From 9104a00773f474c84ac3c2158a1de60ff49896a2 Mon Sep 17 00:00:00 2001 From: philippkraft Date: Wed, 3 Jan 2018 13:48:08 +0100 Subject: [PATCH] Fixed small documentation bug --- cmf/cmf_core.py | 27619 +-- cmf/cmf_core_src/cmf_wrap.cpp | 168245 ++++++++--------- cmf/cmf_core_src/water/simple_connections.h | 4 +- 3 files changed, 97934 insertions(+), 97934 deletions(-) diff --git a/cmf/cmf_core.py b/cmf/cmf_core.py index c39f08ed..31004fe8 100644 --- a/cmf/cmf_core.py +++ b/cmf/cmf_core.py @@ -1,13802 +1,13817 @@ -# This file was automatically generated by SWIG (http://www.swig.org). -# Version 3.0.12 -# -# Do not make changes to this file unless you know what you are doing--modify -# the SWIG interface file instead. - -from sys import version_info as _swig_python_version_info -if _swig_python_version_info >= (3, 0, 0): - new_instancemethod = lambda func, inst, cls: _cmf_core.SWIG_PyInstanceMethod_New(func) -else: - from new import instancemethod as new_instancemethod -if _swig_python_version_info >= (2, 7, 0): - def swig_import_helper(): - import importlib - pkg = __name__.rpartition('.')[0] - mname = '.'.join((pkg, '_cmf_core')).lstrip('.') - try: - return importlib.import_module(mname) - except ImportError: - return importlib.import_module('_cmf_core') - _cmf_core = swig_import_helper() - del swig_import_helper -elif _swig_python_version_info >= (2, 6, 0): - def swig_import_helper(): - from os.path import dirname - import imp - fp = None - try: - fp, pathname, description = imp.find_module('_cmf_core', [dirname(__file__)]) - except ImportError: - import _cmf_core - return _cmf_core - try: - _mod = imp.load_module('_cmf_core', fp, pathname, description) - finally: - if fp is not None: - fp.close() - return _mod - _cmf_core = swig_import_helper() - del swig_import_helper -else: - import _cmf_core -del _swig_python_version_info - -try: - _swig_property = property -except NameError: - pass # Python < 2.2 doesn't have 'property'. - -try: - import builtins as __builtin__ -except ImportError: - import __builtin__ - -def _swig_setattr_nondynamic(self, class_type, name, value, static=1): - if (name == "thisown"): - return self.this.own(value) - if (name == "this"): - if type(value).__name__ == 'SwigPyObject': - self.__dict__[name] = value - return - method = class_type.__swig_setmethods__.get(name, None) - if method: - return method(self, value) - if (not static): - object.__setattr__(self, name, value) - else: - raise AttributeError("You cannot add attributes to %s" % self) - - -def _swig_setattr(self, class_type, name, value): - return _swig_setattr_nondynamic(self, class_type, name, value, 0) - - -def _swig_getattr(self, class_type, name): - if (name == "thisown"): - return self.this.own() - method = class_type.__swig_getmethods__.get(name, None) - if method: - return method(self) - raise AttributeError("'%s' object has no attribute '%s'" % (class_type.__name__, name)) - - -def _swig_repr(self): - try: - strthis = "proxy of " + self.this.__repr__() - except __builtin__.Exception: - strthis = "" - return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,) - - -def _swig_setattr_nondynamic_method(set): - def set_attr(self, name, value): - if (name == "thisown"): - return self.this.own(value) - if hasattr(self, name) or (name == "this"): - set(self, name, value) - else: - raise AttributeError("You cannot add attributes to %s" % self) - return set_attr - - -SHARED_PTR_DISOWN = _cmf_core.SHARED_PTR_DISOWN - -def get_parallel_threads(*args): - """ - get_parallel_threads() -> int - - int - cmf::math::get_parallel_threads() - - Returns the max number of threads used by OpenMP in parallel sections - of the code. - """ - return _cmf_core.get_parallel_threads(*args) - -def set_parallel_threads(*args, **kwargs): - """ - set_parallel_threads(int numthreads) -> int - - int - cmf::math::set_parallel_threads(int numthreads) - - Set the number of threads used by OpenMP in parallel sections of the - code. - """ - return _cmf_core.set_parallel_threads(*args, **kwargs) -class cubicspline(object): - """ - - - Interpolates points with a cubic spline interpolation. - - Code is modified - after:http://ganeshtiwaridotcomdotnp.blogspot.de/2009/12/c-c-code- - cubic- spline-interpolation.html - - C++ includes: spline.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - - def __init__(self, *args, **kwargs): - """ - __init__(cmf::math::cubicspline self, cmf::math::num_array const & x, cmf::math::num_array const & y) -> cubicspline - - cubicspline(const cmf::math::num_array &x, const cmf::math::num_array - &y) - """ - _cmf_core.cubicspline_swiginit(self, _cmf_core.new_cubicspline(*args, **kwargs)) - - def generate(self, *args, **kwargs): - """ - generate(cubicspline self) - - void - generate() - """ - return _cmf_core.cubicspline_generate(self, *args, **kwargs) - - - def size(self, *args, **kwargs): - """ - size(cubicspline self) -> size_t - - size_t size() - const - """ - return _cmf_core.cubicspline_size(self, *args, **kwargs) - - - def __call__(self, *args, **kwargs): - """__call__(cubicspline self, real x) -> real""" - return _cmf_core.cubicspline___call__(self, *args, **kwargs) - - __swig_destroy__ = _cmf_core.delete_cubicspline -cubicspline.generate = new_instancemethod(_cmf_core.cubicspline_generate, None, cubicspline) -cubicspline.size = new_instancemethod(_cmf_core.cubicspline_size, None, cubicspline) -cubicspline.__call__ = new_instancemethod(_cmf_core.cubicspline___call__, None, cubicspline) -cubicspline_swigregister = _cmf_core.cubicspline_swigregister -cubicspline_swigregister(cubicspline) - -class point(object): - """ - - - 2D-Point Class. - - Used as location property anywhere in the text Calculation of - distances - - +,-,-=,*= Operators overloaded - - C++ includes: geometry.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - x = _swig_property(_cmf_core.point_x_get, _cmf_core.point_x_set) - y = _swig_property(_cmf_core.point_y_get, _cmf_core.point_y_set) - z = _swig_property(_cmf_core.point_z_get, _cmf_core.point_z_set) - - def __init__(self, *args): - """ - __init__(cmf::geometry::point self) -> point - __init__(cmf::geometry::point self, point p) -> point - __init__(cmf::geometry::point self, double x_, double y_, double z_=0.0) -> point - - point(double x_, - double y_, double z_=0.0) - - Creates a point from two doubles. - """ - _cmf_core.point_swiginit(self, _cmf_core.new_point(*args)) - - def distanceTo(self, *args, **kwargs): - """ - distanceTo(point self, point p) -> double - - double - distanceTo(point p) const - - Returns the horizontal euclidian distance to another point p. - - :math:`\\sqrt{(this.x-p.x)^2+(this.y-p.y)^2}` - """ - return _cmf_core.point_distanceTo(self, *args, **kwargs) - - - def z_weight_distance(self, *args, **kwargs): - """ - z_weight_distance(point self, point p, double z_weight) -> double - - double z_weight_distance(point p, double z_weight) const - - Returns the horizontal euclidian distance plus the absolute of the - height difference times a factor. - - :math:`\\sqrt{(this.x-p.x)^2+(this.y-p.y)^2}\\ +\\ w_{z}|this.z-p.z|` - - """ - return _cmf_core.point_z_weight_distance(self, *args, **kwargs) - - - def distance3DTo(self, *args, **kwargs): - """ - distance3DTo(point self, point p) -> double - - double - distance3DTo(point p) const - - Returns the euclidian distance in space to another point p. - """ - return _cmf_core.point_distance3DTo(self, *args, **kwargs) - - - def distance(*args, **kwargs): - """distance(point p1, point p2) -> double""" - return _cmf_core.point_distance(*args, **kwargs) - - distance = staticmethod(distance) - - def distance_max(self, *args, **kwargs): - """ - distance_max(point self, point p) -> double - - double - distance_max(point p) const - - Returns the distance by the maximum orthogonal offset. - """ - return _cmf_core.point_distance_max(self, *args, **kwargs) - - - def azimuth(self, *args, **kwargs): - """ - azimuth(point self, point p) -> double - - double - azimuth(point p) const - - Returns the azimuth angle of the line :math:`\\overline{this,p}` to the - Azimuth in degrees. - """ - return _cmf_core.point_azimuth(self, *args, **kwargs) - - - def angleToXAxis(self, *args, **kwargs): - """ - angleToXAxis(point self, point p) -> double - - double - angleToXAxis(point p) const - - Returns the angle between the line :math:`\\overline{this,p}` to the - x-Axis in degrees. - """ - return _cmf_core.point_angleToXAxis(self, *args, **kwargs) - - - def sum(self, *args, **kwargs): - """ - sum(point self) -> double - - double sum() const - - Returns x+y+z. - """ - return _cmf_core.point_sum(self, *args, **kwargs) - - - def length(self, *args, **kwargs): - """ - length(point self) -> double - - double length() - const - """ - return _cmf_core.point_length(self, *args, **kwargs) - - - def __add__(self, *args, **kwargs): - """__add__(point self, point p) -> point""" - return _cmf_core.point___add__(self, *args, **kwargs) - - - def __iadd__(self, *args, **kwargs): - """__iadd__(point self, point left) -> point""" - return _cmf_core.point___iadd__(self, *args, **kwargs) - - - def __sub__(self, *args, **kwargs): - """__sub__(point self, point p) -> point""" - return _cmf_core.point___sub__(self, *args, **kwargs) - - - def __isub__(self, *args, **kwargs): - """__isub__(point self, point left) -> point""" - return _cmf_core.point___isub__(self, *args, **kwargs) - - - def __mul__(self, *args): - """ - __mul__(point self, double left) -> point - __mul__(point self, point p) -> point - """ - return _cmf_core.point___mul__(self, *args) - - - def __imul__(self, *args): - """ - __imul__(point self, double left) -> point - __imul__(point self, point left) -> point - """ - return _cmf_core.point___imul__(self, *args) - - - def __truediv__(self, *args): - return _cmf_core.point___truediv__(self, *args) - __div__ = __truediv__ - - - - def __itruediv__(self, *args): - return _cmf_core.point___itruediv__(self, *args) - __idiv__ = __itruediv__ - - - - def __eq__(self, *args, **kwargs): - """__eq__(point self, point p) -> bool""" - return _cmf_core.point___eq__(self, *args, **kwargs) - - - def __ne__(self, *args, **kwargs): - """__ne__(point self, point p) -> bool""" - return _cmf_core.point___ne__(self, *args, **kwargs) - - - def __len__(self, *args, **kwargs): - """__len__(point self) -> int""" - return _cmf_core.point___len__(self, *args, **kwargs) - - - def __rmul__(self, *args, **kwargs): - """__rmul__(point self, double val) -> point""" - return _cmf_core.point___rmul__(self, *args, **kwargs) - - - def __rdiv__(self, *args, **kwargs): - """__rdiv__(point self, double val) -> point""" - return _cmf_core.point___rdiv__(self, *args, **kwargs) - - - def __getitem__(self,index) : - if isinstance(index,slice): - return [self[i] for i in range(*index.indices(len(self)))] - if index==0 : - return self.x - elif index==1 : - return self.y - elif index==2 : - return self.z - else : - raise IndexError("Only Index 0 .. 2 are allowed") - def __setitem__(self,index,value) : - if index==0 : - self.x=value - elif index==1 : - self.y=value - elif index==2 : - self.z=value - else : - raise IndexError("Only Index 0 .. 2 are allowed") - def __iter__(self): - yield self.x - yield self.y - yield self.z - def __repr__(self): - return 'cmf.point(%g,%g,%g)' % (self.x,self.y,self.z) - - __swig_destroy__ = _cmf_core.delete_point -point.distanceTo = new_instancemethod(_cmf_core.point_distanceTo, None, point) -point.z_weight_distance = new_instancemethod(_cmf_core.point_z_weight_distance, None, point) -point.distance3DTo = new_instancemethod(_cmf_core.point_distance3DTo, None, point) -point.distance_max = new_instancemethod(_cmf_core.point_distance_max, None, point) -point.azimuth = new_instancemethod(_cmf_core.point_azimuth, None, point) -point.angleToXAxis = new_instancemethod(_cmf_core.point_angleToXAxis, None, point) -point.sum = new_instancemethod(_cmf_core.point_sum, None, point) -point.length = new_instancemethod(_cmf_core.point_length, None, point) -point.__add__ = new_instancemethod(_cmf_core.point___add__, None, point) -point.__iadd__ = new_instancemethod(_cmf_core.point___iadd__, None, point) -point.__sub__ = new_instancemethod(_cmf_core.point___sub__, None, point) -point.__isub__ = new_instancemethod(_cmf_core.point___isub__, None, point) -point.__mul__ = new_instancemethod(_cmf_core.point___mul__, None, point) -point.__imul__ = new_instancemethod(_cmf_core.point___imul__, None, point) -point.__eq__ = new_instancemethod(_cmf_core.point___eq__, None, point) -point.__ne__ = new_instancemethod(_cmf_core.point___ne__, None, point) -point.__len__ = new_instancemethod(_cmf_core.point___len__, None, point) -point.__rmul__ = new_instancemethod(_cmf_core.point___rmul__, None, point) -point.__rdiv__ = new_instancemethod(_cmf_core.point___rdiv__, None, point) -point_swigregister = _cmf_core.point_swigregister -point_swigregister(point) -cvar = _cmf_core.cvar -PI = cvar.PI - -def point_distance(*args, **kwargs): - """point_distance(point p1, point p2) -> double""" - return _cmf_core.point_distance(*args, **kwargs) - - -def dot(*args, **kwargs): - """ - dot(point p1, point p2) -> double - - double - cmf::geometry::dot(const point &p1, const point &p2) - """ - return _cmf_core.dot(*args, **kwargs) - -def distance(*args, **kwargs): - """ - distance(point p1, point p2) -> double - - double - cmf::geometry::distance(const point &p1, const point &p2) - """ - return _cmf_core.distance(*args, **kwargs) -class point_vector(object): - """ - - - Holds three arrays x,y and z for fast access of point coordinates. - - C++ includes: geometry.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - X = _swig_property(_cmf_core.point_vector_X_get, _cmf_core.point_vector_X_set) - Y = _swig_property(_cmf_core.point_vector_Y_get, _cmf_core.point_vector_Y_set) - Z = _swig_property(_cmf_core.point_vector_Z_get, _cmf_core.point_vector_Z_set) - - def __init__(self, *args, **kwargs): - """ - __init__(cmf::geometry::point_vector self, ptrdiff_t size) -> point_vector - - point_vector(ptrdiff_t size) - - Create a point vector of a specific size. - """ - _cmf_core.point_vector_swiginit(self, _cmf_core.new_point_vector(*args, **kwargs)) - - def get(self, *args, **kwargs): - """ - get(point_vector self, ptrdiff_t index) -> point - - point - get(ptrdiff_t index) const - - Return a point at index. - """ - return _cmf_core.point_vector_get(self, *args, **kwargs) - - - def set(self, *args, **kwargs): - """ - set(point_vector self, ptrdiff_t index, point p) - - void - set(ptrdiff_t index, cmf::geometry::point p) - - Change the point at index. - """ - return _cmf_core.point_vector_set(self, *args, **kwargs) - - - def size(self, *args, **kwargs): - """ - size(point_vector self) -> size_t - - size_t - size() const - - Return the number of points in the point_vector. - """ - return _cmf_core.point_vector_size(self, *args, **kwargs) - - __swig_destroy__ = _cmf_core.delete_point_vector -point_vector.get = new_instancemethod(_cmf_core.point_vector_get, None, point_vector) -point_vector.set = new_instancemethod(_cmf_core.point_vector_set, None, point_vector) -point_vector.size = new_instancemethod(_cmf_core.point_vector_size, None, point_vector) -point_vector_swigregister = _cmf_core.point_vector_swigregister -point_vector_swigregister(point_vector) - - -import datetime -import struct - - -def minimum(*args, **kwargs): - """ - minimum(real a, real b) -> real - - real minimum(real a, real b) - - Returns the minimum of two values. - """ - return _cmf_core.minimum(*args, **kwargs) - -def maximum(*args, **kwargs): - """ - maximum(real a, real b) -> real - - real maximum(real a, real b) - """ - return _cmf_core.maximum(*args, **kwargs) - -def minmax(*args, **kwargs): - """ - minmax(real x, real min, real max) -> real - - real minmax(real x, real min, real - max) - """ - return _cmf_core.minmax(*args, **kwargs) - -def mean(*args, **kwargs): - """ - mean(real a, real b) -> real - - real mean(real a, real b) - """ - return _cmf_core.mean(*args, **kwargs) - -def geo_mean(*args, **kwargs): - """ - geo_mean(real a, real b) -> real - - real geo_mean(real a, real b) - """ - return _cmf_core.geo_mean(*args, **kwargs) - -def harmonic_mean(*args, **kwargs): - """ - harmonic_mean(real a, real b) -> real - - real harmonic_mean(real a, real - b) - """ - return _cmf_core.harmonic_mean(*args, **kwargs) - -def piecewise_linear(*args, **kwargs): - """ - piecewise_linear(real x, real xmin, real xmax, real ymin=0, real ymax=1) -> real - - real piecewise_linear(real - x, real xmin, real xmax, real ymin=0, real ymax=1) - """ - return _cmf_core.piecewise_linear(*args, **kwargs) - -def boltzmann(*args, **kwargs): - """ - boltzmann(real x, real x_half, real tau) -> real - - real boltzmann(real x, real x_half, - real tau) - - The boltzmann function, used in cmf at several places where a s-shaped - curve is needed. - - - - .. math:: - - f(x,x_{1/2},\\tau)=\\frac{1}{1+e^{-\\frac{x-x_{1/2}}{tau}}} - - - """ - return _cmf_core.boltzmann(*args, **kwargs) - -def sign(*args, **kwargs): - """ - sign(real x) -> real - - real sign(real x) - """ - return _cmf_core.sign(*args, **kwargs) - -def square(*args, **kwargs): - """ - square(real x) -> real - - real square(real x) - """ - return _cmf_core.square(*args, **kwargs) -JULIANDAY_0_1_1900 = _cmf_core.JULIANDAY_0_1_1900 -class Time(object): - """ - - - A time class, used to pass around current modelling times. - - Timespans and dates in cmf are used with a special object, called - Time. An extra class has the advantage, that the user does not have to - remember, which unit of time he or she uses or what time unit is - accepted by a specific function of the model. Arithmetic and boolean - operators are supported by Time. Internally the time classes stores - the time as integer milliseconds, therefore rounding issues will only - appear at very small time ranges. Absolute time (like dates) are - represented as milliseconds gone by from Dec, 31st 1899. Microsoft - Excel dates are represented as days from that time, using floating - point numbers, therefore it is very simple to convert Excel time - representations to cmf time. - - Another object is Date, which is doesn't provide the operators, but - has a nice printed version and some special date functions, like day - of year (DOY) and provides access to the current hour of day and so - on, which only applyto dates and not to time spans. You can convert - Time to Date an vice versa. The printing is not culture aware and uses - the European representation. If you use the Python standard library - datetime, conversion between Python time and cmf time is possible - - Creating absolute time values (dates) Creating time spans - - In principle, there are three ways to create time spans. One is to use - one of the static functions, another is to multiply an existing time - span (like one of the build in constants) or to substrate two absolute - times. - - Available constants : 4.1 seconds - - : 2.3 hours (138 min) - - : 2.3 hours (138 min) - - : 60 hours (2.5 days) - - : 7 days - - : 365/12 days (30.4167 days) - - : 365 days - - Available operators: - - time + time = time, time - time = time - - time * float = time ,time / float = time - - time/time=float - - >, <, ==, != - - Conversions - - Converting to python datetime - - Converting to numbers - - t.AsMilliseconds() - - t.AsSeconds() - - t.AsMinutes() - - t.AsHours() - - t.AsDays() - - t.AsYears() - - Creating time ranges - - C++ includes: time.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - ms_per_day = _cmf_core.Time_ms_per_day - - def __init__(self, *args): - """ - __init__(cmf::math::Time self, int day, int month, int year, int hour=0, int minute=0, int second=0, int ms=0) -> Time - __init__(cmf::math::Time self, Date date) -> Time - __init__(cmf::math::Time self, Time t) -> Time - __init__(cmf::math::Time self) -> Time - - Time(long long ms) - """ - _cmf_core.Time_swiginit(self, _cmf_core.new_Time(*args)) - - def AsDays(self, *args, **kwargs): - """ - AsDays(Time self) -> double - - double AsDays() const - - Time in days. - """ - return _cmf_core.Time_AsDays(self, *args, **kwargs) - - - def AsHours(self, *args, **kwargs): - """ - AsHours(Time self) -> double - - double AsHours() - const - - Time in hours. - """ - return _cmf_core.Time_AsHours(self, *args, **kwargs) - - - def AsMinutes(self, *args, **kwargs): - """ - AsMinutes(Time self) -> double - - double AsMinutes() - const - - Time in minutes. - """ - return _cmf_core.Time_AsMinutes(self, *args, **kwargs) - - - def AsSeconds(self, *args, **kwargs): - """ - AsSeconds(Time self) -> double - - double AsSeconds() - const - - Time in seconds. - """ - return _cmf_core.Time_AsSeconds(self, *args, **kwargs) - - - def AsMilliseconds(self, *args, **kwargs): - """ - AsMilliseconds(Time self) -> long long - - long long - AsMilliseconds() const - - Time in milliseconds. - """ - return _cmf_core.Time_AsMilliseconds(self, *args, **kwargs) - - - def AsDate(self, *args, **kwargs): - """ - AsDate(Time self) -> Date - - Date AsDate() const - - """ - return _cmf_core.Time_AsDate(self, *args, **kwargs) - - - def to_string(self, *args, **kwargs): - """ - to_string(Time self, char seperator) -> std::string - - std::string - to_string(char seperator=':') - """ - return _cmf_core.Time_to_string(self, *args, **kwargs) - - - def is_not_0(self, *args, **kwargs): - """ - is_not_0(Time self) -> bool - - bool is_not_0() - const - """ - return _cmf_core.Time_is_not_0(self, *args, **kwargs) - - - def DOY(self, *args, **kwargs): - """ - DOY(Time self) -> double - - double DOY() const - """ - return _cmf_core.Time_DOY(self, *args, **kwargs) - - - def __add__(self, *args, **kwargs): - """__add__(Time self, Time t1) -> Time""" - return _cmf_core.Time___add__(self, *args, **kwargs) - - - def __sub__(self, *args, **kwargs): - """__sub__(Time self, Time t1) -> Time""" - return _cmf_core.Time___sub__(self, *args, **kwargs) - - - def __iadd__(self, *args, **kwargs): - """__iadd__(Time self, Time t1) -> Time""" - return _cmf_core.Time___iadd__(self, *args, **kwargs) - - - def __isub__(self, *args, **kwargs): - """__isub__(Time self, Time t1) -> Time""" - return _cmf_core.Time___isub__(self, *args, **kwargs) - - - def __mod__(self, *args, **kwargs): - """__mod__(Time self, Time t1) -> Time""" - return _cmf_core.Time___mod__(self, *args, **kwargs) - - - def __mul__(self, *args): - """ - __mul__(Time self, double x) -> Time - __mul__(Time self, long long x) -> Time - __mul__(Time self, int x) -> Time - """ - return _cmf_core.Time___mul__(self, *args) - - - def __imul__(self, *args): - """ - __imul__(Time self, double x) -> Time - __imul__(Time self, long long x) -> Time - __imul__(Time self, int x) -> Time - """ - return _cmf_core.Time___imul__(self, *args) - - - def __itruediv__(self, *args): - return _cmf_core.Time___itruediv__(self, *args) - __idiv__ = __itruediv__ - - - - def __imod__(self, *args, **kwargs): - """__imod__(Time self, Time t1) -> Time""" - return _cmf_core.Time___imod__(self, *args, **kwargs) - - - def __truediv__(self, *args): - return _cmf_core.Time___truediv__(self, *args) - __div__ = __truediv__ - - - - def times_in(self, *args, **kwargs): - """ - times_in(Time self, Time t1) -> long long - - long long - times_in(const Time &t1) const - - Returns the number of times this is included in t1. - """ - return _cmf_core.Time_times_in(self, *args, **kwargs) - - - def __lt__(self, *args, **kwargs): - """__lt__(Time self, Time t1) -> bool""" - return _cmf_core.Time___lt__(self, *args, **kwargs) - - - def __gt__(self, *args, **kwargs): - """__gt__(Time self, Time t1) -> bool""" - return _cmf_core.Time___gt__(self, *args, **kwargs) - - - def __le__(self, *args, **kwargs): - """__le__(Time self, Time t1) -> bool""" - return _cmf_core.Time___le__(self, *args, **kwargs) - - - def __ge__(self, *args, **kwargs): - """__ge__(Time self, Time t1) -> bool""" - return _cmf_core.Time___ge__(self, *args, **kwargs) - - - def __eq__(self, *args, **kwargs): - """__eq__(Time self, Time t1) -> bool""" - return _cmf_core.Time___eq__(self, *args, **kwargs) - - - def __ne__(self, *args, **kwargs): - """__ne__(Time self, Time t1) -> bool""" - return _cmf_core.Time___ne__(self, *args, **kwargs) - - - def __repr__(self): - if self>year*40: - return self.AsDate().to_string() - else: - return self.to_string() - def __nonzero__(self): - return self.is_not_0() - def __rmul__(self,other): - return self*other - def __radd__(self,other): - return self + other - def AsPython(self): - d=self.AsDate() - return datetime.datetime(d.year,d.month,d.day,d.hour,d.minute,d.second,d.ms*1000) - year = property(lambda self: self.AsDate().year) - month = property(lambda self: self.AsDate().month) - day = property(lambda self: self.AsDate().day) - hour = property(lambda self: self.AsDate().hour) - minute = property(lambda self: self.AsDate().minute) - second = property(lambda self: self.AsDate().second) - ms = property(lambda self: self.AsDate().ms) - - __swig_destroy__ = _cmf_core.delete_Time -Time.AsDays = new_instancemethod(_cmf_core.Time_AsDays, None, Time) -Time.AsHours = new_instancemethod(_cmf_core.Time_AsHours, None, Time) -Time.AsMinutes = new_instancemethod(_cmf_core.Time_AsMinutes, None, Time) -Time.AsSeconds = new_instancemethod(_cmf_core.Time_AsSeconds, None, Time) -Time.AsMilliseconds = new_instancemethod(_cmf_core.Time_AsMilliseconds, None, Time) -Time.AsDate = new_instancemethod(_cmf_core.Time_AsDate, None, Time) -Time.to_string = new_instancemethod(_cmf_core.Time_to_string, None, Time) -Time.is_not_0 = new_instancemethod(_cmf_core.Time_is_not_0, None, Time) -Time.DOY = new_instancemethod(_cmf_core.Time_DOY, None, Time) -Time.__add__ = new_instancemethod(_cmf_core.Time___add__, None, Time) -Time.__sub__ = new_instancemethod(_cmf_core.Time___sub__, None, Time) -Time.__iadd__ = new_instancemethod(_cmf_core.Time___iadd__, None, Time) -Time.__isub__ = new_instancemethod(_cmf_core.Time___isub__, None, Time) -Time.__mod__ = new_instancemethod(_cmf_core.Time___mod__, None, Time) -Time.__mul__ = new_instancemethod(_cmf_core.Time___mul__, None, Time) -Time.__imul__ = new_instancemethod(_cmf_core.Time___imul__, None, Time) -Time.__imod__ = new_instancemethod(_cmf_core.Time___imod__, None, Time) -Time.times_in = new_instancemethod(_cmf_core.Time_times_in, None, Time) -Time.__lt__ = new_instancemethod(_cmf_core.Time___lt__, None, Time) -Time.__gt__ = new_instancemethod(_cmf_core.Time___gt__, None, Time) -Time.__le__ = new_instancemethod(_cmf_core.Time___le__, None, Time) -Time.__ge__ = new_instancemethod(_cmf_core.Time___ge__, None, Time) -Time.__eq__ = new_instancemethod(_cmf_core.Time___eq__, None, Time) -Time.__ne__ = new_instancemethod(_cmf_core.Time___ne__, None, Time) -Time_swigregister = _cmf_core.Time_swigregister -Time_swigregister(Time) -Debug = cvar.Debug -__compiledate__ = cvar.__compiledate__ -Pi = cvar.Pi - -class Date(object): - """ - - - An absolute time, not for calculation. Date and Time are - interchangable. - - C++ includes: time.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - year = _swig_property(_cmf_core.Date_year_get, _cmf_core.Date_year_set) - month = _swig_property(_cmf_core.Date_month_get, _cmf_core.Date_month_set) - day = _swig_property(_cmf_core.Date_day_get, _cmf_core.Date_day_set) - hour = _swig_property(_cmf_core.Date_hour_get, _cmf_core.Date_hour_set) - minute = _swig_property(_cmf_core.Date_minute_get, _cmf_core.Date_minute_set) - second = _swig_property(_cmf_core.Date_second_get, _cmf_core.Date_second_set) - ms = _swig_property(_cmf_core.Date_ms_get, _cmf_core.Date_ms_set) - - def __init__(self, *args): - """ - __init__(cmf::math::Date self, int _day, int _month, int _year, int _hour=0, int _minute=0, int _second=0, int _ms=0) -> Date - __init__(cmf::math::Date self, Time time) -> Date - - Date(const Time &time) - - Creates a new date from time (based on the 31.12.1899, like in - Excel(TM)) - """ - _cmf_core.Date_swiginit(self, _cmf_core.new_Date(*args)) - - def ToTime(self, *args, **kwargs): - """ - ToTime(Date self) -> Time - - Time ToTime() - - Converts a date to Time (based on the 31.12.1899, like in Excel(TM) - """ - return _cmf_core.Date_ToTime(self, *args, **kwargs) - - - def DOY(self, *args, **kwargs): - """ - DOY(Date self) -> double - - double DOY() - - Returns the day of year. - """ - return _cmf_core.Date_DOY(self, *args, **kwargs) - - - def to_string(self, *args, **kwargs): - """ - to_string(Date self) -> std::string - - std::string - to_string() - - Returns a string representing the date. - """ - return _cmf_core.Date_to_string(self, *args, **kwargs) - - - def __repr__(self): - return self.to_string() - def AsPython(self): - return datetime.datetime(self.year,self.month,self.day,self.hour,self.minute,self.second,self.ms*1000) - - __swig_destroy__ = _cmf_core.delete_Date -Date.ToTime = new_instancemethod(_cmf_core.Date_ToTime, None, Date) -Date.DOY = new_instancemethod(_cmf_core.Date_DOY, None, Date) -Date.to_string = new_instancemethod(_cmf_core.Date_to_string, None, Date) -Date_swigregister = _cmf_core.Date_swigregister -Date_swigregister(Date) - -class timeseries(object): - """ - - - A timeseries is a list of values, equally distributed over time. - - To create one, one have to provide as start date and a step size. The - end time is calculated from the number of values. Values queried for - times before the start time are returned as the first item, values - after the end time equal the last item. A timeseries with only one - item reacts like a scalar value. - - Creating a time series - - With this technique it is simple to read files or databases to fill - timeseries. Using a timeseries - - C++ includes: timeseries.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - - def interpolationpower(self, *args, **kwargs): - """ - interpolationpower(timeseries self) -> int - - int - interpolationpower() const - - Method for the interpolation (0 - Nearest neighbor, 1- linear, 2 - - cubic spline (not implemented yet) - """ - return _cmf_core.timeseries_interpolationpower(self, *args, **kwargs) - - - def add(self, *args, **kwargs): - """ - add(timeseries self, double Value) - - void add(double - Value) - - Appends a measurement. - """ - return _cmf_core.timeseries_add(self, *args, **kwargs) - - - def is_empty(self, *args, **kwargs): - """ - is_empty(timeseries self) -> bool - - bool - is_empty() const - - returns true if no values are added to the timeseries - """ - return _cmf_core.timeseries_is_empty(self, *args, **kwargs) - - - def clear(self, *args, **kwargs): - """ - clear(timeseries self) - - void clear() - """ - return _cmf_core.timeseries_clear(self, *args, **kwargs) - - - def adress(self, *args, **kwargs): - """ - adress(timeseries self) -> size_t - - size_t adress() - const - """ - return _cmf_core.timeseries_adress(self, *args, **kwargs) - - - def copy(self, *args, **kwargs): - """ - copy(timeseries self) -> timeseries - - timeseries copy() - const - """ - return _cmf_core.timeseries_copy(self, *args, **kwargs) - - - def size(self, *args, **kwargs): - """ - size(timeseries self) -> size_t - - size_t size() - const - - Number of items in the timeseries. - """ - return _cmf_core.timeseries_size(self, *args, **kwargs) - - - def count_values(self, *args, **kwargs): - """ - count_values(timeseries self) -> size_t - - size_t - count_values() const - - Number of valid values (=size - # of NaN's) - """ - return _cmf_core.timeseries_count_values(self, *args, **kwargs) - - - def __init__(self, *args, **kwargs): - """ - __init__(cmf::math::timeseries self, Time begin, Time step, int interpolationmethod=1, size_t count=0) -> timeseries - - timeseries(const cmf::math::timeseries &ts) - """ - _cmf_core.timeseries_swiginit(self, _cmf_core.new_timeseries(*args, **kwargs)) - - def from_array(*args, **kwargs): - """from_array(Time begin, Time step, cmf::math::num_array const & data) -> timeseries""" - return _cmf_core.timeseries_from_array(*args, **kwargs) - - from_array = staticmethod(from_array) - - def from_scalar(*args, **kwargs): - """from_scalar(double scalar) -> timeseries""" - return _cmf_core.timeseries_from_scalar(*args, **kwargs) - - from_scalar = staticmethod(from_scalar) - - def from_file(*args, **kwargs): - """from_file(std::string filename) -> timeseries""" - return _cmf_core.timeseries_from_file(*args, **kwargs) - - from_file = staticmethod(from_file) - - def get_t(self, *args, **kwargs): - """ - get_t(timeseries self, Time t) -> double - - double - get_t(cmf::math::Time t) const - """ - return _cmf_core.timeseries_get_t(self, *args, **kwargs) - - - def get_i(self, *args, **kwargs): - """ - get_i(timeseries self, ptrdiff_t i) -> double - - double - get_i(ptrdiff_t i) const - """ - return _cmf_core.timeseries_get_i(self, *args, **kwargs) - - - def set_t(self, *args, **kwargs): - """ - set_t(timeseries self, Time t, double value) - - void - set_t(cmf::math::Time t, double value) - """ - return _cmf_core.timeseries_set_t(self, *args, **kwargs) - - - def set_i(self, *args, **kwargs): - """ - set_i(timeseries self, ptrdiff_t i, double value) - - void - set_i(ptrdiff_t i, double value) - """ - return _cmf_core.timeseries_set_i(self, *args, **kwargs) - - - def get_slice(self, *args): - """ - get_slice(timeseries self, Time _begin, Time _end, Time _step) -> timeseries - get_slice(timeseries self, ptrdiff_t _begin, ptrdiff_t _end, ptrdiff_t step=1) -> timeseries - - cmf::math::timeseries get_slice(ptrdiff_t _begin, ptrdiff_t _end, - ptrdiff_t step=1) - """ - return _cmf_core.timeseries_get_slice(self, *args) - - - def set_slice(self, *args): - """ - set_slice(timeseries self, Time _begin, Time _end, timeseries values) - set_slice(timeseries self, ptrdiff_t _begin, ptrdiff_t _end, timeseries _values) - - void - set_slice(ptrdiff_t _begin, ptrdiff_t _end, cmf::math::timeseries - _values) - """ - return _cmf_core.timeseries_set_slice(self, *args) - - - def remove_nodata(self, *args, **kwargs): - """ - remove_nodata(timeseries self, double nodata_value) - - void - remove_nodata(double nodata_value) - """ - return _cmf_core.timeseries_remove_nodata(self, *args, **kwargs) - - - def __iadd__(self, *args): - """ - __iadd__(timeseries self, timeseries arg2) -> timeseries - __iadd__(timeseries self, double arg2) -> timeseries - """ - return _cmf_core.timeseries___iadd__(self, *args) - - - def __isub__(self, *args): - """ - __isub__(timeseries self, timeseries arg2) -> timeseries - __isub__(timeseries self, double arg2) -> timeseries - """ - return _cmf_core.timeseries___isub__(self, *args) - - - def __imul__(self, *args): - """ - __imul__(timeseries self, timeseries arg2) -> timeseries - __imul__(timeseries self, double arg2) -> timeseries - """ - return _cmf_core.timeseries___imul__(self, *args) - - - def __itruediv__(self, *args): - return _cmf_core.timeseries___itruediv__(self, *args) - __idiv__ = __itruediv__ - - - - def __add__(self, *args): - """ - __add__(timeseries self, timeseries arg2) -> timeseries - __add__(timeseries self, double arg2) -> timeseries - """ - return _cmf_core.timeseries___add__(self, *args) - - - def __sub__(self, *args): - """ - __sub__(timeseries self, timeseries arg2) -> timeseries - __sub__(timeseries self, double arg2) -> timeseries - """ - return _cmf_core.timeseries___sub__(self, *args) - - - def __mul__(self, *args): - """ - __mul__(timeseries self, timeseries arg2) -> timeseries - __mul__(timeseries self, double arg2) -> timeseries - """ - return _cmf_core.timeseries___mul__(self, *args) - - - def __truediv__(self, *args): - return _cmf_core.timeseries___truediv__(self, *args) - __div__ = __truediv__ - - - - def __neg__(self, *args, **kwargs): - """__neg__(timeseries self) -> timeseries""" - return _cmf_core.timeseries___neg__(self, *args, **kwargs) - - - def inv(self, *args, **kwargs): - """ - inv(timeseries self) -> timeseries - - timeseries inv() - const - """ - return _cmf_core.timeseries_inv(self, *args, **kwargs) - - - def reduce_min(self, *args, **kwargs): - """ - reduce_min(timeseries self, Time begin, Time step) -> timeseries - - timeseries - reduce_min(cmf::math::Time begin, cmf::math::Time step) const - - Creates a timeseries with a bigger timestep, containing the minimum. - - """ - return _cmf_core.timeseries_reduce_min(self, *args, **kwargs) - - - def reduce_max(self, *args, **kwargs): - """ - reduce_max(timeseries self, Time begin, Time step) -> timeseries - - timeseries - reduce_max(cmf::math::Time begin, cmf::math::Time step) const - - Creates a timeseries with a bigger timestep, containing the maximum. - - """ - return _cmf_core.timeseries_reduce_max(self, *args, **kwargs) - - - def reduce_sum(self, *args, **kwargs): - """ - reduce_sum(timeseries self, Time begin, Time step) -> timeseries - - timeseries - reduce_sum(cmf::math::Time begin, cmf::math::Time step) const - - Creates a timeseries with a bigger timestep, containing the sum. - """ - return _cmf_core.timeseries_reduce_sum(self, *args, **kwargs) - - - def reduce_avg(self, *args, **kwargs): - """ - reduce_avg(timeseries self, Time begin, Time step) -> timeseries - - timeseries - reduce_avg(cmf::math::Time begin, cmf::math::Time step) const - - Creates a timeseries with a bigger timestep, containing the average. - - """ - return _cmf_core.timeseries_reduce_avg(self, *args, **kwargs) - - - def floating_avg(self, *args): - """ - floating_avg(timeseries self, Time window_width) -> timeseries - floating_avg(timeseries self, size_t window_size) -> timeseries - - timeseries floating_avg(size_t window_size) const - """ - return _cmf_core.timeseries_floating_avg(self, *args) - - - def floating_max(self, *args, **kwargs): - """ - floating_max(timeseries self, Time window_width) -> timeseries - - timeseries floating_max(cmf::math::Time window_width) const - """ - return _cmf_core.timeseries_floating_max(self, *args, **kwargs) - - - def floating_min(self, *args, **kwargs): - """ - floating_min(timeseries self, Time window_width) -> timeseries - - timeseries floating_min(cmf::math::Time window_width) const - """ - return _cmf_core.timeseries_floating_min(self, *args, **kwargs) - - - def mean(self, *args, **kwargs): - """ - mean(timeseries self) -> double - - double mean() - const - """ - return _cmf_core.timeseries_mean(self, *args, **kwargs) - - - def min(self, *args, **kwargs): - """ - min(timeseries self) -> double - - double min() const - - """ - return _cmf_core.timeseries_min(self, *args, **kwargs) - - - def max(self, *args, **kwargs): - """ - max(timeseries self) -> double - - double max() const - - """ - return _cmf_core.timeseries_max(self, *args, **kwargs) - - - def log(self, *args, **kwargs): - """ - log(timeseries self) -> timeseries - - timeseries log() - const - """ - return _cmf_core.timeseries_log(self, *args, **kwargs) - - - def log10(self, *args, **kwargs): - """ - log10(timeseries self) -> timeseries - - timeseries - log10() const - """ - return _cmf_core.timeseries_log10(self, *args, **kwargs) - - - def power(self, *args, **kwargs): - """ - power(timeseries self, double exponent) -> timeseries - - timeseries - power(double exponent) const - """ - return _cmf_core.timeseries_power(self, *args, **kwargs) - - - def exp(self, *args, **kwargs): - """ - exp(timeseries self) -> timeseries - - timeseries exp() - const - """ - return _cmf_core.timeseries_exp(self, *args, **kwargs) - - begin = _swig_property(_cmf_core.timeseries_begin_get) - step = _swig_property(_cmf_core.timeseries_step_get) - end = _swig_property(_cmf_core.timeseries_end_get) - - def __len__(self, *args, **kwargs): - """__len__(timeseries self) -> ptrdiff_t""" - return _cmf_core.timeseries___len__(self, *args, **kwargs) - - - def __repr__(self): - return "cmf.timeseries(%s:%s:%s,count=%i)" % (self.begin,self.end,self.step,self.size()) - def extend(self,list) : - """ Adds the values of a sequence to the timeseries""" - for item in list : - self.add(float(item)) - def __getitem__(self,index): - if isinstance(index,int): - return self.get_i(index) - elif isinstance(index,slice): - if index.step: - return self.get_slice(index.start,index.stop,index.step) - else: - return self.get_slice(index.start,index.stop) - else: - return self.get_t(index) - def __setitem__(self,index,value): - if isinstance(index,int): - self.set_i(index,value) - elif isinstance(index,slice): - if index.step: - raise ValueError("Slices must be continous, when used for setting") - else: - if not isinstance(value,timeseries): - value=timeseries(value) - self.set_slice(index.start,index.stop,value) - else: - self.set_t(index,value) - def __iter__(self): - for i in xrange(self.size()): - yield self.get_i(i) - def interpolate(self,begin,end,step): - """ Returns a generator returning the interpolated values at the timesteps """ - if step>self.step(): - ts=self.reduce_avg(begin,step) - else: - ts=self - for t in timerange(step,end,step): - yield ts[t] - def __radd__(self,other): - return self + other; - def __rmul__(self,other): - return self + other; - def __rsub__(self,other): - res=-self - res+=other - return res - def __rdiv__(self,other): - res=self.inv() - res*=other - return res - def iter_time(self, as_float=0): - """Returns an iterator to iterate over each timestep - as_float if True, the timesteps will returned as floating point numbers representing the days after 1.1.0001 00:00 - """ - for i in xrange(len(self)): - if as_float: - yield ((self.begin + self.step * i) - cmf.Time(1,1,1)).AsDays() - else: - yield self.begin + self.step * i - def to_buffer(self): - """Returns a binary buffer filled with the data of self""" - return struct.pack('qqqq%id' % self.size(),self.begin.AsMilliseconds(),self.step.AsMilliseconds(),self.interpolationpower(), *self) - def to_file(self,f): - """ Saves a timeseries in a special binary format. - The format consists of 4 integers with 64 bit, indicating the milliseconds after the 31.12.1899 00:00 of the beginning of the timeseries, the milliseconds of the time step, - the interpolation power and the number of values. The following 64 bit floats, are the values of the timeseries - """ - if isinstance(f,str): - f=open(f,'wb') - elif not hasattr(f,'write'): - raise TypeError("The file f must be either an object providing a write method, like a file, or a valid file name") - f.write(struct.pack('qqqq%id' % self.size(), self.size(), self.begin.AsMilliseconds(),self.step.AsMilliseconds(),self.interpolationpower(), *self)) - def to_pandas(self): - """ - Returns the timeseries as a pandas Series object - :return: A pandas.Series object with the timesteps as index - """ - import pandas as pd - import numpy as np - - return pd.Series(data=np.array(self),index=(t.AsPython() for t in self.iter_time())) - - @classmethod - def from_sequence(cls,begin,step,sequence=[],interpolation_mode=1): - res=cls(begin,step,interpolation_mode) - res.extend(sequence) - return res - - @classmethod - def from_buffer(cls,buf): - header_length=struct.calcsize('qqqq') - header=struct.unpack('qqqq',buffer[:header_length]) - res=cls(header[1]*ms,header[2]*ms,header[3]) - res.extend(struct.unpack('%id' % header[0],*buffer(buf,header_length,header[0]*8))) - return res - @classmethod - def from_file(cls,f): - """ Loads a timeseries saved with to_file from a file - Description of the file layout: - byte: - 0 Number of (int64) - 8 Begin of timeseries (in ms since 31.12.1899 00:00) (int64) - 16 Step size of timeseries (in ms) (int64) - 24 Interpolation power (int64) - 32 First value of timeseries (float64) - """ - if isinstance(f,str): - f=open(f,'rb') - elif not hasattr(f,'read'): - raise TypeError("The file f must either implement a 'read' method, like a file, or must be a vild file name") - header_length=struct.calcsize('qqqq') - header=struct.unpack('qqqq',f.read(header_length)) - res=cls(header[1]*ms,header[2]*ms,header[3]) - res.extend(struct.unpack('%id' % header[0],f.read(-1))) - return res - - __swig_destroy__ = _cmf_core.delete_timeseries -timeseries.interpolationpower = new_instancemethod(_cmf_core.timeseries_interpolationpower, None, timeseries) -timeseries.add = new_instancemethod(_cmf_core.timeseries_add, None, timeseries) -timeseries.is_empty = new_instancemethod(_cmf_core.timeseries_is_empty, None, timeseries) -timeseries.clear = new_instancemethod(_cmf_core.timeseries_clear, None, timeseries) -timeseries.adress = new_instancemethod(_cmf_core.timeseries_adress, None, timeseries) -timeseries.copy = new_instancemethod(_cmf_core.timeseries_copy, None, timeseries) -timeseries.size = new_instancemethod(_cmf_core.timeseries_size, None, timeseries) -timeseries.count_values = new_instancemethod(_cmf_core.timeseries_count_values, None, timeseries) -timeseries.get_t = new_instancemethod(_cmf_core.timeseries_get_t, None, timeseries) -timeseries.get_i = new_instancemethod(_cmf_core.timeseries_get_i, None, timeseries) -timeseries.set_t = new_instancemethod(_cmf_core.timeseries_set_t, None, timeseries) -timeseries.set_i = new_instancemethod(_cmf_core.timeseries_set_i, None, timeseries) -timeseries.get_slice = new_instancemethod(_cmf_core.timeseries_get_slice, None, timeseries) -timeseries.set_slice = new_instancemethod(_cmf_core.timeseries_set_slice, None, timeseries) -timeseries.remove_nodata = new_instancemethod(_cmf_core.timeseries_remove_nodata, None, timeseries) -timeseries.__iadd__ = new_instancemethod(_cmf_core.timeseries___iadd__, None, timeseries) -timeseries.__isub__ = new_instancemethod(_cmf_core.timeseries___isub__, None, timeseries) -timeseries.__imul__ = new_instancemethod(_cmf_core.timeseries___imul__, None, timeseries) -timeseries.__add__ = new_instancemethod(_cmf_core.timeseries___add__, None, timeseries) -timeseries.__sub__ = new_instancemethod(_cmf_core.timeseries___sub__, None, timeseries) -timeseries.__mul__ = new_instancemethod(_cmf_core.timeseries___mul__, None, timeseries) -timeseries.__neg__ = new_instancemethod(_cmf_core.timeseries___neg__, None, timeseries) -timeseries.inv = new_instancemethod(_cmf_core.timeseries_inv, None, timeseries) -timeseries.reduce_min = new_instancemethod(_cmf_core.timeseries_reduce_min, None, timeseries) -timeseries.reduce_max = new_instancemethod(_cmf_core.timeseries_reduce_max, None, timeseries) -timeseries.reduce_sum = new_instancemethod(_cmf_core.timeseries_reduce_sum, None, timeseries) -timeseries.reduce_avg = new_instancemethod(_cmf_core.timeseries_reduce_avg, None, timeseries) -timeseries.floating_avg = new_instancemethod(_cmf_core.timeseries_floating_avg, None, timeseries) -timeseries.floating_max = new_instancemethod(_cmf_core.timeseries_floating_max, None, timeseries) -timeseries.floating_min = new_instancemethod(_cmf_core.timeseries_floating_min, None, timeseries) -timeseries.mean = new_instancemethod(_cmf_core.timeseries_mean, None, timeseries) -timeseries.min = new_instancemethod(_cmf_core.timeseries_min, None, timeseries) -timeseries.max = new_instancemethod(_cmf_core.timeseries_max, None, timeseries) -timeseries.log = new_instancemethod(_cmf_core.timeseries_log, None, timeseries) -timeseries.log10 = new_instancemethod(_cmf_core.timeseries_log10, None, timeseries) -timeseries.power = new_instancemethod(_cmf_core.timeseries_power, None, timeseries) -timeseries.exp = new_instancemethod(_cmf_core.timeseries_exp, None, timeseries) -timeseries.__len__ = new_instancemethod(_cmf_core.timeseries___len__, None, timeseries) -timeseries_swigregister = _cmf_core.timeseries_swigregister -timeseries_swigregister(timeseries) -ms = cvar.ms -sec = cvar.sec -min = cvar.min -h = cvar.h -day = cvar.day -week = cvar.week -year = cvar.year -month = cvar.month -never = cvar.never - -def timeseries_from_array(*args, **kwargs): - """timeseries_from_array(Time begin, Time step, cmf::math::num_array const & data) -> timeseries""" - return _cmf_core.timeseries_from_array(*args, **kwargs) - -def timeseries_from_scalar(*args, **kwargs): - """timeseries_from_scalar(double scalar) -> timeseries""" - return _cmf_core.timeseries_from_scalar(*args, **kwargs) - -def timeseries_from_file(*args, **kwargs): - """timeseries_from_file(std::string filename) -> timeseries""" - return _cmf_core.timeseries_from_file(*args, **kwargs) - - -def nash_sutcliffe(*args, **kwargs): - """ - nash_sutcliffe(timeseries model, timeseries observation) -> double - - double - cmf::math::nash_sutcliffe(const cmf::math::timeseries &model, const - cmf::math::timeseries &observation) - - Calculates the Nash-Sutcliffe efficiency of a modeled timeseries in - comparison with an observed timeseries. - - The Nash-Sutcliffe efficiancy is defined as: - - .. math:: - - E = 1 - - \\frac{\\sum_{t=1}^{T}(M_t - O_t)^2}{\\sum_{t=1}^{T}(O_t - - \\overline{O})^2} - - where :math:`T` is the number of observation time - steps - - :math:`M` is the timeseries of model results matchinig O - - :math:`O` is the timeseries containing observations - - :math:`\\overline{O}` is the arithmetic mean of observations - """ - return _cmf_core.nash_sutcliffe(*args, **kwargs) - -def AsCMFtime(date): - """Converts a python datetime to cmf.Time""" - return Time(date.day,date.month,date.year,date.hour,date.minute,date.second,date.microsecond/1000) -def timerange(start,end,step=day): - """Creates a generator of cmf.Time, similar to the Python range function""" - return [start+step*x for x in range(0,int((end-start)/step))] -def xtimerange(start,end,step=day): - """Creates a generator of cmf.Time, similar to the Python range function""" - return (start+step*x for x in range(0,int((end-start)/step))) - -class integratable(object): - """ - - - integratable is a functionality for different classes for integrating - values over time. - - Main usage of an integratable is the calculation of average fluxes - over time e.g. - - .. math:: - - - \\int_{t_0}^{t_{end}}q\\left(t,V_i,V_j\\right)dt - - C++ includes: statevariable.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - - def __init__(self, *args, **kwargs): - raise AttributeError("No constructor defined - class is abstract") - __repr__ = _swig_repr - - def integrate(self, *args, **kwargs): - """ - integrate(integratable self, Time t) - - virtual - void integrate(Time t)=0 - - Integrates the variable until time t. - """ - return _cmf_core.integratable_integrate(self, *args, **kwargs) - - - def reset(self, *args, **kwargs): - """ - reset(integratable self, Time t) - - virtual void - reset(Time t)=0 - - Sets the start time of the integral. - """ - return _cmf_core.integratable_reset(self, *args, **kwargs) - - - def sum(self, *args, **kwargs): - """ - sum(integratable self) -> double - - virtual double - sum() const =0 - - Get the integral from the last reset until the last call of integrate. - - """ - return _cmf_core.integratable_sum(self, *args, **kwargs) - - - def avg(self, *args, **kwargs): - """ - avg(integratable self) -> double - - virtual double - avg() const =0 - - Returns average of the integrated variable (eg. flux) from the last - reset until the last call of integrate. - """ - return _cmf_core.integratable_avg(self, *args, **kwargs) - - __swig_destroy__ = _cmf_core.delete_integratable -integratable.integrate = new_instancemethod(_cmf_core.integratable_integrate, None, integratable) -integratable.reset = new_instancemethod(_cmf_core.integratable_reset, None, integratable) -integratable.sum = new_instancemethod(_cmf_core.integratable_sum, None, integratable) -integratable.avg = new_instancemethod(_cmf_core.integratable_avg, None, integratable) -integratable_swigregister = _cmf_core.integratable_swigregister -integratable_swigregister(integratable) - -class integratable_list(object): - """ - - - A list of cmf::math::integratable objects. - - Todo TODO: Complete collection interface (getitem with slicing etc.) - - C++ includes: statevariable.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - - def append(self, *args, **kwargs): - """ - append(integratable_list self, cmf::math::integratable::ptr add) - - void - append(cmf::math::integratable::ptr add) - - Adds an integratable to the list. - """ - return _cmf_core.integratable_list_append(self, *args, **kwargs) - - - def remove(self, *args, **kwargs): - """ - remove(integratable_list self, cmf::math::integratable::ptr rm) - - void - remove(cmf::math::integratable::ptr rm) - - Removes an integratable from the list. - """ - return _cmf_core.integratable_list_remove(self, *args, **kwargs) - - - def __getitem(self, *args, **kwargs): - """__getitem(integratable_list self, int index) -> cmf::math::integratable::ptr""" - return _cmf_core.integratable_list___getitem(self, *args, **kwargs) - - - def size(self, *args, **kwargs): - """ - size(integratable_list self) -> size_t - - size_t - size() const - - Number of integratables in the list. - """ - return _cmf_core.integratable_list_size(self, *args, **kwargs) - - - def avg(self, *args, **kwargs): - """ - avg(integratable_list self) -> cmf::math::num_array - - cmf::math::num_array avg() const - """ - return _cmf_core.integratable_list_avg(self, *args, **kwargs) - - - def sum(self, *args, **kwargs): - """ - sum(integratable_list self) -> cmf::math::num_array - - cmf::math::num_array sum() const - """ - return _cmf_core.integratable_list_sum(self, *args, **kwargs) - - - def reset(self, *args, **kwargs): - """ - reset(integratable_list self, Time t) - - void - reset(Time t) - """ - return _cmf_core.integratable_list_reset(self, *args, **kwargs) - - - def integrate(self, *args, **kwargs): - """ - integrate(integratable_list self, Time t) - - void - integrate(Time t) - """ - return _cmf_core.integratable_list_integrate(self, *args, **kwargs) - - - def __init__(self, *args): - """ - __init__(cmf::math::integratable_list self) -> integratable_list - __init__(cmf::math::integratable_list self, integratable_list for_copy) -> integratable_list - - integratable_list(const integratable_list &for_copy) - """ - _cmf_core.integratable_list_swiginit(self, _cmf_core.new_integratable_list(*args)) - - def __len__(self, *args, **kwargs): - """__len__(integratable_list self) -> size_t""" - return _cmf_core.integratable_list___len__(self, *args, **kwargs) - - - def __iter__(self): - for i in xrange(len(self)): - yield self[i] - def __getitem__(self,index): - if isinstance(index,slice): - return [self.__getitem(i) for i in range(*index.indices(len(self)))] - else: - try: - it=iter(index) - return [self.__getitem(i) for i in it] - except: - return self.__getitem(index) - - __swig_destroy__ = _cmf_core.delete_integratable_list -integratable_list.append = new_instancemethod(_cmf_core.integratable_list_append, None, integratable_list) -integratable_list.remove = new_instancemethod(_cmf_core.integratable_list_remove, None, integratable_list) -integratable_list.__getitem = new_instancemethod(_cmf_core.integratable_list___getitem, None, integratable_list) -integratable_list.size = new_instancemethod(_cmf_core.integratable_list_size, None, integratable_list) -integratable_list.avg = new_instancemethod(_cmf_core.integratable_list_avg, None, integratable_list) -integratable_list.sum = new_instancemethod(_cmf_core.integratable_list_sum, None, integratable_list) -integratable_list.reset = new_instancemethod(_cmf_core.integratable_list_reset, None, integratable_list) -integratable_list.integrate = new_instancemethod(_cmf_core.integratable_list_integrate, None, integratable_list) -integratable_list.__len__ = new_instancemethod(_cmf_core.integratable_list___len__, None, integratable_list) -integratable_list_swigregister = _cmf_core.integratable_list_swigregister -integratable_list_swigregister(integratable_list) - -class StateVariable(object): - """ - - - Abstract class state variable. - - Simple exponential system class header implementing a state variable: - - C++ includes: statevariable.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - - def __init__(self, *args, **kwargs): - raise AttributeError("No constructor defined - class is abstract") - __repr__ = _swig_repr - - def dxdt(self, *args, **kwargs): - """ - dxdt(StateVariable self, Time time) -> real - - virtual real - dxdt(const cmf::math::Time &time)=0 - - Returns the derivate of the state variable at time time. - """ - return _cmf_core.StateVariable_dxdt(self, *args, **kwargs) - - - def get_abs_errtol(self, *args, **kwargs): - """ - get_abs_errtol(StateVariable self, real rel_errtol) -> real - - virtual real get_abs_errtol(real rel_errtol) const - """ - return _cmf_core.StateVariable_get_abs_errtol(self, *args, **kwargs) - - - def to_string(self, *args, **kwargs): - """ - to_string(StateVariable self) -> std::string - - virtual - std::string to_string() const =0 - """ - return _cmf_core.StateVariable_to_string(self, *args, **kwargs) - - __swig_destroy__ = _cmf_core.delete_StateVariable - state = _swig_property(_cmf_core.StateVariable_state_get, _cmf_core.StateVariable_state_set) - - def __repr__(self): - return self.to_string() - -StateVariable.dxdt = new_instancemethod(_cmf_core.StateVariable_dxdt, None, StateVariable) -StateVariable.get_abs_errtol = new_instancemethod(_cmf_core.StateVariable_get_abs_errtol, None, StateVariable) -StateVariable.to_string = new_instancemethod(_cmf_core.StateVariable_to_string, None, StateVariable) -StateVariable_swigregister = _cmf_core.StateVariable_swigregister -StateVariable_swigregister(StateVariable) - -class StateVariableOwner(object): - """ - - - An abstract class, that owns one or more state variables, that can add - them to a vector of state variables in a certain order. - - C++ includes: statevariable.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - - def __init__(self, *args, **kwargs): - raise AttributeError("No constructor defined - class is abstract") - __repr__ = _swig_repr - - def get_states(self, *args, **kwargs): - """ - get_states(StateVariableOwner self) -> StateVariableList - - virtual StateVariableList get_states()=0 - - Add the state variables, owned by an object derived from - StateVariableOwner, to the given vector. - """ - return _cmf_core.StateVariableOwner_get_states(self, *args, **kwargs) - - __swig_destroy__ = _cmf_core.delete_StateVariableOwner -StateVariableOwner.get_states = new_instancemethod(_cmf_core.StateVariableOwner_get_states, None, StateVariableOwner) -StateVariableOwner_swigregister = _cmf_core.StateVariableOwner_swigregister -StateVariableOwner_swigregister(StateVariableOwner) - -class StateVariableList(StateVariableOwner): - """Proxy of C++ cmf::math::StateVariableList class.""" - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - - def append(self, *args, **kwargs): - """ - append(StateVariableList self, cmf::math::StateVariable::ptr sv) - - void - append(StateVariable::ptr sv) - """ - return _cmf_core.StateVariableList_append(self, *args, **kwargs) - - - def extend(self, *args, **kwargs): - """ - extend(StateVariableList self, StateVariableOwner svo) - - void - extend(StateVariableOwner &svo) - """ - return _cmf_core.StateVariableList_extend(self, *args, **kwargs) - - - def __iadd__(self, *args): - """ - __iadd__(StateVariableList self, StateVariableList food) -> StateVariableList - __iadd__(StateVariableList self, StateVariableOwner svo) -> StateVariableList - """ - return _cmf_core.StateVariableList___iadd__(self, *args) - - - def size(self, *args, **kwargs): - """ - size(StateVariableList self) -> size_t - - size_t - size() const - """ - return _cmf_core.StateVariableList_size(self, *args, **kwargs) - - __swig_destroy__ = _cmf_core.delete_StateVariableList - - def __len__(self, *args, **kwargs): - """__len__(StateVariableList self) -> size_t""" - return _cmf_core.StateVariableList___len__(self, *args, **kwargs) - - - def __init__(self, *args, **kwargs): - """__init__(cmf::math::StateVariableList self) -> StateVariableList""" - _cmf_core.StateVariableList_swiginit(self, _cmf_core.new_StateVariableList(*args, **kwargs)) -StateVariableList.append = new_instancemethod(_cmf_core.StateVariableList_append, None, StateVariableList) -StateVariableList.extend = new_instancemethod(_cmf_core.StateVariableList_extend, None, StateVariableList) -StateVariableList.__iadd__ = new_instancemethod(_cmf_core.StateVariableList___iadd__, None, StateVariableList) -StateVariableList.size = new_instancemethod(_cmf_core.StateVariableList_size, None, StateVariableList) -StateVariableList.__len__ = new_instancemethod(_cmf_core.StateVariableList___len__, None, StateVariableList) -StateVariableList_swigregister = _cmf_core.StateVariableList_swigregister -StateVariableList_swigregister(StateVariableList) - -class Integrator(StateVariableOwner): - """ - - - Base class for any kind of integrator. - - Pure virtual functions: Integrate - - copy Please provide a custom copy constructor - - C++ includes: integrator.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - - def __init__(self, *args, **kwargs): - raise AttributeError("No constructor defined - class is abstract") - __repr__ = _swig_repr - - def get_dxdt(self, *args, **kwargs): - """ - get_dxdt(Integrator self, Time time) -> cmf::math::num_array - - cmf::math::num_array get_dxdt(Time time) const - """ - return _cmf_core.Integrator_get_dxdt(self, *args, **kwargs) - - - def add_states(self, *args, **kwargs): - """ - add_states(Integrator self, StateVariableOwner stateOwner) - - virtual - void add_states(cmf::math::StateVariableOwner &stateOwner) - - Add state variables from a StateVariableOwner. - """ - return _cmf_core.Integrator_add_states(self, *args, **kwargs) - - - def add_single_state(self, *args, **kwargs): - """ - add_single_state(Integrator self, cmf::math::StateVariable::ptr state) - - virtual void add_single_state(cmf::math::StateVariable::ptr state) - - Adds a single state variable to the integrator. - """ - return _cmf_core.Integrator_add_single_state(self, *args, **kwargs) - - integratables = _swig_property(_cmf_core.Integrator_integratables_get, _cmf_core.Integrator_integratables_set) - reset_integratables = _swig_property(_cmf_core.Integrator_reset_integratables_get, _cmf_core.Integrator_reset_integratables_set) - use_OpenMP = _swig_property(_cmf_core.Integrator_use_OpenMP_get, _cmf_core.Integrator_use_OpenMP_set) - - def size(self, *args, **kwargs): - """ - size(Integrator self) -> size_t - - size_t size() - const - - returns the number of state variables - """ - return _cmf_core.Integrator_size(self, *args, **kwargs) - - - def get_state(self, *args, **kwargs): - """ - get_state(Integrator self, ptrdiff_t position) -> real - - real - get_state(ptrdiff_t position) const - - Returns the statevariable at position Simplifies the assessment of - state variables. - """ - return _cmf_core.Integrator_get_state(self, *args, **kwargs) - - - def set_state(self, *args, **kwargs): - """ - set_state(Integrator self, ptrdiff_t position, real newState) - - void - set_state(ptrdiff_t position, real newState) - - Simplifies the assessment of state variables. - """ - return _cmf_core.Integrator_set_state(self, *args, **kwargs) - - - def get_states(self, *args): - """ - get_states(Integrator self) -> cmf::math::num_array - get_states(Integrator self) -> StateVariableList - - StateVariableList get_states() - - gets the state variables of the integrator - """ - return _cmf_core.Integrator_get_states(self, *args) - - __swig_destroy__ = _cmf_core.delete_Integrator - - def get_t(self, *args, **kwargs): - """ - get_t(Integrator self) -> Time - - cmf::math::Time - get_t() const - - Returns the current model time. - """ - return _cmf_core.Integrator_get_t(self, *args, **kwargs) - - - def set_t(self, *args, **kwargs): - """ - set_t(Integrator self, Time val) - - void - set_t(cmf::math::Time val) - - Sets the current model time. - """ - return _cmf_core.Integrator_set_t(self, *args, **kwargs) - - - def get_dt(self, *args, **kwargs): - """ - get_dt(Integrator self) -> Time - - cmf::math::Time - get_dt() const - - Returns the last time step. - """ - return _cmf_core.Integrator_get_dt(self, *args, **kwargs) - - - def reset(self, *args, **kwargs): - """ - reset(Integrator self) - - virtual void - reset() - - Resets any saved history (for multistep methods) - """ - return _cmf_core.Integrator_reset(self, *args, **kwargs) - - - def copy(self, *args, **kwargs): - """ - copy(Integrator self) -> Integrator - - virtual - Integrator* copy() const =0 - - Polymorphic copy constructor. - """ - return _cmf_core.Integrator_copy(self, *args, **kwargs) - - - def integrate(self, *args, **kwargs): - """ - integrate(Integrator self, Time t_max, Time dt) -> int - - virtual int - integrate(cmf::math::Time t_max, cmf::math::Time dt)=0 - - Integrates the vector of state variables. - - Parameters: - ----------- - - t_max: To stop the model (if running in a model framework) at time - steps of value exchange e.g. full hours, the next value exchange time - can be given - - dt: Takes the proposed time step, and changes it into the effectively - used time step according to the local stiffness of the problem and - MaxTime - """ - return _cmf_core.Integrator_integrate(self, *args, **kwargs) - - - def integrate_until(self, *args, **kwargs): - """ - integrate_until(Integrator self, Time t_max, Time dt, bool reset=False) - - void - integrate_until(cmf::math::Time t_max, cmf::math::Time dt=Time(), bool - reset=false) - - Integrates the vector of state variables until t_max. - - Parameters: - ----------- - - t_max: Time, the solver should run to - - dt: Time step (may be omitted) - - reset: If true, solver is reseted before integration starts - """ - return _cmf_core.Integrator_integrate_until(self, *args, **kwargs) - - - def __getitem__(self, *args, **kwargs): - """__getitem__(Integrator self, int index) -> cmf::math::StateVariable::ptr""" - return _cmf_core.Integrator___getitem__(self, *args, **kwargs) - - - def __call__(self,t,reset=False): - if t int - - int - get_error_position() const - - Returns the position of the biggest error. - """ - return _cmf_core.BDF2_get_error_position(self, *args, **kwargs) - - max_order = _swig_property(_cmf_core.BDF2_max_order_get, _cmf_core.BDF2_max_order_set) - - def __init__(self, *args): - """ - __init__(cmf::math::BDF2 self, real epsilon=1e-9, Time tStepMin) -> BDF2 - __init__(cmf::math::BDF2 self, StateVariableOwner states, real epsilon=1e-9, Time tStepMin) -> BDF2 - __init__(cmf::math::BDF2 self, Integrator templ) -> BDF2 - - BDF2(const Integrator - &templ) - - Constructs a new BDF2 integrator. - - Parameters: - ----------- - - templ: Template to be used to construct a BDF2 method - """ - _cmf_core.BDF2_swiginit(self, _cmf_core.new_BDF2(*args)) - __swig_destroy__ = _cmf_core.delete_BDF2 -BDF2.get_error_position = new_instancemethod(_cmf_core.BDF2_get_error_position, None, BDF2) -BDF2_swigregister = _cmf_core.BDF2_swigregister -BDF2_swigregister(BDF2) - -class ExplicitEuler_fixed(Integrator): - """ - - - An explicit Euler integrator, with a fixed time step. - - C++ includes: explicit_euler.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - - def __init__(self, *args): - """ - __init__(cmf::math::ExplicitEuler_fixed self, StateVariableOwner states) -> ExplicitEuler_fixed - __init__(cmf::math::ExplicitEuler_fixed self) -> ExplicitEuler_fixed - __init__(cmf::math::ExplicitEuler_fixed self, Integrator copy) -> ExplicitEuler_fixed - - ExplicitEuler_fixed(const Integrator ©) - - copy constructor - """ - _cmf_core.ExplicitEuler_fixed_swiginit(self, _cmf_core.new_ExplicitEuler_fixed(*args)) - __swig_destroy__ = _cmf_core.delete_ExplicitEuler_fixed -ExplicitEuler_fixed_swigregister = _cmf_core.ExplicitEuler_fixed_swigregister -ExplicitEuler_fixed_swigregister(ExplicitEuler_fixed) - -class HeunIntegrator(Integrator): - """ - - - A simple predictor - corrector solver. - - Not tested and very experimentally :math:`y^{n+1} = y^n + \\alpha f(y^n + f(y^n)dt)dt + (1-\\alpha)f(y^n)dt` - - C++ includes: explicit_euler.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - alpha = _swig_property(_cmf_core.HeunIntegrator_alpha_get, _cmf_core.HeunIntegrator_alpha_set) - - def __init__(self, *args): - """ - __init__(cmf::math::HeunIntegrator self, StateVariableOwner states, real Alpha=0.5) -> HeunIntegrator - __init__(cmf::math::HeunIntegrator self, real Alpha=0.5) -> HeunIntegrator - __init__(cmf::math::HeunIntegrator self, Integrator copy) -> HeunIntegrator - - HeunIntegrator(const Integrator ©) - - copy constructor - """ - _cmf_core.HeunIntegrator_swiginit(self, _cmf_core.new_HeunIntegrator(*args)) - __swig_destroy__ = _cmf_core.delete_HeunIntegrator -HeunIntegrator_swigregister = _cmf_core.HeunIntegrator_swigregister -HeunIntegrator_swigregister(HeunIntegrator) - -class ImplicitEuler(Integrator): - """ - - - An implicit (backward) Euler integrator using fixpoint iteration. - - C++ includes: implicit_euler.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - dt_min = _swig_property(_cmf_core.ImplicitEuler_dt_min_get, _cmf_core.ImplicitEuler_dt_min_set) - - def __init__(self, *args): - """ - __init__(cmf::math::ImplicitEuler self, StateVariableOwner states, real epsilon=1e-9, Time tStepMin) -> ImplicitEuler - __init__(cmf::math::ImplicitEuler self, real epsilon=1e-9, Time tStepMin) -> ImplicitEuler - __init__(cmf::math::ImplicitEuler self, Integrator arg2) -> ImplicitEuler - - ImplicitEuler(const Integrator &) - - copy constructor - """ - _cmf_core.ImplicitEuler_swiginit(self, _cmf_core.new_ImplicitEuler(*args)) - __swig_destroy__ = _cmf_core.delete_ImplicitEuler -ImplicitEuler_swigregister = _cmf_core.ImplicitEuler_swigregister -ImplicitEuler_swigregister(ImplicitEuler) - -class RKFIntegrator(Integrator): - """ - - - Integrates a vector of cmf::math::StateVariable with the Runge-Kutta- - Fehlberg (RKF54) method. - - C++ includes: RKFintegrator.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - - def __init__(self, *args): - """ - __init__(cmf::math::RKFIntegrator self, StateVariableOwner states, real epsilon=1e-9, Time dt_min) -> RKFIntegrator - __init__(cmf::math::RKFIntegrator self, real epsilon=1e-9, Time dt_min) -> RKFIntegrator - - RKFIntegrator(real epsilon=1e-9, cmf::math::Time - dt_min=cmf::math::timespan(1000)) - - Constructs a new RKFIntegrator. - - Parameters: - ----------- - - epsilon: relative error tolerance per time step (default=1e-9) - - dt_min: minimum time step (default=1s) - """ - _cmf_core.RKFIntegrator_swiginit(self, _cmf_core.new_RKFIntegrator(*args)) - __swig_destroy__ = _cmf_core.delete_RKFIntegrator -RKFIntegrator_swigregister = _cmf_core.RKFIntegrator_swigregister -RKFIntegrator_swigregister(RKFIntegrator) - -class CVodeIntegrator(Integrator): - """ - - - A wrapper class for the CVODE integrator from the SUNDIALS library. - - https://computation.llnl.gov/casc/sundials/main.html - - C++ includes: cvodeintegrator.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - preconditioner = _swig_property(_cmf_core.CVodeIntegrator_preconditioner_get, _cmf_core.CVodeIntegrator_preconditioner_set) - MaxNonLinearIterations = _swig_property(_cmf_core.CVodeIntegrator_MaxNonLinearIterations_get, _cmf_core.CVodeIntegrator_MaxNonLinearIterations_set) - MaxConvergenceFailures = _swig_property(_cmf_core.CVodeIntegrator_MaxConvergenceFailures_get, _cmf_core.CVodeIntegrator_MaxConvergenceFailures_set) - MaxErrorTestFailures = _swig_property(_cmf_core.CVodeIntegrator_MaxErrorTestFailures_get, _cmf_core.CVodeIntegrator_MaxErrorTestFailures_set) - maxl = _swig_property(_cmf_core.CVodeIntegrator_maxl_get, _cmf_core.CVodeIntegrator_maxl_set) - LinearSolver = _swig_property(_cmf_core.CVodeIntegrator_LinearSolver_get, _cmf_core.CVodeIntegrator_LinearSolver_set) - MaxOrder = _swig_property(_cmf_core.CVodeIntegrator_MaxOrder_get, _cmf_core.CVodeIntegrator_MaxOrder_set) - max_step = _swig_property(_cmf_core.CVodeIntegrator_max_step_get, _cmf_core.CVodeIntegrator_max_step_set) - - def initialize(self, *args, **kwargs): - """ - initialize(CVodeIntegrator self) - - void - initialize() - - Initializes the solver. Do not add or remove state variables after - initialization. The solver is automatically intialized when - integrating. - """ - return _cmf_core.CVodeIntegrator_initialize(self, *args, **kwargs) - - - def release(self, *args, **kwargs): - """ - release(CVodeIntegrator self) - - void - release() - - Releases the internal solver. Call release before you add state - variables or to change properties. - """ - return _cmf_core.CVodeIntegrator_release(self, *args, **kwargs) - - - def __init__(self, *args): - """ - __init__(cmf::math::CVodeIntegrator self, real epsilon=1e-9, char _preconditioner) -> CVodeIntegrator - __init__(cmf::math::CVodeIntegrator self, StateVariableOwner states, real epsilon=1e-9, char _preconditioner) -> CVodeIntegrator - __init__(cmf::math::CVodeIntegrator self, CVodeIntegrator templ) -> CVodeIntegrator - - CVodeIntegrator(const CVodeIntegrator &templ) - - copy constructor, creates a new CVODE integrator similiar to the - given, but without statevariables - """ - _cmf_core.CVodeIntegrator_swiginit(self, _cmf_core.new_CVodeIntegrator(*args)) - - def get_error(self, *args, **kwargs): - """ - get_error(CVodeIntegrator self) -> cmf::math::num_array - - cmf::math::num_array get_error() const - - Error vector of the integrator. - """ - return _cmf_core.CVodeIntegrator_get_error(self, *args, **kwargs) - - - def get_nonlinear_iterations(self, *args, **kwargs): - """ - get_nonlinear_iterations(CVodeIntegrator self) -> int - - int - get_nonlinear_iterations() const - - Returns the number of non-linear iterations performed. Calls - CVodeGetNumNonlinSolvIters. - """ - return _cmf_core.CVodeIntegrator_get_nonlinear_iterations(self, *args, **kwargs) - - - def get_rhsevals(self, *args, **kwargs): - """ - get_rhsevals(CVodeIntegrator self) -> int - - int - get_rhsevals() const - - Returns the number of evaluations of the right hand side of the ODE. - Calls CVodeGetNumRhsEvals. - """ - return _cmf_core.CVodeIntegrator_get_rhsevals(self, *args, **kwargs) - - - def copy(self, *args, **kwargs): - """ - copy(CVodeIntegrator self) -> CVodeIntegrator - - CVodeIntegrator* copy() const - - Polymorphic copy constructor. - """ - return _cmf_core.CVodeIntegrator_copy(self, *args, **kwargs) - - __swig_destroy__ = _cmf_core.delete_CVodeIntegrator - order = _swig_property(_cmf_core.CVodeIntegrator_order_get) -CVodeIntegrator.initialize = new_instancemethod(_cmf_core.CVodeIntegrator_initialize, None, CVodeIntegrator) -CVodeIntegrator.release = new_instancemethod(_cmf_core.CVodeIntegrator_release, None, CVodeIntegrator) -CVodeIntegrator.get_error = new_instancemethod(_cmf_core.CVodeIntegrator_get_error, None, CVodeIntegrator) -CVodeIntegrator.get_nonlinear_iterations = new_instancemethod(_cmf_core.CVodeIntegrator_get_nonlinear_iterations, None, CVodeIntegrator) -CVodeIntegrator.get_rhsevals = new_instancemethod(_cmf_core.CVodeIntegrator_get_rhsevals, None, CVodeIntegrator) -CVodeIntegrator.copy = new_instancemethod(_cmf_core.CVodeIntegrator_copy, None, CVodeIntegrator) -CVodeIntegrator_swigregister = _cmf_core.CVodeIntegrator_swigregister -CVodeIntegrator_swigregister(CVodeIntegrator) - -class MultiIntegrator(Integrator): - """ - - - The MultiIntegrator is a wrapper for a bunch integrators. The states - of the integrators should not have direct connections over integrator - boundaries. - - C++ includes: multiintegrator.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - - def copy(self, *args, **kwargs): - """ - copy(MultiIntegrator self) -> MultiIntegrator - - virtual - cmf::math::MultiIntegrator* copy() const - - Polymorphic copy constructor. - """ - return _cmf_core.MultiIntegrator_copy(self, *args, **kwargs) - - - def add_states_to_integrator(self, *args, **kwargs): - """ - add_states_to_integrator(MultiIntegrator self, StateVariableOwner stateOwner, int integrator_position) - - void - add_states_to_integrator(cmf::math::StateVariableOwner &stateOwner, - int integrator_position) - - Add state variables from a StateVariableOwner. - """ - return _cmf_core.MultiIntegrator_add_states_to_integrator(self, *args, **kwargs) - - - def __init__(self, *args, **kwargs): - """ - __init__(cmf::math::MultiIntegrator self, Integrator template_integrator, int count) -> MultiIntegrator - - MultiIntegrator(const cmf::math::Integrator &template_integrator, int - count) - - Creates a new MultiIntegrator. - - Parameters: - ----------- - - template_integrator: Template for the integrators - - count: Number of integrators - """ - _cmf_core.MultiIntegrator_swiginit(self, _cmf_core.new_MultiIntegrator(*args, **kwargs)) - __swig_destroy__ = _cmf_core.delete_MultiIntegrator -MultiIntegrator.copy = new_instancemethod(_cmf_core.MultiIntegrator_copy, None, MultiIntegrator) -MultiIntegrator.add_states_to_integrator = new_instancemethod(_cmf_core.MultiIntegrator_add_states_to_integrator, None, MultiIntegrator) -MultiIntegrator_swigregister = _cmf_core.MultiIntegrator_swigregister -MultiIntegrator_swigregister(MultiIntegrator) - -class Adsorption(object): - """ - - - Abstract class to use adsorption process for tracers on surfaces. - - Use the derived classes to use a certain isotherm - - C++ includes: adsorption.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - - def __init__(self, *args, **kwargs): - raise AttributeError("No constructor defined - class is abstract") - __repr__ = _swig_repr - - def freesolute(self, *args, **kwargs): - """ - freesolute(Adsorption self, real xt, real V) -> real - - virtual - real freesolute(real xt, real V) const =0 - - Returns the mass of dissolved tracer as a function of the total tracer - mass in the solute storage and the water volume. - - Parameters: - ----------- - - xt: :math:`x_t` the total tracer mass in the storage - - V: :math:`V m^3` the water volume in the storage - - :math:`x_f` the dissolved mass of the tracer - """ - return _cmf_core.Adsorption_freesolute(self, *args, **kwargs) - - - def totalsolute(self, *args, **kwargs): - """ - totalsolute(Adsorption self, real xf, real V) -> real - - virtual - real totalsolute(real xf, real V) const =0 - - Returns the total mass of the tracer from the dissolved concetration - in tracer unit/m3. - - Parameters: - ----------- - - xf: :math:`x_f` the dissolved tracer mass in the storage - - V: :math:`V m^3` the water volume in the storage - - :math:`x_t` the total mass of the tracer - """ - return _cmf_core.Adsorption_totalsolute(self, *args, **kwargs) - - - def copy(self, *args, **kwargs): - """ - copy(Adsorption self, real m=-1) -> Adsorption - - virtual - Adsorption* copy(real m=-1) const =0 - - returns a copy of the Adsorption object. - - If the adsorption is depending on the sorbent mass, you can give a - positive value for the sorbent mass m. If the value is not given or - negative, m is used from the original object. - """ - return _cmf_core.Adsorption_copy(self, *args, **kwargs) - - __swig_destroy__ = _cmf_core.delete_Adsorption -Adsorption.freesolute = new_instancemethod(_cmf_core.Adsorption_freesolute, None, Adsorption) -Adsorption.totalsolute = new_instancemethod(_cmf_core.Adsorption_totalsolute, None, Adsorption) -Adsorption.copy = new_instancemethod(_cmf_core.Adsorption_copy, None, Adsorption) -Adsorption_swigregister = _cmf_core.Adsorption_swigregister -Adsorption_swigregister(Adsorption) - -class NullAdsorption(Adsorption): - """ - - - A class for tracers without interaction with the storage container. - freesolute returns xt. - - C++ includes: adsorption.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - - def copy(self, *args, **kwargs): - """ - copy(NullAdsorption self, real m=-1) -> NullAdsorption - - virtual - NullAdsorption* copy(real m=-1) const - - returns a copy of the Adsorption object. - - If the adsorption is depending on the sorbent mass, you can give a - positive value for the sorbent mass m. If the value is not given or - negative, m is used from the original object. - """ - return _cmf_core.NullAdsorption_copy(self, *args, **kwargs) - - __swig_destroy__ = _cmf_core.delete_NullAdsorption - - def __init__(self, *args, **kwargs): - """__init__(cmf::water::NullAdsorption self) -> NullAdsorption""" - _cmf_core.NullAdsorption_swiginit(self, _cmf_core.new_NullAdsorption(*args, **kwargs)) -NullAdsorption.copy = new_instancemethod(_cmf_core.NullAdsorption_copy, None, NullAdsorption) -NullAdsorption_swigregister = _cmf_core.NullAdsorption_swigregister -NullAdsorption_swigregister(NullAdsorption) - -class LinearAdsorption(Adsorption): - """ - - - This class calculates the adsorption equilibrium between sorbat and - sorbent using the linear (Henry) isotherme. - - Linear (Henry) isotherme: - - - - .. math:: - - \\frac{x_{ad}}{m} = K c - - where :math:`x_{ad} = x_{tot} - x_{free}` is the adsorbed tracer mass :math:`x_{tot}` is the total tracer - mass - - :math:`x_{free}` is the dissolved tracer mass - - :math:`m` is the mass of the sorbent in the same unit as the tracer mass - - :math:`K` is the Henry sorption coefficient - - :math:`c = \\frac{x_{free}}{V}` is the concentration of the tracer in - tracer mass per m3 - - CMF stores in a solute storage the total mass of a tracer and needs to - calculate the free tracer mass. Calculating :math:`x_{free}` from :math:`x_{tot}` - gives from the eq. above: - - .. math:: - - x_{free} = x_{tot} \\frac{V}{K m + - V} - - C++ includes: adsorption.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - K = _swig_property(_cmf_core.LinearAdsorption_K_get, _cmf_core.LinearAdsorption_K_set) - m = _swig_property(_cmf_core.LinearAdsorption_m_get, _cmf_core.LinearAdsorption_m_set) - - def __init__(self, *args): - """ - __init__(cmf::water::LinearAdsorption self, real K, real m) -> LinearAdsorption - __init__(cmf::water::LinearAdsorption self, LinearAdsorption other) -> LinearAdsorption - - LinearAdsorption(const LinearAdsorption &other) - """ - _cmf_core.LinearAdsorption_swiginit(self, _cmf_core.new_LinearAdsorption(*args)) - - def copy(self, *args, **kwargs): - """ - copy(LinearAdsorption self, real m=-1) -> LinearAdsorption - - LinearAdsorption* copy(real m=-1) const - - returns a copy of the Adsorption object. - - If the adsorption is depending on the sorbent mass, you can give a - positive value for the sorbent mass m. If the value is not given or - negative, m is used from the original object. - """ - return _cmf_core.LinearAdsorption_copy(self, *args, **kwargs) - - __swig_destroy__ = _cmf_core.delete_LinearAdsorption -LinearAdsorption.copy = new_instancemethod(_cmf_core.LinearAdsorption_copy, None, LinearAdsorption) -LinearAdsorption_swigregister = _cmf_core.LinearAdsorption_swigregister -LinearAdsorption_swigregister(LinearAdsorption) - -class FreundlichAdsorbtion(Adsorption): - """ - - - This class calculates the adsorption equilibrium between sorbat and - sorbent using the Freundlich isotherme. - - Freundlich isotherme: - - - - .. math:: - - \\frac{x_{ad}}{m} = K c^n - - where :math:`x_{ad} = x_{tot} - x_{free}` is the adsorbed tracer mass :math:`x_{tot}` is the total tracer - mass - - :math:`x_{free}` is the dissolved tracer mass - - :math:`m` is the mass of the sorbent in the same unit as the tracer mass - - :math:`K` is the Freundlich sorption coefficient - - :math:`c = \\frac{x_{free}}{V}` is the concentration of the tracer in - tracer mass per m3 - - :math:`n` is the Freundlich exponent - - CMF stores in a solute storage the total mass of a tracer and needs to - calculate the free tracer mass. The eq. above can not be rearanged to - get :math:`x_{free}` from :math:`x_{tot}`. Instead, the value is iterated - usingregula falsi. If n is near to 1, using LinearAdsorption will - speed up your calculations. The simplest physically based adsorption - model by Langmuir ( LangmuirAdsorption) has also a analytical solution - and is hence calculated faster then Freundlich. - - C++ includes: adsorption.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - K = _swig_property(_cmf_core.FreundlichAdsorbtion_K_get, _cmf_core.FreundlichAdsorbtion_K_set) - n = _swig_property(_cmf_core.FreundlichAdsorbtion_n_get, _cmf_core.FreundlichAdsorbtion_n_set) - m = _swig_property(_cmf_core.FreundlichAdsorbtion_m_get, _cmf_core.FreundlichAdsorbtion_m_set) - epsilon = _swig_property(_cmf_core.FreundlichAdsorbtion_epsilon_get, _cmf_core.FreundlichAdsorbtion_epsilon_set) - maxiter = _swig_property(_cmf_core.FreundlichAdsorbtion_maxiter_get, _cmf_core.FreundlichAdsorbtion_maxiter_set) - - def __init__(self, *args): - """ - __init__(cmf::water::FreundlichAdsorbtion self, real K, real n, real m, real epsilon=1e-12, int maxiter=100) -> FreundlichAdsorbtion - __init__(cmf::water::FreundlichAdsorbtion self, FreundlichAdsorbtion other) -> FreundlichAdsorbtion - - FreundlichAdsorbtion(const FreundlichAdsorbtion &other) - """ - _cmf_core.FreundlichAdsorbtion_swiginit(self, _cmf_core.new_FreundlichAdsorbtion(*args)) - - def copy(self, *args, **kwargs): - """ - copy(FreundlichAdsorbtion self, real m=-1) -> FreundlichAdsorbtion - - FreundlichAdsorbtion* copy(real m=-1) const - - returns a copy of the Adsorption object. - - If the adsorption is depending on the sorbent mass, you can give a - positive value for the sorbent mass m. If the value is not given or - negative, m is used from the original object. - """ - return _cmf_core.FreundlichAdsorbtion_copy(self, *args, **kwargs) - - __swig_destroy__ = _cmf_core.delete_FreundlichAdsorbtion -FreundlichAdsorbtion.copy = new_instancemethod(_cmf_core.FreundlichAdsorbtion_copy, None, FreundlichAdsorbtion) -FreundlichAdsorbtion_swigregister = _cmf_core.FreundlichAdsorbtion_swigregister -FreundlichAdsorbtion_swigregister(FreundlichAdsorbtion) - -class LangmuirAdsorption(Adsorption): - """ - - - This class calculates the adsorption equilibrium between sorbat and - sorbent using the Langmuir isotherme. - - Langmuir Adsorption: - - - - .. math:: - - \\frac{x_{ad}}{m} = q = \\frac{K c}{1 + K c} - - where - :math:`x_{ad} = x_{tot} - x_{free}` is the adsorbed tracer mass :math:`x_{tot}` - is the total tracer mass - - :math:`x_{free}` is the dissolved tracer mass - - :math:`m` is the mass of the sorbent in the same unit as the tracer mass - - :math:`K` is the Langmuir sorption coefficient - - :math:`c = \\frac{x_{free}}{V}` is the concentration of the tracer in - tracer mass per m3 - - CMF stores in a solute storage the total mass of a tracer and needs to - calculate the free tracer mass. The analytical solution for :math:`x_{free}` - from :math:`x_{tot}` is implemented in freesolute and derived usingsympy. If - you really want to see it, look in the code. - - http://en.wikipedia.org/wiki/Langmuir_equation - - C++ includes: adsorption.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - K = _swig_property(_cmf_core.LangmuirAdsorption_K_get, _cmf_core.LangmuirAdsorption_K_set) - m = _swig_property(_cmf_core.LangmuirAdsorption_m_get, _cmf_core.LangmuirAdsorption_m_set) - - def __init__(self, *args): - """ - __init__(cmf::water::LangmuirAdsorption self, real K, real m) -> LangmuirAdsorption - __init__(cmf::water::LangmuirAdsorption self, LangmuirAdsorption other) -> LangmuirAdsorption - - LangmuirAdsorption(const LangmuirAdsorption &other) - """ - _cmf_core.LangmuirAdsorption_swiginit(self, _cmf_core.new_LangmuirAdsorption(*args)) - - def copy(self, *args, **kwargs): - """ - copy(LangmuirAdsorption self, real m=-1) -> LangmuirAdsorption - - LangmuirAdsorption* copy(real m=-1) const - - returns a copy of the Adsorption object. - - If the adsorption is depending on the sorbent mass, you can give a - positive value for the sorbent mass m. If the value is not given or - negative, m is used from the original object. - """ - return _cmf_core.LangmuirAdsorption_copy(self, *args, **kwargs) - - __swig_destroy__ = _cmf_core.delete_LangmuirAdsorption -LangmuirAdsorption.copy = new_instancemethod(_cmf_core.LangmuirAdsorption_copy, None, LangmuirAdsorption) -LangmuirAdsorption_swigregister = _cmf_core.LangmuirAdsorption_swigregister -LangmuirAdsorption_swigregister(LangmuirAdsorption) - -class solute(object): - """ - - - A structure to identify a solute. - - C++ includes: Solute.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - - def __init__(self, *args, **kwargs): - """ - __init__(cmf::water::solute self, solute copy) -> solute - - solute(const - solute ©) - """ - _cmf_core.solute_swiginit(self, _cmf_core.new_solute(*args, **kwargs)) - - def __eq__(self, *args, **kwargs): - """__eq__(solute self, solute cmp) -> bool""" - return _cmf_core.solute___eq__(self, *args, **kwargs) - - - def __lt__(self, *args, **kwargs): - """__lt__(solute self, solute cmp) -> bool""" - return _cmf_core.solute___lt__(self, *args, **kwargs) - - - def __gt__(self, *args, **kwargs): - """__gt__(solute self, solute cmp) -> bool""" - return _cmf_core.solute___gt__(self, *args, **kwargs) - - - def __le__(self, *args, **kwargs): - """__le__(solute self, solute cmp) -> bool""" - return _cmf_core.solute___le__(self, *args, **kwargs) - - - def __ge__(self, *args, **kwargs): - """__ge__(solute self, solute cmp) -> bool""" - return _cmf_core.solute___ge__(self, *args, **kwargs) - - - def __ne__(self, *args, **kwargs): - """__ne__(solute self, solute cmp) -> bool""" - return _cmf_core.solute___ne__(self, *args, **kwargs) - - Name = _swig_property(_cmf_core.solute_Name_get, _cmf_core.solute_Name_set) - Unit = _swig_property(_cmf_core.solute_Unit_get, _cmf_core.solute_Unit_set) - Uptake = _swig_property(_cmf_core.solute_Uptake_get, _cmf_core.solute_Uptake_set) - Id = _swig_property(_cmf_core.solute_Id_get) - - def __repr__(self, *args, **kwargs): - """__repr__(solute self) -> std::string""" - return _cmf_core.solute___repr__(self, *args, **kwargs) - - __swig_destroy__ = _cmf_core.delete_solute -solute.__eq__ = new_instancemethod(_cmf_core.solute___eq__, None, solute) -solute.__lt__ = new_instancemethod(_cmf_core.solute___lt__, None, solute) -solute.__gt__ = new_instancemethod(_cmf_core.solute___gt__, None, solute) -solute.__le__ = new_instancemethod(_cmf_core.solute___le__, None, solute) -solute.__ge__ = new_instancemethod(_cmf_core.solute___ge__, None, solute) -solute.__ne__ = new_instancemethod(_cmf_core.solute___ne__, None, solute) -solute.__repr__ = new_instancemethod(_cmf_core.solute___repr__, None, solute) -solute_swigregister = _cmf_core.solute_swigregister -solute_swigregister(solute) - -class solute_vector(object): - """ - - - Manages the solutes of the model. - - C++ includes: Solute.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - - def size(self, *args, **kwargs): - """ - size(solute_vector self) -> size_t - - size_t size() - const - """ - return _cmf_core.solute_vector_size(self, *args, **kwargs) - - - def __init__(self, *args, **kwargs): - """ - __init__(cmf::water::solute_vector self, std::string str) -> solute_vector - - solute_vector(std::string str) - - Creates a solute vector from solute names, separated by whitespace. - E.g. solutes= solute_vector("dO18 dH2") - """ - _cmf_core.solute_vector_swiginit(self, _cmf_core.new_solute_vector(*args, **kwargs)) - - def get_solute(self, *args, **kwargs): - """ - get_solute(solute_vector self, int position) -> solute - - cmf::water::solute* get_solute(int position) - """ - return _cmf_core.solute_vector_get_solute(self, *args, **kwargs) - - - def __getitem__(self, *args, **kwargs): - """__getitem__(solute_vector self, int i) -> solute""" - return _cmf_core.solute_vector___getitem__(self, *args, **kwargs) - - - def __len__(self, *args, **kwargs): - """__len__(solute_vector self) -> size_t""" - return _cmf_core.solute_vector___len__(self, *args, **kwargs) - - - def __iter__(self): - for i in range(len(self)): - yield self[i] - def __repr__(self): - return str([s.Name for s in self]) - - __swig_destroy__ = _cmf_core.delete_solute_vector -solute_vector.size = new_instancemethod(_cmf_core.solute_vector_size, None, solute_vector) -solute_vector.get_solute = new_instancemethod(_cmf_core.solute_vector_get_solute, None, solute_vector) -solute_vector.__getitem__ = new_instancemethod(_cmf_core.solute_vector___getitem__, None, solute_vector) -solute_vector.__len__ = new_instancemethod(_cmf_core.solute_vector___len__, None, solute_vector) -solute_vector_swigregister = _cmf_core.solute_vector_swigregister -solute_vector_swigregister(solute_vector) - -class SoluteTimeseries(object): - """ - - - A map of concentration time series for solutes. - - C++ includes: Solute.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - - def conc(self, *args, **kwargs): - """ - conc(SoluteTimeseries self, Time t, solute _Solute) -> real - - real - conc(cmf::math::Time t, const cmf::water::solute &_Solute) const - """ - return _cmf_core.SoluteTimeseries_conc(self, *args, **kwargs) - - - def size(self, *args, **kwargs): - """ - size(SoluteTimeseries self) -> size_t - - size_t - size() const - - Returns the number of solutes in the solution. - """ - return _cmf_core.SoluteTimeseries_size(self, *args, **kwargs) - - - def __init__(self, *args): - """ - __init__(cmf::water::SoluteTimeseries self) -> SoluteTimeseries - __init__(cmf::water::SoluteTimeseries self, solute_vector solutes, Time begin, Time step) -> SoluteTimeseries - __init__(cmf::water::SoluteTimeseries self, SoluteTimeseries sts) -> SoluteTimeseries - - SoluteTimeseries(const cmf::water::SoluteTimeseries &sts) - """ - _cmf_core.SoluteTimeseries_swiginit(self, _cmf_core.new_SoluteTimeseries(*args)) - - def __getitem__(self, *args, **kwargs): - """__getitem__(SoluteTimeseries self, solute solute) -> timeseries""" - return _cmf_core.SoluteTimeseries___getitem__(self, *args, **kwargs) - - - def __setitem__(self, *args, **kwargs): - """__setitem__(SoluteTimeseries self, solute solute, timeseries concentration)""" - return _cmf_core.SoluteTimeseries___setitem__(self, *args, **kwargs) - - - def __len__(self, *args, **kwargs): - """__len__(SoluteTimeseries self) -> size_t""" - return _cmf_core.SoluteTimeseries___len__(self, *args, **kwargs) - - __swig_destroy__ = _cmf_core.delete_SoluteTimeseries -SoluteTimeseries.conc = new_instancemethod(_cmf_core.SoluteTimeseries_conc, None, SoluteTimeseries) -SoluteTimeseries.size = new_instancemethod(_cmf_core.SoluteTimeseries_size, None, SoluteTimeseries) -SoluteTimeseries.__getitem__ = new_instancemethod(_cmf_core.SoluteTimeseries___getitem__, None, SoluteTimeseries) -SoluteTimeseries.__setitem__ = new_instancemethod(_cmf_core.SoluteTimeseries___setitem__, None, SoluteTimeseries) -SoluteTimeseries.__len__ = new_instancemethod(_cmf_core.SoluteTimeseries___len__, None, SoluteTimeseries) -SoluteTimeseries_swigregister = _cmf_core.SoluteTimeseries_swigregister -SoluteTimeseries_swigregister(SoluteTimeseries) - -class SoluteStorage(StateVariable): - """ - - - A class for the storage of any tracer. - - The state is the amount (mol, kg etc. see cmf::water) of the tracer in - the storage. - - The derivative function is given by: - - .. math:: - - - \\frac{dX}{dt}&=&\\sum_{f=1}^{F}\\left( q_f [X]_f\\right) + - X_{in} - r^-X \\left[\\frac{mol}{day}\\right]\\\\ F&=& - \\mbox{Number of fluxes in water storage} \\\\ q_f&=& - \\mbox{Water flux in } \\frac{m^3}{day} \\\\ - \\left[X\\right]_f &=& \\mbox{Concentration of solute X in flux - }q_f \\mbox{ in } \\frac{mol}{m^3} \\\\ X_{in} &=& - \\mbox{Absolute source or sink term} \\frac{mol}{day} \\\\ r^- - &=& \\mbox{Decay rate} \\frac 1{day} \\\\ V &=& - \\mbox{Volume of water in water storage }\\left[m^3\\right] - - - - - C++ includes: SoluteStorage.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - - def __init__(self, *args, **kwargs): - raise AttributeError("No constructor defined") - __repr__ = _swig_repr - - def set_adsorption(self, *args, **kwargs): - """ - set_adsorption(SoluteStorage self, Adsorption newadsorption, real m=-1) - - void set_adsorption(const Adsorption &newadsorption, real m=-1) - """ - return _cmf_core.SoluteStorage_set_adsorption(self, *args, **kwargs) - - decay = _swig_property(_cmf_core.SoluteStorage_decay_get, _cmf_core.SoluteStorage_decay_set) - source = _swig_property(_cmf_core.SoluteStorage_source_get, _cmf_core.SoluteStorage_source_set) - Solute = _swig_property(_cmf_core.SoluteStorage_Solute_get) - - def conc(self, *args, **kwargs): - """ - conc(SoluteStorage self) -> real - - real conc() - const - - Returns the concentration of the solute. - """ - return _cmf_core.SoluteStorage_conc(self, *args, **kwargs) - - - def set_conc(self, *args, **kwargs): - """ - set_conc(SoluteStorage self, real NewConcentration) - - void - set_conc(real NewConcentration) - - set a new concentration of dissolved tracers. - - In case of adsorption functions, the isotherm is used - """ - return _cmf_core.SoluteStorage_set_conc(self, *args, **kwargs) - - __swig_destroy__ = _cmf_core.delete_SoluteStorage -SoluteStorage.set_adsorption = new_instancemethod(_cmf_core.SoluteStorage_set_adsorption, None, SoluteStorage) -SoluteStorage.conc = new_instancemethod(_cmf_core.SoluteStorage_conc, None, SoluteStorage) -SoluteStorage.set_conc = new_instancemethod(_cmf_core.SoluteStorage_set_conc, None, SoluteStorage) -SoluteStorage_swigregister = _cmf_core.SoluteStorage_swigregister -SoluteStorage_swigregister(SoluteStorage) - -class flux_node(object): - """ - - - Base class for everything that can be connected by fluxes. - - Flux nodes can be WaterStorages, flux end points, sinks, sources and - bridges to other model domains (e.g. Ponded water to river system). - The base class can be used where a simple routing, potentially with - mixing, is needed. - - C++ includes: flux_node.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - node_id = _swig_property(_cmf_core.flux_node_node_id_get) - - def is_storage(self, *args, **kwargs): - """ - is_storage(flux_node self) -> bool - - virtual - bool is_storage() const - - true, if this is a waterstorage - """ - return _cmf_core.flux_node_is_storage(self, *args, **kwargs) - - Name = _swig_property(_cmf_core.flux_node_Name_get, _cmf_core.flux_node_Name_set) - - def to_string(self, *args, **kwargs): - """ - to_string(flux_node self) -> std::string - - virtual - std::string to_string() const - """ - return _cmf_core.flux_node_to_string(self, *args, **kwargs) - - __swig_destroy__ = _cmf_core.delete_flux_node - - def __eq__(self, *args, **kwargs): - """__eq__(flux_node self, flux_node other) -> bool""" - return _cmf_core.flux_node___eq__(self, *args, **kwargs) - - - def RecalcFluxes(self, *args, **kwargs): - """ - RecalcFluxes(flux_node self, Time t) -> bool - - virtual - bool RecalcFluxes(cmf::math::Time t) - - Pure flux_nodes do not influence fluxes, therefore no recalculation of - fluxes is required by flux_node. - - WaterStorage overrides this, since state changes require an update of - the fluxes - """ - return _cmf_core.flux_node_RecalcFluxes(self, *args, **kwargs) - - - def connection_to(self, *args, **kwargs): - """ - connection_to(flux_node self, flux_node target) -> flux_connection - - cmf::water::flux_connection* connection_to(const cmf::water::flux_node - &target) - - Returns the connection between this and target. - """ - return _cmf_core.flux_node_connection_to(self, *args, **kwargs) - - - def remove_connection(self, *args, **kwargs): - """ - remove_connection(flux_node self, cmf::water::flux_node::ptr To) -> bool - - bool - remove_connection(cmf::water::flux_node::ptr To) - - Remove the connection. - """ - return _cmf_core.flux_node_remove_connection(self, *args, **kwargs) - - - def flux_to(self, *args, **kwargs): - """ - flux_to(flux_node self, flux_node target, Time t) -> real - - real - flux_to(const cmf::water::flux_node &target, cmf::math::Time t) - - Returns the actual flux between this and target (positive sign means - "from this into target") - """ - return _cmf_core.flux_node_flux_to(self, *args, **kwargs) - - - def flux3d_to(self, *args, **kwargs): - """ - flux3d_to(flux_node self, flux_node target, Time t) -> point - - cmf::geometry::point flux3d_to(const cmf::water::flux_node &target, - cmf::math::Time t) - """ - return _cmf_core.flux_node_flux3d_to(self, *args, **kwargs) - - - def get_3d_flux(self, *args, **kwargs): - """ - get_3d_flux(flux_node self, Time t) -> point - - cmf::geometry::point get_3d_flux(cmf::math::Time t) - - Returns the sum of all flux vectors. - """ - return _cmf_core.flux_node_get_3d_flux(self, *args, **kwargs) - - - def waterbalance(self, *args, **kwargs): - """ - waterbalance(flux_node self, Time t, flux_connection Without=None) -> real - - real - waterbalance(cmf::math::Time t, const flux_connection *Without=0) - const - - Returns the sum of all fluxes (positive and negative) at time t. - - Single fluxes can be excluded from the calculation - - Parameters: - ----------- - - t: Time of the query - - Without: A flux_connection that is excluded from the waterbalance - (e.g. to prevent closed circuits) - """ - return _cmf_core.flux_node_waterbalance(self, *args, **kwargs) - - - def __call__(self, *args, **kwargs): - """__call__(flux_node self, Time t) -> real""" - return _cmf_core.flux_node___call__(self, *args, **kwargs) - - - def conc(self, *args, **kwargs): - """ - conc(flux_node self, Time t, solute Solute) -> real - - virtual real - conc(cmf::math::Time t, const cmf::water::solute &Solute) const - - Returns the water quality of the flux_node, if it is not overridden - this is the mix of the incoming fluxes. - """ - return _cmf_core.flux_node_conc(self, *args, **kwargs) - - position = _swig_property(_cmf_core.flux_node_position_get, _cmf_core.flux_node_position_set) - - def is_empty(self, *args, **kwargs): - """ - is_empty(flux_node self) -> double - - virtual - double is_empty() const - - Returns true if the node has no water. - """ - return _cmf_core.flux_node_is_empty(self, *args, **kwargs) - - - def __init__(self, *args, **kwargs): - """ - __init__(cmf::water::flux_node self, project _project, point location) -> flux_node - - flux_node(cmf::project &_project, cmf::geometry::point - location=cmf::geometry::point()) - """ - _cmf_core.flux_node_swiginit(self, _cmf_core.new_flux_node(*args, **kwargs)) - project = _swig_property(_cmf_core.flux_node_project_get) - potential = _swig_property(_cmf_core.flux_node_potential_get, _cmf_core.flux_node_potential_set) - connections = _swig_property(_cmf_core.flux_node_connections_get) - - def __repr__(self): return self.to_string() - def fluxes(self,t): - return [(con.q(self,t),con[self]) for con in self.connections] - @property - def connected_nodes(self): - return [con[self] for con in self.connections] - -flux_node.is_storage = new_instancemethod(_cmf_core.flux_node_is_storage, None, flux_node) -flux_node.to_string = new_instancemethod(_cmf_core.flux_node_to_string, None, flux_node) -flux_node.__eq__ = new_instancemethod(_cmf_core.flux_node___eq__, None, flux_node) -flux_node.RecalcFluxes = new_instancemethod(_cmf_core.flux_node_RecalcFluxes, None, flux_node) -flux_node.connection_to = new_instancemethod(_cmf_core.flux_node_connection_to, None, flux_node) -flux_node.remove_connection = new_instancemethod(_cmf_core.flux_node_remove_connection, None, flux_node) -flux_node.flux_to = new_instancemethod(_cmf_core.flux_node_flux_to, None, flux_node) -flux_node.flux3d_to = new_instancemethod(_cmf_core.flux_node_flux3d_to, None, flux_node) -flux_node.get_3d_flux = new_instancemethod(_cmf_core.flux_node_get_3d_flux, None, flux_node) -flux_node.waterbalance = new_instancemethod(_cmf_core.flux_node_waterbalance, None, flux_node) -flux_node.__call__ = new_instancemethod(_cmf_core.flux_node___call__, None, flux_node) -flux_node.conc = new_instancemethod(_cmf_core.flux_node_conc, None, flux_node) -flux_node.is_empty = new_instancemethod(_cmf_core.flux_node_is_empty, None, flux_node) -flux_node_swigregister = _cmf_core.flux_node_swigregister -flux_node_swigregister(flux_node) - - -def count_node_references(*args, **kwargs): - """ - count_node_references(cmf::water::flux_node::ptr node) -> int - - int - cmf::water::count_node_references(flux_node::ptr node) - """ - return _cmf_core.count_node_references(*args, **kwargs) - -def get_higher_node(*args, **kwargs): - """ - get_higher_node(cmf::water::flux_node::ptr node1, cmf::water::flux_node::ptr node2) -> cmf::water::flux_node::ptr - - flux_node::ptr - cmf::water::get_higher_node(flux_node::ptr node1, flux_node::ptr - node2) - """ - return _cmf_core.get_higher_node(*args, **kwargs) - -def get_lower_node(*args, **kwargs): - """ - get_lower_node(cmf::water::flux_node::ptr node1, cmf::water::flux_node::ptr node2) -> cmf::water::flux_node::ptr - - flux_node::ptr - cmf::water::get_lower_node(flux_node::ptr node1, flux_node::ptr node2) - - """ - return _cmf_core.get_lower_node(*args, **kwargs) -class waterbalance_integrator(integratable): - """ - - - The waterbalance_integrator is an integratable for precise output of - the average water balance of a flux_node over time. - - It can be added to a solver (any cmf::math::Integrator), which is than - calling the integrate method at each substep. - - C++ includes: flux_node.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - - def integration_t(self, *args, **kwargs): - """ - integration_t(waterbalance_integrator self) -> Time - - cmf::math::Time - integration_t() const - - Returns the duration of the integration. - """ - return _cmf_core.waterbalance_integrator_integration_t(self, *args, **kwargs) - - - def t0(self, *args, **kwargs): - """ - t0(waterbalance_integrator self) -> Time - - cmf::math::Time t0() const - - Returns the start time of the integration. - """ - return _cmf_core.waterbalance_integrator_t0(self, *args, **kwargs) - - - def __get_node(self, *args, **kwargs): - """ - __get_node(waterbalance_integrator self) -> cmf::water::flux_node::ptr - - flux_node::ptr get_node() const - - Returns the node of this integrator. - """ - return _cmf_core.waterbalance_integrator___get_node(self, *args, **kwargs) - - - def __set_node(self, *args, **kwargs): - """ - __set_node(waterbalance_integrator self, cmf::water::flux_node::ptr node) - - void set_node(cmf::water::flux_node::ptr node) - """ - return _cmf_core.waterbalance_integrator___set_node(self, *args, **kwargs) - - - def __init__(self, *args, **kwargs): - """ - __init__(cmf::water::waterbalance_integrator self, cmf::water::flux_node::ptr node) -> waterbalance_integrator - - waterbalance_integrator(cmf::water::flux_node::ptr node) - """ - _cmf_core.waterbalance_integrator_swiginit(self, _cmf_core.new_waterbalance_integrator(*args, **kwargs)) - - node = _swig_property(_cmf_core.waterbalance_integrator___get_node, - _cmf_core.waterbalance_integrator___set_node) - - __swig_destroy__ = _cmf_core.delete_waterbalance_integrator -waterbalance_integrator.integration_t = new_instancemethod(_cmf_core.waterbalance_integrator_integration_t, None, waterbalance_integrator) -waterbalance_integrator.t0 = new_instancemethod(_cmf_core.waterbalance_integrator_t0, None, waterbalance_integrator) -waterbalance_integrator.__get_node = new_instancemethod(_cmf_core.waterbalance_integrator___get_node, None, waterbalance_integrator) -waterbalance_integrator.__set_node = new_instancemethod(_cmf_core.waterbalance_integrator___set_node, None, waterbalance_integrator) -waterbalance_integrator_swigregister = _cmf_core.waterbalance_integrator_swigregister -waterbalance_integrator_swigregister(waterbalance_integrator) - -class flux_connection(object): - """ - - - The connections in cmf hold the processes for the calculation of - fluxes between water storages and model boundaries. - - Todo Elaborate on this Represents a connection between flux_nodes, - where water fluxes occur. - - C++ includes: flux_connection.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - - def __init__(self, *args, **kwargs): - raise AttributeError("No constructor defined - class is abstract") - __repr__ = _swig_repr - - def left_node(self, *args, **kwargs): - """ - left_node(flux_connection self) -> cmf::water::flux_node::ptr - - flux_node::ptr left_node() const - - Returns the left node of this connection. - """ - return _cmf_core.flux_connection_left_node(self, *args, **kwargs) - - - def right_node(self, *args, **kwargs): - """ - right_node(flux_connection self) -> cmf::water::flux_node::ptr - - flux_node::ptr right_node() const - - returns the right node of this connection - """ - return _cmf_core.flux_connection_right_node(self, *args, **kwargs) - - - def kill_me(self, *args, **kwargs): - """ - kill_me(flux_connection self) -> bool - - bool - kill_me() - - Deregisters this connection from its nodes. Returns true if only one - reference is left. - """ - return _cmf_core.flux_connection_kill_me(self, *args, **kwargs) - - - def refresh(self, *args, **kwargs): - """ - refresh(flux_connection self, Time t) - - void - refresh(cmf::math::Time t) - - Performes a new calculation of the flux. - """ - return _cmf_core.flux_connection_refresh(self, *args, **kwargs) - - connection_id = _swig_property(_cmf_core.flux_connection_connection_id_get) - - def __eq__(self, *args, **kwargs): - """__eq__(flux_connection self, flux_connection other) -> bool""" - return _cmf_core.flux_connection___eq__(self, *args, **kwargs) - - - def get_target(self, *args): - """ - get_target(flux_connection self, flux_node inquirer) -> cmf::water::flux_node::ptr - get_target(flux_connection self, int index) -> cmf::water::flux_node::ptr - - flux_node::ptr get_target(int index) const - - With index 0, the left node is returned, with index 1 the right node - of the connection. - """ - return _cmf_core.flux_connection_get_target(self, *args) - - - def exchange_target(self, *args, **kwargs): - """ - exchange_target(flux_connection self, cmf::water::flux_node::ptr oldtarget, cmf::water::flux_node::ptr newTarget) - - void exchange_target(flux_node::ptr oldtarget, flux_node::ptr - newTarget) - """ - return _cmf_core.flux_connection_exchange_target(self, *args, **kwargs) - - - def q(self, *args, **kwargs): - """ - q(flux_connection self, flux_node inquirer, Time t) -> real - - real q(const - flux_node &inquirer, cmf::math::Time t) - - Returns the current flux through a connection. Negative signs mean out - of the inquirer, positive are inflows to the inquirer. - """ - return _cmf_core.flux_connection_q(self, *args, **kwargs) - - - def conc(self, *args, **kwargs): - """ - conc(flux_connection self, Time t, solute _Solute) -> real - - real - conc(cmf::math::Time t, const cmf::water::solute &_Solute) - - Returns the concentration of the flux. - - If not overridden, it returns the concentration of the source of the - flux (direction depending) - """ - return _cmf_core.flux_connection_conc(self, *args, **kwargs) - - type = _swig_property(_cmf_core.flux_connection_type_get) - - def get_tracer_filter(self, *args): - """ - get_tracer_filter(flux_connection self) -> real - get_tracer_filter(flux_connection self, solute S) -> real - - real get_tracer_filter(solute S) - - A value ranging from 0 to 1 to filter tracers out of the water flux. - - """ - return _cmf_core.flux_connection_get_tracer_filter(self, *args) - - - def set_tracer_filter(self, *args): - """ - set_tracer_filter(flux_connection self, real value) - set_tracer_filter(flux_connection self, solute S, real value) - - void set_tracer_filter(solute S, real value) - """ - return _cmf_core.flux_connection_set_tracer_filter(self, *args) - - - def to_string(self, *args, **kwargs): - """ - to_string(flux_connection self) -> std::string - - virtual std::string to_string() const - """ - return _cmf_core.flux_connection_to_string(self, *args, **kwargs) - - - def short_string(self, *args, **kwargs): - """ - short_string(flux_connection self) -> std::string - - virtual std::string short_string() const - """ - return _cmf_core.flux_connection_short_string(self, *args, **kwargs) - - __swig_destroy__ = _cmf_core.delete_flux_connection - - def __repr__(self): - return self.to_string() - def __getitem__(self,index): - return self.get_target(index) - def __iter__(self): - yield self.get_target(0) - yield self.get_target(1) - def __contains__(self,cmp): - return cmp==self[0] or cmp==self[1] - -flux_connection.left_node = new_instancemethod(_cmf_core.flux_connection_left_node, None, flux_connection) -flux_connection.right_node = new_instancemethod(_cmf_core.flux_connection_right_node, None, flux_connection) -flux_connection.kill_me = new_instancemethod(_cmf_core.flux_connection_kill_me, None, flux_connection) -flux_connection.refresh = new_instancemethod(_cmf_core.flux_connection_refresh, None, flux_connection) -flux_connection.__eq__ = new_instancemethod(_cmf_core.flux_connection___eq__, None, flux_connection) -flux_connection.get_target = new_instancemethod(_cmf_core.flux_connection_get_target, None, flux_connection) -flux_connection.exchange_target = new_instancemethod(_cmf_core.flux_connection_exchange_target, None, flux_connection) -flux_connection.q = new_instancemethod(_cmf_core.flux_connection_q, None, flux_connection) -flux_connection.conc = new_instancemethod(_cmf_core.flux_connection_conc, None, flux_connection) -flux_connection.get_tracer_filter = new_instancemethod(_cmf_core.flux_connection_get_tracer_filter, None, flux_connection) -flux_connection.set_tracer_filter = new_instancemethod(_cmf_core.flux_connection_set_tracer_filter, None, flux_connection) -flux_connection.to_string = new_instancemethod(_cmf_core.flux_connection_to_string, None, flux_connection) -flux_connection.short_string = new_instancemethod(_cmf_core.flux_connection_short_string, None, flux_connection) -flux_connection_swigregister = _cmf_core.flux_connection_swigregister -flux_connection_swigregister(flux_connection) - - -def replace_node(*args, **kwargs): - """ - replace_node(cmf::water::flux_node::ptr oldnode, cmf::water::flux_node::ptr newnode) -> int - - int - cmf::water::replace_node(cmf::water::flux_node::ptr oldnode, - cmf::water::flux_node::ptr newnode) - """ - return _cmf_core.replace_node(*args, **kwargs) -class connection_list(object): - """ - - - A self sorting list of connections. - - C++ includes: flux_connection.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - - def append(self, *args, **kwargs): - """ - append(connection_list self, cmf::water::flux_connection::ptr connection) -> bool - - bool - append(cmf::water::flux_connection::ptr connection) - """ - return _cmf_core.connection_list_append(self, *args, **kwargs) - - - def extend(self, *args, **kwargs): - """ - extend(connection_list self, connection_list connections) - - void - extend(const connection_list &connections) - """ - return _cmf_core.connection_list_extend(self, *args, **kwargs) - - - def contains(self, *args, **kwargs): - """ - contains(connection_list self, cmf::water::flux_connection::ptr connection) -> bool - - bool - contains(cmf::water::flux_connection::ptr connection) const - """ - return _cmf_core.connection_list_contains(self, *args, **kwargs) - - - def remove(self, *args, **kwargs): - """ - remove(connection_list self, cmf::water::flux_connection::ptr connection) -> bool - - bool - remove(cmf::water::flux_connection::ptr connection) - """ - return _cmf_core.connection_list_remove(self, *args, **kwargs) - - - def do_action(self, *args, **kwargs): - """ - do_action(connection_list self, Time t, bool use_OpenMP=True) - - void - do_action(cmf::math::Time t, bool use_OpenMP=true) - """ - return _cmf_core.connection_list_do_action(self, *args, **kwargs) - - - def size(self, *args, **kwargs): - """ - size(connection_list self) -> size_t - - size_t - size() const - """ - return _cmf_core.connection_list_size(self, *args, **kwargs) - - - def at(self, *args, **kwargs): - """ - at(connection_list self, size_t pos) -> cmf::water::flux_connection::ptr - - cmf::water::flux_connection::ptr at(size_t pos) const - """ - return _cmf_core.connection_list_at(self, *args, **kwargs) - - - def begin(self, *args): - """ - begin(connection_list self) -> cmf::water::connection_list::iterator - begin(connection_list self) -> cmf::water::connection_list::const_iterator - - const_iterator begin() const - """ - return _cmf_core.connection_list_begin(self, *args) - - - def end(self, *args): - """ - end(connection_list self) -> cmf::water::connection_list::iterator - end(connection_list self) -> cmf::water::connection_list::const_iterator - - const_iterator end() const - """ - return _cmf_core.connection_list_end(self, *args) - - __swig_destroy__ = _cmf_core.delete_connection_list - - def __len__(self, *args, **kwargs): - """__len__(connection_list self) -> size_t""" - return _cmf_core.connection_list___len__(self, *args, **kwargs) - - - def __contains__(self, *args, **kwargs): - """__contains__(connection_list self, cmf::water::flux_connection::ptr const & con) -> bool""" - return _cmf_core.connection_list___contains__(self, *args, **kwargs) - - - def __repr__(self): - return repr(list(self)) + "" - def __getitem__(self,index): - return self.at(index) - def __iter__(self): - for i in xrange(len(self)): - yield self.at(i) - - - def __init__(self, *args, **kwargs): - """__init__(cmf::water::connection_list self) -> connection_list""" - _cmf_core.connection_list_swiginit(self, _cmf_core.new_connection_list(*args, **kwargs)) -connection_list.append = new_instancemethod(_cmf_core.connection_list_append, None, connection_list) -connection_list.extend = new_instancemethod(_cmf_core.connection_list_extend, None, connection_list) -connection_list.contains = new_instancemethod(_cmf_core.connection_list_contains, None, connection_list) -connection_list.remove = new_instancemethod(_cmf_core.connection_list_remove, None, connection_list) -connection_list.do_action = new_instancemethod(_cmf_core.connection_list_do_action, None, connection_list) -connection_list.size = new_instancemethod(_cmf_core.connection_list_size, None, connection_list) -connection_list.at = new_instancemethod(_cmf_core.connection_list_at, None, connection_list) -connection_list.begin = new_instancemethod(_cmf_core.connection_list_begin, None, connection_list) -connection_list.end = new_instancemethod(_cmf_core.connection_list_end, None, connection_list) -connection_list.__len__ = new_instancemethod(_cmf_core.connection_list___len__, None, connection_list) -connection_list.__contains__ = new_instancemethod(_cmf_core.connection_list___contains__, None, connection_list) -connection_list_swigregister = _cmf_core.connection_list_swigregister -connection_list_swigregister(connection_list) - -class flux_integrator(integratable): - """ - - - The flux_integrator is an integratable for precise output of average - fluxes over time. - - It can be added to solver (any cmf::math::Integrator), which is then - calling the integrate method at each substep. - - C++ includes: flux_connection.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - - def integration_t(self, *args, **kwargs): - """ - integration_t(flux_integrator self) -> Time - - cmf::math::Time integration_t() const - - Returns the duration of the integration. - """ - return _cmf_core.flux_integrator_integration_t(self, *args, **kwargs) - - - def t0(self, *args, **kwargs): - """ - t0(flux_integrator self) -> Time - - cmf::math::Time t0() const - - Returns the start time of the integration. - """ - return _cmf_core.flux_integrator_t0(self, *args, **kwargs) - - invert = _swig_property(_cmf_core.flux_integrator_invert_get, _cmf_core.flux_integrator_invert_set) - - def connection(self, *args, **kwargs): - """ - connection(flux_integrator self) -> cmf::water::flux_connection::ptr - - flux_connection::ptr connection() const - - Returns the flux_connection. - """ - return _cmf_core.flux_integrator_connection(self, *args, **kwargs) - - - def __init__(self, *args): - """ - __init__(cmf::water::flux_integrator self, flux_connection connection) -> flux_integrator - __init__(cmf::water::flux_integrator self, cmf::water::flux_node::ptr left, cmf::water::flux_node::ptr right) -> flux_integrator - - flux_integrator(cmf::water::flux_node::ptr left, - cmf::water::flux_node::ptr right) - - Creates a flux_integrator from the endpoints of a connection. Throws - if there is no connection between the endpoints. - """ - _cmf_core.flux_integrator_swiginit(self, _cmf_core.new_flux_integrator(*args)) - __swig_destroy__ = _cmf_core.delete_flux_integrator -flux_integrator.integration_t = new_instancemethod(_cmf_core.flux_integrator_integration_t, None, flux_integrator) -flux_integrator.t0 = new_instancemethod(_cmf_core.flux_integrator_t0, None, flux_integrator) -flux_integrator.connection = new_instancemethod(_cmf_core.flux_integrator_connection, None, flux_integrator) -flux_integrator_swigregister = _cmf_core.flux_integrator_swigregister -flux_integrator_swigregister(flux_integrator) - -class linear_scale(object): - """ - - - A linear scaling functor, with slope and displacement. - - C++ includes: boundary_condition.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - displacement = _swig_property(_cmf_core.linear_scale_displacement_get, _cmf_core.linear_scale_displacement_set) - slope = _swig_property(_cmf_core.linear_scale_slope_get, _cmf_core.linear_scale_slope_set) - - def __call__(self, *args, **kwargs): - """__call__(linear_scale self, real value) -> real""" - return _cmf_core.linear_scale___call__(self, *args, **kwargs) - - - def __init__(self, *args, **kwargs): - """ - __init__(cmf::water::linear_scale self, real _slope=1, real _displacement=0) -> linear_scale - - linear_scale(real _slope=1, real _displacement=0) - - Creates a linear scale (by default it is a unity scale, :math:`a=1; b=0`) - """ - _cmf_core.linear_scale_swiginit(self, _cmf_core.new_linear_scale(*args, **kwargs)) - __swig_destroy__ = _cmf_core.delete_linear_scale -linear_scale.__call__ = new_instancemethod(_cmf_core.linear_scale___call__, None, linear_scale) -linear_scale_swigregister = _cmf_core.linear_scale_swigregister -linear_scale_swigregister(linear_scale) - -class DirichletBoundary(flux_node): - """ - - - Dirichlet (constant head) boundary condition. - - This boundary condition can be used either as a pure sink boundary - condition or as a conditional source / sink boundary condition. The - constant head of the boundary condition is interpreted and handled by - the connections of the boundary condition. Not head aware connections, - should not be used, since they are ignoring the constant head. - - C++ includes: boundary_condition.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - - def set_conc(self, *args, **kwargs): - """ - set_conc(DirichletBoundary self, solute _Solute, double value) - - virtual void set_conc(const cmf::water::solute &_Solute, double value) - - """ - return _cmf_core.DirichletBoundary_set_conc(self, *args, **kwargs) - - is_source = _swig_property(_cmf_core.DirichletBoundary_is_source_get, _cmf_core.DirichletBoundary_is_source_set) - - def RecalcFluxes(self, *args, **kwargs): - """ - RecalcFluxes(DirichletBoundary self, Time t) -> bool - - virtual bool RecalcFluxes(cmf::math::Time t) - - Pure flux_nodes do not influence fluxes, therefore no recalculation of - fluxes is required by flux_node. - - WaterStorage overrides this, since state changes require an update of - the fluxes - """ - return _cmf_core.DirichletBoundary_RecalcFluxes(self, *args, **kwargs) - - - def __init__(self, *args, **kwargs): - """ - __init__(cmf::water::DirichletBoundary self, project _p, real potential, point Location) -> DirichletBoundary - - DirichletBoundary(cmf::project &_p, real potential, - cmf::geometry::point Location=cmf::geometry::point()) - """ - _cmf_core.DirichletBoundary_swiginit(self, _cmf_core.new_DirichletBoundary(*args, **kwargs)) - - def __repr__(self): - return self.to_string() - - __swig_destroy__ = _cmf_core.delete_DirichletBoundary -DirichletBoundary.set_conc = new_instancemethod(_cmf_core.DirichletBoundary_set_conc, None, DirichletBoundary) -DirichletBoundary.RecalcFluxes = new_instancemethod(_cmf_core.DirichletBoundary_RecalcFluxes, None, DirichletBoundary) -DirichletBoundary_swigregister = _cmf_core.DirichletBoundary_swigregister -DirichletBoundary_swigregister(DirichletBoundary) - -class NeumannBoundary(flux_node): - """ - - - A Neumann boundary condition (constant flux boundary condition) - - The flux is a timeseries, but can be used as a scalar. To scale the - timeseries to the specific conditions of this boundary condition the - linear_scale flux_scale can be used. - - C++ includes: boundary_condition.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - - def get_flux(self, *args, **kwargs): - """ - get_flux(NeumannBoundary self) -> timeseries - - cmf::math::timeseries get_flux() - - The timeseries of the boundary flux. - """ - return _cmf_core.NeumannBoundary_get_flux(self, *args, **kwargs) - - - def set_flux(self, *args): - """ - set_flux(NeumannBoundary self, timeseries new_flux) - set_flux(NeumannBoundary self, double new_flux) - - void - set_flux(double new_flux) - - Set a constant as the boundary flux. - """ - return _cmf_core.NeumannBoundary_set_flux(self, *args) - - flux_scale = _swig_property(_cmf_core.NeumannBoundary_flux_scale_get, _cmf_core.NeumannBoundary_flux_scale_set) - concentration = _swig_property(_cmf_core.NeumannBoundary_concentration_get, _cmf_core.NeumannBoundary_concentration_set) - - def __call__(self, *args, **kwargs): - """__call__(NeumannBoundary self, Time t) -> real""" - return _cmf_core.NeumannBoundary___call__(self, *args, **kwargs) - - - def connect_to(self, *args, **kwargs): - """ - connect_to(NeumannBoundary self, cmf::water::flux_node::ptr target) - - void - connect_to(cmf::water::flux_node::ptr target) - """ - return _cmf_core.NeumannBoundary_connect_to(self, *args, **kwargs) - - - def __init__(self, *args): - """ - __init__(cmf::water::NeumannBoundary self, project _project, timeseries _flux, SoluteTimeseries _concentration, point loc) -> NeumannBoundary - __init__(cmf::water::NeumannBoundary self, project _project, point loc) -> NeumannBoundary - - NeumannBoundary(cmf::project &_project, cmf::geometry::point - loc=cmf::geometry::point()) - """ - _cmf_core.NeumannBoundary_swiginit(self, _cmf_core.new_NeumannBoundary(*args)) - - def create(*args, **kwargs): - """create(cmf::water::flux_node::ptr target) -> cmf::water::NeumannBoundary::ptr""" - return _cmf_core.NeumannBoundary_create(*args, **kwargs) - - create = staticmethod(create) - - def __repr__(self): - return self.to_string() - - - flux = property(get_flux,set_flux,"The flux over the boundary condition") - - __swig_destroy__ = _cmf_core.delete_NeumannBoundary -NeumannBoundary.get_flux = new_instancemethod(_cmf_core.NeumannBoundary_get_flux, None, NeumannBoundary) -NeumannBoundary.set_flux = new_instancemethod(_cmf_core.NeumannBoundary_set_flux, None, NeumannBoundary) -NeumannBoundary.__call__ = new_instancemethod(_cmf_core.NeumannBoundary___call__, None, NeumannBoundary) -NeumannBoundary.connect_to = new_instancemethod(_cmf_core.NeumannBoundary_connect_to, None, NeumannBoundary) -NeumannBoundary_swigregister = _cmf_core.NeumannBoundary_swigregister -NeumannBoundary_swigregister(NeumannBoundary) - -def NeumannBoundary_create(*args, **kwargs): - """NeumannBoundary_create(cmf::water::flux_node::ptr target) -> cmf::water::NeumannBoundary::ptr""" - return _cmf_core.NeumannBoundary_create(*args, **kwargs) - -class NeumannFlux(flux_connection): - """ - - - Connection between Neumann-boundary and a flux node. - - This flux_connection is created, when connecting a Neumann boundary - condition with a state variable using Neumann::connect_to - - C++ includes: boundary_condition.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - - def __init__(self, *args, **kwargs): - """ - __init__(cmf::water::NeumannFlux self, std::shared_ptr< cmf::water::NeumannBoundary > left, cmf::water::flux_node::ptr right) -> NeumannFlux - - NeumannFlux(std::shared_ptr< NeumannBoundary > left, - cmf::water::flux_node::ptr right) - """ - _cmf_core.NeumannFlux_swiginit(self, _cmf_core.new_NeumannFlux(*args, **kwargs)) - __swig_destroy__ = _cmf_core.delete_NeumannFlux -NeumannFlux_swigregister = _cmf_core.NeumannFlux_swigregister -NeumannFlux_swigregister(NeumannFlux) - -class WaterStorage(StateVariable, StateVariableOwner, flux_node): - """ - - - A state variable for the storage of water. - - A class for the storage of water. The state is the volume of water - stored in :math:`m^3` The derivative function is given by: - - - .. math:: - - \\frac{dV}{dt}&=&\\sum_{f=1}^{F} q_f \\\\ - F&=& \\mbox{Number of fluxes in water storage} \\\\ q_f&=& - \\mbox{Water flux in } \\frac{m^3}{day} \\\\ - - - - - Todo Check the head based state mode - - C++ includes: WaterStorage.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - - def __init__(self, *args, **kwargs): - """ - __init__(cmf::water::WaterStorage self, project project, std::string const & Name, double InitialState=0, double scale=1) -> WaterStorage - - WaterStorage(cmf::project &project, const std::string &Name="", - double InitialState=0, double scale=1) - - creates a water storage (abstract class) - - Parameters: - ----------- - - project: The project the waterstorage belongs to - - Name: Name of the water storage - - InitialState: Initial water content in m3 - - scale: A kind of "standard size" in m3 of the water storage to - scale tolerances, default 1m3 - """ - _cmf_core.WaterStorage_swiginit(self, _cmf_core.new_WaterStorage(*args, **kwargs)) - - def from_node(*args, **kwargs): - """from_node(cmf::water::flux_node::ptr node) -> std::shared_ptr< cmf::water::WaterStorage >""" - return _cmf_core.WaterStorage_from_node(*args, **kwargs) - - from_node = staticmethod(from_node) - - def Solute(self, *args): - """ - Solute(WaterStorage self, solute _Solute) -> SoluteStorage - Solute(WaterStorage self, solute _Solute) -> SoluteStorage - - const - SoluteStorage& Solute(const cmf::water::solute &_Solute) const - """ - return _cmf_core.WaterStorage_Solute(self, *args) - - - def conc(self, *args): - """ - conc(WaterStorage self, solute _Solute) -> real - conc(WaterStorage self, Time t, solute _Solute) -> real - conc(WaterStorage self, solute _Solute, real NewConcetration) - - void - conc(const cmf::water::solute &_Solute, real NewConcetration) - - Sets a new concentration. - """ - return _cmf_core.WaterStorage_conc(self, *args) - - - def cast(*args, **kwargs): - """cast(std::shared_ptr< cmf::water::flux_node > node) -> std::shared_ptr< cmf::water::WaterStorage >""" - return _cmf_core.WaterStorage_cast(*args, **kwargs) - - cast = staticmethod(cast) - - def create(*args, **kwargs): - """create(project _project, real initial_state=0.0, real scale=1.0) -> std::shared_ptr< cmf::water::WaterStorage >""" - return _cmf_core.WaterStorage_create(*args, **kwargs) - - create = staticmethod(create) - volume = _swig_property(_cmf_core.WaterStorage_volume_get, _cmf_core.WaterStorage_volume_set) - statevariable = _swig_property(_cmf_core.WaterStorage_statevariable_get, _cmf_core.WaterStorage_statevariable_set) - - def __repr__(self): - return self.to_string() - - __swig_destroy__ = _cmf_core.delete_WaterStorage -WaterStorage.Solute = new_instancemethod(_cmf_core.WaterStorage_Solute, None, WaterStorage) -WaterStorage.conc = new_instancemethod(_cmf_core.WaterStorage_conc, None, WaterStorage) -WaterStorage_swigregister = _cmf_core.WaterStorage_swigregister -WaterStorage_swigregister(WaterStorage) - -def WaterStorage_from_node(*args, **kwargs): - """WaterStorage_from_node(cmf::water::flux_node::ptr node) -> std::shared_ptr< cmf::water::WaterStorage >""" - return _cmf_core.WaterStorage_from_node(*args, **kwargs) - -def WaterStorage_cast(*args, **kwargs): - """WaterStorage_cast(std::shared_ptr< cmf::water::flux_node > node) -> std::shared_ptr< cmf::water::WaterStorage >""" - return _cmf_core.WaterStorage_cast(*args, **kwargs) - -def WaterStorage_create(*args, **kwargs): - """WaterStorage_create(project _project, real initial_state=0.0, real scale=1.0) -> std::shared_ptr< cmf::water::WaterStorage >""" - return _cmf_core.WaterStorage_create(*args, **kwargs) - -class waterbalance_connection(flux_connection): - """ - - - Routes the sum of all other fluxes to a target. - - - - .. math:: - - q_{1,0} = \\sum_{i=2}^N{q_{1,i}(V_1,V_i,t)} - - where: - :math:`q_{i,j}` is the flux between the two node i and j. Subscript 0 is the - right node, subscript 1 is the left node and 2..N are the nodes - connected to the left node, except for the right node - - C++ includes: simple_connections.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - - def __init__(self, *args, **kwargs): - """ - __init__(cmf::water::waterbalance_connection self, cmf::water::flux_node::ptr source, cmf::water::flux_node::ptr target) -> waterbalance_connection - - waterbalance_connection(flux_node::ptr source, flux_node::ptr target) - - """ - _cmf_core.waterbalance_connection_swiginit(self, _cmf_core.new_waterbalance_connection(*args, **kwargs)) - __swig_destroy__ = _cmf_core.delete_waterbalance_connection -waterbalance_connection_swigregister = _cmf_core.waterbalance_connection_swigregister -waterbalance_connection_swigregister(waterbalance_connection) - -class external_control_connection(flux_connection): - """ - - - Flux from one node to another, controlled by the user or an external - program, by changing the flux constant. - - It is easy to create negative volumes in water storages with this - connection, which can be hazard to the solver, since most connections - rely on a positive volume in a storage. Handle with care! - - C++ includes: simple_connections.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - flux = _swig_property(_cmf_core.external_control_connection_flux_get, _cmf_core.external_control_connection_flux_set) - - def __init__(self, *args, **kwargs): - """ - __init__(cmf::water::external_control_connection self, cmf::water::flux_node::ptr source, cmf::water::flux_node::ptr target, real flux_value=0) -> external_control_connection - - external_control_connection(flux_node::ptr source, flux_node::ptr - target, real flux_value=0) - """ - _cmf_core.external_control_connection_swiginit(self, _cmf_core.new_external_control_connection(*args, **kwargs)) - __swig_destroy__ = _cmf_core.delete_external_control_connection -external_control_connection_swigregister = _cmf_core.external_control_connection_swigregister -external_control_connection_swigregister(external_control_connection) - - -def set_flux(*args, **kwargs): - """ - set_flux(cmf::water::flux_node::ptr source, cmf::water::flux_node::ptr target, real flux_value) - - void - cmf::water::set_flux(flux_node::ptr source, flux_node::ptr target, - real flux_value) - - Sets a constant flux between two nodes, if an - external_control_connection exists. - """ - return _cmf_core.set_flux(*args, **kwargs) - -def can_set_flux(*args, **kwargs): - """ - can_set_flux(cmf::water::flux_node::ptr source, cmf::water::flux_node::ptr target) -> bool - - bool - cmf::water::can_set_flux(flux_node::ptr source, flux_node::ptr target) - - Checks if a constant flux between two nodes can be set. - - Returns true if the nodes are connected by an - external_control_connection - """ - return _cmf_core.can_set_flux(*args, **kwargs) -class kinematic_wave(flux_connection): - """ - - - Calculates flux out of a storage as a linear function of its volume to - a power. - - Deprecated kinematic_wave is superseeded by LinearStorageConnection - and PowerLawConnection - - - - .. math:: - - q = \\frac 1 {t_r} {\\left(\\frac{V - V_{residual}}{V_0} - \\right)^\\beta} - - where: :math:`V_{residual} [m^3]` The volume of - water not flowing out (default = 0) - - :math:`V_0` The reference volume to scale the exponent (default = 1m3/day) - - :math:`\\beta` A parameter to shape the response curve. In case of - :math:`\\beta \\neq 1`, :math:`t_r` is not a residence time, but just a - parameter. - - :math:`t_r [days]` The residence time of the water in this storage in days - - WARNING: :math:`\\beta < 0.5` may lead to numerical troubles and have a - dubious hydrological meaning. Please avoid. - - C++ includes: simple_connections.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - residencetime = _swig_property(_cmf_core.kinematic_wave_residencetime_get, _cmf_core.kinematic_wave_residencetime_set) - exponent = _swig_property(_cmf_core.kinematic_wave_exponent_get, _cmf_core.kinematic_wave_exponent_set) - residual = _swig_property(_cmf_core.kinematic_wave_residual_get, _cmf_core.kinematic_wave_residual_set) - V0 = _swig_property(_cmf_core.kinematic_wave_V0_get, _cmf_core.kinematic_wave_V0_set) - - def __init__(self, *args, **kwargs): - """ - __init__(cmf::water::kinematic_wave self, cmf::water::WaterStorage::ptr source, cmf::water::flux_node::ptr target, real residencetime, real exponent=1.0, real residual=0.0, real V0=1.0) -> kinematic_wave - - kinematic_wave(WaterStorage::ptr source, flux_node::ptr target, real - residencetime, real exponent=1.0, real residual=0.0, real V0=1.0) - - Creates a kinematic wave connection. - - - - .. math:: - - q = \\frac 1 {t_r} {\\left(\\frac{V - V_{residual}}{V_0} - \\right)^\\beta} - - Parameters: - ----------- - - source: Water storage from which the water flows out. Flux is a - function of source.volume - - target: Target node (boundary condition or storage). Does not - influence the strength of the flow - - residencetime: :math:`t_r [days]` The residence time of the water in this - storage - - exponent: :math:`\\beta [-]` An empirical exponent to shape the flux - function (default = 1 (linear function)) - - residual: :math:`V_{residual} [m^3]` The volume of water not flowing out - (default = 0) - - V0: :math:`V_0` The reference volume to scale the exponent - """ - _cmf_core.kinematic_wave_swiginit(self, _cmf_core.new_kinematic_wave(*args, **kwargs)) - __swig_destroy__ = _cmf_core.delete_kinematic_wave -kinematic_wave_swigregister = _cmf_core.kinematic_wave_swigregister -kinematic_wave_swigregister(kinematic_wave) - -class LinearStorageConnection(flux_connection): - """ - - - Calculates flux out of a storage as a linear function of its volume. - - This connection serves the same purpose as the old kinematic_wave - connection, but the parameters are easier to explain - - - - .. math:: - - q = \\frac{V - V_{residual}}{t_r} - - where: :math:`V` The actual - volume of water stored in source - - :math:`V_{residual} [m^3]` The volume of water not flowing out (default = 0) - :math:`t_r` is the residence time in the source. - - C++ includes: simple_connections.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - residencetime = _swig_property(_cmf_core.LinearStorageConnection_residencetime_get, _cmf_core.LinearStorageConnection_residencetime_set) - residual = _swig_property(_cmf_core.LinearStorageConnection_residual_get, _cmf_core.LinearStorageConnection_residual_set) - - def __init__(self, *args, **kwargs): - """ - __init__(cmf::water::LinearStorageConnection self, cmf::water::WaterStorage::ptr source, cmf::water::flux_node::ptr target, real residencetime, real residual=0.0) -> LinearStorageConnection - - LinearStorageConnection(WaterStorage::ptr source, flux_node::ptr - target, real residencetime, real residual=0.0) - - Creates a linear storage connection or Nash-box. - - - - .. math:: - - q = \\frac{V - V_{residual}}{t_r}} - - Parameters: - ----------- - - source: Water storage from which the water flows out. Flux is a - function of source.volume - - target: Target node (boundary condition or storage). Does not - influence the strength of the flow - - residencetime: :math:`t_r [days]` The residence time of the water in this - storage - - residual: :math:`V_{residual} [m^3]` The volume of water not flowing out - (default = 0) - """ - _cmf_core.LinearStorageConnection_swiginit(self, _cmf_core.new_LinearStorageConnection(*args, **kwargs)) - __swig_destroy__ = _cmf_core.delete_LinearStorageConnection -LinearStorageConnection_swigregister = _cmf_core.LinearStorageConnection_swigregister -LinearStorageConnection_swigregister(LinearStorageConnection) - -class PowerLawConnection(flux_connection): - """ - - - Calculates flux out of a storage as a linear function of its volume to - a power. - - This connection serves the same purpose as the old kinematic_wave - connection, but the parameters are easier to explain. - - - - .. math:: - - q = Q_0 {\\left(\\frac{V - V_{residual}}{V_0} - \\right)^\\beta} - - where: :math:`V` The actual volume of water - stored in source - - :math:`V_{residual} [m^3]` The volume of water not flowing out (default = 0) - - :math:`V_0` A reference volume to scale the outflux. One can see :math:`V_0` as - the inflection point of the outflow curve - - :math:`\\beta` A parameter to shape the response curve. :math:`Q_0` is the - outflow from the source in :math:`\\frac{m^3}{day}`, when :math:`V = V_0`. - - WARNING: :math:`\\beta < 0.5` may lead to numerical troubles and have a - dubious hydrological meaning. Please avoid. - - C++ includes: simple_connections.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - Q0 = _swig_property(_cmf_core.PowerLawConnection_Q0_get, _cmf_core.PowerLawConnection_Q0_set) - beta = _swig_property(_cmf_core.PowerLawConnection_beta_get, _cmf_core.PowerLawConnection_beta_set) - residual = _swig_property(_cmf_core.PowerLawConnection_residual_get, _cmf_core.PowerLawConnection_residual_set) - V0 = _swig_property(_cmf_core.PowerLawConnection_V0_get, _cmf_core.PowerLawConnection_V0_set) - - def __init__(self, *args, **kwargs): - """ - __init__(cmf::water::PowerLawConnection self, cmf::water::WaterStorage::ptr source, cmf::water::flux_node::ptr target, real Q0, real V0, real beta=1.0, real residual=0.0) -> PowerLawConnection - - PowerLawConnection(WaterStorage::ptr source, flux_node::ptr target, - real Q0, real V0, real beta=1.0, real residual=0.0) - - Creates a power law connection. - - Parameters: - ----------- - - source: Water storage from which the water flows out. Flux is a - function of source.volume - - target: Target node (boundary condition or storage). Does not - influence the strength of the flow - - Q0: Reference flow :math:`Q_0 = q(V_0)` Outflow when the source storage - equals the reference volume - - V0: Reference volume :math:`V_0` The reference volume to scale the exponent - - beta: :math:`\\beta [-]` An empirical exponent to shape the flux - function (default = 1 (linear function)) - - residual: :math:`V_{residual} [m^3]` The volume of water not flowing out - (default = 0) - """ - _cmf_core.PowerLawConnection_swiginit(self, _cmf_core.new_PowerLawConnection(*args, **kwargs)) - __swig_destroy__ = _cmf_core.delete_PowerLawConnection -PowerLawConnection_swigregister = _cmf_core.PowerLawConnection_swigregister -PowerLawConnection_swigregister(PowerLawConnection) - -class ExponentialDeclineConnection(flux_connection): - """ - - - A conceptual TOPmodel inspired connection. - - - - .. math:: - - q = Q_0 \\cdot e^{(V-V_0)/m} - - C++ includes: simple_connections.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - Q0 = _swig_property(_cmf_core.ExponentialDeclineConnection_Q0_get, _cmf_core.ExponentialDeclineConnection_Q0_set) - m = _swig_property(_cmf_core.ExponentialDeclineConnection_m_get, _cmf_core.ExponentialDeclineConnection_m_set) - V0 = _swig_property(_cmf_core.ExponentialDeclineConnection_V0_get, _cmf_core.ExponentialDeclineConnection_V0_set) - - def __init__(self, *args, **kwargs): - """ - __init__(cmf::water::ExponentialDeclineConnection self, cmf::water::WaterStorage::ptr source, cmf::water::flux_node::ptr target, real Q0, real V0, real m) -> ExponentialDeclineConnection - - ExponentialDeclineConnection(WaterStorage::ptr source, - flux_node::ptr target, real Q0, real V0, real m) - - creates the exponential decline connection - """ - _cmf_core.ExponentialDeclineConnection_swiginit(self, _cmf_core.new_ExponentialDeclineConnection(*args, **kwargs)) - __swig_destroy__ = _cmf_core.delete_ExponentialDeclineConnection -ExponentialDeclineConnection_swigregister = _cmf_core.ExponentialDeclineConnection_swigregister -ExponentialDeclineConnection_swigregister(ExponentialDeclineConnection) - -class ConstraintLinearStorageConnection(flux_connection): - """Proxy of C++ cmf::water::ConstraintLinearStorageConnection class.""" - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - residencetime = _swig_property(_cmf_core.ConstraintLinearStorageConnection_residencetime_get, _cmf_core.ConstraintLinearStorageConnection_residencetime_set) - Vlmin = _swig_property(_cmf_core.ConstraintLinearStorageConnection_Vlmin_get, _cmf_core.ConstraintLinearStorageConnection_Vlmin_set) - Vrmax = _swig_property(_cmf_core.ConstraintLinearStorageConnection_Vrmax_get, _cmf_core.ConstraintLinearStorageConnection_Vrmax_set) - - def __init__(self, *args, **kwargs): - """__init__(cmf::water::ConstraintLinearStorageConnection self, cmf::water::WaterStorage::ptr source, cmf::water::WaterStorage::ptr target, real residencetime=1.0, real Vlmin=0.0, real Vrmax=1.0) -> ConstraintLinearStorageConnection""" - _cmf_core.ConstraintLinearStorageConnection_swiginit(self, _cmf_core.new_ConstraintLinearStorageConnection(*args, **kwargs)) - __swig_destroy__ = _cmf_core.delete_ConstraintLinearStorageConnection -ConstraintLinearStorageConnection_swigregister = _cmf_core.ConstraintLinearStorageConnection_swigregister -ConstraintLinearStorageConnection_swigregister(ConstraintLinearStorageConnection) - -class bidirectional_kinematic_exchange(flux_connection): - """ - - - A conceptual flux between two storages that can be positive as well as - negative. - - The state of the right node is not monitored, hence negative volumes - of the right node can occur! Deprecated Behaviour unclear, will be - removed - - .. math:: - - q = q_{spill}^*-q_{suc}^* \\\\ q_{spill}^* = - q_{spill} - \\left(\\frac{V-V_{spill,min}}{V_{spill,min}}\\right)^{\\beta_{spill}} - \\\\ q_{suc}^* = q_{suc} - \\left(\\frac{V_{suc,max}-V}{V_{suc,max}}\\right)^{\\beta_{suc}} - - - where: :math:`q` is the flow to the target - - :math:`q_{spill}^*` is the actual spill flow to the target - - :math:`q_{spill}` is the spill flow at :math:`V = 2V_{spill}` - - :math:`q_{suc}^*` is the actual suction flow from the target - - :math:`q_{suc}` is the sucked flow from the target when :math:`V=0.0` - - :math:`\\beta` is a shape forming exponent for spill and suction flow. - - C++ includes: simple_connections.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - Vmaxsuc = _swig_property(_cmf_core.bidirectional_kinematic_exchange_Vmaxsuc_get, _cmf_core.bidirectional_kinematic_exchange_Vmaxsuc_set) - Vminspill = _swig_property(_cmf_core.bidirectional_kinematic_exchange_Vminspill_get, _cmf_core.bidirectional_kinematic_exchange_Vminspill_set) - qspill = _swig_property(_cmf_core.bidirectional_kinematic_exchange_qspill_get, _cmf_core.bidirectional_kinematic_exchange_qspill_set) - qsuc = _swig_property(_cmf_core.bidirectional_kinematic_exchange_qsuc_get, _cmf_core.bidirectional_kinematic_exchange_qsuc_set) - beta_suc = _swig_property(_cmf_core.bidirectional_kinematic_exchange_beta_suc_get, _cmf_core.bidirectional_kinematic_exchange_beta_suc_set) - beta_spill = _swig_property(_cmf_core.bidirectional_kinematic_exchange_beta_spill_get, _cmf_core.bidirectional_kinematic_exchange_beta_spill_set) - - def __init__(self, *args, **kwargs): - """ - __init__(cmf::water::bidirectional_kinematic_exchange self, cmf::water::WaterStorage::ptr source, cmf::water::flux_node::ptr target, real Vminspill, real Vmaxsuc, real qspill, real qsuc, real beta_spill, real beta_suc) -> bidirectional_kinematic_exchange - - bidirectional_kinematic_exchange(WaterStorage::ptr source, - flux_node::ptr target, real Vminspill, real Vmaxsuc, real qspill, real - qsuc, real beta_spill, real beta_suc) - - Creates a kinematic wave connection. - - Parameters: - ----------- - - source: Water storage from which the water flows out. Flux is a - function of source.volume - - target: Target node (boundary condition or storage). Does not - influence the strength of the flow - - Vmaxsuc: Suction starts below this threshold volume of source - - Vminspill: Spilling starts above this threshold volume of source - - qspill: Spill flow at 2*Vminspill in m3/day - - qsuc: Suction flow at V=0 m3 - - beta_suc: beta_spill: Exponent for spill / suction flow - """ - _cmf_core.bidirectional_kinematic_exchange_swiginit(self, _cmf_core.new_bidirectional_kinematic_exchange(*args, **kwargs)) - __swig_destroy__ = _cmf_core.delete_bidirectional_kinematic_exchange -bidirectional_kinematic_exchange_swigregister = _cmf_core.bidirectional_kinematic_exchange_swigregister -bidirectional_kinematic_exchange_swigregister(bidirectional_kinematic_exchange) - -class constraint_kinematic_wave(flux_connection): - """ - - - Calculates flux out of a storage as a linear function of its volume to - a power, constraint by the volume stored in the target storage. - - Deprecated Will be replaced by ConstraintLinearStorageConnection, - without beta and gamma. - - .. math:: - - q = \\frac 1 {t_r} - {\\left(\\frac{V_{l} - V_{residual}}{V_0} \\right)^\\beta} - \\left(\\frac{V_{r,max}-V_{r}}{V_{r,max}}\\right)^\\gamma - - where: :math:`V_l` The actual volume stored by the left water storage - - :math:`V_{residual} [m^3]` The volume of water not flowing out (default = 0) - - :math:`V_0` The reference volume to scale the exponent (default = 1m3/day) - - :math:`\\beta` A parameter to shape the response curve. In case of - :math:`\\beta \\neq 1`, :math:`t_r` is not a residence time, but just a - parameter. - - :math:`t_r [days]` The residence time of the water in this storage in days - - :math:`V_{r,max}` The capacity of the right water storage in m3 - - :math:`V_{r}` The actual volume of the right water storage - - :math:`\\gamma` A shape parameter for the target capacity constriction - - C++ includes: simple_connections.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - residencetime = _swig_property(_cmf_core.constraint_kinematic_wave_residencetime_get, _cmf_core.constraint_kinematic_wave_residencetime_set) - beta = _swig_property(_cmf_core.constraint_kinematic_wave_beta_get, _cmf_core.constraint_kinematic_wave_beta_set) - residual = _swig_property(_cmf_core.constraint_kinematic_wave_residual_get, _cmf_core.constraint_kinematic_wave_residual_set) - V0 = _swig_property(_cmf_core.constraint_kinematic_wave_V0_get, _cmf_core.constraint_kinematic_wave_V0_set) - Vrmax = _swig_property(_cmf_core.constraint_kinematic_wave_Vrmax_get, _cmf_core.constraint_kinematic_wave_Vrmax_set) - gamma = _swig_property(_cmf_core.constraint_kinematic_wave_gamma_get, _cmf_core.constraint_kinematic_wave_gamma_set) - - def __init__(self, *args, **kwargs): - """ - __init__(cmf::water::constraint_kinematic_wave self, cmf::water::WaterStorage::ptr source, cmf::water::WaterStorage::ptr target, real residencetime=1.0, real exponent=1.0, real residual=0.0, real V0=1.0, real Vrmax=1.0, real gamma=1.0) -> constraint_kinematic_wave - - constraint_kinematic_wave(WaterStorage::ptr source, WaterStorage::ptr - target, real residencetime=1.0, real exponent=1.0, real residual=0.0, - real V0=1.0, real Vrmax=1.0, real gamma=1.0) - - Creates a kinematic wave connection. - - - - .. math:: - - q = \\frac 1 {t_r} {\\left(\\frac{V - V_{residual}}{V_0} - \\right)^\\beta} - - Parameters: - ----------- - - source: Water storage from which the water flows out. Flux is a - function of source.volume - - target: Target node (boundary condition or storage). Does not - influence the strength of the flow - - residencetime: :math:`t_r [days]` The residence time of the water in this - storage - - exponent: :math:`\\beta [-]` An empirical exponent to shape the flux - function (default = 1 (linear function)) - - residual: :math:`V_{residual} [m^3]` The volume of water not flowing out - (default = 0) - - V0: :math:`V_0` The reference volume to scale the exponent - - Vrmax: :math:`V_{r,max}` Capacity of the target water storage in m3 - - gamma: :math:`\\gamma` Target capacity constriction curve shape - """ - _cmf_core.constraint_kinematic_wave_swiginit(self, _cmf_core.new_constraint_kinematic_wave(*args, **kwargs)) - __swig_destroy__ = _cmf_core.delete_constraint_kinematic_wave -constraint_kinematic_wave_swigregister = _cmf_core.constraint_kinematic_wave_swigregister -constraint_kinematic_wave_swigregister(constraint_kinematic_wave) - -class TechnicalFlux(flux_connection): - """ - - - Produces a constant but changeable flux from a source to a target, if - enough water is present in the source. - - - - .. math:: - - q=\\begin{cases}0 & V_{source}\\le V_{min}\\\\ q_0 - \\frac{V_{source} - V_{min}}{t_{decr} q_{0} - V_{min}} & V_{source} - \\le t_{decr} q_{0}\\\\ q_{0} & \\end{cases} - - This is similar to a neumann boundary, however this is not a boundary - condition, but water is taken from the source (left) water storage and - limited by that water storage. - - C++ includes: simple_connections.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - MaxFlux = _swig_property(_cmf_core.TechnicalFlux_MaxFlux_get, _cmf_core.TechnicalFlux_MaxFlux_set) - MinState = _swig_property(_cmf_core.TechnicalFlux_MinState_get, _cmf_core.TechnicalFlux_MinState_set) - FluxDecreaseTime = _swig_property(_cmf_core.TechnicalFlux_FluxDecreaseTime_get, _cmf_core.TechnicalFlux_FluxDecreaseTime_set) - - def __init__(self, *args, **kwargs): - """ - __init__(cmf::water::TechnicalFlux self, cmf::water::WaterStorage::ptr source, cmf::water::flux_node::ptr target, real maximum_flux, real minimal_state=0, Time flux_decrease_time) -> TechnicalFlux - - TechnicalFlux(cmf::water::WaterStorage::ptr source, - cmf::water::flux_node::ptr target, real maximum_flux, real - minimal_state=0, cmf::math::Time flux_decrease_time=cmf::math::h) - - Produces a constant but changeable flux from a source to a target, if - enough water is present in the source. - - Parameters: - ----------- - - source: The source of the water - - target: The target of the water - - maximum_flux: The requested flux :math:`q_{0}` - - minimal_state: Minimal volume of stored water in source - - flux_decrease_time: ( cmf::math::Time) - """ - _cmf_core.TechnicalFlux_swiginit(self, _cmf_core.new_TechnicalFlux(*args, **kwargs)) - __swig_destroy__ = _cmf_core.delete_TechnicalFlux -TechnicalFlux_swigregister = _cmf_core.TechnicalFlux_swigregister -TechnicalFlux_swigregister(TechnicalFlux) - -class generic_gradient_connection(flux_connection): - """ - - - A generic node-to-node gradient based connection. - - This connection is similar to the Darcy-connection, but there are no - restrictions concerning the type of nodes. However, the left side - needs to be a water storage - - .. math:: - - q = K A - \\frac{\\Psi_{l}-\\Psi_{r}}{d} - - where: :math:`q`: the resulting - flux in :math:`m^3/day` - - :math:`K`: the conductivity of the connection - - :math:`A`: the area of the connection cross section - - :math:`\\Psi`: The hydraulic head of the (l)eft, resp. (r)ight node of the - connection - - :math:`d`: The topographic length of the connection in m - - C++ includes: simple_connections.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - K = _swig_property(_cmf_core.generic_gradient_connection_K_get, _cmf_core.generic_gradient_connection_K_set) - A = _swig_property(_cmf_core.generic_gradient_connection_A_get, _cmf_core.generic_gradient_connection_A_set) - d = _swig_property(_cmf_core.generic_gradient_connection_d_get, _cmf_core.generic_gradient_connection_d_set) - - def __init__(self, *args, **kwargs): - """ - __init__(cmf::water::generic_gradient_connection self, cmf::water::WaterStorage::ptr left, cmf::water::WaterStorage::ptr right, real K, real d=1.0, real A=1.0) -> generic_gradient_connection - - generic_gradient_connection(cmf::water::WaterStorage::ptr left, - cmf::water::WaterStorage::ptr right, real K, real d=1.0, real A=1.0) - - Creates a generic gradient based flux, if enough water is present in - the source. - - Parameters: - ----------- - - left: The left node of the connection - - right: The right node of the connection - - K: the conductivity of the connection in m/day - - d: the topographic lenght of the connection in m - - A: the area of the connection cross section in m2 - """ - _cmf_core.generic_gradient_connection_swiginit(self, _cmf_core.new_generic_gradient_connection(*args, **kwargs)) - __swig_destroy__ = _cmf_core.delete_generic_gradient_connection -generic_gradient_connection_swigregister = _cmf_core.generic_gradient_connection_swigregister -generic_gradient_connection_swigregister(generic_gradient_connection) - -class statecontrol_connection(flux_connection): - """ - - - Calculates a flux to or from a water storage to hold it's state at a - more or less constant level. - - - - .. math:: - - q=\\frac{h_1 - h_{target}}{t_c [days]} - - where: :math:`q` the - resulting flux in m3/day - - :math:`h_1` the reference state - - :math:`h_{target}` the state of the target (right) node - - :math:`t_c` the time to reach the target state - - C++ includes: simple_connections.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - reaction_time = _swig_property(_cmf_core.statecontrol_connection_reaction_time_get, _cmf_core.statecontrol_connection_reaction_time_set) - target_state = _swig_property(_cmf_core.statecontrol_connection_target_state_get, _cmf_core.statecontrol_connection_target_state_set) - - def __init__(self, *args, **kwargs): - """ - __init__(cmf::water::statecontrol_connection self, cmf::water::WaterStorage::ptr controlled_storage, cmf::water::flux_node::ptr other_end, real target_state, Time reaction_time) -> statecontrol_connection - - statecontrol_connection(cmf::water::WaterStorage::ptr - controlled_storage, cmf::water::flux_node::ptr other_end, real - target_state, cmf::math::Time reaction_time) - - Creates a flux connection to control the state of a storage. - - Parameters: - ----------- - - controlled_storage: Water storage, to be controlled - - other_end: source of missing water or target of excessive water - - target_state: State the controlled storage should hold ( - :math:`h_{target}`) - - reaction_time: Time to reach state ( :math:`t_c`) - """ - _cmf_core.statecontrol_connection_swiginit(self, _cmf_core.new_statecontrol_connection(*args, **kwargs)) - __swig_destroy__ = _cmf_core.delete_statecontrol_connection -statecontrol_connection_swigregister = _cmf_core.statecontrol_connection_swigregister -statecontrol_connection_swigregister(statecontrol_connection) - -class node_list(StateVariableOwner): - """ - - - A collection of nodes for fast access of the waterbalance. - - In setups with many storages and rather fast computations, the speed - of data access for output generation can take a high portion of the - total run time. To accelerate data access, one can use the node_list - object - - Todo Add a get_volume / set_volume function pair, to complement - get_potential / set_potential - - C++ includes: collections.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - - def size(self, *args, **kwargs): - """ - size(node_list self) -> size_t - - size_t size() - const - - The number of nodes. - """ - return _cmf_core.node_list_size(self, *args, **kwargs) - - - def __init__(self, *args): - """ - __init__(cmf::water::node_list self) -> node_list - __init__(cmf::water::node_list self, node_list forcopy) -> node_list - - node_list(const cmf::water::node_list &forcopy) - - Copy the node_list. - """ - _cmf_core.node_list_swiginit(self, _cmf_core.new_node_list(*args)) - - def __iadd__(self, *args, **kwargs): - """__iadd__(node_list self, node_list right) -> node_list""" - return _cmf_core.node_list___iadd__(self, *args, **kwargs) - - - def __add__(self, *args, **kwargs): - """__add__(node_list self, node_list right) -> node_list""" - return _cmf_core.node_list___add__(self, *args, **kwargs) - - - def __get(self, *args, **kwargs): - """ - __get(node_list self, ptrdiff_t index) -> cmf::water::flux_node::ptr - - flux_node::ptr - get(ptrdiff_t index) const - - Returns a node in the node_list. - """ - return _cmf_core.node_list___get(self, *args, **kwargs) - - - def __getslice(self, *args, **kwargs): - """ - __getslice(node_list self, ptrdiff_t begin, ptrdiff_t end, ptrdiff_t step=1) -> node_list - - node_list - getslice(ptrdiff_t begin, ptrdiff_t end, ptrdiff_t step=1) const - - Returns a slice of the node_list. - """ - return _cmf_core.node_list___getslice(self, *args, **kwargs) - - - def append(self, *args, **kwargs): - """ - append(node_list self, cmf::water::flux_node::ptr node) - - void - append(flux_node::ptr node) - - Adds a flux node to the list. - """ - return _cmf_core.node_list_append(self, *args, **kwargs) - - - def remove(self, *args, **kwargs): - """ - remove(node_list self, cmf::water::flux_node::ptr node) -> bool - - bool - remove(flux_node::ptr node) - - Removes a flux node from the list, returns true if successful. - """ - return _cmf_core.node_list_remove(self, *args, **kwargs) - - - def global_water_balance(self, *args, **kwargs): - """ - global_water_balance(node_list self, Time t) -> real - - real global_water_balance(cmf::math::Time t) const - - Returns the sum of the water balances of the nodes. - - - - .. math:: - - \\sigma_{global} = - \\sum_{i=0}^N{\\sum_{j=0}^{C_i}{q_{ij}(t)}} - - Replaces slow Python code like: - """ - return _cmf_core.node_list_global_water_balance(self, *args, **kwargs) - - - def water_balance(self, *args, **kwargs): - """ - water_balance(node_list self, Time t) -> cmf::math::num_array - - cmf::math::num_array water_balance(cmf::math::Time t) const - - Returns the water balance of each vector as a vector. - - - - .. math:: - - \\sigma_i = \\sum_{j=0}^{C_i}{q_{ij}(t)} - - Replaces slow Python code like: - """ - return _cmf_core.node_list_water_balance(self, *args, **kwargs) - - - def conc(self, *args, **kwargs): - """ - conc(node_list self, Time t, solute _Solute) -> cmf::math::num_array - - cmf::math::num_array conc(cmf::math::Time t, const cmf::water::solute - &_Solute) const - - Returns an array holding the concentration of all the flux nodes for - the given solute. - """ - return _cmf_core.node_list_conc(self, *args, **kwargs) - - - def set_solute_source(self, *args, **kwargs): - """ - set_solute_source(node_list self, solute _Solute, cmf::math::num_array source_fluxes) -> ptrdiff_t - - ptrdiff_t set_solute_source(const cmf::water::solute &_Solute, - cmf::math::num_array source_fluxes) - - Sets the source flux of a solute storage associated with a node (node - has to be a water storage) - """ - return _cmf_core.node_list_set_solute_source(self, *args, **kwargs) - - - def get_fluxes_to(self, *args, **kwargs): - """ - get_fluxes_to(node_list self, node_list targets, Time t) -> cmf::math::num_array - - cmf::math::num_array get_fluxes_to(const cmf::water::node_list - &targets, cmf::math::Time t) const - - A fast method to perform flux queries as a batch. - - The node lists left and right should have the same length. - - The vector containing the flux from left to right at the same position - - Parameters: - ----------- - - targets: A node_list containing the source nodes - - t: The time for the fluxes - - Replaces slow Python code like: - """ - return _cmf_core.node_list_get_fluxes_to(self, *args, **kwargs) - - - def get_fluxes3d_to(self, *args, **kwargs): - """ - get_fluxes3d_to(node_list self, node_list targets, Time t) -> point_vector - - cmf::geometry::point_vector get_fluxes3d_to(const - cmf::water::node_list &targets, cmf::math::Time t) const - - Returns the flux vectors to the nodes of a given target node_list. - """ - return _cmf_core.node_list_get_fluxes3d_to(self, *args, **kwargs) - - - def get_fluxes3d(self, *args, **kwargs): - """ - get_fluxes3d(node_list self, Time t) -> point_vector - - cmf::geometry::point_vector get_fluxes3d(cmf::math::Time t) const - - Returns the current flow vector for each node. - """ - return _cmf_core.node_list_get_fluxes3d(self, *args, **kwargs) - - - def get_positions(self, *args, **kwargs): - """ - get_positions(node_list self) -> point_vector - - cmf::geometry::point_vector get_positions() const - - Returns the positions of the nodes. - """ - return _cmf_core.node_list_get_positions(self, *args, **kwargs) - - __swig_destroy__ = _cmf_core.delete_node_list - potentials = _swig_property(_cmf_core.node_list_potentials_get, _cmf_core.node_list_potentials_set) - - def __getitem__(self,index): - if isinstance(index,slice): - return self.__getslice(*index.indices(self.size())) - else: - try: - it = iter(index) - return node_list(self.__get(i) for i in it) - except: - return self.__get(index) - - def __len__(self): - return self.size() - def __iter__(self): - for i in xrange(self.size()): - yield self[i] - def __repr__(self): - if len(self): return "[%i nodes: %s ... %s]" % (len(self),self[0], self[-1]) - else: return "[empty node list]" - def extend(self,sequence): - """Extends the node list with the sequence (any iterable will do) """ - for o in sequence: - self.append(o) - @staticmethod - def from_sequence(sequence): - """Returns a new node list populated from the sequence (any iterable will do) """ - nl=node_list() - nl.extend(sequence) - return nl - -node_list.size = new_instancemethod(_cmf_core.node_list_size, None, node_list) -node_list.__iadd__ = new_instancemethod(_cmf_core.node_list___iadd__, None, node_list) -node_list.__add__ = new_instancemethod(_cmf_core.node_list___add__, None, node_list) -node_list.__get = new_instancemethod(_cmf_core.node_list___get, None, node_list) -node_list.__getslice = new_instancemethod(_cmf_core.node_list___getslice, None, node_list) -node_list.append = new_instancemethod(_cmf_core.node_list_append, None, node_list) -node_list.remove = new_instancemethod(_cmf_core.node_list_remove, None, node_list) -node_list.global_water_balance = new_instancemethod(_cmf_core.node_list_global_water_balance, None, node_list) -node_list.water_balance = new_instancemethod(_cmf_core.node_list_water_balance, None, node_list) -node_list.conc = new_instancemethod(_cmf_core.node_list_conc, None, node_list) -node_list.set_solute_source = new_instancemethod(_cmf_core.node_list_set_solute_source, None, node_list) -node_list.get_fluxes_to = new_instancemethod(_cmf_core.node_list_get_fluxes_to, None, node_list) -node_list.get_fluxes3d_to = new_instancemethod(_cmf_core.node_list_get_fluxes3d_to, None, node_list) -node_list.get_fluxes3d = new_instancemethod(_cmf_core.node_list_get_fluxes3d, None, node_list) -node_list.get_positions = new_instancemethod(_cmf_core.node_list_get_positions, None, node_list) -node_list_swigregister = _cmf_core.node_list_swigregister -node_list_swigregister(node_list) - -class NeumannBoundary_list(object): - """ - - - Provides fast access to Neumann boundaries for flux update. - - If many Neumann boundary conditions are present in a project, a fast - data exchange to update the fluxes might be needed. - - With this specialized list a num_array can be passed to the boundary - conditions for a fast flux update If a multiple system layout for the - cmf setup is chosen, we might have a node_list Dirichlet boundary - conditions (dbc), a corresponding NeumannBoundary_list (nbc) of - Neumann boundaries and a node_list containing the storages connected - with the NeumannBoundary_list (storages). The fast data exchange is - written in Python as: - - C++ includes: collections.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - - def get(self, *args, **kwargs): - """ - get(NeumannBoundary_list self, ptrdiff_t index) -> cmf::water::NeumannBoundary::ptr - - NeumannBoundary::ptr get(ptrdiff_t index) const - - Returns the Neumann boundary condition at position index. - - From Python you can use [] - """ - return _cmf_core.NeumannBoundary_list_get(self, *args, **kwargs) - - - def get_fluxes(self, *args, **kwargs): - """ - get_fluxes(NeumannBoundary_list self, Time t) -> cmf::math::num_array - - cmf::math::num_array get_fluxes(cmf::math::Time t=cmf::math::Time()) - const - - Returns the fluxes of the items as an array. - - get_fluxes and set_fluxes are wrapped with the Python property fluxes - - """ - return _cmf_core.NeumannBoundary_list_get_fluxes(self, *args, **kwargs) - - - def append(self, *args, **kwargs): - """ - append(NeumannBoundary_list self, cmf::water::NeumannBoundary::ptr nbc) - - void - append(NeumannBoundary::ptr nbc) - - Appends a neumann boundary to this list. - """ - return _cmf_core.NeumannBoundary_list_append(self, *args, **kwargs) - - - def size(self, *args, **kwargs): - """ - size(NeumannBoundary_list self) -> size_t - - size_t - size() const - - returns the number of stored boundary conditions - """ - return _cmf_core.NeumannBoundary_list_size(self, *args, **kwargs) - - - def __init__(self, *args): - """ - __init__(cmf::water::NeumannBoundary_list self) -> NeumannBoundary_list - __init__(cmf::water::NeumannBoundary_list self, node_list copy) -> NeumannBoundary_list - __init__(cmf::water::NeumannBoundary_list self, NeumannBoundary_list copy) -> NeumannBoundary_list - - NeumannBoundary_list(const NeumannBoundary_list ©) - """ - _cmf_core.NeumannBoundary_list_swiginit(self, _cmf_core.new_NeumannBoundary_list(*args)) - - def to_node_list(self, *args, **kwargs): - """ - to_node_list(NeumannBoundary_list self) -> node_list - - cmf::water::node_list to_node_list() const - - Creates a node_list from this NeumannBoundary_list. - """ - return _cmf_core.NeumannBoundary_list_to_node_list(self, *args, **kwargs) - - - def global_water_balance(self, *args, **kwargs): - """ - global_water_balance(NeumannBoundary_list self, Time t) -> real - - real - global_water_balance(cmf::math::Time t) const - - Returns the sum of the water balances of the nodes - - - .. math:: - - \\sigma_{global} = - \\sum_{i=0}^N{\\sum_{j=0}^{C_i}{q_{ij}(t)}} - - . - - Replaces slow Python code like: - """ - return _cmf_core.NeumannBoundary_list_global_water_balance(self, *args, **kwargs) - - - def water_balance(self, *args, **kwargs): - """ - water_balance(NeumannBoundary_list self, Time t) -> cmf::math::num_array - - cmf::math::num_array water_balance(cmf::math::Time t) const - - Returns the water balance of each vector as a vector - - .. math:: - - \\sigma_i - = \\sum_{j=0}^{C_i}{q_{ij}(t)} - - . - - Replaces slow Python code like: - """ - return _cmf_core.NeumannBoundary_list_water_balance(self, *args, **kwargs) - - fluxes = _swig_property(_cmf_core.NeumannBoundary_list_fluxes_get, _cmf_core.NeumannBoundary_list_fluxes_set) - - def __getitem__(self,index): - return self.get(index) - def __len__(self): - return self.size() - def __iter__(self): - for i in xrange(self.size()): - yield self[i] - def extend(self,sequence): - """Extends the list of Neumann boundaries with the sequence (any iterable will do) """ - for o in sequence: - self.append(o) - @staticmethod - def from_sequence(sequence): - """Returns a new list of Neumann boundaries populated from the sequence (any iterable will do) """ - nl=NeumannBoundary_list() - nl.extend(sequence) - return nl - - __swig_destroy__ = _cmf_core.delete_NeumannBoundary_list -NeumannBoundary_list.get = new_instancemethod(_cmf_core.NeumannBoundary_list_get, None, NeumannBoundary_list) -NeumannBoundary_list.get_fluxes = new_instancemethod(_cmf_core.NeumannBoundary_list_get_fluxes, None, NeumannBoundary_list) -NeumannBoundary_list.append = new_instancemethod(_cmf_core.NeumannBoundary_list_append, None, NeumannBoundary_list) -NeumannBoundary_list.size = new_instancemethod(_cmf_core.NeumannBoundary_list_size, None, NeumannBoundary_list) -NeumannBoundary_list.to_node_list = new_instancemethod(_cmf_core.NeumannBoundary_list_to_node_list, None, NeumannBoundary_list) -NeumannBoundary_list.global_water_balance = new_instancemethod(_cmf_core.NeumannBoundary_list_global_water_balance, None, NeumannBoundary_list) -NeumannBoundary_list.water_balance = new_instancemethod(_cmf_core.NeumannBoundary_list_water_balance, None, NeumannBoundary_list) -NeumannBoundary_list_swigregister = _cmf_core.NeumannBoundary_list_swigregister -NeumannBoundary_list_swigregister(NeumannBoundary_list) - -class SystemBridge(flux_node): - """ - - - A SystemBridge is an advanced feature for tuning of the calculation - time. - - A SystemBridge can be used to replace an existing connection between - nodes. It is created using the system_bridge function. After - installation, the two nodes can more safely be added to different - integrator systems. One node (called upper) is connected with the - system bridge with the connection formerly connecting the nodes, the - second node (called lower) is connected to the system bridge with as a - Neumann boundary condition. The flux equals the average flux of the - connection upper <-> SystemBridge. Therefore, the downward flux needs - to be integrated over time by the solver the upper node belongs to. - Use as an upper system (system upper node is belonging to) the faster - reacting system. For the connection between upper and SystemBridge, - the SystemBridge reacts as an Dirichlet boundary condition, providing - the potential of the lower node. - - The following example code creates a system bridge between the nodes - upper and lower. To integrate the flux over each timestep - automatically, the systembridge is added to the solver of upper, as an - integratable - - C++ includes: system_bridge.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - - def __init__(self, *args, **kwargs): - raise AttributeError("No constructor defined") - __repr__ = _swig_repr - - def get_upper_node(self, *args, **kwargs): - """ - get_upper_node(SystemBridge self) -> cmf::water::flux_node::ptr - - flux_node::ptr get_upper_node() const - - Returns the upper node. - """ - return _cmf_core.SystemBridge_get_upper_node(self, *args, **kwargs) - - - def get_lower_node(self, *args, **kwargs): - """ - get_lower_node(SystemBridge self) -> cmf::water::flux_node::ptr - - flux_node::ptr get_lower_node() const - - Returns the lower node. - """ - return _cmf_core.SystemBridge_get_lower_node(self, *args, **kwargs) - - - def get_down_flux(self, *args, **kwargs): - """ - get_down_flux(SystemBridge self) -> double - - double get_down_flux() const - - Returns the currently integrated flux to the lower node. - """ - return _cmf_core.SystemBridge_get_down_flux(self, *args, **kwargs) - - - def down_flux_integrator(self, *args, **kwargs): - """ - down_flux_integrator(SystemBridge self) -> cmf::water::flux_integrator::ptr - - flux_integrator::ptr down_flux_integrator() const - """ - return _cmf_core.SystemBridge_down_flux_integrator(self, *args, **kwargs) - - __swig_destroy__ = _cmf_core.delete_SystemBridge -SystemBridge.get_upper_node = new_instancemethod(_cmf_core.SystemBridge_get_upper_node, None, SystemBridge) -SystemBridge.get_lower_node = new_instancemethod(_cmf_core.SystemBridge_get_lower_node, None, SystemBridge) -SystemBridge.get_down_flux = new_instancemethod(_cmf_core.SystemBridge_get_down_flux, None, SystemBridge) -SystemBridge.down_flux_integrator = new_instancemethod(_cmf_core.SystemBridge_down_flux_integrator, None, SystemBridge) -SystemBridge_swigregister = _cmf_core.SystemBridge_swigregister -SystemBridge_swigregister(SystemBridge) - -class SystemBridgeConnection(flux_connection): - """ - - - Connects a system bridge with its lower node. Is created automatically - when creating a SystemBridge. - - C++ includes: system_bridge.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - - def __init__(self, *args, **kwargs): - raise AttributeError("No constructor defined") - __repr__ = _swig_repr - __swig_destroy__ = _cmf_core.delete_SystemBridgeConnection -SystemBridgeConnection_swigregister = _cmf_core.SystemBridgeConnection_swigregister -SystemBridgeConnection_swigregister(SystemBridgeConnection) - - -def system_bridge(*args, **kwargs): - """ - system_bridge(project p, cmf::water::flux_node::ptr upper, cmf::water::flux_node::ptr lower) -> cmf::water::SystemBridge::ptr - - SystemBridge::ptr - cmf::water::system_bridge(cmf::project &p, flux_node::ptr upper, - flux_node::ptr lower) - - Creates a SystemBridge object. - - This is an advanced feature for tuning of the calculation time. - - A SystemBridge can be used to replace an existing connection between - nodes. After installation, the two nodes can more safely be added to - different integrator systems. One node (called upper) is connected - with the system bridge with the connection formerly connecting the - nodes, the second node (called lower) is connected to the system - bridge with as a Neumann boundary condition. The flux equals the - average flux of the connection upper <-> SystemBridge. Therefore, the - system bridge must become an integratable of the integrator system the - upper node belongs to. Use as an upper system (system upper node is - belonging to) the faster reacting system. For the connection between - upper and SystemBridge, the SystemBridge reacts as an Dirichlet - boundary condition, providing the potential of the lower node. - """ - return _cmf_core.system_bridge(*args, **kwargs) - -def integrate_over(item,solver=None): - """Returns a suitable cmf.integratable implementation for item, if available. - The created integratable is integrated by solver, if given""" - try: - it = iter(item) - except: - it=None - if it: - res = integratable_list() - for i in it: - integ = integrate_over(i,solver) - res.append(integ) - return res - elif isinstance(item,flux_node): - res = waterbalance_integrator(item) - elif isinstance(item,flux_connection): - res = flux_integrator(item) - else: - raise TypeError("""Only the waterbalance of flux_nodes and the flux of flux_connections - are integratable. Received: """ + str(item)) - if isinstance(solver,Integrator): - solver.integratables.append(res) - return res - - -def vapour_pressure(*args, **kwargs): - """ - vapour_pressure(double T) -> double - - double - cmf::atmosphere::vapour_pressure(double T) - - Returns the saturated vapor pressure in Pa for temperature T [degC]. - - The saturated vapor pressure :math:`e_s` is calculated follwing the - following formula - - .. math:: - - e_s = 0.6108 \\exp{\\frac{17.27 - T}{T+237.3}} - - The definition is - fromhttp://www.fao.org/docrep/X0490E/x0490e07.htm#concepts - """ - return _cmf_core.vapour_pressure(*args, **kwargs) - -def vpd_from_rH(*args, **kwargs): - """ - vpd_from_rH(double T, double rH) -> double - - double - cmf::atmosphere::vpd_from_rH(double T, double rH) - - Returns the vapor pressure deficit in Pa for temperature T [degC] and - rel. - - humidity rH [%] - - The vapor pressure deficit :math:`e_s - e_a` is calculated from rel. - humidity as: - - .. math:: - - e_s - e_a = (1-rH/100) * e_s(T) - - The definition - is fromhttp://www.fao.org/docrep/X0490E/x0490e07.htm#concepts - - Parameters: - ----------- - - T: Air temperature in degC - - rH: Rel. humidity in % - - :math:`e_s(T)` is calculated using cmf::atmosphere::vapor_pressure(double) - - """ - return _cmf_core.vpd_from_rH(*args, **kwargs) - -def rH_from_vpd(*args, **kwargs): - """ - rH_from_vpd(double T, double vpd) -> double - - double - cmf::atmosphere::rH_from_vpd(double T, double vpd) - - Returns the rel. - - humidity in % for temperature T [degC] and vapor pressure deficit vpd - [Pa] - - the rel. humidity is calculated from the vapor pressure deficit :math:`vpd = e_s - e_a` as: - - .. math:: - - rH = 100 * \\frac{e_a}{e_s(T)}, e_a = e_s(T) - - vpd - - The definition is - fromhttp://www.fao.org/docrep/X0490E/x0490e07.htm#concepts - - Parameters: - ----------- - - T: Air temperature in degC - - vpd: Vapor pressure deficit in Pa - - :math:`e_s(T)` is calculated using cmf::atmosphere::vapor_pressure(double) - - """ - return _cmf_core.rH_from_vpd(*args, **kwargs) - -def global_radiation(*args, **kwargs): - """ - global_radiation(Time t, double height, double sunshine_fraction, double longitude=8, double latitude=51, double time_zone=1, bool daily=False) -> double - - double - cmf::atmosphere::global_radiation(cmf::math::Time t, double height, - double sunshine_fraction, double longitude=8, double latitude=51, - double time_zone=1, bool daily=0) - - Calculates the global radiation in MJ/(m2 day) from the sun position - and the sunshine fraction. - - Parameters: - ----------- - - t: actual time step - - height: Height above sea level - - sunshine_fraction: Fraction of sunshine hours per potential sunshine - duration in h/h - - longitude: latitude: Geographical position in degree. Latitude is - only taken into acount for subdaily calculation - - time_zone: Offset by timezone from GMT, eg. central Europe=1 US west - coast = -8 - - daily: If true, the average radiation for the whole day is given - (therefore latitude and time zone ignored), otherwise the average of - the current hour is returned - - The calculation of the global radiation - followshttp://www.fao.org/docrep/X0490E/x0490e07.htm#radiation. - - The following formula is used: - - .. math:: - - \\phi &=& - \\frac{(\\mbox{geogr. Latitude})^\\circ \\pi}{180^\\circ} - \\mbox{ Latitude in }rad \\\\ \\delta &=& 0.409 - \\sin\\left(\\frac{2\\pi}{365}DOY - 1.39\\right) \\mbox{ - Declination, DOY is day of year}\\\\ \\omega_s &=& - \\arccos(-\\tan\\phi\\tan\\delta) \\mbox{ Sunset angle} - \\\\ G_{sc} &=& 0.0802 \\frac{MJ}{m^2min} \\mbox{Solar - constant} \\\\ d_r &=& 1+0.033 - \\cos\\left(\\frac{2\\pi}{365}DOY\\right) \\mbox{Inverse - relative distance Earth-Sun} \\\\ b &=& - \\frac{2\\pi(DOY-81)}{364}\\\\ S_c &=& - 0.1645\\sin(2b)-0.1255\\cos(b)-0.025\\sin(b) \\mbox{ Seasonal - correction for solar time} \\\\ \\omega &=& \\frac {\\pi} - {12} \\left(t_h+\\frac{(\\mbox{geogr. - Longitude})^\\circ}{15}-\\mbox{Timezone}+S_c-12\\right) - \\mbox{ solar time in }rad \\\\ \\mbox{If daily} \\\\ R_a - &=& \\frac{24\\ 60}{\\pi}G_{sc}\\ d_r \\left(\\omega_s - \\sin\\phi \\sin\\delta + \\cos\\phi \\cos\\delta - \\sin\\omega_s\\right) \\mbox{Extraterrestrial radiation } - \\frac{MJ}{m^2 day} \\\\ \\mbox{If hourly} \\\\ R_a &=& - \\frac{12\\ 24\\ 60}{\\pi}G_{sc}\\ d_r - \\left(\\left(\\omega^+ -\\omega^-\\right) \\sin\\phi - \\sin\\delta + \\cos\\phi \\cos\\delta - \\left(\\sin\\omega^+ - \\sin\\omega^-\\right)\\right) - \\\\ && \\omega^+,\\omega^- = \\omega - \\pm\\frac{\\pi}{24} \\\\ \\frac n N &=& - \\mbox{Fractional sunshine duration} \\\\ R_s &=& - \\left(0.25+\\left(0.5+2\\ - 10^{-5}z\\right)\\frac{n}{N}\\right)R_a \\mbox{Global - radiation in }\\frac{MJ}{m^2 day} \\\\ && z=\\mbox{Height - a.s.l. in }m \\\\ - - - """ - return _cmf_core.global_radiation(*args, **kwargs) - -def Pressure(*args, **kwargs): - """ - Pressure(double height) -> double - - double - cmf::atmosphere::Pressure(double height) - - Returns the average air pressure for a height (m a.s.l.) - """ - return _cmf_core.Pressure(*args, **kwargs) -class Weather(object): - """ - - - A structure holding meteorological information, excluding - precipitation - - C++ includes: Weather.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - T = _swig_property(_cmf_core.Weather_T_get, _cmf_core.Weather_T_set) - Tmax = _swig_property(_cmf_core.Weather_Tmax_get, _cmf_core.Weather_Tmax_set) - Tmin = _swig_property(_cmf_core.Weather_Tmin_get, _cmf_core.Weather_Tmin_set) - Tground = _swig_property(_cmf_core.Weather_Tground_get, _cmf_core.Weather_Tground_set) - Windspeed = _swig_property(_cmf_core.Weather_Windspeed_get, _cmf_core.Weather_Windspeed_set) - e_a = _swig_property(_cmf_core.Weather_e_a_get, _cmf_core.Weather_e_a_set) - e_s = _swig_property(_cmf_core.Weather_e_s_get, _cmf_core.Weather_e_s_set) - sunshine = _swig_property(_cmf_core.Weather_sunshine_get, _cmf_core.Weather_sunshine_set) - Rs = _swig_property(_cmf_core.Weather_Rs_get, _cmf_core.Weather_Rs_set) - daylength = _swig_property(_cmf_core.Weather_daylength_get, _cmf_core.Weather_daylength_set) - instrument_height = _swig_property(_cmf_core.Weather_instrument_height_get, _cmf_core.Weather_instrument_height_set) - - def Rn(self, *args, **kwargs): - """ - Rn(Weather self, double albedo, bool daily=False) -> double - - double Rn(double - albedo, bool daily=false) const - - Calculates the net radiation flux :math:`R_n \\left[\\frac{MJ}{m^2 day}\\right]`. - - - - .. math:: - - R_{n} &=& R_{ns} - R_{nl} \\\\ \\mbox{ Net - short wave radiation: }R_{ns} &=& (1-\\alpha) R_s \\\\ \\mbox{ - Net long wave radiation: }R_{nl} &=& R_{black}\\ \\beta_{v}\\ - \\beta_{c} \\\\ \\mbox{Black body radiation: } R_{black} &=& - \\left\\{\\begin{array}{cl} \\sigma T^4 & \\mbox{for less - than daily time steps} \\\\ \\sigma \\frac {T_{max}^4 + - T_{min}^4} 2 & \\mbox{for daily time steps} \\end{array} - \\right. \\\\ T &=& \\mbox{Temperature }[K] \\\\ \\sigma - &=& 4.903\\ 10^{-9} \\frac{MJ}{K^4 m^2 day} \\mbox{ Stefan- - Boltzmann constant } \\\\ \\mbox{Long wave reflectance: } - \\\\ \\mbox{by water vapor: }\\beta_{v} &=& 0.34 - 0.14 - \\sqrt{e_a} \\\\ \\mbox{ by clouds: }\\beta_{c} &=& 0.1 + - 0.9 \\frac n N - - - - Parameters: - ----------- - - albedo: the albedo :math:`\\alpha` of the surface - - daily: If true, the net radiation for daily averages will be - calculated - """ - return _cmf_core.Weather_Rn(self, *args, **kwargs) - - - def __init__(self, *args, **kwargs): - """ - __init__(cmf::atmosphere::Weather self, double T=15.0, double Tmax=17.0, double Tmin=13.0, double rH=70.0, double wind=2.0, double sunshine=0.5, double Rs=15, double daylength=12) -> Weather - - Weather(double T=15.0, double Tmax=17.0, double Tmin=13.0, double - rH=70.0, double wind=2.0, double sunshine=0.5, double Rs=15, double - daylength=12) - - Creates a "weather" from given data. - - Parameters: - ----------- - - T: actual Temperature in deg C - - Tmax: daily maximum Temperature in deg C - - Tmin: daily minimum Temperature in deg C - - rH: actual relative humidity in % [0..100] - - wind: actual wind speed in m/s - - sunshine: actual fraction of sunshine duration per potential sunshine - duration in h/h - - Rs: actual incoming shortwave global radiation in MJ/(m2 day) - - daylength: length of the day in h - """ - _cmf_core.Weather_swiginit(self, _cmf_core.new_Weather(*args, **kwargs)) - - def to_string(self, *args, **kwargs): - """ - to_string(Weather self) -> std::string - - std::string to_string() const - - Returns a string representation. - """ - return _cmf_core.Weather_to_string(self, *args, **kwargs) - - - def set_snow_threshold(*args, **kwargs): - """set_snow_threshold(double new_threshold)""" - return _cmf_core.Weather_set_snow_threshold(*args, **kwargs) - - set_snow_threshold = staticmethod(set_snow_threshold) - - def get_snow_threshold(*args, **kwargs): - """get_snow_threshold() -> double""" - return _cmf_core.Weather_get_snow_threshold(*args, **kwargs) - - get_snow_threshold = staticmethod(get_snow_threshold) - - def __iadd__(self, *args, **kwargs): - """__iadd__(Weather self, Weather w) -> Weather""" - return _cmf_core.Weather___iadd__(self, *args, **kwargs) - - - def __imul__(self, *args, **kwargs): - """__imul__(Weather self, double factor) -> Weather""" - return _cmf_core.Weather___imul__(self, *args, **kwargs) - - - def __add__(self, *args, **kwargs): - """__add__(Weather self, Weather w) -> Weather""" - return _cmf_core.Weather___add__(self, *args, **kwargs) - - - def __mul__(self, *args, **kwargs): - """__mul__(Weather self, double factor) -> Weather""" - return _cmf_core.Weather___mul__(self, *args, **kwargs) - - - def __repr__(self): - return "cmf.Weather(Tmin=%0.2f,Tmax=%0.2f)" % (self.Tmin,self.Tmax) - def __str__(self): - return self.to_string() - - __swig_destroy__ = _cmf_core.delete_Weather -Weather.Rn = new_instancemethod(_cmf_core.Weather_Rn, None, Weather) -Weather.to_string = new_instancemethod(_cmf_core.Weather_to_string, None, Weather) -Weather.__iadd__ = new_instancemethod(_cmf_core.Weather___iadd__, None, Weather) -Weather.__imul__ = new_instancemethod(_cmf_core.Weather___imul__, None, Weather) -Weather.__add__ = new_instancemethod(_cmf_core.Weather___add__, None, Weather) -Weather.__mul__ = new_instancemethod(_cmf_core.Weather___mul__, None, Weather) -Weather_swigregister = _cmf_core.Weather_swigregister -Weather_swigregister(Weather) - -def Weather_set_snow_threshold(*args, **kwargs): - """Weather_set_snow_threshold(double new_threshold)""" - return _cmf_core.Weather_set_snow_threshold(*args, **kwargs) - -def Weather_get_snow_threshold(*args): - """Weather_get_snow_threshold() -> double""" - return _cmf_core.Weather_get_snow_threshold(*args) - -class Meteorology(object): - """ - - - An abstract class, for objects generating Weather records at a - specific time. - - C++ includes: meteorology.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - - def __init__(self, *args, **kwargs): - raise AttributeError("No constructor defined - class is abstract") - __repr__ = _swig_repr - - def __call__(self, *args, **kwargs): - """__call__(Meteorology self, Time t) -> Weather""" - return _cmf_core.Meteorology___call__(self, *args, **kwargs) - - - def get_weather(self, *args, **kwargs): - """ - get_weather(Meteorology self, Time t) -> Weather - - virtual cmf::atmosphere::Weather get_weather(cmf::math::Time t) const - =0 - - Returns the Weather at time t. Pure virtual function. Must get - implemented by child functions. - """ - return _cmf_core.Meteorology_get_weather(self, *args, **kwargs) - - - def copy(self, *args, **kwargs): - """ - copy(Meteorology self) -> Meteorology - - virtual - Meteorology* copy() const =0 - - Returns a copy of the meteorology object. Pure virtual function, needs - to be implemented. - """ - return _cmf_core.Meteorology_copy(self, *args, **kwargs) - - - def get_instrument_height(self, *args, **kwargs): - """ - get_instrument_height(Meteorology self) -> real - - virtual real - get_instrument_height() const =0 - - Returns the height of the instruments above canopy. - """ - return _cmf_core.Meteorology_get_instrument_height(self, *args, **kwargs) - - __swig_destroy__ = _cmf_core.delete_Meteorology -Meteorology.__call__ = new_instancemethod(_cmf_core.Meteorology___call__, None, Meteorology) -Meteorology.get_weather = new_instancemethod(_cmf_core.Meteorology_get_weather, None, Meteorology) -Meteorology.copy = new_instancemethod(_cmf_core.Meteorology_copy, None, Meteorology) -Meteorology.get_instrument_height = new_instancemethod(_cmf_core.Meteorology_get_instrument_height, None, Meteorology) -Meteorology_swigregister = _cmf_core.Meteorology_swigregister -Meteorology_swigregister(Meteorology) - -class ConstantMeteorology(Meteorology): - """ - - - A primitive implementation of the Meteorology interface. - - Holds a Weather record and returns it for any date - - C++ includes: meteorology.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - weather = _swig_property(_cmf_core.ConstantMeteorology_weather_get, _cmf_core.ConstantMeteorology_weather_set) - - def __init__(self, *args): - """ - __init__(cmf::atmosphere::ConstantMeteorology self) -> ConstantMeteorology - __init__(cmf::atmosphere::ConstantMeteorology self, Weather w) -> ConstantMeteorology - __init__(cmf::atmosphere::ConstantMeteorology self, ConstantMeteorology other) -> ConstantMeteorology - - ConstantMeteorology(const cmf::atmosphere::ConstantMeteorology &other) - - Copy constructor. - """ - _cmf_core.ConstantMeteorology_swiginit(self, _cmf_core.new_ConstantMeteorology(*args)) - - def copy(self, *args, **kwargs): - """ - copy(ConstantMeteorology self) -> ConstantMeteorology - - ConstantMeteorology* copy() const - - Creates a new instannce of the ConstantMeteorology with the same - weather. - """ - return _cmf_core.ConstantMeteorology_copy(self, *args, **kwargs) - - __swig_destroy__ = _cmf_core.delete_ConstantMeteorology -ConstantMeteorology.copy = new_instancemethod(_cmf_core.ConstantMeteorology_copy, None, ConstantMeteorology) -ConstantMeteorology_swigregister = _cmf_core.ConstantMeteorology_swigregister -ConstantMeteorology_swigregister(ConstantMeteorology) - -class MeteoStation(object): - """ - - - A meteorological station holding timeseries to create Weather records. - - In order to calculate ETpot with cmf a big amount of meteorological - data is needed, more data than usually available. The MeteoStation - class can estimate missing data from a minimal set. As more data, as - one provides, the better the calculation of ETpot becomes. The minimal - data needed is Tmin and Tmax (daily) and precipitation. To calculate - the global radiation (although measured global radiation could be - inserted), the position of meteorological station in geographic - coordinates has to be set. - - A meteorological station is created by - cmf::atmosphere::MeteoStationList::add_station . Usage from python: - - There are two modes for the meteorology: daily=true and daily=false. - If daily=true, Radiation is given as a daily mean value. If - daily=false, Radiation is given as an hourly mean value, which shows - the dial ETpot variation but results in erronous results if the - timestep is daily. - - C++ includes: meteorology.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - Latitude = _swig_property(_cmf_core.MeteoStation_Latitude_get, _cmf_core.MeteoStation_Latitude_set) - Longitude = _swig_property(_cmf_core.MeteoStation_Longitude_get, _cmf_core.MeteoStation_Longitude_set) - Timezone = _swig_property(_cmf_core.MeteoStation_Timezone_get, _cmf_core.MeteoStation_Timezone_set) - x = _swig_property(_cmf_core.MeteoStation_x_get, _cmf_core.MeteoStation_x_set) - y = _swig_property(_cmf_core.MeteoStation_y_get, _cmf_core.MeteoStation_y_set) - z = _swig_property(_cmf_core.MeteoStation_z_get, _cmf_core.MeteoStation_z_set) - Name = _swig_property(_cmf_core.MeteoStation_Name_get, _cmf_core.MeteoStation_Name_set) - - def get_position(self, *args, **kwargs): - """ - get_position(MeteoStation self) -> point - - cmf::geometry::point get_position() const - """ - return _cmf_core.MeteoStation_get_position(self, *args, **kwargs) - - daily = _swig_property(_cmf_core.MeteoStation_daily_get, _cmf_core.MeteoStation_daily_set) - InstrumentHeight = _swig_property(_cmf_core.MeteoStation_InstrumentHeight_get, _cmf_core.MeteoStation_InstrumentHeight_set) - - def __init__(self, *args, **kwargs): - """ - __init__(cmf::atmosphere::MeteoStation self, MeteoStation other) -> MeteoStation - - MeteoStation(const cmf::atmosphere::MeteoStation &other) - - Copy c'tor. - """ - _cmf_core.MeteoStation_swiginit(self, _cmf_core.new_MeteoStation(*args, **kwargs)) - - def get_data(self, *args, **kwargs): - """ - get_data(MeteoStation self, Time t, double height) -> Weather - - cmf::atmosphere::Weather get_data(cmf::math::Time t, double height) - const - - Returns the current Atmosphere state. Uses default values for missing - timeseries. - """ - return _cmf_core.MeteoStation_get_data(self, *args, **kwargs) - - - def use_for_cell(self, *args, **kwargs): - """ - use_for_cell(MeteoStation self, Cell c) - - void use_for_cell(cmf::upslope::Cell &c) - - Connects this meteostation as a meteo data provider with the cell. - """ - return _cmf_core.MeteoStation_use_for_cell(self, *args, **kwargs) - - - def SetSunshineFraction(self, *args, **kwargs): - """ - SetSunshineFraction(MeteoStation self, timeseries sunshine_duration) - - void - SetSunshineFraction(cmf::math::timeseries sunshine_duration) - - Calculates a timeseries of the sunshine fraction (to put into - Sunshine) from a timeseries of absolute sunshine duration. - - seehttp://www.fao.org/docrep/X0490E/x0490e07.htm#radiation - - - .. math:: - - \\phi &=& \\frac{(\\mbox{geogr. - Latitude})^\\circ \\pi}{180^\\circ} \\mbox{ Latitude in }rad - \\\\ \\delta &=& 0.409 \\sin\\left(\\frac{2\\pi}{365}DOY - - 1.39\\right) \\mbox{ Declination, DOY is day of year}\\\\ - \\omega_s &=& \\arccos(-\\tan\\phi\\tan\\delta) \\mbox{ - Sunset angle in }rad \\\\ N &=& \\frac{24}{\\pi}\\omega_s - \\mbox{ potential duration of sunshine in }h \\\\ \\frac n N - &=& n\\mbox{ absolute sunshine duration in }h - - - """ - return _cmf_core.MeteoStation_SetSunshineFraction(self, *args, **kwargs) - - T = _swig_property(_cmf_core.MeteoStation_T_get, _cmf_core.MeteoStation_T_set) - Tmax = _swig_property(_cmf_core.MeteoStation_Tmax_get, _cmf_core.MeteoStation_Tmax_set) - Tmin = _swig_property(_cmf_core.MeteoStation_Tmin_get, _cmf_core.MeteoStation_Tmin_set) - Tground = _swig_property(_cmf_core.MeteoStation_Tground_get, _cmf_core.MeteoStation_Tground_set) - Windspeed = _swig_property(_cmf_core.MeteoStation_Windspeed_get, _cmf_core.MeteoStation_Windspeed_set) - rHmean = _swig_property(_cmf_core.MeteoStation_rHmean_get, _cmf_core.MeteoStation_rHmean_set) - rHmin = _swig_property(_cmf_core.MeteoStation_rHmin_get, _cmf_core.MeteoStation_rHmin_set) - rHmax = _swig_property(_cmf_core.MeteoStation_rHmax_get, _cmf_core.MeteoStation_rHmax_set) - Tdew = _swig_property(_cmf_core.MeteoStation_Tdew_get, _cmf_core.MeteoStation_Tdew_set) - Sunshine = _swig_property(_cmf_core.MeteoStation_Sunshine_get, _cmf_core.MeteoStation_Sunshine_set) - Rs = _swig_property(_cmf_core.MeteoStation_Rs_get, _cmf_core.MeteoStation_Rs_set) - T_lapse = _swig_property(_cmf_core.MeteoStation_T_lapse_get, _cmf_core.MeteoStation_T_lapse_set) - - def TimeseriesDictionary(self): - return {"Tmin":self.Tmin, - "Tmax":self.Tmax, - "Tdew":self.Tdew, - "T":self.T, - "rHmean":self.rHmean, - "rHmax":self.rHmax, - "rHmin":self.rHmin, - "Sunshine":self.Sunshine, - "Windspeed":self.Windspeed, - "Rs" : self.Rs} - def __repr__(self): - return "cmf.MeteoStation(%s,lat=%0.5g,lon=%0.5g,z=%6.1f)" % (self.Name,self.Latitude,self.Longitude,self.z) - - __swig_destroy__ = _cmf_core.delete_MeteoStation -MeteoStation.get_position = new_instancemethod(_cmf_core.MeteoStation_get_position, None, MeteoStation) -MeteoStation.get_data = new_instancemethod(_cmf_core.MeteoStation_get_data, None, MeteoStation) -MeteoStation.use_for_cell = new_instancemethod(_cmf_core.MeteoStation_use_for_cell, None, MeteoStation) -MeteoStation.SetSunshineFraction = new_instancemethod(_cmf_core.MeteoStation_SetSunshineFraction, None, MeteoStation) -MeteoStation_swigregister = _cmf_core.MeteoStation_swigregister -MeteoStation_swigregister(MeteoStation) - -class MeteoStationReference(Meteorology): - """ - - - A reference to a meteorological station. - - Returns the weather at a given time for its place using - MeteoStation::T_lapse - - C++ includes: meteorology.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - - def get_station(self, *args, **kwargs): - """ - get_station(MeteoStationReference self) -> cmf::atmosphere::MeteoStation::ptr - - MeteoStation::ptr get_station() const - - Returns the station referenced. - """ - return _cmf_core.MeteoStationReference_get_station(self, *args, **kwargs) - - - def get_position(self, *args, **kwargs): - """ - get_position(MeteoStationReference self) -> point - - cmf::geometry::point get_position() const - - Returns the position of the reference. - """ - return _cmf_core.MeteoStationReference_get_position(self, *args, **kwargs) - - - def __init__(self, *args): - """ - __init__(cmf::atmosphere::MeteoStationReference self, cmf::atmosphere::MeteoStation::ptr station, point location) -> MeteoStationReference - __init__(cmf::atmosphere::MeteoStationReference self, MeteoStationReference copy) -> MeteoStationReference - - MeteoStationReference(const MeteoStationReference ©) - """ - _cmf_core.MeteoStationReference_swiginit(self, _cmf_core.new_MeteoStationReference(*args)) - - def copy(self, *args, **kwargs): - """ - copy(MeteoStationReference self) -> MeteoStationReference - - MeteoStationReference* copy() const - - Returns a copy of the meteorology object. Pure virtual function, needs - to be implemented. - """ - return _cmf_core.MeteoStationReference_copy(self, *args, **kwargs) - - __swig_destroy__ = _cmf_core.delete_MeteoStationReference -MeteoStationReference.get_station = new_instancemethod(_cmf_core.MeteoStationReference_get_station, None, MeteoStationReference) -MeteoStationReference.get_position = new_instancemethod(_cmf_core.MeteoStationReference_get_position, None, MeteoStationReference) -MeteoStationReference.copy = new_instancemethod(_cmf_core.MeteoStationReference_copy, None, MeteoStationReference) -MeteoStationReference_swigregister = _cmf_core.MeteoStationReference_swigregister -MeteoStationReference_swigregister(MeteoStationReference) - -class MeteoStationList(object): - """ - - - A list of meteorological stations. - - Can find the nearest station for a position and calculate the - temperature lapse - - C++ includes: meteorology.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - - def __len__(self, *args, **kwargs): - """ - __len__(MeteoStationList self) -> size_t - - size_t size() const - - Returns the number of stations. - """ - return _cmf_core.MeteoStationList___len__(self, *args, **kwargs) - - - def __getitem__(self, *args): - """ - __getitem__(MeteoStationList self, ptrdiff_t index) -> cmf::atmosphere::MeteoStation::ptr - __getitem__(MeteoStationList self, std::string const & Name) -> cmf::atmosphere::MeteoStation::ptr - """ - return _cmf_core.MeteoStationList___getitem__(self, *args) - - - def calculate_Temp_lapse(self, *args, **kwargs): - """ - calculate_Temp_lapse(MeteoStationList self, Time begin, Time step, Time end) -> double - - double - calculate_Temp_lapse(cmf::math::Time begin, cmf::math::Time step, - cmf::math::Time end) - - Calculates the temperature lapse from all stations in the list and - sets the T_lapse attribute of each station. - - Returns the average lapse over the whole period. - """ - return _cmf_core.MeteoStationList_calculate_Temp_lapse(self, *args, **kwargs) - - - def add_station(self, *args, **kwargs): - """ - add_station(MeteoStationList self, std::string name, point position, double latitude=51.0, double longitude=8.0, double tz=1.0, Time startTime, Time timestep) -> cmf::atmosphere::MeteoStation::ptr - - MeteoStation::ptr add_station(std::string name, cmf::geometry::point - position, double latitude=51.0, double longitude=8.0, double tz=1.0, - cmf::math::Time startTime=cmf::math::Time(1, 1, 2001), cmf::math::Time - timestep=cmf::math::day) - - Creates a meteorological station at a certain position and adds it to - the list. - - Parameters: - ----------- - - name: Name of the station - - position: The location of the station in map coordinates - - latitude: Latitude of the study area (for solar radiation) - - longitude: Longitude of the study area (for solar time) - - tz: Time zone of the study area (e.g Germany +1,U.S. Pacific time -8 - - startTime: Date of the beginning of the climatic data (may be changed - for each time series later) - - timestep: Frequency of climatic data (may be changed for each time - series later) - """ - return _cmf_core.MeteoStationList_add_station(self, *args, **kwargs) - - - def remove_station(self, *args, **kwargs): - """ - remove_station(MeteoStationList self, ptrdiff_t index) -> ptrdiff_t - - ptrdiff_t - remove_station(ptrdiff_t index) - - Removes a station and returns the number of remaining references to - the removed station. If the station is deleted, 0 is returned. - """ - return _cmf_core.MeteoStationList_remove_station(self, *args, **kwargs) - - - def __init__(self, *args): - """ - __init__(cmf::atmosphere::MeteoStationList self) -> MeteoStationList - __init__(cmf::atmosphere::MeteoStationList self, MeteoStationList copy) -> MeteoStationList - - MeteoStationList(const MeteoStationList ©) - - Copy c'tor. - """ - _cmf_core.MeteoStationList_swiginit(self, _cmf_core.new_MeteoStationList(*args)) - - def reference_to_nearest(self, *args, **kwargs): - """ - reference_to_nearest(MeteoStationList self, point position, double z_weight=0) -> MeteoStationReference - - MeteoStationReference reference_to_nearest(const cmf::geometry::point - &position, double z_weight=0) const - - Creates a MeteoStationReference from the nearest station to position - at position. - - The distance is calculated as :math:`d=\\sqrt{(x_{s} - x_{l})^2 + (y_{s} - y_{l})^2} + \\lambda_z\\|z_{s} - z_{l}\\|` Where :math:`s` is the - station and :math:`l` is the locatable A Meteorology using the data of the - nearest station to position - - Parameters: - ----------- - - position: The position (any locatable, like e.g. Cell possible) to - look for the station. The reference should be owned by the locatable - - z_weight: The weight of the height difference :math:`\\lambda_z` - """ - return _cmf_core.MeteoStationList_reference_to_nearest(self, *args, **kwargs) - - - def __iter__(self): - for i in xrange(len(self)): - yield self[i] - def __repr__(self): - return "list of %i cmf meteorological stations" % len(self) - - __swig_destroy__ = _cmf_core.delete_MeteoStationList -MeteoStationList.__len__ = new_instancemethod(_cmf_core.MeteoStationList___len__, None, MeteoStationList) -MeteoStationList.__getitem__ = new_instancemethod(_cmf_core.MeteoStationList___getitem__, None, MeteoStationList) -MeteoStationList.calculate_Temp_lapse = new_instancemethod(_cmf_core.MeteoStationList_calculate_Temp_lapse, None, MeteoStationList) -MeteoStationList.add_station = new_instancemethod(_cmf_core.MeteoStationList_add_station, None, MeteoStationList) -MeteoStationList.remove_station = new_instancemethod(_cmf_core.MeteoStationList_remove_station, None, MeteoStationList) -MeteoStationList.reference_to_nearest = new_instancemethod(_cmf_core.MeteoStationList_reference_to_nearest, None, MeteoStationList) -MeteoStationList_swigregister = _cmf_core.MeteoStationList_swigregister -MeteoStationList_swigregister(MeteoStationList) - -class IDW_Meteorology(Meteorology): - """ - - - Regionalizes meteorological measurements using a simple inverse - distance weighted (IDW) method. - - See: IDW - - C++ includes: meteorology.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - - def __init__(self, *args): - """ - __init__(cmf::atmosphere::IDW_Meteorology self, point position, MeteoStationList stations, double z_weight, double power) -> IDW_Meteorology - __init__(cmf::atmosphere::IDW_Meteorology self, IDW_Meteorology copy) -> IDW_Meteorology - - IDW_Meteorology(const IDW_Meteorology ©) - - Copy c'tor. - """ - _cmf_core.IDW_Meteorology_swiginit(self, _cmf_core.new_IDW_Meteorology(*args)) - - def copy(self, *args, **kwargs): - """ - copy(IDW_Meteorology self) -> IDW_Meteorology - - virtual IDW_Meteorology* copy() const - - Returns a copy of the meteorology object. Pure virtual function, needs - to be implemented. - """ - return _cmf_core.IDW_Meteorology_copy(self, *args, **kwargs) - - __swig_destroy__ = _cmf_core.delete_IDW_Meteorology -IDW_Meteorology.copy = new_instancemethod(_cmf_core.IDW_Meteorology_copy, None, IDW_Meteorology) -IDW_Meteorology_swigregister = _cmf_core.IDW_Meteorology_swigregister -IDW_Meteorology_swigregister(IDW_Meteorology) - -class aerodynamic_resistance(object): - """ - - - Abstract class. Child classes can be used to calculate aerodynamic - resistances against turbulent heat fluxes. - - C++ includes: meteorology.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - - def __init__(self, *args, **kwargs): - raise AttributeError("No constructor defined - class is abstract") - __repr__ = _swig_repr - - def get_aerodynamic_resistance(self, *args, **kwargs): - """ - get_aerodynamic_resistance(aerodynamic_resistance self, double & r_ag, double & r_ac, Time t) - - virtual void get_aerodynamic_resistance(double &r_ag, double &r_ac, - cmf::math::Time t) const =0 - - aerodynamic resistance from ground to atmosphere (r_ag) and from - canopy to atmosphere (r_ac) - """ - return _cmf_core.aerodynamic_resistance_get_aerodynamic_resistance(self, *args, **kwargs) - - __swig_destroy__ = _cmf_core.delete_aerodynamic_resistance -aerodynamic_resistance.get_aerodynamic_resistance = new_instancemethod(_cmf_core.aerodynamic_resistance_get_aerodynamic_resistance, None, aerodynamic_resistance) -aerodynamic_resistance_swigregister = _cmf_core.aerodynamic_resistance_swigregister -aerodynamic_resistance_swigregister(aerodynamic_resistance) - -class RainSource(flux_node): - """ - - - An abstract class for different types of rainfall sources. - - C++ includes: precipitation.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - - def __init__(self, *args, **kwargs): - raise AttributeError("No constructor defined - class is abstract") - __repr__ = _swig_repr - - def __call__(self, *args, **kwargs): - """__call__(RainSource self, Time t) -> real""" - return _cmf_core.RainSource___call__(self, *args, **kwargs) - - - def get_intensity(self, *args, **kwargs): - """ - get_intensity(RainSource self, Time t) -> real - - virtual real get_intensity(cmf::math::Time t) const =0 - - Returns the actual rainfall intensity in mm/day. - """ - return _cmf_core.RainSource_get_intensity(self, *args, **kwargs) - - - def __repr__(self): - return self.to_string() - - __swig_destroy__ = _cmf_core.delete_RainSource -RainSource.__call__ = new_instancemethod(_cmf_core.RainSource___call__, None, RainSource) -RainSource.get_intensity = new_instancemethod(_cmf_core.RainSource_get_intensity, None, RainSource) -RainSource_swigregister = _cmf_core.RainSource_swigregister -RainSource_swigregister(RainSource) - -class ConstantRainSource(RainSource): - """ - - - A simple implementation of RainSource. - - Returns intensity for any time step. - - C++ includes: precipitation.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - intensity = _swig_property(_cmf_core.ConstantRainSource_intensity_get, _cmf_core.ConstantRainSource_intensity_set) - - def __init__(self, *args, **kwargs): - """ - __init__(cmf::atmosphere::ConstantRainSource self, project _project, point location, real _intensity) -> ConstantRainSource - - ConstantRainSource(cmf::project &_project, cmf::geometry::point - location, real _intensity) - - Creates a new ConstantRainSource. - - Consider using Cell::set_rainfall for internal creation of a constant - rain source, instead of direct use - - Parameters: - ----------- - - _project: The project the rain source is belonging to. - - location: The location of the rain source - - _intensity: The constant rainfall intensity in mm/day - """ - _cmf_core.ConstantRainSource_swiginit(self, _cmf_core.new_ConstantRainSource(*args, **kwargs)) - - def set_conc(self, *args, **kwargs): - """ - set_conc(ConstantRainSource self, solute Solute, real value) - - void set_conc(const cmf::water::solute &Solute, real value) - - Sets the concentration of a solute in the rainfall. - """ - return _cmf_core.ConstantRainSource_set_conc(self, *args, **kwargs) - - - def __repr__(self): - return self.to_string() - - __swig_destroy__ = _cmf_core.delete_ConstantRainSource -ConstantRainSource.set_conc = new_instancemethod(_cmf_core.ConstantRainSource_set_conc, None, ConstantRainSource) -ConstantRainSource_swigregister = _cmf_core.ConstantRainSource_swigregister -ConstantRainSource_swigregister(ConstantRainSource) - -class TimeseriesRainSource(RainSource): - """ - - - A rainsource with a timeseries. - - Simpler to use than a rainfall station if there are only few cells in - the project - - C++ includes: precipitation.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - - def __init__(self, *args, **kwargs): - raise AttributeError("No constructor defined") - __repr__ = _swig_repr - data = _swig_property(_cmf_core.TimeseriesRainSource_data_get, _cmf_core.TimeseriesRainSource_data_set) - concentrations = _swig_property(_cmf_core.TimeseriesRainSource_concentrations_get, _cmf_core.TimeseriesRainSource_concentrations_set) - __swig_destroy__ = _cmf_core.delete_TimeseriesRainSource -TimeseriesRainSource_swigregister = _cmf_core.TimeseriesRainSource_swigregister -TimeseriesRainSource_swigregister(TimeseriesRainSource) - -class RainfallStation(object): - """ - - - RainfallStation describes a rainfall timeseries in mm/day at a certain - place. - - Use RainfallStationReference or IDWRainfall to distribute the data - into space - - C++ includes: precipitation.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - Location = _swig_property(_cmf_core.RainfallStation_Location_get, _cmf_core.RainfallStation_Location_set) - - def create(*args, **kwargs): - """create(size_t Id, std::string Name, timeseries Data, point position) -> cmf::atmosphere::RainfallStation::ptr""" - return _cmf_core.RainfallStation_create(*args, **kwargs) - - create = staticmethod(create) - id = _swig_property(_cmf_core.RainfallStation_id_get) - name = _swig_property(_cmf_core.RainfallStation_name_get) - data = _swig_property(_cmf_core.RainfallStation_data_get, _cmf_core.RainfallStation_data_set) - - def __repr__(self, *args, **kwargs): - """ - __repr__(RainfallStation self) -> std::string - - std::string tostring() const - - Returns the name and the mean yearly rainfall. - """ - return _cmf_core.RainfallStation___repr__(self, *args, **kwargs) - - concentration = _swig_property(_cmf_core.RainfallStation_concentration_get, _cmf_core.RainfallStation_concentration_set) - - def use_for_cell(self, *args, **kwargs): - """ - use_for_cell(RainfallStation self, Cell c) - - void use_for_cell(cmf::upslope::Cell &c) - - Connects a cell with this rainfall station. - """ - return _cmf_core.RainfallStation_use_for_cell(self, *args, **kwargs) - - - def __init__(self, *args, **kwargs): - """ - __init__(cmf::atmosphere::RainfallStation self, RainfallStation copy) -> RainfallStation - - RainfallStation(const RainfallStation ©) - - copy c'tor - """ - _cmf_core.RainfallStation_swiginit(self, _cmf_core.new_RainfallStation(*args, **kwargs)) - - def __call__(self, *args, **kwargs): - """__call__(RainfallStation self, Time t) -> double""" - return _cmf_core.RainfallStation___call__(self, *args, **kwargs) - - __swig_destroy__ = _cmf_core.delete_RainfallStation -RainfallStation.__repr__ = new_instancemethod(_cmf_core.RainfallStation___repr__, None, RainfallStation) -RainfallStation.use_for_cell = new_instancemethod(_cmf_core.RainfallStation_use_for_cell, None, RainfallStation) -RainfallStation.__call__ = new_instancemethod(_cmf_core.RainfallStation___call__, None, RainfallStation) -RainfallStation_swigregister = _cmf_core.RainfallStation_swigregister -RainfallStation_swigregister(RainfallStation) - -def RainfallStation_create(*args, **kwargs): - """RainfallStation_create(size_t Id, std::string Name, timeseries Data, point position) -> cmf::atmosphere::RainfallStation::ptr""" - return _cmf_core.RainfallStation_create(*args, **kwargs) - -class RainfallStationList(object): - """ - - - A list of rainfall stations. - - C++ includes: precipitation.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - - def __len__(self, *args, **kwargs): - """ - __len__(RainfallStationList self) -> size_t - - size_t size() const - - Returns the number of rainfall stations. - """ - return _cmf_core.RainfallStationList___len__(self, *args, **kwargs) - - - def __getitem__(self, *args): - """ - __getitem__(RainfallStationList self, ptrdiff_t index) -> cmf::atmosphere::RainfallStation::ptr - __getitem__(RainfallStationList self, ptrdiff_t index) -> cmf::atmosphere::RainfallStation::ptr const - """ - return _cmf_core.RainfallStationList___getitem__(self, *args) - - - def add(self, *args, **kwargs): - """ - add(RainfallStationList self, std::string Name, timeseries Data, point Position) -> cmf::atmosphere::RainfallStation::ptr - - RainfallStation::ptr add(std::string Name, cmf::math::timeseries Data, - cmf::geometry::point Position) - - Creates a new RainfallStation and adds it to the list. - - Usage: The position of the rainfall station will be used as identifier - A new rainfall station - - Parameters: - ----------- - - Name: Name of the station - - Data: Rainfall timeseries - - Position: Spatial position of the new station - """ - return _cmf_core.RainfallStationList_add(self, *args, **kwargs) - - - def remove(self, *args, **kwargs): - """ - remove(RainfallStationList self, ptrdiff_t index) - - void remove(ptrdiff_t index) - - Removes the station at index from this list. - """ - return _cmf_core.RainfallStationList_remove(self, *args, **kwargs) - - - def __repr__(self): - return repr(list(self)) - def __iter__(self): - for i in range(len(self)): - yield self[i] - - - def __init__(self, *args, **kwargs): - """__init__(cmf::atmosphere::RainfallStationList self) -> RainfallStationList""" - _cmf_core.RainfallStationList_swiginit(self, _cmf_core.new_RainfallStationList(*args, **kwargs)) - __swig_destroy__ = _cmf_core.delete_RainfallStationList -RainfallStationList.__len__ = new_instancemethod(_cmf_core.RainfallStationList___len__, None, RainfallStationList) -RainfallStationList.__getitem__ = new_instancemethod(_cmf_core.RainfallStationList___getitem__, None, RainfallStationList) -RainfallStationList.add = new_instancemethod(_cmf_core.RainfallStationList_add, None, RainfallStationList) -RainfallStationList.remove = new_instancemethod(_cmf_core.RainfallStationList_remove, None, RainfallStationList) -RainfallStationList_swigregister = _cmf_core.RainfallStationList_swigregister -RainfallStationList_swigregister(RainfallStationList) - -class RainfallStationReference(RainSource): - """ - - - References a single RainfallStation to provide rainfall intensity - data. - - C++ includes: precipitation.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - - def __init__(self, *args, **kwargs): - raise AttributeError("No constructor defined") - __repr__ = _swig_repr - - def from_nearest_station(*args, **kwargs): - """from_nearest_station(project project, point position, double z_weight) -> cmf::atmosphere::RainfallStationReference::ptr""" - return _cmf_core.RainfallStationReference_from_nearest_station(*args, **kwargs) - - from_nearest_station = staticmethod(from_nearest_station) - - def from_station_id(*args, **kwargs): - """from_station_id(project project, point position, size_t id) -> cmf::atmosphere::RainfallStationReference::ptr""" - return _cmf_core.RainfallStationReference_from_station_id(*args, **kwargs) - - from_station_id = staticmethod(from_station_id) - - def __repr__(self): - return self.to_string() - - __swig_destroy__ = _cmf_core.delete_RainfallStationReference -RainfallStationReference_swigregister = _cmf_core.RainfallStationReference_swigregister -RainfallStationReference_swigregister(RainfallStationReference) - -def RainfallStationReference_from_nearest_station(*args, **kwargs): - """RainfallStationReference_from_nearest_station(project project, point position, double z_weight) -> cmf::atmosphere::RainfallStationReference::ptr""" - return _cmf_core.RainfallStationReference_from_nearest_station(*args, **kwargs) - -def RainfallStationReference_from_station_id(*args, **kwargs): - """RainfallStationReference_from_station_id(project project, point position, size_t id) -> cmf::atmosphere::RainfallStationReference::ptr""" - return _cmf_core.RainfallStationReference_from_station_id(*args, **kwargs) - -class IDWRainfall(RainSource): - """ - - - A RainSource using a spatially interpolated rainfall intensity from - all stations. - - Interpolation method is inverse distance weighted (IDW) - - C++ includes: precipitation.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - - def __init__(self, *args, **kwargs): - raise AttributeError("No constructor defined") - __repr__ = _swig_repr - - def create(*args, **kwargs): - """create(project project, point position, double z_weight, double power) -> cmf::atmosphere::RainSource::ptr""" - return _cmf_core.IDWRainfall_create(*args, **kwargs) - - create = staticmethod(create) - - def __repr__(self): - return self.to_string() - - __swig_destroy__ = _cmf_core.delete_IDWRainfall -IDWRainfall_swigregister = _cmf_core.IDWRainfall_swigregister -IDWRainfall_swigregister(IDWRainfall) - -def IDWRainfall_create(*args, **kwargs): - """IDWRainfall_create(project project, point position, double z_weight, double power) -> cmf::atmosphere::RainSource::ptr""" - return _cmf_core.IDWRainfall_create(*args, **kwargs) - -class Vegetation(object): - """ - - - Holds the vegetation parameters for the calculation of ET and - fractionating rainfall. Not every ET method uses all parameters. - - C++ includes: StructVegetation.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - LAI = _swig_property(_cmf_core.Vegetation_LAI_get, _cmf_core.Vegetation_LAI_set) - Height = _swig_property(_cmf_core.Vegetation_Height_get, _cmf_core.Vegetation_Height_set) - albedo = _swig_property(_cmf_core.Vegetation_albedo_get, _cmf_core.Vegetation_albedo_set) - snow_albedo = _swig_property(_cmf_core.Vegetation_snow_albedo_get, _cmf_core.Vegetation_snow_albedo_set) - CanopyCapacityPerLAI = _swig_property(_cmf_core.Vegetation_CanopyCapacityPerLAI_get, _cmf_core.Vegetation_CanopyCapacityPerLAI_set) - RootDepth = _swig_property(_cmf_core.Vegetation_RootDepth_get, _cmf_core.Vegetation_RootDepth_set) - RootContent = _swig_property(_cmf_core.Vegetation_RootContent_get, _cmf_core.Vegetation_RootContent_set) - fraction_at_rootdepth = _swig_property(_cmf_core.Vegetation_fraction_at_rootdepth_get, _cmf_core.Vegetation_fraction_at_rootdepth_set) - StomatalResistance = _swig_property(_cmf_core.Vegetation_StomatalResistance_get, _cmf_core.Vegetation_StomatalResistance_set) - CanopyClosure = _swig_property(_cmf_core.Vegetation_CanopyClosure_get, _cmf_core.Vegetation_CanopyClosure_set) - CanopyPARExtinction = _swig_property(_cmf_core.Vegetation_CanopyPARExtinction_get, _cmf_core.Vegetation_CanopyPARExtinction_set) - LeafWidth = _swig_property(_cmf_core.Vegetation_LeafWidth_get, _cmf_core.Vegetation_LeafWidth_set) - - def RootLength(self, *args, **kwargs): - """ - RootLength(Vegetation self) -> double - - double RootLength() - const - - Returns the average root length in m/m2. - """ - return _cmf_core.Vegetation_RootLength(self, *args, **kwargs) - - - def RootFraction(self, *args): - """ - RootFraction(Vegetation self, double upperBoundary, double lowerBoundary) -> double - RootFraction(Vegetation self, cmf::math::num_array const & thickness) -> cmf::math::num_array - - cmf::math::num_array RootFraction(const cmf::math::num_array - &thickness) const - """ - return _cmf_core.Vegetation_RootFraction(self, *args) - - - def __init__(self, *args, **kwargs): - """ - __init__(cmf::upslope::vegetation::Vegetation self, double _LAI=2.88, double _Height=0.12, double _RootDepth=0.25, double _StomatalResistance=100, double _albedo=0.23, double _CanopyClosure=1, double _CanopyCapacityPerLAI=0.1, double _fraction_at_rootdepth=1.0) -> Vegetation - - Vegetation(double - _LAI=2.88, double _Height=0.12, double _RootDepth=0.25, double - _StomatalResistance=100, double _albedo=0.23, double _CanopyClosure=1, - double _CanopyCapacityPerLAI=0.1, double _fraction_at_rootdepth=1.0) - - """ - _cmf_core.Vegetation_swiginit(self, _cmf_core.new_Vegetation(*args, **kwargs)) - - def __repr__(self, *args, **kwargs): - """__repr__(Vegetation self) -> std::string""" - return _cmf_core.Vegetation___repr__(self, *args, **kwargs) - - __swig_destroy__ = _cmf_core.delete_Vegetation -Vegetation.RootLength = new_instancemethod(_cmf_core.Vegetation_RootLength, None, Vegetation) -Vegetation.RootFraction = new_instancemethod(_cmf_core.Vegetation_RootFraction, None, Vegetation) -Vegetation.__repr__ = new_instancemethod(_cmf_core.Vegetation___repr__, None, Vegetation) -Vegetation_swigregister = _cmf_core.Vegetation_swigregister -Vegetation_swigregister(Vegetation) - -class CellConnector(object): - """ - - - A helper class to connect cells with flux_connection objects. This is - generated by flux_connection classes, intended to connect cells. - - C++ includes: cell.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - - def __init__(self, *args, **kwargs): - """ - __init__(cmf::upslope::CellConnector self, cmf::upslope::connectorfunction connector) -> CellConnector - - CellConnector(connectorfunction connector) - """ - _cmf_core.CellConnector_swiginit(self, _cmf_core.new_CellConnector(*args, **kwargs)) - - def __call__(self, *args, **kwargs): - """__call__(CellConnector self, Cell cell1, Cell cell2, ptrdiff_t start_at_layer=0)""" - return _cmf_core.CellConnector___call__(self, *args, **kwargs) - - - def connect(self, *args, **kwargs): - """ - connect(CellConnector self, Cell cell1, Cell cell2, ptrdiff_t start_at_layer=0) - - void - connect(cmf::upslope::Cell &cell1, cmf::upslope::Cell &cell2, - ptrdiff_t start_at_layer=0) const - """ - return _cmf_core.CellConnector_connect(self, *args, **kwargs) - - __swig_destroy__ = _cmf_core.delete_CellConnector -CellConnector.__call__ = new_instancemethod(_cmf_core.CellConnector___call__, None, CellConnector) -CellConnector.connect = new_instancemethod(_cmf_core.CellConnector_connect, None, CellConnector) -CellConnector_swigregister = _cmf_core.CellConnector_swigregister -CellConnector_swigregister(CellConnector) - -class Cell(StateVariableOwner): - """ - - - This class is the basic landscape object. - - It is the owner of water storages, and the upper and lower boundary - conditions of the system (rainfall, atmospheric vapor, deep - groundwater) - - C++ includes: cell.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - x = _swig_property(_cmf_core.Cell_x_get, _cmf_core.Cell_x_set) - y = _swig_property(_cmf_core.Cell_y_get, _cmf_core.Cell_y_set) - z = _swig_property(_cmf_core.Cell_z_get, _cmf_core.Cell_z_set) - - def get_position(self, *args, **kwargs): - """ - get_position(Cell self) -> point - - cmf::geometry::point get_position() const - - Returns the location of the cell. - """ - return _cmf_core.Cell_get_position(self, *args, **kwargs) - - - def m3_to_mm(self, *args, **kwargs): - """ - m3_to_mm(Cell self, double volume) -> double - - double - m3_to_mm(double volume) const - - Converts a volume in m3 in mm for the cell area. - """ - return _cmf_core.Cell_m3_to_mm(self, *args, **kwargs) - - - def mm_to_m3(self, *args, **kwargs): - """ - mm_to_m3(Cell self, double depth) -> double - - double - mm_to_m3(double depth) const - """ - return _cmf_core.Cell_mm_to_m3(self, *args, **kwargs) - - - def InvalidateSatDepth(self, *args, **kwargs): - """ - InvalidateSatDepth(Cell self) - - void - InvalidateSatDepth() const - - Marks the saturated depth as unvalid. This is done automatically, when - the state of a layer changes. - """ - return _cmf_core.Cell_InvalidateSatDepth(self, *args, **kwargs) - - vegetation = _swig_property(_cmf_core.Cell_vegetation_get, _cmf_core.Cell_vegetation_set) - - def set_aerodynamic_resistance(self, *args, **kwargs): - """ - set_aerodynamic_resistance(Cell self, cmf::atmosphere::aerodynamic_resistance::ptr Ra) - - void - set_aerodynamic_resistance(cmf::atmosphere::aerodynamic_resistance::ptr - Ra) - - Sets the method to calculate aerodynamic resistance against turbulent - sensible heat fluxes. - """ - return _cmf_core.Cell_set_aerodynamic_resistance(self, *args, **kwargs) - - - def set_weather(self, *args, **kwargs): - """ - set_weather(Cell self, Weather weather) - - void - set_weather(const cmf::atmosphere::Weather &weather) - - Sets the weather for this cell. Connectivity to a meteorological - station is lost. - """ - return _cmf_core.Cell_set_weather(self, *args, **kwargs) - - - def set_rainfall(self, *args, **kwargs): - """ - set_rainfall(Cell self, double rainfall) - - void - set_rainfall(double rainfall) - - Exchanges a timeseries of rainfall with a constant flux. - """ - return _cmf_core.Cell_set_rainfall(self, *args, **kwargs) - - - def get_rainfall(self, *args, **kwargs): - """ - get_rainfall(Cell self, Time t) -> double - - double - get_rainfall(cmf::math::Time t) const - - Returns the current rainfall flux in m3/day. - """ - return _cmf_core.Cell_get_rainfall(self, *args, **kwargs) - - - def __set_rain_source(self, *args, **kwargs): - """ - __set_rain_source(Cell self, cmf::atmosphere::RainSource::ptr new_source) - - void - set_rain_source(cmf::atmosphere::RainSource::ptr new_source) - - Changes the current source of rainfall. - """ - return _cmf_core.Cell___set_rain_source(self, *args, **kwargs) - - - def __get_rain_source(self, *args, **kwargs): - """ - __get_rain_source(Cell self) -> cmf::atmosphere::RainSource::ptr - - cmf::atmosphere::RainSource::ptr get_rain_source() - - Returns the current source for rainfall. - """ - return _cmf_core.Cell___get_rain_source(self, *args, **kwargs) - - - def set_uptakestress(self, *args, **kwargs): - """ - set_uptakestress(Cell self, RootUptakeStessFunction stressfunction) - - void - set_uptakestress(const ET::RootUptakeStessFunction &stressfunction) - - Uses the given WaterStressFunction for all stressedET like connections - to the transpiration target. - """ - return _cmf_core.Cell_set_uptakestress(self, *args, **kwargs) - - - def __get_evaporation(self, *args, **kwargs): - """ - __get_evaporation(Cell self) -> cmf::water::flux_node::ptr - - cmf::water::flux_node::ptr get_evaporation() - - Returns the end point of all evaporation of this cell (a - cmf::water::flux_node) - """ - return _cmf_core.Cell___get_evaporation(self, *args, **kwargs) - - - def __get_transpiration(self, *args, **kwargs): - """ - __get_transpiration(Cell self) -> cmf::water::flux_node::ptr - - cmf::water::flux_node::ptr get_transpiration() - - Returns the end point of all transpiration of this cell (a - cmf::water::flux_node) - """ - return _cmf_core.Cell___get_transpiration(self, *args, **kwargs) - - - def get_surfacewater(self, *args, **kwargs): - """ - get_surfacewater(Cell self) -> cmf::water::flux_node::ptr - - cmf::water::flux_node::ptr get_surfacewater() - - returns the surface water of this cell. This is either a flux node or - a cmf::upslope::SurfaceWater - """ - return _cmf_core.Cell_get_surfacewater(self, *args, **kwargs) - - - def surfacewater_as_storage(self, *args, **kwargs): - """ - surfacewater_as_storage(Cell self) - - void surfacewater_as_storage() - - Makes the surfacewater of this cell a cmf::upslope::SurfaceWater - storage. - """ - return _cmf_core.Cell_surfacewater_as_storage(self, *args, **kwargs) - - - def add_storage(self, *args): - """ - add_storage(Cell self, std::string Name, char storage_role, bool isopenwater=False) -> cmf::water::WaterStorage::ptr - add_storage(Cell self, cmf::water::WaterStorage::ptr storage) -> ptrdiff_t - - ptrdiff_t - add_storage(cmf::water::WaterStorage::ptr storage) - - Bounds an existing storage to the cell. - """ - return _cmf_core.Cell_add_storage(self, *args) - - - def remove_storage(self, *args, **kwargs): - """ - remove_storage(Cell self, cmf::water::WaterStorage::ptr storage) - - void - remove_storage(cmf::water::WaterStorage::ptr storage) - """ - return _cmf_core.Cell_remove_storage(self, *args, **kwargs) - - - def storage_count(self, *args, **kwargs): - """ - storage_count(Cell self) -> size_t - - size_t - storage_count() const - """ - return _cmf_core.Cell_storage_count(self, *args, **kwargs) - - - def get_storage(self, *args, **kwargs): - """ - get_storage(Cell self, ptrdiff_t index) -> cmf::water::WaterStorage::ptr - - cmf::water::WaterStorage::ptr get_storage(ptrdiff_t index) const - """ - return _cmf_core.Cell_get_storage(self, *args, **kwargs) - - - def get_canopy(self, *args, **kwargs): - """ - get_canopy(Cell self) -> cmf::water::WaterStorage::ptr - - cmf::water::WaterStorage::ptr get_canopy() const - """ - return _cmf_core.Cell_get_canopy(self, *args, **kwargs) - - - def get_snow(self, *args, **kwargs): - """ - get_snow(Cell self) -> cmf::water::WaterStorage::ptr - - cmf::water::WaterStorage::ptr get_snow() const - """ - return _cmf_core.Cell_get_snow(self, *args, **kwargs) - - - def snow_coverage(self, *args, **kwargs): - """ - snow_coverage(Cell self) -> real - - real - snow_coverage() const - """ - return _cmf_core.Cell_snow_coverage(self, *args, **kwargs) - - - def albedo(self, *args, **kwargs): - """ - albedo(Cell self) -> real - - real albedo() - const - """ - return _cmf_core.Cell_albedo(self, *args, **kwargs) - - surface_amplitude = _swig_property(_cmf_core.Cell_surface_amplitude_get, _cmf_core.Cell_surface_amplitude_set) - - def surface_water_coverage(self, *args, **kwargs): - """ - surface_water_coverage(Cell self) -> real - - real surface_water_coverage() const - - Returns the coverage of the surface water. - - The covered fraction (0..1) is simply modelled as a piecewise linear - function of the surface water depth. If the depth is above the - aggregate height, the coverage is 1, below it is given as - - .. math:: - - c = - \\frac{h_{water}}{\\Delta h_{surface}} - - with c the coverage, - :math:`h_{water}` the depth of the surface water and :math:`\\Delta h_{surface}` - the amplitude of the surface roughness - """ - return _cmf_core.Cell_surface_water_coverage(self, *args, **kwargs) - - - def heat_flux(self, *args, **kwargs): - """ - heat_flux(Cell self, Time t) -> real - - real - heat_flux(cmf::math::Time t) const - - Calculates the surface heat balance. - - Parameters: - ----------- - - t: Time step - """ - return _cmf_core.Cell_heat_flux(self, *args, **kwargs) - - Tground = _swig_property(_cmf_core.Cell_Tground_get, _cmf_core.Cell_Tground_set) - - def leave_wetness(self, *args, **kwargs): - """ - leave_wetness(Cell self) -> real - - real - leave_wetness() const - - Return the fraction of wet leaves in the canopy if a canopy water - storage exists. - - If no canopy storage is present, it returns 0.0 (=empty). The fraction - of wet leaves are calculated as the linear filling of the canopy - storage. - """ - return _cmf_core.Cell_leave_wetness(self, *args, **kwargs) - - Id = _swig_property(_cmf_core.Cell_Id_get, _cmf_core.Cell_Id_set) - - def get_WKB(self, *args, **kwargs): - """get_WKB(Cell self) -> cmf::bytestring""" - return _cmf_core.Cell_get_WKB(self, *args, **kwargs) - - - def set_WKB(self, *args, **kwargs): - """set_WKB(Cell self, cmf::bytestring wkb)""" - return _cmf_core.Cell_set_WKB(self, *args, **kwargs) - - - def get_weather(self, *args, **kwargs): - """ - get_weather(Cell self, Time t) -> Weather - - cmf::atmosphere::Weather get_weather(cmf::math::Time t) const - - Returns the current meteorological conditions of the cell at time t. - - """ - return _cmf_core.Cell_get_weather(self, *args, **kwargs) - - - def layer_count(self, *args, **kwargs): - """ - layer_count(Cell self) -> size_t - - size_t - layer_count() const - - Returns the number of layers of the cell. - """ - return _cmf_core.Cell_layer_count(self, *args, **kwargs) - - - def get_layer(self, *args, **kwargs): - """ - get_layer(Cell self, ptrdiff_t ndx) -> cmf::upslope::SoilLayer::ptr - - cmf::upslope::SoilLayer::ptr get_layer(ptrdiff_t ndx) const - - Returns the layer at position ndx. - - From python this function is masked as a sequence: - """ - return _cmf_core.Cell_get_layer(self, *args, **kwargs) - - - def add_layer(self, *args): - """ - add_layer(Cell self, real lowerboundary, RetentionCurve r_curve, real saturateddepth=10) -> cmf::upslope::SoilLayer::ptr - add_layer(Cell self, real lowerboundary) -> cmf::upslope::SoilLayer::ptr - - cmf::upslope::SoilLayer::ptr add_layer(real lowerboundary) - - Adds a rather conceptual layer to the cell. Use this version for - conceptual models. The retention curve resambles an empty bucket. - """ - return _cmf_core.Cell_add_layer(self, *args) - - - def remove_last_layer(self, *args, **kwargs): - """ - remove_last_layer(Cell self) - - void - remove_last_layer() - - Remove the lowest layer from this cell. - """ - return _cmf_core.Cell_remove_last_layer(self, *args, **kwargs) - - - def remove_layers(self, *args, **kwargs): - """ - remove_layers(Cell self) - - void - remove_layers() - - Removes all layers from this cell. - """ - return _cmf_core.Cell_remove_layers(self, *args, **kwargs) - - __swig_destroy__ = _cmf_core.delete_Cell - - def __init__(self, *args, **kwargs): - """ - __init__(cmf::upslope::Cell self, double x, double y, double z, double area, project _project) -> Cell - - Cell(double x, - double y, double z, double area, cmf::project &_project) - """ - _cmf_core.Cell_swiginit(self, _cmf_core.new_Cell(*args, **kwargs)) - - def to_string(self, *args, **kwargs): - """ - to_string(Cell self) -> std::string - - std::string - to_string() const - """ - return _cmf_core.Cell_to_string(self, *args, **kwargs) - - topology = _swig_property(_cmf_core.Cell_topology_get) - - evaporation = _swig_property(_cmf_core.Cell___get_evaporation) - - - transpiration = _swig_property(_cmf_core.Cell___get_transpiration) - - meteorology = _swig_property(_cmf_core.Cell_meteorology_get, _cmf_core.Cell_meteorology_set) - - rain_source = _swig_property(_cmf_core.Cell___get_rain_source, - _cmf_core.Cell___set_rain_source) - - layers = _swig_property(_cmf_core.Cell_layers_get) - project = _swig_property(_cmf_core.Cell_project_get) - saturated_depth = _swig_property(_cmf_core.Cell_saturated_depth_get, _cmf_core.Cell_saturated_depth_set) - area = _swig_property(_cmf_core.Cell_area_get) - soildepth = _swig_property(_cmf_core.Cell_soildepth_get) - - @property - def surface_storages(self): - "Provides access to all surface storages of the cell, like canopy, snow, surface water etc" - return [self.get_storage(i) for i in range(self.storage_count())] - @property - def storages(self): - "Provides access to all storages of the cell (surface storages and layers)" - return self.surface_storages + list(self.layers) - - @property - def neighbors(self): - c_iter=neighbor_iterator(self) - while c_iter.valid(): - yield (c_iter.cell(),c_iter.flowwidth()) - c_iter.next() - - surfacewater=property(get_surfacewater,None,"Gives access to the surface water, which is either a distributing flux node, or the storage for all surface water") - canopy=property(get_canopy,None,"The canopy water storage of the cell, if it exists") - snow=property(get_snow,None,"The snow pack of the cell, if a storage for the snow exists") - - contributing_area=property(lambda self:self.topology.ContributingArea(),None,"Contributing area of this cell m2") - main_outlet=property(lambda self:self.topology.MainOutlet(),None,"The main outlet of the surface water of this cell") - - def connect_soil_with_node(self,node,ctype,flowwidth,distance,upper_boundary=0,lower_boundary=None): - """Connects all layers between the boundaries with a node using a flux connection - node: Target node (flux_node) - type: Type of the connection (e.g. cmf.Richards_lateral) - flowwidth: Width of the connection - distance: distance of the connection - upper_boundary: Connect only layers, whose lower depth is greater then this value - lower_boundary: Connect only layers, whose upper depth is smaller then this value - """ - if lower_boundary is None: - lower_boundary=self.soildepth - connections=[ctype(l,node,flowwidth,distance) - for l in self.layers - if l.boundary[0]upper_boundary - ] - - def install_connection(self,connection_type): - """Calls the static use_for_cell method of the connection_type, if present. - The use_for_cell method might do quite a lot of stuff, please consult the docs for the connection. - Eg. >>>help(Richards.use_for_cell) - """ - if hasattr(connection_type,"use_for_cell"): - connection_type.use_for_cell(self) - else: - raise TypeError("Only connection types implementing a static use_for_cell function can be used") - def __hash__(self): - return hash((self.x,self.y,self.Id)) - def __eq__(self,cmp): - return hash(self)==hash(cmp) - def __repr__(self): - return "cell #%i(%g,%g,%g)" % (self.Id,self.x,self.y,self.z) - -Cell.get_position = new_instancemethod(_cmf_core.Cell_get_position, None, Cell) -Cell.m3_to_mm = new_instancemethod(_cmf_core.Cell_m3_to_mm, None, Cell) -Cell.mm_to_m3 = new_instancemethod(_cmf_core.Cell_mm_to_m3, None, Cell) -Cell.InvalidateSatDepth = new_instancemethod(_cmf_core.Cell_InvalidateSatDepth, None, Cell) -Cell.set_aerodynamic_resistance = new_instancemethod(_cmf_core.Cell_set_aerodynamic_resistance, None, Cell) -Cell.set_weather = new_instancemethod(_cmf_core.Cell_set_weather, None, Cell) -Cell.set_rainfall = new_instancemethod(_cmf_core.Cell_set_rainfall, None, Cell) -Cell.get_rainfall = new_instancemethod(_cmf_core.Cell_get_rainfall, None, Cell) -Cell.__set_rain_source = new_instancemethod(_cmf_core.Cell___set_rain_source, None, Cell) -Cell.__get_rain_source = new_instancemethod(_cmf_core.Cell___get_rain_source, None, Cell) -Cell.set_uptakestress = new_instancemethod(_cmf_core.Cell_set_uptakestress, None, Cell) -Cell.__get_evaporation = new_instancemethod(_cmf_core.Cell___get_evaporation, None, Cell) -Cell.__get_transpiration = new_instancemethod(_cmf_core.Cell___get_transpiration, None, Cell) -Cell.get_surfacewater = new_instancemethod(_cmf_core.Cell_get_surfacewater, None, Cell) -Cell.surfacewater_as_storage = new_instancemethod(_cmf_core.Cell_surfacewater_as_storage, None, Cell) -Cell.add_storage = new_instancemethod(_cmf_core.Cell_add_storage, None, Cell) -Cell.remove_storage = new_instancemethod(_cmf_core.Cell_remove_storage, None, Cell) -Cell.storage_count = new_instancemethod(_cmf_core.Cell_storage_count, None, Cell) -Cell.get_storage = new_instancemethod(_cmf_core.Cell_get_storage, None, Cell) -Cell.get_canopy = new_instancemethod(_cmf_core.Cell_get_canopy, None, Cell) -Cell.get_snow = new_instancemethod(_cmf_core.Cell_get_snow, None, Cell) -Cell.snow_coverage = new_instancemethod(_cmf_core.Cell_snow_coverage, None, Cell) -Cell.albedo = new_instancemethod(_cmf_core.Cell_albedo, None, Cell) -Cell.surface_water_coverage = new_instancemethod(_cmf_core.Cell_surface_water_coverage, None, Cell) -Cell.heat_flux = new_instancemethod(_cmf_core.Cell_heat_flux, None, Cell) -Cell.leave_wetness = new_instancemethod(_cmf_core.Cell_leave_wetness, None, Cell) -Cell.get_WKB = new_instancemethod(_cmf_core.Cell_get_WKB, None, Cell) -Cell.set_WKB = new_instancemethod(_cmf_core.Cell_set_WKB, None, Cell) -Cell.get_weather = new_instancemethod(_cmf_core.Cell_get_weather, None, Cell) -Cell.layer_count = new_instancemethod(_cmf_core.Cell_layer_count, None, Cell) -Cell.get_layer = new_instancemethod(_cmf_core.Cell_get_layer, None, Cell) -Cell.add_layer = new_instancemethod(_cmf_core.Cell_add_layer, None, Cell) -Cell.remove_last_layer = new_instancemethod(_cmf_core.Cell_remove_last_layer, None, Cell) -Cell.remove_layers = new_instancemethod(_cmf_core.Cell_remove_layers, None, Cell) -Cell.to_string = new_instancemethod(_cmf_core.Cell_to_string, None, Cell) -Cell_swigregister = _cmf_core.Cell_swigregister -Cell_swigregister(Cell) - -class Topology(object): - """ - - - represents the connectivity of cells to each other - - C++ includes: Topology.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - - def __init__(self, *args, **kwargs): - raise AttributeError("No constructor defined") - __repr__ = _swig_repr - cell = _swig_property(_cmf_core.Topology_cell_get) - x = _swig_property(_cmf_core.Topology_x_get, _cmf_core.Topology_x_set) - y = _swig_property(_cmf_core.Topology_y_get, _cmf_core.Topology_y_set) - z = _swig_property(_cmf_core.Topology_z_get, _cmf_core.Topology_z_set) - - def get_position(self, *args, **kwargs): - """ - get_position(Topology self) -> point - - cmf::geometry::point get_position() const - - Returns the center of the cell. - """ - return _cmf_core.Topology_get_position(self, *args, **kwargs) - - - def flowwidth(self, *args): - """ - flowwidth(Topology self, Cell target) -> double - flowwidth(Topology self, Topology target) -> double - - double - flowwidth(Topology &target) - """ - return _cmf_core.Topology_flowwidth(self, *args) - - - def AddNeighbor(self, *args): - """ - AddNeighbor(Topology self, Cell target, double flowwidth) - AddNeighbor(Topology self, Topology target, double flowwidth) - - void - AddNeighbor(Topology &target, double flowwidth) - """ - return _cmf_core.Topology_AddNeighbor(self, *args) - - - def RemoveNeighbor(self, *args, **kwargs): - """ - RemoveNeighbor(Topology self, Topology target) - - void - RemoveNeighbor(Topology &target) - - Removes the topological relation to the given cell. - """ - return _cmf_core.Topology_RemoveNeighbor(self, *args, **kwargs) - - - def neighbor_count(self, *args, **kwargs): - """ - neighbor_count(Topology self) -> size_t - - size_t - neighbor_count() const - - Returns the number of neighbors. - """ - return _cmf_core.Topology_neighbor_count(self, *args, **kwargs) - - - def MainOutlet(self, *args, **kwargs): - """ - MainOutlet(Topology self, bool forceRecalc=False) -> Cell - - Cell* - MainOutlet(bool forceRecalc=false) - - Returns the mainoutlet (steepest lower neighbor) - """ - return _cmf_core.Topology_MainOutlet(self, *args, **kwargs) - - - def ContributingArea(self, *args, **kwargs): - """ - ContributingArea(Topology self) -> double - - double ContributingArea() const - - Get the contributing area (steepest path upwards) - """ - return _cmf_core.Topology_ContributingArea(self, *args, **kwargs) - - - def calculate_contributing_area(*args, **kwargs): - """calculate_contributing_area(cell_vector arg1)""" - return _cmf_core.Topology_calculate_contributing_area(*args, **kwargs) - - calculate_contributing_area = staticmethod(calculate_contributing_area) - - def __eq__(self, *args, **kwargs): - """__eq__(Topology self, Topology cmp) -> bool""" - return _cmf_core.Topology___eq__(self, *args, **kwargs) - - __swig_destroy__ = _cmf_core.delete_Topology -Topology.get_position = new_instancemethod(_cmf_core.Topology_get_position, None, Topology) -Topology.flowwidth = new_instancemethod(_cmf_core.Topology_flowwidth, None, Topology) -Topology.AddNeighbor = new_instancemethod(_cmf_core.Topology_AddNeighbor, None, Topology) -Topology.RemoveNeighbor = new_instancemethod(_cmf_core.Topology_RemoveNeighbor, None, Topology) -Topology.neighbor_count = new_instancemethod(_cmf_core.Topology_neighbor_count, None, Topology) -Topology.MainOutlet = new_instancemethod(_cmf_core.Topology_MainOutlet, None, Topology) -Topology.ContributingArea = new_instancemethod(_cmf_core.Topology_ContributingArea, None, Topology) -Topology.__eq__ = new_instancemethod(_cmf_core.Topology___eq__, None, Topology) -Topology_swigregister = _cmf_core.Topology_swigregister -Topology_swigregister(Topology) - -def Topology_calculate_contributing_area(*args, **kwargs): - """Topology_calculate_contributing_area(cell_vector arg2)""" - return _cmf_core.Topology_calculate_contributing_area(*args, **kwargs) - -class neighbor_iterator(object): - """ - - - A class to iterate through the neighbors of a cell (const). Not needed - from the Python side, use the generator cell.neighbors instead. - - C++ includes: Topology.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - - def __init__(self, *args, **kwargs): - """ - __init__(cmf::upslope::neighbor_iterator self, Cell cell) -> neighbor_iterator - - neighbor_iterator(cmf::upslope::Cell *cell) - """ - _cmf_core.neighbor_iterator_swiginit(self, _cmf_core.new_neighbor_iterator(*args, **kwargs)) - - def cell(self, *args, **kwargs): - """ - cell(neighbor_iterator self) -> Cell - - Cell& - cell() - """ - return _cmf_core.neighbor_iterator_cell(self, *args, **kwargs) - - - def flowwidth(self, *args, **kwargs): - """ - flowwidth(neighbor_iterator self) -> double - - double flowwidth() - """ - return _cmf_core.neighbor_iterator_flowwidth(self, *args, **kwargs) - - - def valid(self, *args, **kwargs): - """ - valid(neighbor_iterator self) -> bool - - bool - valid() const - """ - return _cmf_core.neighbor_iterator_valid(self, *args, **kwargs) - - - def next(self, *args, **kwargs): - """ - next(neighbor_iterator self) -> neighbor_iterator - - neighbor_iterator& next() - - Points the iterator to the next neighbor. - """ - return _cmf_core.neighbor_iterator_next(self, *args, **kwargs) - - - def __eq__(self, *args, **kwargs): - """__eq__(neighbor_iterator self, neighbor_iterator cmp) -> bool""" - return _cmf_core.neighbor_iterator___eq__(self, *args, **kwargs) - - - def __neq__(self, *args, **kwargs): - """__neq__(neighbor_iterator self, neighbor_iterator cmp) -> bool""" - return _cmf_core.neighbor_iterator___neq__(self, *args, **kwargs) - - __swig_destroy__ = _cmf_core.delete_neighbor_iterator -neighbor_iterator.cell = new_instancemethod(_cmf_core.neighbor_iterator_cell, None, neighbor_iterator) -neighbor_iterator.flowwidth = new_instancemethod(_cmf_core.neighbor_iterator_flowwidth, None, neighbor_iterator) -neighbor_iterator.valid = new_instancemethod(_cmf_core.neighbor_iterator_valid, None, neighbor_iterator) -neighbor_iterator.next = new_instancemethod(_cmf_core.neighbor_iterator_next, None, neighbor_iterator) -neighbor_iterator.__eq__ = new_instancemethod(_cmf_core.neighbor_iterator___eq__, None, neighbor_iterator) -neighbor_iterator.__neq__ = new_instancemethod(_cmf_core.neighbor_iterator___neq__, None, neighbor_iterator) -neighbor_iterator_swigregister = _cmf_core.neighbor_iterator_swigregister -neighbor_iterator_swigregister(neighbor_iterator) - -class cell_vector(StateVariableOwner): - """ - - - A cell vector holds a bunch of cells. - - C++ includes: cell_vector.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - - def __init__(self, *args): - """ - __init__(cmf::upslope::cell_vector self) -> cell_vector - __init__(cmf::upslope::cell_vector self, cell_vector copy) -> cell_vector - - cell_vector(cell_const_iterator first, cell_const_iterator last) - """ - _cmf_core.cell_vector_swiginit(self, _cmf_core.new_cell_vector(*args)) - - def __getitem__(self, *args): - """ - __getitem__(cell_vector self, ptrdiff_t index) -> Cell - __getitem__(cell_vector self, ptrdiff_t index) -> Cell - """ - return _cmf_core.cell_vector___getitem__(self, *args) - - - def append(self, *args, **kwargs): - """ - append(cell_vector self, Cell cell) - - void - append(cmf::upslope::Cell &cell) - """ - return _cmf_core.cell_vector_append(self, *args, **kwargs) - - - def remove(self, *args): - """ - remove(cell_vector self, ptrdiff_t index) - remove(cell_vector self, Cell cell) - - void - remove(const cmf::upslope::Cell &cell) - """ - return _cmf_core.cell_vector_remove(self, *args) - - - def pop(self, *args, **kwargs): - """ - pop(cell_vector self) -> Cell - - Cell& pop() - - Returns and removes the last cell. - """ - return _cmf_core.cell_vector_pop(self, *args, **kwargs) - - - def __len__(self, *args, **kwargs): - """ - __len__(cell_vector self) -> size_t - - size_t size() - const - """ - return _cmf_core.cell_vector___len__(self, *args, **kwargs) - - - def __getslice__(self, *args, **kwargs): - """ - __getslice__(cell_vector self, ptrdiff_t start, ptrdiff_t end, ptrdiff_t step=1) -> cell_vector - - cell_vector get_slice(ptrdiff_t start, ptrdiff_t end, ptrdiff_t - step=1) - """ - return _cmf_core.cell_vector___getslice__(self, *args, **kwargs) - - - def get_area(self, *args, **kwargs): - """ - get_area(cell_vector self) -> double - - double - get_area() const - - Returns sum of the area of the cells. - """ - return _cmf_core.cell_vector_get_area(self, *args, **kwargs) - - - def __contains__(self, *args, **kwargs): - """ - __contains__(cell_vector self, Cell cell) -> bool - - bool - contains(const cmf::upslope::Cell &cell) const - """ - return _cmf_core.cell_vector___contains__(self, *args, **kwargs) - - __swig_destroy__ = _cmf_core.delete_cell_vector - lowest = _swig_property(_cmf_core.cell_vector_lowest_get) - highest = _swig_property(_cmf_core.cell_vector_highest_get) - - def __iter__(self): - for i in range(len(self)): - yield self[i] - def __repr__(self): - if len(self): - return "[%i cells, %0.0fm2, %0.0f - %0.0f m asl.]" % (len(self),self.get_area(),self.lowest.z,self.highest.z) - else: - return "" - -cell_vector.__getitem__ = new_instancemethod(_cmf_core.cell_vector___getitem__, None, cell_vector) -cell_vector.append = new_instancemethod(_cmf_core.cell_vector_append, None, cell_vector) -cell_vector.remove = new_instancemethod(_cmf_core.cell_vector_remove, None, cell_vector) -cell_vector.pop = new_instancemethod(_cmf_core.cell_vector_pop, None, cell_vector) -cell_vector.__len__ = new_instancemethod(_cmf_core.cell_vector___len__, None, cell_vector) -cell_vector.__getslice__ = new_instancemethod(_cmf_core.cell_vector___getslice__, None, cell_vector) -cell_vector.get_area = new_instancemethod(_cmf_core.cell_vector_get_area, None, cell_vector) -cell_vector.__contains__ = new_instancemethod(_cmf_core.cell_vector___contains__, None, cell_vector) -cell_vector_swigregister = _cmf_core.cell_vector_swigregister -cell_vector_swigregister(cell_vector) - - -def find_cell(*args, **kwargs): - """find_cell(cell_vector arg1, point p, double max_dist=1e20) -> Cell""" - return _cmf_core.find_cell(*args, **kwargs) - -def get_boundary_cells(*args, **kwargs): - """get_boundary_cells(cell_vector cells) -> cell_vector""" - return _cmf_core.get_boundary_cells(*args, **kwargs) - -def get_connections(*args, **kwargs): - """get_connections(cell_vector cells) -> connection_list""" - return _cmf_core.get_connections(*args, **kwargs) - -def connect_cells_with_flux(*args, **kwargs): - """connect_cells_with_flux(cell_vector cells, CellConnector connect, int start_at_layer=0)""" - return _cmf_core.connect_cells_with_flux(*args, **kwargs) - -def fill_sinks(*args, **kwargs): - """fill_sinks(cell_vector cells, double min_difference=0.001) -> int""" - return _cmf_core.fill_sinks(*args, **kwargs) - -def get_area(*args, **kwargs): - """get_area(cell_vector cells) -> double""" - return _cmf_core.get_area(*args, **kwargs) - -def get_center(*args, **kwargs): - """get_center(cell_vector cells) -> point""" - return _cmf_core.get_center(*args, **kwargs) - -def cell_positions(*args, **kwargs): - """cell_positions(cell_vector cells) -> point_vector""" - return _cmf_core.cell_positions(*args, **kwargs) - -def cell_flux_directions(*args, **kwargs): - """cell_flux_directions(cell_vector cells, Time arg2) -> point_vector""" - return _cmf_core.cell_flux_directions(*args, **kwargs) - -def cell2cellflux(*args, **kwargs): - """cell2cellflux(Cell source, Cell target, Time t, bool subsurface_only=False) -> cmf::math::num_array""" - return _cmf_core.cell2cellflux(*args, **kwargs) - -def cell_distance(*args, **kwargs): - """cell_distance(Cell c1, Cell c2) -> double""" - return _cmf_core.cell_distance(*args, **kwargs) -class subcatchment(object): - """ - - - A class to structure cells in a project using their main outlets. - - C++ includes: algorithm.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - pourpoint = _swig_property(_cmf_core.subcatchment_pourpoint_get) - inflowcells = _swig_property(_cmf_core.subcatchment_inflowcells_get, _cmf_core.subcatchment_inflowcells_set) - cells = _swig_property(_cmf_core.subcatchment_cells_get, _cmf_core.subcatchment_cells_set) - - def __init__(self, *args, **kwargs): - """ - __init__(cmf::upslope::subcatchment self, Cell pourpoint, double area_threshold=1e308) -> subcatchment - - subcatchment(cmf::upslope::Cell &pourpoint, double - area_threshold=1e308) - - Creates a subcatchment from a pourpoint cell. - - Parameters: - ----------- - - pourpoint: The pourpoint (outlet of the subcatchment) - - area_threshold: Minimum contributing area size to form a - subcatchment. When area_threshold > area(cells), all upslope cells of - pourpoint are used. - """ - _cmf_core.subcatchment_swiginit(self, _cmf_core.new_subcatchment(*args, **kwargs)) - __swig_destroy__ = _cmf_core.delete_subcatchment -subcatchment_swigregister = _cmf_core.subcatchment_swigregister -subcatchment_swigregister(subcatchment) - - -def pressure_to_waterhead(*args, **kwargs): - """pressure_to_waterhead(double Pressure) -> double""" - return _cmf_core.pressure_to_waterhead(*args, **kwargs) - -def waterhead_to_pressure(*args, **kwargs): - """waterhead_to_pressure(double waterhead) -> double""" - return _cmf_core.waterhead_to_pressure(*args, **kwargs) - -def pF_to_waterhead(*args, **kwargs): - """pF_to_waterhead(double pF) -> double""" - return _cmf_core.pF_to_waterhead(*args, **kwargs) - -def waterhead_to_pF(*args, **kwargs): - """waterhead_to_pF(double waterhead) -> double""" - return _cmf_core.waterhead_to_pF(*args, **kwargs) -class RetentionCurve(object): - """ - - - Abstract base class for different types of retention curves. - - This class, and its children uses wetness instead of volumetric water - content. The wetness of a soil is defined as water content per void - volume - - C++ includes: RetentionCurve.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - - def __init__(self, *args, **kwargs): - raise AttributeError("No constructor defined - class is abstract") - __repr__ = _swig_repr - - def K(self, *args): - """ - K(RetentionCurve self, real wetness) -> real - K(RetentionCurve self, cmf::math::num_array const & wetness) -> cmf::math::num_array - - cmf::math::num_array K(const cmf::math::num_array &wetness) const - """ - return _cmf_core.RetentionCurve_K(self, *args) - - - def Wetness_eff(self, *args, **kwargs): - """ - Wetness_eff(RetentionCurve self, real wetness, real pF_r=4.2) -> real - - virtual real Wetness_eff(real wetness, real pF_r=4.2) const - - Returns the effective wetness, using a residual pF value - - .. math:: - - w_{eff} - = - \\frac{w_{act}-w\\left(pF_r\\right)}{1-w\\left(pF_r\\right)} - - . - - """ - return _cmf_core.RetentionCurve_Wetness_eff(self, *args, **kwargs) - - - def Porosity(self, *args, **kwargs): - """ - Porosity(RetentionCurve self, real depth=0.0) -> real - - virtual real Porosity(real depth=0.0) const =0 - - Returns the porosity at a certain depth. - """ - return _cmf_core.RetentionCurve_Porosity(self, *args, **kwargs) - - - def VoidVolume(self, *args, **kwargs): - """ - VoidVolume(RetentionCurve self, real upperDepth, real lowerDepth, real Area) -> real - - virtual real VoidVolume(real upperDepth, real lowerDepth, real Area) - const - - Returns the void volume of a soil column. - """ - return _cmf_core.RetentionCurve_VoidVolume(self, *args, **kwargs) - - - def FillHeight(self, *args, **kwargs): - """ - FillHeight(RetentionCurve self, real lowerDepth, real Area, real Volume) -> real - - virtual real FillHeight(real lowerDepth, real Area, real Volume) const - - Returns the thickness of a soil column with a certain pore volume. - """ - return _cmf_core.RetentionCurve_FillHeight(self, *args, **kwargs) - - - def Diffusivity(self, *args): - """ - Diffusivity(RetentionCurve self, real wetness) -> real - Diffusivity(RetentionCurve self, cmf::math::num_array & wetness) -> cmf::math::num_array - - cmf::math::num_array Diffusivity(cmf::math::num_array &wetness) - """ - return _cmf_core.RetentionCurve_Diffusivity(self, *args) - - - def Wetness(self, *args): - """ - Wetness(RetentionCurve self, real suction) -> real - Wetness(RetentionCurve self, cmf::math::num_array const & suction) -> cmf::math::num_array - - cmf::math::num_array Wetness(const cmf::math::num_array &suction) - const - """ - return _cmf_core.RetentionCurve_Wetness(self, *args) - - - def theta(self, *args): - """ - theta(RetentionCurve self, real wetness) -> real - theta(RetentionCurve self, cmf::math::num_array const & wetness) -> cmf::math::num_array - - cmf::math::num_array theta(const cmf::math::num_array &wetness) const - - """ - return _cmf_core.RetentionCurve_theta(self, *args) - - - def dPsiM_dW(self, *args): - """ - dPsiM_dW(RetentionCurve self, real wetness) -> real - dPsiM_dW(RetentionCurve self, cmf::math::num_array const & wetness) -> cmf::math::num_array - - cmf::math::num_array dPsiM_dW(const cmf::math::num_array &wetness) - const - """ - return _cmf_core.RetentionCurve_dPsiM_dW(self, *args) - - - def Wetness_pF(self, *args): - """ - Wetness_pF(RetentionCurve self, real pF) -> real - Wetness_pF(RetentionCurve self, cmf::math::num_array const & pF) -> cmf::math::num_array - - cmf::math::num_array Wetness_pF(const cmf::math::num_array &pF) const - - """ - return _cmf_core.RetentionCurve_Wetness_pF(self, *args) - - - def MatricPotential(self, *args): - """ - MatricPotential(RetentionCurve self, real wetness) -> real - MatricPotential(RetentionCurve self, cmf::math::num_array const & wetness) -> cmf::math::num_array - - cmf::math::num_array MatricPotential(const cmf::math::num_array - &wetness) const - """ - return _cmf_core.RetentionCurve_MatricPotential(self, *args) - - - def copy(self, *args, **kwargs): - """ - copy(RetentionCurve self) -> RetentionCurve - - virtual - RetentionCurve* copy() const =0 - """ - return _cmf_core.RetentionCurve_copy(self, *args, **kwargs) - - __swig_destroy__ = _cmf_core.delete_RetentionCurve -RetentionCurve.K = new_instancemethod(_cmf_core.RetentionCurve_K, None, RetentionCurve) -RetentionCurve.Wetness_eff = new_instancemethod(_cmf_core.RetentionCurve_Wetness_eff, None, RetentionCurve) -RetentionCurve.Porosity = new_instancemethod(_cmf_core.RetentionCurve_Porosity, None, RetentionCurve) -RetentionCurve.VoidVolume = new_instancemethod(_cmf_core.RetentionCurve_VoidVolume, None, RetentionCurve) -RetentionCurve.FillHeight = new_instancemethod(_cmf_core.RetentionCurve_FillHeight, None, RetentionCurve) -RetentionCurve.Diffusivity = new_instancemethod(_cmf_core.RetentionCurve_Diffusivity, None, RetentionCurve) -RetentionCurve.Wetness = new_instancemethod(_cmf_core.RetentionCurve_Wetness, None, RetentionCurve) -RetentionCurve.theta = new_instancemethod(_cmf_core.RetentionCurve_theta, None, RetentionCurve) -RetentionCurve.dPsiM_dW = new_instancemethod(_cmf_core.RetentionCurve_dPsiM_dW, None, RetentionCurve) -RetentionCurve.Wetness_pF = new_instancemethod(_cmf_core.RetentionCurve_Wetness_pF, None, RetentionCurve) -RetentionCurve.MatricPotential = new_instancemethod(_cmf_core.RetentionCurve_MatricPotential, None, RetentionCurve) -RetentionCurve.copy = new_instancemethod(_cmf_core.RetentionCurve_copy, None, RetentionCurve) -RetentionCurve_swigregister = _cmf_core.RetentionCurve_swigregister -RetentionCurve_swigregister(RetentionCurve) -rho_wg = cvar.rho_wg - -class BrooksCoreyRetentionCurve(RetentionCurve): - """ - - - Provides the use of the Brooks-Corey retention curve. - - - - .. math:: - - W(\\theta) &=& \\frac{\\theta - - \\theta_r}{\\theta_s - \\theta_r} \\\\ K(W) &=& K_{sat} - W^{2b+3} \\\\ \\Psi(W) &=& \\Psi_X - \\left(\\frac{W}{W_X}\\right)^{-b} \\\\ W(\\Psi) &=& - {\\left( \\frac{\\Psi_X}{\\Psi}\\right) - }^{\\frac{1}{b}}\\ W_X - - where: :math:`K` is the - conductivity in :math:`\\frac m{day}` - - :math:`W` is the wetness (Volume of soil water per volume of pores) - - :math:`b` is the shape of the retention curve (usually between 4 (sand) and - 14 (clay)) - - :math:`\\Psi(W)` is the matric potential in :math:`m H_2O` at wetness W - - :math:`\\Psi_X` is a matric potential at a known wetness in :math:`m H_2O` - - :math:`W_X` is the wetness with a known matric potential for dynamic changes - with depth, exponential decays of porosity and saturated conductivity - are used The decay function is: :math:`v(d)=v(0) (1+a)^{-d}`, where v is - the value ( :math:`K_{sat},\\Phi`), d is the depth in m and a is the - fractional decay per m. E.g. 0.1 means the value has in 1 m depth 90% - of the value at the surface - - C++ includes: RetentionCurve.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - Ksat = _swig_property(_cmf_core.BrooksCoreyRetentionCurve_Ksat_get, _cmf_core.BrooksCoreyRetentionCurve_Ksat_set) - - def SetPorosity(self, *args, **kwargs): - """ - SetPorosity(BrooksCoreyRetentionCurve self, real porosity, real porosity_decay=0) - - void - SetPorosity(real porosity, real porosity_decay=0) - - Sets the porosity (Volume of pores per volume of soil) and the - exponential porosity decline with depth. - """ - return _cmf_core.BrooksCoreyRetentionCurve_SetPorosity(self, *args, **kwargs) - - - def Transmissivity(self, *args, **kwargs): - """ - Transmissivity(BrooksCoreyRetentionCurve self, real upperDepth, real lowerDepth, real theta) -> real - - real - Transmissivity(real upperDepth, real lowerDepth, real theta) const - """ - return _cmf_core.BrooksCoreyRetentionCurve_Transmissivity(self, *args, **kwargs) - - wetness_X = _swig_property(_cmf_core.BrooksCoreyRetentionCurve_wetness_X_get, _cmf_core.BrooksCoreyRetentionCurve_wetness_X_set) - Psi_X = _swig_property(_cmf_core.BrooksCoreyRetentionCurve_Psi_X_get, _cmf_core.BrooksCoreyRetentionCurve_Psi_X_set) - residual_theta = _swig_property(_cmf_core.BrooksCoreyRetentionCurve_residual_theta_get, _cmf_core.BrooksCoreyRetentionCurve_residual_theta_set) - - def __init__(self, *args, **kwargs): - """ - __init__(cmf::upslope::BrooksCoreyRetentionCurve self, real ksat=15, real porosity=0.5, real _b=5, real theta_x=0.2, real psi_x, real porosity_decay=0) -> BrooksCoreyRetentionCurve - - BrooksCoreyRetentionCurve(real ksat=15, real porosity=0.5, real _b=5, - real theta_x=0.2, real psi_x=pF_to_waterhead(2.5), real - porosity_decay=0) - - Creates a brooks corey retention curve. - - Parameters: - ----------- - - ksat: Saturated conductivity :math:`\\frac{m}{day}` - - porosity: :math:`\\frac{m^3 Pores}{m^3 Soil}` - - _b: Shape of the retention curve (if you do not know how to - parameterize this, take a look at the other constructor) - - theta_x: :math:`\\theta_X` Water content at a specific suction pressure - - psi_x: Suction pressure for :math:`\\theta_X` in m water column, use the - conversion functions pF_to_waterhead, pressure_to_waterhead to convert - pressure in to waterhead height (default pF=2.5) - - porosity_decay: Relative decay of porosity with depth, e.g. 0.1 means - conductivity gets 10% smaller per meter - """ - _cmf_core.BrooksCoreyRetentionCurve_swiginit(self, _cmf_core.new_BrooksCoreyRetentionCurve(*args, **kwargs)) - - def CreateFrom2Points(*args, **kwargs): - """CreateFrom2Points(real ksat, real porosity, real theta1, real theta2, real psi_1, real psi_2) -> BrooksCoreyRetentionCurve""" - return _cmf_core.BrooksCoreyRetentionCurve_CreateFrom2Points(*args, **kwargs) - - CreateFrom2Points = staticmethod(CreateFrom2Points) - - def copy(self, *args, **kwargs): - """ - copy(BrooksCoreyRetentionCurve self) -> BrooksCoreyRetentionCurve - - virtual BrooksCoreyRetentionCurve* copy() const - """ - return _cmf_core.BrooksCoreyRetentionCurve_copy(self, *args, **kwargs) - - __swig_destroy__ = _cmf_core.delete_BrooksCoreyRetentionCurve - b = _swig_property(_cmf_core.BrooksCoreyRetentionCurve_b_get, _cmf_core.BrooksCoreyRetentionCurve_b_set) - - def __repr__(self): - return "cmf.BrooksCoreyRetentionCurve(Ksat=%g,phi=%g,b=%g,wfp0=%0.1f,pF0=%0.2f)" % (self.Ksat,self.Porosity(0.0),self.b,self.wetness_X,waterhead_to_pF(self.Psi_X)) - def __str__(self): - return "Brooks-Corey retention curve: Ksat=%0.3g m/day,por.=%0.0f%%,b=%g,%0.1f%% water content at pF%0.2f)" % (self.Ksat,self.Porosity(0.0)*100,self.b,self.wetness_X * self.Porosity(0.0) * 100,waterhead_to_pF(self.Psi_X)) - -BrooksCoreyRetentionCurve.SetPorosity = new_instancemethod(_cmf_core.BrooksCoreyRetentionCurve_SetPorosity, None, BrooksCoreyRetentionCurve) -BrooksCoreyRetentionCurve.Transmissivity = new_instancemethod(_cmf_core.BrooksCoreyRetentionCurve_Transmissivity, None, BrooksCoreyRetentionCurve) -BrooksCoreyRetentionCurve.copy = new_instancemethod(_cmf_core.BrooksCoreyRetentionCurve_copy, None, BrooksCoreyRetentionCurve) -BrooksCoreyRetentionCurve_swigregister = _cmf_core.BrooksCoreyRetentionCurve_swigregister -BrooksCoreyRetentionCurve_swigregister(BrooksCoreyRetentionCurve) - -def BrooksCoreyRetentionCurve_CreateFrom2Points(*args, **kwargs): - """BrooksCoreyRetentionCurve_CreateFrom2Points(real ksat, real porosity, real theta1, real theta2, real psi_1, real psi_2) -> BrooksCoreyRetentionCurve""" - return _cmf_core.BrooksCoreyRetentionCurve_CreateFrom2Points(*args, **kwargs) - -class VanGenuchtenMualem(RetentionCurve): - """ - - - Provides the use of the Van Genuchten - Mualem retention curve (Van - Genuchten 1980) - - Head - moisture relationship: - - .. math:: - - W(\\theta) &=& - \\frac{\\theta - \\theta_r}{\\theta_s - \\theta_r} \\\\ - K(W) &=& K_{sat} \\sqrt{W} - \\left(1-\\left(1-W^{1/m}\\right)^m\\right)^2 \\\\ m &=& - 1-\\frac 1 n \\\\ \\Psi(W) &=& 0.01 \\frac{m}{cm} - \\frac{{\\left(1-{W}^{\\frac{1}{m}}\\right) - }^{\\frac{1}{n}}}{\\alpha\\,{W}^{\\frac{1}{m\\,n}}} \\\\ - W(\\Psi) &=& - \\left(1+\\left(\\alpha\\,100\\frac{cm}{m}\\Psi\\right)^n\\right)^{-m} - - - where: :math:`K` is the conductivity in :math:`\\frac m{day}` - - :math:`W` is the wetness (Volume of soil water per volume of pores) - - :math:`n` is a shape parameter of the retention curve - - :math:`\\alpha` is inverse of the air entry potential in :math:`cm^{-1}` - - :math:`\\Psi(W)` is the matric potential in :math:`m H_2O` at wetness W - - C++ includes: RetentionCurve.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - alpha = _swig_property(_cmf_core.VanGenuchtenMualem_alpha_get, _cmf_core.VanGenuchtenMualem_alpha_set) - n = _swig_property(_cmf_core.VanGenuchtenMualem_n_get, _cmf_core.VanGenuchtenMualem_n_set) - Ksat = _swig_property(_cmf_core.VanGenuchtenMualem_Ksat_get, _cmf_core.VanGenuchtenMualem_Ksat_set) - Phi = _swig_property(_cmf_core.VanGenuchtenMualem_Phi_get, _cmf_core.VanGenuchtenMualem_Phi_set) - m = _swig_property(_cmf_core.VanGenuchtenMualem_m_get, _cmf_core.VanGenuchtenMualem_m_set) - l = _swig_property(_cmf_core.VanGenuchtenMualem_l_get, _cmf_core.VanGenuchtenMualem_l_set) - theta_r = _swig_property(_cmf_core.VanGenuchtenMualem_theta_r_get, _cmf_core.VanGenuchtenMualem_theta_r_set) - w0 = _swig_property(_cmf_core.VanGenuchtenMualem_w0_get, _cmf_core.VanGenuchtenMualem_w0_set) - - def Transmissivity(self, *args, **kwargs): - """ - Transmissivity(VanGenuchtenMualem self, real upperDepth, real lowerDepth, real wetness) -> real - - virtual real - Transmissivity(real upperDepth, real lowerDepth, real wetness) const - - """ - return _cmf_core.VanGenuchtenMualem_Transmissivity(self, *args, **kwargs) - - - def fit_w0(self, *args, **kwargs): - """ - fit_w0(VanGenuchtenMualem self, real w1=1.01, real Psi_p=1.0, real tolerance=0.05) -> real - - real - fit_w0(real w1=1.01, real Psi_p=1.0, real tolerance=0.05) - - Fits the break point wetness w0, to ensure a specific oversaturation - at a given hydrostatic potential. - - Parameters: - ----------- - - w1: The oversaturation wetness to archieve (>1), default = 1.01 - - Psi_p: the hydrostatic potential for w1, default = +1.0 m - - tolerance: - """ - return _cmf_core.VanGenuchtenMualem_fit_w0(self, *args, **kwargs) - - - def copy(self, *args, **kwargs): - """ - copy(VanGenuchtenMualem self) -> VanGenuchtenMualem - - VanGenuchtenMualem* copy() const - """ - return _cmf_core.VanGenuchtenMualem_copy(self, *args, **kwargs) - - - def __init__(self, *args, **kwargs): - """ - __init__(cmf::upslope::VanGenuchtenMualem self, real Ksat=15, real phi=0.5, real alpha=0.2178, real n=1.211, real m=-1) -> VanGenuchtenMualem - - VanGenuchtenMualem(real Ksat=15, real phi=0.5, real alpha=0.2178, real - n=1.211, real m=-1) - - Creates a van Genuchten-Mualem retention curve. - - Parameters: - ----------- - - Ksat: Saturated conductivity in :math:`\\frac m{day}` - - phi: Porosity in :math:`\\frac{m^3 Pores}{m^3 Soil}` - - alpha: Van Genuchten :math:`\\alpha` in :math:`\\frac 1{cm}` - - n: Van Genuchten n - - m: Van Genuchten m parameter, if negative m is calculated as :math:`1-\\frac 1 n` - """ - _cmf_core.VanGenuchtenMualem_swiginit(self, _cmf_core.new_VanGenuchtenMualem(*args, **kwargs)) - __swig_destroy__ = _cmf_core.delete_VanGenuchtenMualem - - def __repr__(self): - return "cmf.VanGenuchtenMualem(Ksat=%0.3g,Phi=%0.3g,alpha=%0.3g,n=%0.3g,m=%0.3g)" % (self.Ksat,self.Phi,self.alpha,self.n,self.m) - def __str__(self): - return "VanGenuchten / Mualem retention curve: Ksat=%0.3g m/day, %0.3g%% Pores, alpha=%0.3g 1/cm, n=%0.3g" % (self.Ksat,self.Phi*100,self.alpha,self.n) - -VanGenuchtenMualem.Transmissivity = new_instancemethod(_cmf_core.VanGenuchtenMualem_Transmissivity, None, VanGenuchtenMualem) -VanGenuchtenMualem.fit_w0 = new_instancemethod(_cmf_core.VanGenuchtenMualem_fit_w0, None, VanGenuchtenMualem) -VanGenuchtenMualem.copy = new_instancemethod(_cmf_core.VanGenuchtenMualem_copy, None, VanGenuchtenMualem) -VanGenuchtenMualem_swigregister = _cmf_core.VanGenuchtenMualem_swigregister -VanGenuchtenMualem_swigregister(VanGenuchtenMualem) - -class LinearRetention(RetentionCurve): - """ - - - The linear retention curve provides a simple linear relationship - between storage and head. - - Head function (head in m, calculated from upper side control volume) - - - .. math:: - - h(\\theta) = -\\Delta z \\left( 1 - \\frac{\\theta - - \\theta_r}{\\theta_s - \\theta_r} \\right) - - Conductivity - function - - .. math:: - - K(\\theta) = K_{sat} \\left(\\frac{\\theta - - \\theta_r}{\\theta_s - \\theta_r}\\right)^\\beta - - C++ includes: RetentionCurve.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - Ksat = _swig_property(_cmf_core.LinearRetention_Ksat_get, _cmf_core.LinearRetention_Ksat_set) - porosity = _swig_property(_cmf_core.LinearRetention_porosity_get, _cmf_core.LinearRetention_porosity_set) - thickness = _swig_property(_cmf_core.LinearRetention_thickness_get, _cmf_core.LinearRetention_thickness_set) - residual_wetness = _swig_property(_cmf_core.LinearRetention_residual_wetness_get, _cmf_core.LinearRetention_residual_wetness_set) - porosity_decay = _swig_property(_cmf_core.LinearRetention_porosity_decay_get, _cmf_core.LinearRetention_porosity_decay_set) - beta = _swig_property(_cmf_core.LinearRetention_beta_get, _cmf_core.LinearRetention_beta_set) - - def Transmissivity(self, *args, **kwargs): - """ - Transmissivity(LinearRetention self, real upperDepth, real lowerDepth, real wetness) -> real - - virtual real Transmissivity(real upperDepth, real lowerDepth, real - wetness) const - """ - return _cmf_core.LinearRetention_Transmissivity(self, *args, **kwargs) - - - def copy(self, *args, **kwargs): - """ - copy(LinearRetention self) -> LinearRetention - - LinearRetention* copy() const - """ - return _cmf_core.LinearRetention_copy(self, *args, **kwargs) - - - def __init__(self, *args, **kwargs): - """ - __init__(cmf::upslope::LinearRetention self, real ksat, real phi, real thickness, real residual_wetness=0.1) -> LinearRetention - - LinearRetention(real ksat, real phi, real thickness, real - residual_wetness=0.1) - """ - _cmf_core.LinearRetention_swiginit(self, _cmf_core.new_LinearRetention(*args, **kwargs)) - __swig_destroy__ = _cmf_core.delete_LinearRetention -LinearRetention.Transmissivity = new_instancemethod(_cmf_core.LinearRetention_Transmissivity, None, LinearRetention) -LinearRetention.copy = new_instancemethod(_cmf_core.LinearRetention_copy, None, LinearRetention) -LinearRetention_swigregister = _cmf_core.LinearRetention_swigregister -LinearRetention_swigregister(LinearRetention) - -class SoilLayer(WaterStorage): - """ - - - A representation of a SoilLayer. - - C++ includes: SoilLayer.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - - def __init__(self, *args, **kwargs): - raise AttributeError("No constructor defined") - __repr__ = _swig_repr - Position = _swig_property(_cmf_core.SoilLayer_Position_get) - cell = _swig_property(_cmf_core.SoilLayer_cell_get) - - def __get_upper(self, *args, **kwargs): - """ - __get_upper(SoilLayer self) -> cmf::upslope::SoilLayer::ptr - - ptr - get_upper() const - """ - return _cmf_core.SoilLayer___get_upper(self, *args, **kwargs) - - - def __get_lower(self, *args, **kwargs): - """ - __get_lower(SoilLayer self) -> cmf::upslope::SoilLayer::ptr - - ptr - get_lower() const - """ - return _cmf_core.SoilLayer___get_lower(self, *args, **kwargs) - - - def get_soil(self, *args, **kwargs): - """ - get_soil(SoilLayer self) -> RetentionCurve - - virtual - cmf::upslope::RetentionCurve& get_soil() const - - Returns the soil properties of the water storage. - """ - return _cmf_core.SoilLayer_get_soil(self, *args, **kwargs) - - - def set_soil(self, *args, **kwargs): - """ - set_soil(SoilLayer self, RetentionCurve r_curve) - - virtual - void set_soil(const cmf::upslope::RetentionCurve &r_curve) - """ - return _cmf_core.SoilLayer_set_soil(self, *args, **kwargs) - - - def get_K(self, *args, **kwargs): - """ - get_K(SoilLayer self, point direction) -> real - - virtual real - get_K(cmf::geometry::point direction) const - - Returns the actual anisotropic conductivity along a direction :math:`K = (k_f \\cdot d) K`. - """ - return _cmf_core.SoilLayer_get_K(self, *args, **kwargs) - - anisotropic_kf = _swig_property(_cmf_core.SoilLayer_anisotropic_kf_get, _cmf_core.SoilLayer_anisotropic_kf_set) - - def get_capacity(self, *args, **kwargs): - """ - get_capacity(SoilLayer self) -> real - - virtual - real get_capacity() const - - Returns the capacity of the water storage in m3. - """ - return _cmf_core.SoilLayer_get_capacity(self, *args, **kwargs) - - - def get_saturated_depth(self, *args, **kwargs): - """ - get_saturated_depth(SoilLayer self) -> real - - virtual real get_saturated_depth() const - - Returns the depth for saturation - - .. math:: - - z_{sat,this} = - \\left\\{z_{cell}-\\Psi_{tot} \\mbox{ if } W<1 \\\\ - z_{sat,upper layer} \\right. - - . - """ - return _cmf_core.SoilLayer_get_saturated_depth(self, *args, **kwargs) - - - def get_flow_crosssection(self, *args, **kwargs): - """ - get_flow_crosssection(SoilLayer self, SoilLayer target, bool HorizontalLayers=False) -> real - - real get_flow_crosssection(const cmf::upslope::SoilLayer &target, - bool HorizontalLayers=false) const - - Calculates the shared crosssectional area of this and another soil - water storage. - - If both layers belong to the same cell, the area of the cell is - returned, if they belong to different cells the area of the vertical - shared boundary is returned get_area in m2 - - Parameters: - ----------- - - target: The other soil water storage - - HorizontalLayers: If true, the layers are assumed to be parallel to - the gravitational potential, otherwise they are assumed to be parallel - to the ground topography - """ - return _cmf_core.SoilLayer_get_flow_crosssection(self, *args, **kwargs) - - - def cast(*args, **kwargs): - """cast(cmf::water::flux_node::ptr node) -> cmf::upslope::SoilLayer::ptr""" - return _cmf_core.SoilLayer_cast(*args, **kwargs) - - cast = staticmethod(cast) - gravitational_potential = _swig_property(_cmf_core.SoilLayer_gravitational_potential_get) - matrix_potential = _swig_property(_cmf_core.SoilLayer_matrix_potential_get) - wetness = _swig_property(_cmf_core.SoilLayer_wetness_get, _cmf_core.SoilLayer_wetness_set) - theta = _swig_property(_cmf_core.SoilLayer_theta_get, _cmf_core.SoilLayer_theta_set) - K = _swig_property(_cmf_core.SoilLayer_K_get) - Ksat = _swig_property(_cmf_core.SoilLayer_Ksat_get) - thickness = _swig_property(_cmf_core.SoilLayer_thickness_get) - lower_boundary = _swig_property(_cmf_core.SoilLayer_lower_boundary_get) - upper_boundary = _swig_property(_cmf_core.SoilLayer_upper_boundary_get) - porosity = _swig_property(_cmf_core.SoilLayer_porosity_get) - ice_fraction = _swig_property(_cmf_core.SoilLayer_ice_fraction_get, _cmf_core.SoilLayer_ice_fraction_set) - rootfraction = _swig_property(_cmf_core.SoilLayer_rootfraction_get, _cmf_core.SoilLayer_rootfraction_set) - - upper = _swig_property(_cmf_core.SoilLayer___get_upper) - - - lower = _swig_property(_cmf_core.SoilLayer___get_lower) - - - boundary=property(lambda self:(self.upper_boundary,self.lower_boundary),None,"Returns the upper and lower boundary of the layer") - pF=property(lambda self : waterhead_to_pF(self.matrix_potential),None,"The actual pF value") - soil=property(get_soil,set_soil,"The retention curve of the layer") - - - def __repr__(self): - return self.to_string() - - __swig_destroy__ = _cmf_core.delete_SoilLayer -SoilLayer.__get_upper = new_instancemethod(_cmf_core.SoilLayer___get_upper, None, SoilLayer) -SoilLayer.__get_lower = new_instancemethod(_cmf_core.SoilLayer___get_lower, None, SoilLayer) -SoilLayer.get_soil = new_instancemethod(_cmf_core.SoilLayer_get_soil, None, SoilLayer) -SoilLayer.set_soil = new_instancemethod(_cmf_core.SoilLayer_set_soil, None, SoilLayer) -SoilLayer.get_K = new_instancemethod(_cmf_core.SoilLayer_get_K, None, SoilLayer) -SoilLayer.get_capacity = new_instancemethod(_cmf_core.SoilLayer_get_capacity, None, SoilLayer) -SoilLayer.get_saturated_depth = new_instancemethod(_cmf_core.SoilLayer_get_saturated_depth, None, SoilLayer) -SoilLayer.get_flow_crosssection = new_instancemethod(_cmf_core.SoilLayer_get_flow_crosssection, None, SoilLayer) -SoilLayer_swigregister = _cmf_core.SoilLayer_swigregister -SoilLayer_swigregister(SoilLayer) - -def SoilLayer_cast(*args, **kwargs): - """SoilLayer_cast(cmf::water::flux_node::ptr node) -> cmf::upslope::SoilLayer::ptr""" - return _cmf_core.SoilLayer_cast(*args, **kwargs) - -class layer_list(object): - """ - - - A vector of layers, with array access to the properties of the layers, - for fast data exchange. - - C++ includes: layer_list.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - - def __init__(self, *args): - """ - __init__(cmf::upslope::layer_list self, layer_list for_copy) -> layer_list - __init__(cmf::upslope::layer_list self) -> layer_list - __init__(cmf::upslope::layer_list self, node_list for_copy) -> layer_list - - layer_list(const cmf::water::node_list &for_copy) - - Creates a list of all soil layers from a node_list. - """ - _cmf_core.layer_list_swiginit(self, _cmf_core.new_layer_list(*args)) - - def pop(self, *args, **kwargs): - """ - pop(layer_list self) -> cmf::upslope::SoilLayer::ptr - - SoilLayer::ptr - pop() - - Deletes the last layer from the list and returns it. - """ - return _cmf_core.layer_list_pop(self, *args, **kwargs) - - - def append(self, *args, **kwargs): - """ - append(layer_list self, cmf::upslope::SoilLayer::ptr l) -> layer_list - - layer_list& - append(SoilLayer::ptr l) - - Appends a soil layer to the list. - """ - return _cmf_core.layer_list_append(self, *args, **kwargs) - - - def extend(self, *args): - """ - extend(layer_list self, layer_list ll) -> layer_list - extend(layer_list self, node_list nl) -> layer_list - - layer_list& - extend(const cmf::water::node_list &nl) - - Appends all soil layers from a node_list to this. - """ - return _cmf_core.layer_list_extend(self, *args) - - - def get_slice(self, *args, **kwargs): - """ - get_slice(layer_list self, size_t first=0, size_t last=1000000, size_t step=1) -> layer_list - - layer_list get_slice(size_t first=0, size_t last=1000000, size_t - step=1) - """ - return _cmf_core.layer_list_get_slice(self, *args, **kwargs) - - - def clear(self, *args, **kwargs): - """ - clear(layer_list self) - - void clear() - - Clears the list. - """ - return _cmf_core.layer_list_clear(self, *args, **kwargs) - - - def size(self, *args, **kwargs): - """ - size(layer_list self) -> size_t - - size_t size() - const - - Number of layers in the list. - """ - return _cmf_core.layer_list_size(self, *args, **kwargs) - - - def set_wetness(self, *args, **kwargs): - """ - set_wetness(layer_list self, cmf::math::num_array const & Value, size_t offset=0) - - void - set_wetness(const cmf::math::num_array &Value, size_t offset=0) - - Sets the wetness in m3/m3 of layers [offset : arraysize]. - """ - return _cmf_core.layer_list_set_wetness(self, *args, **kwargs) - - - def set_potential(self, *args, **kwargs): - """ - set_potential(layer_list self, cmf::math::num_array const & Value, size_t offset=0) - - void - set_potential(const cmf::math::num_array &Value, size_t offset=0) - - Sets the potential (head) in m of layers [offset : arraysize]. - """ - return _cmf_core.layer_list_set_potential(self, *args, **kwargs) - - - def set_volume(self, *args, **kwargs): - """ - set_volume(layer_list self, cmf::math::num_array const & Value, size_t offset=0) - - void - set_volume(const cmf::math::num_array &Value, size_t offset=0) - - Sets the Volume in m3 of layers [offset : arraysize]. - """ - return _cmf_core.layer_list_set_volume(self, *args, **kwargs) - - - def get_percolation(self, *args, **kwargs): - """ - get_percolation(layer_list self, Time t) -> cmf::math::num_array - - cmf::math::num_array get_percolation(cmf::math::Time t) const - - Returns the flux to each layer from the upper layer, or, in case of - the first layer from the surface water. - """ - return _cmf_core.layer_list_get_percolation(self, *args, **kwargs) - - - def set_theta(self, *args, **kwargs): - """ - set_theta(layer_list self, cmf::math::num_array const & Value, size_t offset=0) - - void - set_theta(const cmf::math::num_array &Value, size_t offset=0) - - Sets the volumetric water content of the soil. - """ - return _cmf_core.layer_list_set_theta(self, *args, **kwargs) - - - def set_ice_fraction(self, *args, **kwargs): - """ - set_ice_fraction(layer_list self, cmf::math::num_array const & Value, size_t offset=0) - - void set_ice_fraction(const cmf::math::num_array &Value, size_t - offset=0) - - Sets the fraction of the ice content of the soil water. - """ - return _cmf_core.layer_list_set_ice_fraction(self, *args, **kwargs) - - - def set_rootfraction(self, *args, **kwargs): - """ - set_rootfraction(layer_list self, cmf::math::num_array const & Value, size_t offset=0) - - void set_rootfraction(const cmf::math::num_array &Value, size_t - offset=0) - - Sets the fraction of roots in each layer. - """ - return _cmf_core.layer_list_set_rootfraction(self, *args, **kwargs) - - gravitational_potential = _swig_property(_cmf_core.layer_list_gravitational_potential_get) - matrix_potential = _swig_property(_cmf_core.layer_list_matrix_potential_get) - wetness = _swig_property(_cmf_core.layer_list_wetness_get) - volume = _swig_property(_cmf_core.layer_list_volume_get) - potential = _swig_property(_cmf_core.layer_list_potential_get) - K = _swig_property(_cmf_core.layer_list_K_get) - Ksat = _swig_property(_cmf_core.layer_list_Ksat_get) - thickness = _swig_property(_cmf_core.layer_list_thickness_get) - lower_boundary = _swig_property(_cmf_core.layer_list_lower_boundary_get) - upper_boundary = _swig_property(_cmf_core.layer_list_upper_boundary_get) - porosity = _swig_property(_cmf_core.layer_list_porosity_get) - ice_fraction = _swig_property(_cmf_core.layer_list_ice_fraction_get) - theta = _swig_property(_cmf_core.layer_list_theta_get) - root = _swig_property(_cmf_core.layer_list_root_get) - - def __get(self, *args, **kwargs): - """__get(layer_list self, int index) -> cmf::upslope::SoilLayer::ptr""" - return _cmf_core.layer_list___get(self, *args, **kwargs) - - - __repr__=lambda self: repr(list(self)) - __str__ =lambda self: str(list(self)) - __len__=lambda self: self.size() - def __iadd__(self,other): - self.append(other) - return self - def __add__(self,other): - res = layer_list(self) - res.append(other) - return res - def __iter__(self): - for i in range(len(self)): - yield self[i] - def __getitem__(self,index): - if (type(index)==slice): - return self.get_slice(*index.indices(len(self))) - try: - gen=iter(index) - return [self.__get(it) for it in gen] - except TypeError: - return self.__get(index) - - __swig_destroy__ = _cmf_core.delete_layer_list -layer_list.pop = new_instancemethod(_cmf_core.layer_list_pop, None, layer_list) -layer_list.append = new_instancemethod(_cmf_core.layer_list_append, None, layer_list) -layer_list.extend = new_instancemethod(_cmf_core.layer_list_extend, None, layer_list) -layer_list.get_slice = new_instancemethod(_cmf_core.layer_list_get_slice, None, layer_list) -layer_list.clear = new_instancemethod(_cmf_core.layer_list_clear, None, layer_list) -layer_list.size = new_instancemethod(_cmf_core.layer_list_size, None, layer_list) -layer_list.set_wetness = new_instancemethod(_cmf_core.layer_list_set_wetness, None, layer_list) -layer_list.set_potential = new_instancemethod(_cmf_core.layer_list_set_potential, None, layer_list) -layer_list.set_volume = new_instancemethod(_cmf_core.layer_list_set_volume, None, layer_list) -layer_list.get_percolation = new_instancemethod(_cmf_core.layer_list_get_percolation, None, layer_list) -layer_list.set_theta = new_instancemethod(_cmf_core.layer_list_set_theta, None, layer_list) -layer_list.set_ice_fraction = new_instancemethod(_cmf_core.layer_list_set_ice_fraction, None, layer_list) -layer_list.set_rootfraction = new_instancemethod(_cmf_core.layer_list_set_rootfraction, None, layer_list) -layer_list.__get = new_instancemethod(_cmf_core.layer_list___get, None, layer_list) -layer_list_swigregister = _cmf_core.layer_list_swigregister -layer_list_swigregister(layer_list) - -class MacroPore(WaterStorage): - """ - - - An additional water storage for a soil layer to model matrix water and - macro pore water seperately. - - Deprecated The MacroPore model is still very experimental and not - stable. Only for tryouts! - - If present, the soil layer water storage holds the matrix water and - the MacroPore holds the water in the macro pore. Use - cmf::upslope::Macropore::create to create a macropore storage. - - Use cmf::upslope::connections::GradientMacroFlow or - cmf::upslope::connections::KinematicMacroFlow to model water flow - between macro pores and a lateral connection ( lateral subsurface - fluxes) like cmf::upslope::connections::Richards_lateral to connect - the macro pore with the matrix. - - C++ includes: macropore.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - - def __init__(self, *args, **kwargs): - raise AttributeError("No constructor defined") - __repr__ = _swig_repr - porefraction_min = _swig_property(_cmf_core.MacroPore_porefraction_min_get, _cmf_core.MacroPore_porefraction_min_set) - porefraction_max = _swig_property(_cmf_core.MacroPore_porefraction_max_get, _cmf_core.MacroPore_porefraction_max_set) - - def __get_layer(self, *args, **kwargs): - """ - __get_layer(MacroPore self) -> cmf::upslope::SoilLayer::ptr - - SoilLayer::ptr get_layer() const - - Gets the soil layer (matrix water storage) for this macropore storage. - - """ - return _cmf_core.MacroPore___get_layer(self, *args, **kwargs) - - - def get_porefraction(self, *args, **kwargs): - """ - get_porefraction(MacroPore self) -> real - - real get_porefraction() const - - The fraction of the macro pores in m3/m3. This adds to the porosity of - the layer. - """ - return _cmf_core.MacroPore_get_porefraction(self, *args, **kwargs) - - density = _swig_property(_cmf_core.MacroPore_density_get, _cmf_core.MacroPore_density_set) - Ksat = _swig_property(_cmf_core.MacroPore_Ksat_get, _cmf_core.MacroPore_Ksat_set) - crack_wetness = _swig_property(_cmf_core.MacroPore_crack_wetness_get, _cmf_core.MacroPore_crack_wetness_set) - - def get_K(self, *args, **kwargs): - """ - get_K(MacroPore self, point direction) -> real - - virtual real - get_K(cmf::geometry::point direction) const - - Returns the actual anisotropic conductivity along a direction :math:`K = (k_f \\cdot d) K`. - """ - return _cmf_core.MacroPore_get_K(self, *args, **kwargs) - - - def get_crackwidth(self, *args, **kwargs): - """ - get_crackwidth(MacroPore self) -> real - - virtual real get_crackwidth() const - - Returns the crack width for a prismatic crackstructure. - - For a prismatic crack structure, the porefraction in m3/m3 equals the - vertical crack area in m2/m2. The length of equally spaced cracks is - in one direction the inverse of the density and twice the length for - two directions. - - .. math:: - - l_{crack} [m/m^2]= 2 \\frac {1}{d[m]} - - If - we again ignore the fact that the spacing of the cracking crossings is - counted double, the crack width is: - - .. math:: - - w_{crack}[m] = - \\frac{A_{crack}[m^2/m^2]}{l_{crack}[m/m^2]} - - Combining both - eq. above: - - .. math:: - - w_{crack}[m] = A_{crack}[m^2/m^2]\\frac{d[m]}{2} - - - - """ - return _cmf_core.MacroPore_get_crackwidth(self, *args, **kwargs) - - - def get_flowwidth(self, *args, **kwargs): - """ - get_flowwidth(MacroPore self) -> real - - real - get_flowwidth() const - - The approximate length of the aggregate boundaries. - - - - .. math:: - - l = \\frac{2}{d_{macro}} A - - where: :math:`l` is the length of - the aggregate boundaries (in m) - - :math:`2` is the number of directions - - :math:`d_{macro}` is the mean distance between macropores (density) in m - - :math:`A` is the area of the cell - """ - return _cmf_core.MacroPore_get_flowwidth(self, *args, **kwargs) - - K_shape = _swig_property(_cmf_core.MacroPore_K_shape_get, _cmf_core.MacroPore_K_shape_set) - - def create(*args, **kwargs): - """create(cmf::upslope::SoilLayer::ptr layer, real porefraction=0.05, real Ksat=10, real density=0.05, real porefraction_wilt=-1., real K_shape=0.0) -> cmf::upslope::MacroPore::ptr""" - return _cmf_core.MacroPore_create(*args, **kwargs) - - create = staticmethod(create) - - def cast(*args, **kwargs): - """cast(cmf::water::flux_node::ptr node) -> cmf::upslope::MacroPore::ptr""" - return _cmf_core.MacroPore_cast(*args, **kwargs) - - cast = staticmethod(cast) - - def __repr__(self): - return self.to_string() - - - layer = _swig_property(_cmf_core.MacroPore___get_layer) - - filled_fraction = _swig_property(_cmf_core.MacroPore_filled_fraction_get) - K = _swig_property(_cmf_core.MacroPore_K_get) - capacity = _swig_property(_cmf_core.MacroPore_capacity_get) - cell = _swig_property(_cmf_core.MacroPore_cell_get) - __swig_destroy__ = _cmf_core.delete_MacroPore -MacroPore.__get_layer = new_instancemethod(_cmf_core.MacroPore___get_layer, None, MacroPore) -MacroPore.get_porefraction = new_instancemethod(_cmf_core.MacroPore_get_porefraction, None, MacroPore) -MacroPore.get_K = new_instancemethod(_cmf_core.MacroPore_get_K, None, MacroPore) -MacroPore.get_crackwidth = new_instancemethod(_cmf_core.MacroPore_get_crackwidth, None, MacroPore) -MacroPore.get_flowwidth = new_instancemethod(_cmf_core.MacroPore_get_flowwidth, None, MacroPore) -MacroPore_swigregister = _cmf_core.MacroPore_swigregister -MacroPore_swigregister(MacroPore) - -def MacroPore_create(*args, **kwargs): - """MacroPore_create(cmf::upslope::SoilLayer::ptr layer, real porefraction=0.05, real Ksat=10, real density=0.05, real porefraction_wilt=-1., real K_shape=0.0) -> cmf::upslope::MacroPore::ptr""" - return _cmf_core.MacroPore_create(*args, **kwargs) - -def MacroPore_cast(*args, **kwargs): - """MacroPore_cast(cmf::water::flux_node::ptr node) -> cmf::upslope::MacroPore::ptr""" - return _cmf_core.MacroPore_cast(*args, **kwargs) - -class BaseMacroFlow(flux_connection): - """Proxy of C++ cmf::upslope::connections::BaseMacroFlow class.""" - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - - def __init__(self, *args, **kwargs): - raise AttributeError("No constructor defined - class is abstract") - __repr__ = _swig_repr - __swig_destroy__ = _cmf_core.delete_BaseMacroFlow -BaseMacroFlow_swigregister = _cmf_core.BaseMacroFlow_swigregister -BaseMacroFlow_swigregister(BaseMacroFlow) - -class GradientMacroFlow(BaseMacroFlow): - """ - - - Gradient based flux from macro pore to macro pore. - - Deprecated The MacroPore model is still very experimental and not - stable. Only for tryouts! - - - - .. math:: - - q = K(\\theta) \\frac{\\Delta \\Psi}{\\Delta z} - - C++ includes: macropore.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - - def __init__(self, *args, **kwargs): - """ - __init__(cmf::upslope::connections::GradientMacroFlow self, cmf::upslope::MacroPore::ptr left, cmf::water::flux_node::ptr right) -> GradientMacroFlow - - GradientMacroFlow(cmf::upslope::MacroPore::ptr left, - cmf::water::flux_node::ptr right) - """ - _cmf_core.GradientMacroFlow_swiginit(self, _cmf_core.new_GradientMacroFlow(*args, **kwargs)) - __swig_destroy__ = _cmf_core.delete_GradientMacroFlow -GradientMacroFlow_swigregister = _cmf_core.GradientMacroFlow_swigregister -GradientMacroFlow_swigregister(GradientMacroFlow) - -class KinematicMacroFlow(BaseMacroFlow): - """ - - - Linear storage based flux from macro pore to macro pore. - - Deprecated The MacroPore model is still very experimental and not - stable. Only for tryouts! - - - - .. math:: - - q = A_{cell} K_{macro} - \\left(\\frac{V_{upper}}{C_{upper}}\\right)^\\beta - \\left(1-\\frac{V_{lower}}{C_{lower}}\\right) - - where: - :math:`A_{cell}` is the area of the owning cell in m2 - - :math:`K_{macro}` is the conductivity of the macro pore storage - - :math:`V` is the actual stored water volume in the upper resp. lower macro - pore storage - - :math:`C` is the capacity of the upper resp. lower macro pore storage - - C++ includes: macropore.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - - def __init__(self, *args, **kwargs): - """ - __init__(cmf::upslope::connections::KinematicMacroFlow self, cmf::water::WaterStorage::ptr left, cmf::water::flux_node::ptr right, real beta=1.) -> KinematicMacroFlow - - KinematicMacroFlow(cmf::water::WaterStorage::ptr left, - cmf::water::flux_node::ptr right, real beta=1.) - - Creates the connection. - - Parameters: - ----------- - - left: right: the nodes between the connection should be created. - - beta: a conceptional curve shape parameter for the relation between - storage and outflow - - Either left or right needs to be a MacroPore, left needs to be a water - storage - """ - _cmf_core.KinematicMacroFlow_swiginit(self, _cmf_core.new_KinematicMacroFlow(*args, **kwargs)) - __swig_destroy__ = _cmf_core.delete_KinematicMacroFlow -KinematicMacroFlow_swigregister = _cmf_core.KinematicMacroFlow_swigregister -KinematicMacroFlow_swigregister(KinematicMacroFlow) - -class JarvisMacroFlow(BaseMacroFlow): - """ - - - A physically based macropore to macropore connection according to - Jarvis & Leeds-Harrison 1987, JSS. - - - - .. math:: - - q_{i->j} [m/s]= \\rho \\frac G {12\\eta} w^2 \\frac{e_v- - e_r}{1-e_r} S_{c,i}^\\beta\\ (1-S_{c,j}) - - where: :math:`q_{i->j}` - the flow from macro pore layer i to macropore layer j - - :math:`\\rho=10^{-3} kg/m^3` - the density of water - - :math:`G=9.81 m/s^2` the earth acceleration - - :math:`\\eta=1.0 kg/(m s)` the viscosity of water (at 20 degC) - - :math:`w [m]` the crack width, a function of water content and crack - distance - - :math:`e_v [-]` the crack porosity - - :math:`e_r [-]` crack por - - :math:`S_c [-]` the crack saturation of layer i resp. j - - :math:`\\beta [-]` a conceptional exponent to shape the flow reaction - - C++ includes: macropore.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - beta = _swig_property(_cmf_core.JarvisMacroFlow_beta_get, _cmf_core.JarvisMacroFlow_beta_set) - porefraction_r = _swig_property(_cmf_core.JarvisMacroFlow_porefraction_r_get, _cmf_core.JarvisMacroFlow_porefraction_r_set) - - def __init__(self, *args, **kwargs): - """ - __init__(cmf::upslope::connections::JarvisMacroFlow self, cmf::water::WaterStorage::ptr left, cmf::water::flux_node::ptr right, real beta=1., real porefraction_r=0.0) -> JarvisMacroFlow - - JarvisMacroFlow(cmf::water::WaterStorage::ptr left, - cmf::water::flux_node::ptr right, real beta=1., real - porefraction_r=0.0) - - Constructs the connection. - - Parameters: - ----------- - - left: right: the connected macropores - - beta: User defined parameter for the swelling reaction - - porefraction_r: Porefraction at which flow starts. For swelling soils - that are closing completely th - """ - _cmf_core.JarvisMacroFlow_swiginit(self, _cmf_core.new_JarvisMacroFlow(*args, **kwargs)) - __swig_destroy__ = _cmf_core.delete_JarvisMacroFlow -JarvisMacroFlow_swigregister = _cmf_core.JarvisMacroFlow_swigregister -JarvisMacroFlow_swigregister(JarvisMacroFlow) - -class GradientMacroMicroExchange(flux_connection): - """ - - - A gradient based exchange term between macropores and micropores, - using a fixed (air-) potential for macropores. - - - - .. math:: - - q = K \\frac{\\Delta\\Psi}{d/2} A - - where: :math:`K` The - conductivity of the aggregate boundary - - :math:`\\Delta\\Psi` The potential difference. Using the air potential - as the constant potential for the macro pores, you get: - :math:`\\Delta\\Psi = \\Psi_M(\\theta_{micro})` - - :math:`d` the mean aggregate size in m - - :math:`A` the crosssection area, given as the flow width ( - cmf::upslope::MacroPore::get_flowwidth) times layer thickness - - C++ includes: macropore.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - - def __init__(self, *args, **kwargs): - """ - __init__(cmf::upslope::connections::GradientMacroMicroExchange self, cmf::upslope::SoilLayer::ptr left, cmf::upslope::MacroPore::ptr right) -> GradientMacroMicroExchange - - GradientMacroMicroExchange(cmf::upslope::SoilLayer::ptr left, - cmf::upslope::MacroPore::ptr right) - """ - _cmf_core.GradientMacroMicroExchange_swiginit(self, _cmf_core.new_GradientMacroMicroExchange(*args, **kwargs)) - __swig_destroy__ = _cmf_core.delete_GradientMacroMicroExchange -GradientMacroMicroExchange_swigregister = _cmf_core.GradientMacroMicroExchange_swigregister -GradientMacroMicroExchange_swigregister(GradientMacroMicroExchange) - -class DiffusiveMacroMicroExchange(flux_connection): - """ - - - A simple first order diffusive water exchange between MacroPore and - matrix ( SoilLayer) - - - - .. math:: - - q = \\omega (W_{ma} - W_{mi,eff}) V_{soil} - - where: - :math:`\\omega` is the exchange rate in :math:`day^{-1}` - - :math:`W_{ma}` is the filled fraction of the macropore system [-] - - :math:`W_{mi,eff}` is the water filled pore space of the micropores above - the residual pF value [-], default 4.2 - - :math:`V_{soil} = A_{cell} d_{layer}` is the total volume of the soil layer - [ :math:`m^3`] - - The residual micropore pF is used to determine a residual water - content of the micropores. Residual in this case means, that above - this pF value, water is not draining to the macro pores, even if they - are empty. Although the default value is at wilting point, lower pF - values are much more sensible, and should be rather lower than field - capacity (pF=1.8 - 2.5). However, since this equation is rather - conceptual than physical, this value can only be estimated or - calibrated. - - cf. Simunek et al J. of Hydr. 2003 - - C++ includes: macropore.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - omega = _swig_property(_cmf_core.DiffusiveMacroMicroExchange_omega_get, _cmf_core.DiffusiveMacroMicroExchange_omega_set) - pFrmi = _swig_property(_cmf_core.DiffusiveMacroMicroExchange_pFrmi_get, _cmf_core.DiffusiveMacroMicroExchange_pFrmi_set) - - def __init__(self, *args, **kwargs): - """ - __init__(cmf::upslope::connections::DiffusiveMacroMicroExchange self, cmf::upslope::MacroPore::ptr left, cmf::upslope::SoilLayer::ptr right, real omega, real pFrmi=4.2) -> DiffusiveMacroMicroExchange - - DiffusiveMacroMicroExchange(cmf::upslope::MacroPore::ptr left, - cmf::upslope::SoilLayer::ptr right, real omega, real pFrmi=4.2) - """ - _cmf_core.DiffusiveMacroMicroExchange_swiginit(self, _cmf_core.new_DiffusiveMacroMicroExchange(*args, **kwargs)) - __swig_destroy__ = _cmf_core.delete_DiffusiveMacroMicroExchange -DiffusiveMacroMicroExchange_swigregister = _cmf_core.DiffusiveMacroMicroExchange_swigregister -DiffusiveMacroMicroExchange_swigregister(DiffusiveMacroMicroExchange) - -class MACROlikeMacroMicroExchange(flux_connection): - """ - - - This connection models the water exchange between macropores and - micropores as in the MACRO Model (Larsbo & Jarvis, 2003), which - follows Gerke & van Genuchten 1996. - - WARNING: Deprecated This connection uses the diffusivity of a soil - given by its retention curve. Since no retention curve provides a - valid value for Diffusivity in case of saturation this connection will - blow up the numerical solution for sure. - - The exchange between Macropore and matrix is defined as follows: - (MACRO 5 Tech report, Larsbo & Jarvis 2003) - - - - .. math:: - - q = \\frac{G_f D_w \\gamma_w}{d^2}(\\theta_b - - \\theta_{mi}) V_{layer} - - where: :math:`G_f` is the geometry factor. - Use 3 for a rectangular slab geometry - - :math:`gamma_w` A scaling factor to fit analytical and numerical solution - (0.4) - - :math:`d` is an effective diffusive path length related to aggregate size - and the influence of coatings on the aggregate surfaces in m - - :math:`\\theta_b` the saturated water content of the matrix - - :math:`\\theta_{mi}` the actual water content of the matrix - - :math:`D_w = \\frac12(D(\\theta_b)+D(\\theta_{mi})W_{ma})` is the - effective water diffusivity in m2/day, as defined below :math:`W_{ma}` is - the saturation of the macropores - - C++ includes: macropore.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - Gf = _swig_property(_cmf_core.MACROlikeMacroMicroExchange_Gf_get, _cmf_core.MACROlikeMacroMicroExchange_Gf_set) - gamma_w = _swig_property(_cmf_core.MACROlikeMacroMicroExchange_gamma_w_get, _cmf_core.MACROlikeMacroMicroExchange_gamma_w_set) - - def __init__(self, *args, **kwargs): - """ - __init__(cmf::upslope::connections::MACROlikeMacroMicroExchange self, cmf::upslope::SoilLayer::ptr left, cmf::upslope::MacroPore::ptr right, real _gamma_w=0.4, real _Gf=3) -> MACROlikeMacroMicroExchange - - MACROlikeMacroMicroExchange(cmf::upslope::SoilLayer::ptr left, - cmf::upslope::MacroPore::ptr right, real _gamma_w=0.4, real _Gf=3) - """ - _cmf_core.MACROlikeMacroMicroExchange_swiginit(self, _cmf_core.new_MACROlikeMacroMicroExchange(*args, **kwargs)) - __swig_destroy__ = _cmf_core.delete_MACROlikeMacroMicroExchange -MACROlikeMacroMicroExchange_swigregister = _cmf_core.MACROlikeMacroMicroExchange_swigregister -MACROlikeMacroMicroExchange_swigregister(MACROlikeMacroMicroExchange) - -class IVolumeHeightFunction(object): - """ - - - Volume height relations are functional objects, which return a height - and a crosssectional area of a volume for different geometric bodies. - - This is the abstract base class, where the geometries derive from - - C++ includes: ReachType.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - - def __init__(self, *args, **kwargs): - raise AttributeError("No constructor defined - class is abstract") - __repr__ = _swig_repr - - def h(self, *args, **kwargs): - """ - h(IVolumeHeightFunction self, double V) -> double - - virtual - double h(double V) const =0 - - Returns the depth of a given volume. - """ - return _cmf_core.IVolumeHeightFunction_h(self, *args, **kwargs) - - - def A(self, *args, **kwargs): - """ - A(IVolumeHeightFunction self, double V) -> double - - virtual - double A(double V) const =0 - - Returns the area of the surface for a given volume. - """ - return _cmf_core.IVolumeHeightFunction_A(self, *args, **kwargs) - - - def V(self, *args, **kwargs): - """ - V(IVolumeHeightFunction self, double h) -> double - - virtual - double V(double h) const =0 - """ - return _cmf_core.IVolumeHeightFunction_V(self, *args, **kwargs) - - - def copy(self, *args, **kwargs): - """ - copy(IVolumeHeightFunction self) -> IVolumeHeightFunction - - virtual IVolumeHeightFunction* copy() const =0 - """ - return _cmf_core.IVolumeHeightFunction_copy(self, *args, **kwargs) - - - def q(self, *args, **kwargs): - """ - q(IVolumeHeightFunction self, double h, double slope) -> double - - virtual - double q(double h, double slope) const - """ - return _cmf_core.IVolumeHeightFunction_q(self, *args, **kwargs) - - __swig_destroy__ = _cmf_core.delete_IVolumeHeightFunction -IVolumeHeightFunction.h = new_instancemethod(_cmf_core.IVolumeHeightFunction_h, None, IVolumeHeightFunction) -IVolumeHeightFunction.A = new_instancemethod(_cmf_core.IVolumeHeightFunction_A, None, IVolumeHeightFunction) -IVolumeHeightFunction.V = new_instancemethod(_cmf_core.IVolumeHeightFunction_V, None, IVolumeHeightFunction) -IVolumeHeightFunction.copy = new_instancemethod(_cmf_core.IVolumeHeightFunction_copy, None, IVolumeHeightFunction) -IVolumeHeightFunction.q = new_instancemethod(_cmf_core.IVolumeHeightFunction_q, None, IVolumeHeightFunction) -IVolumeHeightFunction_swigregister = _cmf_core.IVolumeHeightFunction_swigregister -IVolumeHeightFunction_swigregister(IVolumeHeightFunction) - -class Prism(IVolumeHeightFunction): - """ - - - the height of a volume in a Prism with a defined base area - - C++ includes: ReachType.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - Area = _swig_property(_cmf_core.Prism_Area_get, _cmf_core.Prism_Area_set) - RoughThickness = _swig_property(_cmf_core.Prism_RoughThickness_get, _cmf_core.Prism_RoughThickness_set) - - def __init__(self, *args, **kwargs): - """ - __init__(cmf::river::Prism self, double base_area, double thickness_of_rough_ground=0.01) -> Prism - - Prism(double - base_area, double thickness_of_rough_ground=0.01) - """ - _cmf_core.Prism_swiginit(self, _cmf_core.new_Prism(*args, **kwargs)) - - def copy(self, *args, **kwargs): - """ - copy(Prism self) -> Prism - - Prism* copy() const - - """ - return _cmf_core.Prism_copy(self, *args, **kwargs) - - __swig_destroy__ = _cmf_core.delete_Prism -Prism.copy = new_instancemethod(_cmf_core.Prism_copy, None, Prism) -Prism_swigregister = _cmf_core.Prism_swigregister -Prism_swigregister(Prism) - -class volume_height_function(IVolumeHeightFunction): - """ - - - A wrapper class for volume / height functional relations. - - C++ includes: ReachType.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - - def __init__(self, *args): - """ - __init__(cmf::river::volume_height_function self, volume_height_function for_copy) -> volume_height_function - __init__(cmf::river::volume_height_function self, IVolumeHeightFunction for_copy) -> volume_height_function - - volume_height_function(const IVolumeHeightFunction &for_copy) - - Wrapper for any IVolumeHeightFunction. - """ - _cmf_core.volume_height_function_swiginit(self, _cmf_core.new_volume_height_function(*args)) - - def copy(self, *args, **kwargs): - """ - copy(volume_height_function self) -> volume_height_function - - volume_height_function* copy() const - """ - return _cmf_core.volume_height_function_copy(self, *args, **kwargs) - - __swig_destroy__ = _cmf_core.delete_volume_height_function -volume_height_function.copy = new_instancemethod(_cmf_core.volume_height_function_copy, None, volume_height_function) -volume_height_function_swigregister = _cmf_core.volume_height_function_swigregister -volume_height_function_swigregister(volume_height_function) - -class IChannel(IVolumeHeightFunction): - """ - - - Structure for the description of structural parameters of a reach - Abstract base class for different IChannel geometries. - - C++ includes: ReachType.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - - def __init__(self, *args, **kwargs): - raise AttributeError("No constructor defined - class is abstract") - __repr__ = _swig_repr - - def get_nManning(self, *args, **kwargs): - """ - get_nManning(IChannel self) -> double - - virtual - double get_nManning() const =0 - """ - return _cmf_core.IChannel_get_nManning(self, *args, **kwargs) - - - def set_nManning(self, *args, **kwargs): - """ - set_nManning(IChannel self, double val) - - virtual - void set_nManning(double val)=0 - """ - return _cmf_core.IChannel_set_nManning(self, *args, **kwargs) - - - def get_length(self, *args, **kwargs): - """ - get_length(IChannel self) -> double - - virtual - double get_length() const =0 - - Length of the reach. - """ - return _cmf_core.IChannel_get_length(self, *args, **kwargs) - - - def typecode(self, *args, **kwargs): - """ - typecode(IChannel self) -> char - - virtual char - typecode() const =0 - """ - return _cmf_core.IChannel_typecode(self, *args, **kwargs) - - - def get_channel_width(self, *args, **kwargs): - """ - get_channel_width(IChannel self, double depth) -> double - - virtual double get_channel_width(double depth) const =0 - - Calculates the flow width from a given actual depth [m] using the - actual IChannel geometry. - """ - return _cmf_core.IChannel_get_channel_width(self, *args, **kwargs) - - - def get_wetted_perimeter(self, *args, **kwargs): - """ - get_wetted_perimeter(IChannel self, double depth) -> double - - virtual double get_wetted_perimeter(double depth) const =0 - - Calculates the wetted perimeter from a given actual depth [m] using - the actual IChannel geometry. - """ - return _cmf_core.IChannel_get_wetted_perimeter(self, *args, **kwargs) - - - def get_depth(self, *args, **kwargs): - """ - get_depth(IChannel self, double area) -> double - - virtual - double get_depth(double area) const =0 - - Calculates the actual depth of the reach using the IChannel geometry. - - get_depth of the reach [m] - - Parameters: - ----------- - - area: Wetted area of a river cross section [m2], can be obtained by - V/l, where V is the stored volume and l is the reach length - """ - return _cmf_core.IChannel_get_depth(self, *args, **kwargs) - - - def get_flux_crossection(self, *args, **kwargs): - """ - get_flux_crossection(IChannel self, double depth) -> double - - virtual double get_flux_crossection(double depth) const =0 - - Calculates the wetted area from a given depth using the IChannel - geometry. - - In most cases use get_flux_crossection=V/l, where V is the stored - volume and l is the reach length Wetted area of a river cross section - [m2] - - Parameters: - ----------- - - depth: depth of the reach [m] - """ - return _cmf_core.IChannel_get_flux_crossection(self, *args, **kwargs) - - - def copy(self, *args, **kwargs): - """ - copy(IChannel self) -> IChannel - - virtual IChannel* - copy() const =0 - """ - return _cmf_core.IChannel_copy(self, *args, **kwargs) - - - def qManning(self, *args, **kwargs): - """ - qManning(IChannel self, double A, double slope) -> double - - virtual double - qManning(double A, double slope) const - - Calculates the flow rate from a given water volume in the reach - - - .. math:: - - q_{Manning}&=& A R^{\\frac 2 3} - \\sqrt{\\frac {\\Delta_z} n} \\\\ A &=& \\frac V l - \\mbox{, (Crosssectional area of the wetted crossection, Volume per - length)} \\\\ R &=& \\frac A {P(d)} \\\\ P(d) &=& \\mbox{ - the perimeter of the wetted crosssection, a function of reach depth} - \\\\ d(V) &=& \\mbox{ the depth of the reach a function of the - volume} \\\\ \\Delta_z &=& \\frac{z_{max} - z_{min}}{l} - \\mbox{ Slope of the reach} - - . - - Flow rate [m3/s] - - Parameters: - ----------- - - A: The area of the cross section [m2] - - slope: The slope of the reach [m/m] - """ - return _cmf_core.IChannel_qManning(self, *args, **kwargs) - - __swig_destroy__ = _cmf_core.delete_IChannel -IChannel.get_nManning = new_instancemethod(_cmf_core.IChannel_get_nManning, None, IChannel) -IChannel.set_nManning = new_instancemethod(_cmf_core.IChannel_set_nManning, None, IChannel) -IChannel.get_length = new_instancemethod(_cmf_core.IChannel_get_length, None, IChannel) -IChannel.typecode = new_instancemethod(_cmf_core.IChannel_typecode, None, IChannel) -IChannel.get_channel_width = new_instancemethod(_cmf_core.IChannel_get_channel_width, None, IChannel) -IChannel.get_wetted_perimeter = new_instancemethod(_cmf_core.IChannel_get_wetted_perimeter, None, IChannel) -IChannel.get_depth = new_instancemethod(_cmf_core.IChannel_get_depth, None, IChannel) -IChannel.get_flux_crossection = new_instancemethod(_cmf_core.IChannel_get_flux_crossection, None, IChannel) -IChannel.copy = new_instancemethod(_cmf_core.IChannel_copy, None, IChannel) -IChannel.qManning = new_instancemethod(_cmf_core.IChannel_qManning, None, IChannel) -IChannel_swigregister = _cmf_core.IChannel_swigregister -IChannel_swigregister(IChannel) - -class SWATReachType(IChannel): - """ - - - Structure for the description of structural parameters of a reach. - - Uses the SWAT IChannel geometry (see SWAT Theoretical Documentation, - Version 2005 (ch. 7:1.1), Neitsch et al. 2005), in this class - referenced as SWATtheoDoc. Differences to the SWAT geometry: The flood - plain is not plain, but has a small slope=0.5%, but has an infinite - width - - C++ includes: ReachType.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - BottomWidth = _swig_property(_cmf_core.SWATReachType_BottomWidth_get, _cmf_core.SWATReachType_BottomWidth_set) - ChannelDepth = _swig_property(_cmf_core.SWATReachType_ChannelDepth_get, _cmf_core.SWATReachType_ChannelDepth_set) - BankSlope = _swig_property(_cmf_core.SWATReachType_BankSlope_get, _cmf_core.SWATReachType_BankSlope_set) - FloodPlainSlope = _swig_property(_cmf_core.SWATReachType_FloodPlainSlope_get, _cmf_core.SWATReachType_FloodPlainSlope_set) - - def __init__(self, *args): - """ - __init__(cmf::river::SWATReachType self, SWATReachType copy) -> SWATReachType - __init__(cmf::river::SWATReachType self, double l) -> SWATReachType - __init__(cmf::river::SWATReachType self, double l, double BankWidth, double Depth) -> SWATReachType - - SWATReachType(double l, double BankWidth, double Depth) - - Creates a new reach structure from a give width and depth. - - Parameters: - ----------- - - l: length of the channel [m] - - BankWidth: get_channel_width of the reach from bank to bank [m] - - Depth: Depth of the reach [m] - """ - _cmf_core.SWATReachType_swiginit(self, _cmf_core.new_SWATReachType(*args)) - - def copy(self, *args, **kwargs): - """ - copy(SWATReachType self) -> SWATReachType - - SWATReachType* copy() const - """ - return _cmf_core.SWATReachType_copy(self, *args, **kwargs) - - __swig_destroy__ = _cmf_core.delete_SWATReachType -SWATReachType.copy = new_instancemethod(_cmf_core.SWATReachType_copy, None, SWATReachType) -SWATReachType_swigregister = _cmf_core.SWATReachType_swigregister -SWATReachType_swigregister(SWATReachType) - -class TriangularReach(IChannel): - """ - - - Structure for the description of reaches with a triangular cross - section. - - Although double triangular cross section reach are rarely met, a - triangular reach does scale with its water load, and is therefore - preferable in case where nothing about IChannel geometry is known - - C++ includes: ReachType.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - BankSlope = _swig_property(_cmf_core.TriangularReach_BankSlope_get, _cmf_core.TriangularReach_BankSlope_set) - - def __init__(self, *args): - """ - __init__(cmf::river::TriangularReach self, double l, double bankSlope=2) -> TriangularReach - __init__(cmf::river::TriangularReach self, TriangularReach copy) -> TriangularReach - - TriangularReach(const TriangularReach ©) - """ - _cmf_core.TriangularReach_swiginit(self, _cmf_core.new_TriangularReach(*args)) - - def copy(self, *args, **kwargs): - """ - copy(TriangularReach self) -> TriangularReach - - TriangularReach* copy() const - """ - return _cmf_core.TriangularReach_copy(self, *args, **kwargs) - - __swig_destroy__ = _cmf_core.delete_TriangularReach -TriangularReach.copy = new_instancemethod(_cmf_core.TriangularReach_copy, None, TriangularReach) -TriangularReach_swigregister = _cmf_core.TriangularReach_swigregister -TriangularReach_swigregister(TriangularReach) - -class RectangularReach(IChannel): - """ - - - Describes a IChannel with a rectangular crosssection. - - C++ includes: ReachType.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - - def __init__(self, *args): - """ - __init__(cmf::river::RectangularReach self, double l, double width) -> RectangularReach - __init__(cmf::river::RectangularReach self, RectangularReach copy) -> RectangularReach - - RectangularReach(const RectangularReach ©) - """ - _cmf_core.RectangularReach_swiginit(self, _cmf_core.new_RectangularReach(*args)) - - def copy(self, *args, **kwargs): - """ - copy(RectangularReach self) -> RectangularReach - - RectangularReach* copy() const - """ - return _cmf_core.RectangularReach_copy(self, *args, **kwargs) - - __swig_destroy__ = _cmf_core.delete_RectangularReach -RectangularReach.copy = new_instancemethod(_cmf_core.RectangularReach_copy, None, RectangularReach) -RectangularReach_swigregister = _cmf_core.RectangularReach_swigregister -RectangularReach_swigregister(RectangularReach) - -class PipeReach(IChannel): - """ - - - Describes the geometry of a closed pipe. - - C++ includes: ReachType.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - radius = _swig_property(_cmf_core.PipeReach_radius_get, _cmf_core.PipeReach_radius_set) - - def __init__(self, *args): - """ - __init__(cmf::river::PipeReach self, double l, double diameter) -> PipeReach - __init__(cmf::river::PipeReach self, PipeReach copy) -> PipeReach - - PipeReach(const PipeReach ©) - """ - _cmf_core.PipeReach_swiginit(self, _cmf_core.new_PipeReach(*args)) - - def copy(self, *args, **kwargs): - """ - copy(PipeReach self) -> PipeReach - - PipeReach* copy() - const - """ - return _cmf_core.PipeReach_copy(self, *args, **kwargs) - - __swig_destroy__ = _cmf_core.delete_PipeReach -PipeReach.copy = new_instancemethod(_cmf_core.PipeReach_copy, None, PipeReach) -PipeReach_swigregister = _cmf_core.PipeReach_swigregister -PipeReach_swigregister(PipeReach) - -class Channel(IChannel): - """ - - - A wrapper for channel geometries. - - C++ includes: ReachType.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - - def __init__(self, *args): - """ - __init__(cmf::river::Channel self) -> Channel - __init__(cmf::river::Channel self, double length) -> Channel - __init__(cmf::river::Channel self, IChannel for_wrapping) -> Channel - __init__(cmf::river::Channel self, IVolumeHeightFunction for_casting) -> Channel - __init__(cmf::river::Channel self, Channel for_copy) -> Channel - __init__(cmf::river::Channel self, char typecode, double length, double width=1., double depth=0.25) -> Channel - - Channel(char - typecode, double length, double width=1., double depth=0.25) - - Creates a reachtype using a short cut character. - - Acceptes one of the following characters: 'T' TriangularReach, width - and depth are ignored. - - 'R' RectangularReach, depth is ignored - - 'P' PipeReach, depth is ignored, width is the diameter of the pipe - - 'S' SWATReachType, a trapezoid flow cross section, as used in the SWAT - model, width (bank width) and depth are used the reach type - - Parameters: - ----------- - - typecode: Describes the geometry of the reach cross section. - - length: The length of the channel in m - - width: width of the reach cross section in m (ignored for typecode - 'T') - - depth: depth of the reach (ignored for typecode 'T','R','P','S') - """ - _cmf_core.Channel_swiginit(self, _cmf_core.new_Channel(*args)) - - def copy(self, *args, **kwargs): - """ - copy(Channel self) -> Channel - - Channel* copy() - const - """ - return _cmf_core.Channel_copy(self, *args, **kwargs) - - __swig_destroy__ = _cmf_core.delete_Channel -Channel.copy = new_instancemethod(_cmf_core.Channel_copy, None, Channel) -Channel_swigregister = _cmf_core.Channel_swigregister -Channel_swigregister(Channel) - -class MeanChannel(IChannel): - """ - - - A combination of two channel geometries. - - C++ includes: ReachType.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - - def __init__(self, *args): - """ - __init__(cmf::river::MeanChannel self, IChannel channel1, IChannel channel2) -> MeanChannel - __init__(cmf::river::MeanChannel self, MeanChannel meanChannel) -> MeanChannel - - MeanChannel(const MeanChannel &meanChannel) - """ - _cmf_core.MeanChannel_swiginit(self, _cmf_core.new_MeanChannel(*args)) - - def copy(self, *args, **kwargs): - """ - copy(MeanChannel self) -> MeanChannel - - MeanChannel* - copy() const - """ - return _cmf_core.MeanChannel_copy(self, *args, **kwargs) - - __swig_destroy__ = _cmf_core.delete_MeanChannel -MeanChannel.copy = new_instancemethod(_cmf_core.MeanChannel_copy, None, MeanChannel) -MeanChannel_swigregister = _cmf_core.MeanChannel_swigregister -MeanChannel_swigregister(MeanChannel) - -class OpenWaterStorage(WaterStorage): - """ - - - An open water body. - - The potential is calculated from the stored water using a water table - function - - C++ includes: OpenWaterStorage.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - - def __init__(self, *args, **kwargs): - raise AttributeError("No constructor defined") - __repr__ = _swig_repr - - def get_height_function(self, *args, **kwargs): - """ - get_height_function(OpenWaterStorage self) -> IVolumeHeightFunction - - virtual const - IVolumeHeightFunction& get_height_function() const - - The functional relation between volume, depth and exposed area. - """ - return _cmf_core.OpenWaterStorage_get_height_function(self, *args, **kwargs) - - - def set_height_function(self, *args, **kwargs): - """ - set_height_function(OpenWaterStorage self, IVolumeHeightFunction val) - - virtual void - set_height_function(const IVolumeHeightFunction &val) - """ - return _cmf_core.OpenWaterStorage_set_height_function(self, *args, **kwargs) - - - def wet_area(self, *args, **kwargs): - """ - wet_area(OpenWaterStorage self) -> real - - real - wet_area() const - - Returns the exposed surface area in m2. - """ - return _cmf_core.OpenWaterStorage_wet_area(self, *args, **kwargs) - - - def create(*args): - """ - create(project _project, real Area) -> cmf::river::OpenWaterStorage::ptr - create(project _project, IVolumeHeightFunction base_geo) -> cmf::river::OpenWaterStorage::ptr - """ - return _cmf_core.OpenWaterStorage_create(*args) - - create = staticmethod(create) - - def cast(*args, **kwargs): - """cast(cmf::water::flux_node::ptr node) -> cmf::river::OpenWaterStorage::ptr""" - return _cmf_core.OpenWaterStorage_cast(*args, **kwargs) - - cast = staticmethod(cast) - depth = _swig_property(_cmf_core.OpenWaterStorage_depth_get, _cmf_core.OpenWaterStorage_depth_set) - - def __repr__(self): - return self.to_string() - - __swig_destroy__ = _cmf_core.delete_OpenWaterStorage -OpenWaterStorage.get_height_function = new_instancemethod(_cmf_core.OpenWaterStorage_get_height_function, None, OpenWaterStorage) -OpenWaterStorage.set_height_function = new_instancemethod(_cmf_core.OpenWaterStorage_set_height_function, None, OpenWaterStorage) -OpenWaterStorage.wet_area = new_instancemethod(_cmf_core.OpenWaterStorage_wet_area, None, OpenWaterStorage) -OpenWaterStorage_swigregister = _cmf_core.OpenWaterStorage_swigregister -OpenWaterStorage_swigregister(OpenWaterStorage) - -def OpenWaterStorage_create(*args): - """ - create(project _project, real Area) -> cmf::river::OpenWaterStorage::ptr - OpenWaterStorage_create(project _project, IVolumeHeightFunction base_geo) -> cmf::river::OpenWaterStorage::ptr - """ - return _cmf_core.OpenWaterStorage_create(*args) - -def OpenWaterStorage_cast(*args, **kwargs): - """OpenWaterStorage_cast(cmf::water::flux_node::ptr node) -> cmf::river::OpenWaterStorage::ptr""" - return _cmf_core.OpenWaterStorage_cast(*args, **kwargs) - -class Reach(OpenWaterStorage): - """ - - - A reach represents the section of a riover and is a specialization of - an open water storage. - - The OpenWaterStorage attributes and methods are extended by - topological features, for the creation of a network of reaches. - - C++ includes: Reach.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - - def __init__(self, *args, **kwargs): - raise AttributeError("No constructor defined") - __repr__ = _swig_repr - - def get_reachtype(self, *args, **kwargs): - """ - get_reachtype(Reach self) -> Channel - - Channel - get_reachtype() const - - Returns the channel shape. - """ - return _cmf_core.Reach_get_reachtype(self, *args, **kwargs) - - - def set_height_function(self, *args, **kwargs): - """ - set_height_function(Reach self, IChannel val) - - void - set_height_function(const IChannel &val) - - Sets the channel shape. - """ - return _cmf_core.Reach_set_height_function(self, *args, **kwargs) - - - def set_outlet(self, *args, **kwargs): - """ - set_outlet(Reach self, cmf::water::flux_node::ptr outlet) - - void - set_outlet(cmf::water::flux_node::ptr outlet) - - Connects the reach to an outlet, e.g. a boundary condition. - """ - return _cmf_core.Reach_set_outlet(self, *args, **kwargs) - - - def set_dead_end(self, *args, **kwargs): - """ - set_dead_end(Reach self) - - void - set_dead_end() - - Deletes any downstream connection. - """ - return _cmf_core.Reach_set_dead_end(self, *args, **kwargs) - - - def set_downstream(self, *args, **kwargs): - """ - set_downstream(Reach self, cmf::river::Reach::ptr new_downstream, bool use_meanchannel=False) - - void - set_downstream(ptr new_downstream, bool use_meanchannel=false) - - Connects the reach to another one downstream. - """ - return _cmf_core.Reach_set_downstream(self, *args, **kwargs) - - - def __get_downstream(self, *args, **kwargs): - """ - __get_downstream(Reach self) -> cmf::water::flux_node::ptr - - cmf::water::flux_node::ptr get_downstream() const - - Returns the reach downstream of this (or null if there is no reach - downstream) - """ - return _cmf_core.Reach___get_downstream(self, *args, **kwargs) - - - def get_upstream(self, *args, **kwargs): - """ - get_upstream(Reach self, int index) -> cmf::river::Reach::ptr - - ptr - get_upstream(int index) const - - Returns a reach upstream of this. - """ - return _cmf_core.Reach_get_upstream(self, *args, **kwargs) - - - def connect_to_surfacewater(self, *args, **kwargs): - """ - connect_to_surfacewater(Reach self, Cell cell, real width, bool diffusive) - - void connect_to_surfacewater(cmf::upslope::Cell *cell, real width, - bool diffusive) - - Connects the surfacewater of a cell with this reach. - - Parameters: - ----------- - - cell: The cell with the surface water to be connected with this reach - - width: The flow width from cell to this reach - - diffusive: If diffusive is false, a ManningKinematic connection is - used, else a ManningDiffusive connection - """ - return _cmf_core.Reach_connect_to_surfacewater(self, *args, **kwargs) - - - def distance_to_cell(self, *args, **kwargs): - """ - distance_to_cell(Reach self, Cell cell) -> double - - double - distance_to_cell(cmf::upslope::Cell *cell) const - - Returns the distance (d) for connections between this reach and a - cell. - - If the effective inner cell distance (defined as :math:`R_{Cell} = 0.5\\frac{\\sqrt{A}}{\\pi}`) is smaller than the distance - between the center points, the cell radius is returned - """ - return _cmf_core.Reach_distance_to_cell(self, *args, **kwargs) - - - def __get_root(self, *args, **kwargs): - """ - __get_root(Reach self) -> cmf::river::Reach::ptr - - ptr get_root() - - Returns the reach most downstream from this reach. - """ - return _cmf_core.Reach___get_root(self, *args, **kwargs) - - __swig_destroy__ = _cmf_core.delete_Reach - - def create(*args, **kwargs): - """create(project project, IChannel shape, bool diffusive=False) -> cmf::river::Reach::ptr""" - return _cmf_core.Reach_create(*args, **kwargs) - - create = staticmethod(create) - length = _swig_property(_cmf_core.Reach_length_get) - width = _swig_property(_cmf_core.Reach_width_get) - channel = _swig_property(_cmf_core.Reach_channel_get) - - downstream = _swig_property(_cmf_core.Reach___get_downstream) - - - root = _swig_property(_cmf_core.Reach___get_root) - - upstream_count = _swig_property(_cmf_core.Reach_upstream_count_get) - diffusive = _swig_property(_cmf_core.Reach_diffusive_get, _cmf_core.Reach_diffusive_set) - - @property - def upstream(self): - """Returns a list containing all reaches flowing into self""" - return [self.get_upstream(i) for i in range(self.upstream_count)] - def __hash__(self): - return hash(self.water.node_id) - def connect_to_cell(self,cell,width,subsurface_connection_type=None,subsurface_connection_depth=None,diffusive=None): - """ Connects a cell with this reach using Manning's equation for surface runoff and - a given connection for subsurface interflow - - width : Boundary width in m - - subsurface_connection_type : Any lateral flow connection type - - subsurface_connection_depth : The depth below ground of the deepest layer to be connected by subsurface_connection_type, - default (None) = cell.z - reach.position.z - - diffusive: Determines if a kinematic or diffusive wave is to be used for surface runoff - """ - assert(subsurface_connection_type is None or issubclass(subsurface_connection_type, lateral_sub_surface_flux)) - if diffusive is None: - diffusive = self.diffusive - if subsurface_connection_depth is None: - subsurface_connection_depth = cell.z - self.position.z - self.connect_to_surfacewater(cell,width,diffusive) - r_depth = cell.z - self.position.z - distance = self.distance_to_cell(cell) - connections=[self.connection_to(cell.surfacewater)] - if subsurface_connection_type: - cell.connect_soil_with_node(self,subsurface_connection_type,width,distance,0,subsurface_connection_depth) - connections.extend(self.connection_to(l) for l in cell.layers) - return connections - - - def __repr__(self): - return self.to_string() - -Reach.get_reachtype = new_instancemethod(_cmf_core.Reach_get_reachtype, None, Reach) -Reach.set_height_function = new_instancemethod(_cmf_core.Reach_set_height_function, None, Reach) -Reach.set_outlet = new_instancemethod(_cmf_core.Reach_set_outlet, None, Reach) -Reach.set_dead_end = new_instancemethod(_cmf_core.Reach_set_dead_end, None, Reach) -Reach.set_downstream = new_instancemethod(_cmf_core.Reach_set_downstream, None, Reach) -Reach.__get_downstream = new_instancemethod(_cmf_core.Reach___get_downstream, None, Reach) -Reach.get_upstream = new_instancemethod(_cmf_core.Reach_get_upstream, None, Reach) -Reach.connect_to_surfacewater = new_instancemethod(_cmf_core.Reach_connect_to_surfacewater, None, Reach) -Reach.distance_to_cell = new_instancemethod(_cmf_core.Reach_distance_to_cell, None, Reach) -Reach.__get_root = new_instancemethod(_cmf_core.Reach___get_root, None, Reach) -Reach_swigregister = _cmf_core.Reach_swigregister -Reach_swigregister(Reach) - -def Reach_create(*args, **kwargs): - """Reach_create(project project, IChannel shape, bool diffusive=False) -> cmf::river::Reach::ptr""" - return _cmf_core.Reach_create(*args, **kwargs) - -class ReachIterator(object): - """ - - - An iterator over every upstream reach from a start reach. - - Implements both the Python and the C++ iterator interface Usage C++: - Usage Python: - - C++ includes: Reach.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - - def next(self, *args, **kwargs): - """ - next(ReachIterator self) -> cmf::river::Reach::ptr - - Reach::ptr - next() - - Returns the next reach in the upstream queue. - """ - return _cmf_core.ReachIterator_next(self, *args, **kwargs) - - - def valid(self, *args, **kwargs): - """ - valid(ReachIterator self) -> bool - - bool valid() - const - - Returns true, if reaches are left to iterate over. - """ - return _cmf_core.ReachIterator_valid(self, *args, **kwargs) - - - def __init__(self, *args, **kwargs): - """ - __init__(cmf::river::ReachIterator self, cmf::river::Reach::ptr first) -> ReachIterator - - ReachIterator(Reach::ptr first) - - Creates a ReachIterator from a first reach. - """ - _cmf_core.ReachIterator_swiginit(self, _cmf_core.new_ReachIterator(*args, **kwargs)) - - def __reach(self, *args, **kwargs): - """ - __reach(ReachIterator self) -> cmf::river::Reach::ptr - - Reach::ptr - reach() const - - Returns the current reach. - """ - return _cmf_core.ReachIterator___reach(self, *args, **kwargs) - - position = _swig_property(_cmf_core.ReachIterator_position_get) - - reach = _swig_property(_cmf_core.ReachIterator___reach) - - - def __iter__(self): - while self.valid(): - self.next() - yield (self.reach,self.position) - - __swig_destroy__ = _cmf_core.delete_ReachIterator -ReachIterator.next = new_instancemethod(_cmf_core.ReachIterator_next, None, ReachIterator) -ReachIterator.valid = new_instancemethod(_cmf_core.ReachIterator_valid, None, ReachIterator) -ReachIterator.__reach = new_instancemethod(_cmf_core.ReachIterator___reach, None, ReachIterator) -ReachIterator_swigregister = _cmf_core.ReachIterator_swigregister -ReachIterator_swigregister(ReachIterator) - - -def make_river_gap(*args, **kwargs): - """ - make_river_gap(cmf::river::Reach::ptr root_reach) -> double - - double - cmf::river::make_river_gap(Reach::ptr root_reach) - - Ensures that rivers have a monotone downward flow direction. - - Reaches with a bottom higher than any upstream reach are lowered to - the minimum height of any (possibly distant) upstream reach. - """ - return _cmf_core.make_river_gap(*args, **kwargs) -class SurfaceWater(OpenWaterStorage): - """ - - - A child class of OpenWaterStorage to model surface water on a cell. - - Specially created to connect a SurfaceWater with other nodes, is the - flux connection cmf::upslope::connections::KinematicSurfaceRunoff - - C++ includes: surfacewater.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - - def __init__(self, *args, **kwargs): - raise AttributeError("No constructor defined") - __repr__ = _swig_repr - - def get_height_function(self, *args, **kwargs): - """ - get_height_function(SurfaceWater self) -> Prism - - virtual const cmf::river::Prism& get_height_function() const - - Gets the height function (a cmf::river::Prism) for further reference. - - """ - return _cmf_core.SurfaceWater_get_height_function(self, *args, **kwargs) - - - def get_cell(self, *args, **kwargs): - """ - get_cell(SurfaceWater self) -> Cell - - Cell& - get_cell() const - - Get the cell of the surface. - """ - return _cmf_core.SurfaceWater_get_cell(self, *args, **kwargs) - - - def cast(*args, **kwargs): - """cast(cmf::water::flux_node::ptr node) -> cmf::upslope::SurfaceWater::ptr""" - return _cmf_core.SurfaceWater_cast(*args, **kwargs) - - cast = staticmethod(cast) - puddledepth = _swig_property(_cmf_core.SurfaceWater_puddledepth_get, _cmf_core.SurfaceWater_puddledepth_set) - nManning = _swig_property(_cmf_core.SurfaceWater_nManning_get, _cmf_core.SurfaceWater_nManning_set) - - def __repr__(self): - return self.to_string() - - __swig_destroy__ = _cmf_core.delete_SurfaceWater -SurfaceWater.get_height_function = new_instancemethod(_cmf_core.SurfaceWater_get_height_function, None, SurfaceWater) -SurfaceWater.get_cell = new_instancemethod(_cmf_core.SurfaceWater_get_cell, None, SurfaceWater) -SurfaceWater_swigregister = _cmf_core.SurfaceWater_swigregister -SurfaceWater_swigregister(SurfaceWater) - -def SurfaceWater_cast(*args, **kwargs): - """SurfaceWater_cast(cmf::water::flux_node::ptr node) -> cmf::upslope::SurfaceWater::ptr""" - return _cmf_core.SurfaceWater_cast(*args, **kwargs) - -class KinematicSurfaceRunoff(flux_connection): - """ - - - A connection to route water from a SurfaceWater storage to another - node following a topographic gradient. - - - - .. math:: - - q_{runoff} = A_{cross} d_{eff}^{2/3} - \\frac{\\sqrt{S}}{n} - - where: :math:`q_{runoff}` is the surface - runoff - - :math:`A_{cross}` is the wetted crossectional flux area, given as :math:`d_{eff} \\cdot w` - - :math:`w` is the width of the shared boundary between the surface water - storage and the target node - - :math:`d_{eff}` is the effective flow depth of the surface water.The - effective flow depth is defined as - - .. math:: - - d_{eff} = \\begin{cases} - V/A-d_{puddle}\\ & V/A>d_{puddle} \\\\ 0.0 & V/A<=d_{puddle} - \\end{cases} - - :math:`V` the volume of stored water in the surface in :math:`m^3` - - :math:`A` the area of the cell in :math:`m^2` - - :math:`d_{puddle}=V_{puddle}/A` the average depth of water in the surface - water needed to start run off - - :math:`S = \\|\\frac{\\Delta z\\|}{d}` the slope between - surfacewater center and the target node - - :math:`n` the manning roughness - - The KinematicSurfaceRunoff can be used as a cell connecting flux as - in: This results in a connection of the surfacewater storage of each - cell with the surface water storages of its neighborssee - - C++ includes: surfacewater.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - - def __init__(self, *args, **kwargs): - """ - __init__(cmf::upslope::connections::KinematicSurfaceRunoff self, cmf::upslope::SurfaceWater::ptr left, cmf::water::flux_node::ptr right, real flowwidth, real distance=-1) -> KinematicSurfaceRunoff - - KinematicSurfaceRunoff(cmf::upslope::SurfaceWater::ptr left, - cmf::water::flux_node::ptr right, real flowwidth, real distance=-1) - - Creates a KinematicSurfaceRunoff between a SurfaceWater (left) with - another (right) node. - - Parameters: - ----------- - - left: A surfacewater storage - - right: The target node - - flowwidth: the length of the shared boundary between left and right - in m - - distance: the distance between left and right in m. If d<=0m, the - distance is calculated according to the position of left and right - """ - _cmf_core.KinematicSurfaceRunoff_swiginit(self, _cmf_core.new_KinematicSurfaceRunoff(*args, **kwargs)) - __swig_destroy__ = _cmf_core.delete_KinematicSurfaceRunoff -KinematicSurfaceRunoff_swigregister = _cmf_core.KinematicSurfaceRunoff_swigregister -KinematicSurfaceRunoff_swigregister(KinematicSurfaceRunoff) -KinematicSurfaceRunoff.cell_connector = _cmf_core.cvar.KinematicSurfaceRunoff_cell_connector - -class DiffusiveSurfaceRunoff(flux_connection): - """ - - - A connection to route water from a SurfaceWater storage to another - node following the gradient of the water level. - - - - .. math:: - - q_{runoff} = A_{cross} d_{eff}^{2/3} - \\frac{\\sqrt{S}}{n} - - where: :math:`q_{runoff}` is the surface - runoff - - :math:`A_{cross}` is the wetted crossectional flux area, given as :math:`d_{eff} \\cdot w` - - :math:`w` is the width of the shared boundary between the surface water - storage and the target node - - :math:`d_{eff}` is the effective flow depth of the surface water.The - effective flow depth is defined as either the mean of the effective - depth of the left and the right node (when use_depthmax=false) or the - maximum of the efficitve depth. The effective depth for a surfacewater - is always defined as: - - .. math:: - - d_{eff} = \\begin{cases} - V/A-d_{puddle}\\ & V/A>d_{puddle} \\\\ 0.0 & V/A<=d_{puddle} - \\end{cases} - - The right node might be not a surfacewater. If the - right node is an OpenWaterStorage, then the effective depth is the - depth of the OWS above the cell height of the left surfacewater, given - by: - - .. math:: - - d_{eff,ows} = \\Psi_{ows} - z_{cell} - - In case of - another node, the right node depth equals the effective depth of the - left node. - - :math:`V` the volume of stored water in the surface in :math:`m^3` - - :math:`A` the area of the cell in :math:`m^2` - - :math:`d_{puddle}=V_{puddle}/A` the average depth of water in the surface - water needed to start run off - - :math:`S = \\|\\frac{\\Delta h\\|}{d}` the slope between - surfacewater center potential and the target node potential - - :math:`n` the manning roughness - - The DiffusiveSurfaceRunoff can be used as a cell connecting flux as - in: This results in a connection of the surfacewater storage of each - cell with the surface water storages of its neighborssee - - C++ includes: surfacewater.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - - def set_linear_slope(*args, **kwargs): - """set_linear_slope(real width)""" - return _cmf_core.DiffusiveSurfaceRunoff_set_linear_slope(*args, **kwargs) - - set_linear_slope = staticmethod(set_linear_slope) - - def get_linear_slope(*args, **kwargs): - """get_linear_slope() -> real""" - return _cmf_core.DiffusiveSurfaceRunoff_get_linear_slope(*args, **kwargs) - - get_linear_slope = staticmethod(get_linear_slope) - - def __init__(self, *args, **kwargs): - """ - __init__(cmf::upslope::connections::DiffusiveSurfaceRunoff self, cmf::upslope::SurfaceWater::ptr left, cmf::water::flux_node::ptr right, real flowwidth, real distance=-1) -> DiffusiveSurfaceRunoff - - DiffusiveSurfaceRunoff(cmf::upslope::SurfaceWater::ptr left, - cmf::water::flux_node::ptr right, real flowwidth, real distance=-1) - """ - _cmf_core.DiffusiveSurfaceRunoff_swiginit(self, _cmf_core.new_DiffusiveSurfaceRunoff(*args, **kwargs)) - __swig_destroy__ = _cmf_core.delete_DiffusiveSurfaceRunoff -DiffusiveSurfaceRunoff_swigregister = _cmf_core.DiffusiveSurfaceRunoff_swigregister -DiffusiveSurfaceRunoff_swigregister(DiffusiveSurfaceRunoff) - -def DiffusiveSurfaceRunoff_set_linear_slope(*args, **kwargs): - """DiffusiveSurfaceRunoff_set_linear_slope(real width)""" - return _cmf_core.DiffusiveSurfaceRunoff_set_linear_slope(*args, **kwargs) - -def DiffusiveSurfaceRunoff_get_linear_slope(*args): - """DiffusiveSurfaceRunoff_get_linear_slope() -> real""" - return _cmf_core.DiffusiveSurfaceRunoff_get_linear_slope(*args) -DiffusiveSurfaceRunoff.cell_connector = _cmf_core.cvar.DiffusiveSurfaceRunoff_cell_connector - -class aquifer(WaterStorage): - """ - - - A class to represent large groundwater storages, not bounded to the - usual horizontal discretization scheme, the Cell. - - Naturally aquifers are connected with aquifer_Darcy or kinematic_wave - connections. As a boundary condition for a cell based soil water - system, aquifers are used as a right hand side node of percolation - connections. - - Basic head ( :math:`\\Psi`) / volume ( :math:`V`) relation: - - .. math:: - - \\Psi = - z_{base} + \\frac {V}{A \\Phi} - - :math:`\\Psi` water head in m - - :math:`z_{base}` base height of the aquifer - - :math:`V` volume of stored water in m3 - - :math:`A` Base area of the aquifer in m2 - - :math:`\\Phi` Porosity, or more general, :math:`\\frac{dV_{bulk}}{dV_{H_2O}}` - - C++ includes: groundwater.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - area = _swig_property(_cmf_core.aquifer_area_get, _cmf_core.aquifer_area_set) - thickness = _swig_property(_cmf_core.aquifer_thickness_get, _cmf_core.aquifer_thickness_set) - porosity = _swig_property(_cmf_core.aquifer_porosity_get, _cmf_core.aquifer_porosity_set) - K = _swig_property(_cmf_core.aquifer_K_get, _cmf_core.aquifer_K_set) - - def get_K(self, *args, **kwargs): - """ - get_K(aquifer self, point direction) -> real - - virtual real - get_K(cmf::geometry::point direction) const - - Returns the conductivity in m/day for a specific direction. - - Takes account for anisotropy - - .. math:: - - \\|K\\|(d) = - \\frac{d}{\\|d\\|} \\bullet K - - - """ - return _cmf_core.aquifer_get_K(self, *args, **kwargs) - - - def get_abs_errtol(self, *args, **kwargs): - """ - get_abs_errtol(aquifer self, real rel_errtol) -> real - - virtual - real get_abs_errtol(real rel_errtol) const - """ - return _cmf_core.aquifer_get_abs_errtol(self, *args, **kwargs) - - - def __init__(self, *args): - """ - __init__(cmf::upslope::aquifer self, project p, point position, real area, real thickness, real porosity, real K=1e-4) -> aquifer - __init__(cmf::upslope::aquifer self, cell_vector cells, real thickness, real porosity, real K=1e-4) -> aquifer - - aquifer(cmf::upslope::cell_vector &cells, real thickness, real - porosity, real K=1e-4) - - Creates an aquifer below a collection of cells. - - Parameters: - ----------- - - cells: The cells above the aquifer. The area of the aquifer equals - the area of the cells, and the upper boundary equals the soildepth of - the lowest cell - - thickness: The thickness of the aquifer in m - - porosity: Porosity of the aquifer - - K: Conductivity of the aquifer in m/day. If the conductivity should - be anisotropic, change the x,y and z values of the member K - """ - _cmf_core.aquifer_swiginit(self, _cmf_core.new_aquifer(*args)) - - def cast(*args, **kwargs): - """cast(cmf::water::flux_node::ptr for_cast) -> cmf::upslope::aquifer::ptr""" - return _cmf_core.aquifer_cast(*args, **kwargs) - - cast = staticmethod(cast) - base_height = _swig_property(_cmf_core.aquifer_base_height_get) - top_height = _swig_property(_cmf_core.aquifer_top_height_get) - - def __repr__(self): - return self.to_string() - - __swig_destroy__ = _cmf_core.delete_aquifer -aquifer.get_K = new_instancemethod(_cmf_core.aquifer_get_K, None, aquifer) -aquifer.get_abs_errtol = new_instancemethod(_cmf_core.aquifer_get_abs_errtol, None, aquifer) -aquifer_swigregister = _cmf_core.aquifer_swigregister -aquifer_swigregister(aquifer) - -def aquifer_cast(*args, **kwargs): - """aquifer_cast(cmf::water::flux_node::ptr for_cast) -> cmf::upslope::aquifer::ptr""" - return _cmf_core.aquifer_cast(*args, **kwargs) - -class aquifer_Darcy(flux_connection): - """ - - - Lateral darcy flow between aquifer objects. - - - - .. math:: - - v_{Darcy}=K_{1,2}\\nabla\\Psi - - - - .. math:: - - q = v_{Darcy} w - \\Delta z - - C++ includes: groundwater.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - flux_width = _swig_property(_cmf_core.aquifer_Darcy_flux_width_get, _cmf_core.aquifer_Darcy_flux_width_set) - - def __init__(self, *args, **kwargs): - """ - __init__(cmf::upslope::aquifer_Darcy self, cmf::upslope::aquifer::ptr left, cmf::water::flux_node::ptr right, real width) -> aquifer_Darcy - - aquifer_Darcy(aquifer::ptr left, cmf::water::flux_node::ptr right, - real width) - - Creates a new Darcy flow connection between two aquifers, or an - aquifer and another node acting as Dirichlet boundary condition. - - Parameters: - ----------- - - left: One aquifer - - right: Another aquifer, or a flux node that can be interpreted as an - Dirichlet boundary - - width: Width of the connection - """ - _cmf_core.aquifer_Darcy_swiginit(self, _cmf_core.new_aquifer_Darcy(*args, **kwargs)) - __swig_destroy__ = _cmf_core.delete_aquifer_Darcy -aquifer_Darcy_swigregister = _cmf_core.aquifer_Darcy_swigregister -aquifer_Darcy_swigregister(aquifer_Darcy) - -class lateral_sub_surface_flux(flux_connection): - """ - - - An abstract base class for lateral subsurface fluxes. - - C++ includes: subsurfacefluxes.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - - def __init__(self, *args, **kwargs): - raise AttributeError("No constructor defined - class is abstract") - __repr__ = _swig_repr - __swig_destroy__ = _cmf_core.delete_lateral_sub_surface_flux -lateral_sub_surface_flux_swigregister = _cmf_core.lateral_sub_surface_flux_swigregister -lateral_sub_surface_flux_swigregister(lateral_sub_surface_flux) - -class Darcy(lateral_sub_surface_flux): - """ - - - Calculates the lateral flow using the gravitational potential gradient - only. - - - - .. math:: - - q_{lat} = \\frac{\\Delta \\Psi_G}{\\|C_1-C_2\\|} - \\frac 12 (T(C_1)+T(C_2)) w - - where :math:`\\Delta \\Psi_G` is - the gravitational potential difference - - :math:`\\|C_1-C_2\\|` is the distance from Cell 1 to Cell 2 - - :math:`T(C)` is the transmissivity of cell C, calculated by - SoilType::Transmissivity - - :math:`w` is the width of the connection of the cells - - C++ includes: subsurfacefluxes.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - - def __init__(self, *args, **kwargs): - """ - __init__(cmf::upslope::connections::Darcy self, cmf::upslope::SoilLayer::ptr left, cmf::water::flux_node::ptr right, real FlowWidth, real Distance=0) -> Darcy - - Darcy(cmf::upslope::SoilLayer::ptr left, cmf::water::flux_node::ptr - right, real FlowWidth, real Distance=0) - """ - _cmf_core.Darcy_swiginit(self, _cmf_core.new_Darcy(*args, **kwargs)) - __swig_destroy__ = _cmf_core.delete_Darcy -Darcy_swigregister = _cmf_core.Darcy_swigregister -Darcy_swigregister(Darcy) -Darcy.cell_connector = _cmf_core.cvar.Darcy_cell_connector - -class TopographicGradientDarcy(lateral_sub_surface_flux): - """ - - - Calculates the lateral flow using the topographic gradient. - - - - .. math:: - - q_{lat} = \\frac{z_1 - z_2}{\\|C_1-C_2\\|} \\frac 12 - (T(C_1)+T(C_2)) w - - where :math:`z_1 - z_2` is the topographic height - difference - - :math:`\\|C_1-C_2\\|` is the distance from Cell 1 to Cell 2 - - :math:`T(C)` is the transmissivity of cell C, calculated by - SoilType::Transmissivity - - :math:`w` is the width of the connection of the cells - - C++ includes: subsurfacefluxes.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - - def __init__(self, *args, **kwargs): - """ - __init__(cmf::upslope::connections::TopographicGradientDarcy self, cmf::upslope::SoilLayer::ptr left, cmf::water::flux_node::ptr right, real FlowWidth, real Distance=0) -> TopographicGradientDarcy - - TopographicGradientDarcy(cmf::upslope::SoilLayer::ptr left, - cmf::water::flux_node::ptr right, real FlowWidth, real Distance=0) - - Creates the connection. - - Parameters: - ----------- - - left: Left node of the connection (needs to be soil water storage) - - right: Right node of the connection (can be any node) - - FlowWidth: the width of the connection - is multiplied by layer - thickness to get the interface area - - Distance: the length of the connection. If 0, the distance is - calculated from the position of the nodes - """ - _cmf_core.TopographicGradientDarcy_swiginit(self, _cmf_core.new_TopographicGradientDarcy(*args, **kwargs)) - __swig_destroy__ = _cmf_core.delete_TopographicGradientDarcy -TopographicGradientDarcy_swigregister = _cmf_core.TopographicGradientDarcy_swigregister -TopographicGradientDarcy_swigregister(TopographicGradientDarcy) -TopographicGradientDarcy.cell_connector = _cmf_core.cvar.TopographicGradientDarcy_cell_connector - -class DarcyKinematic(lateral_sub_surface_flux): - """ - - - A simple kinemtic wave model for subsurface flux. - - - - .. math:: - - q = \\frac{\\Delta z_{surface}}{d} K(\\theta)_{source} - A_{cross} - - C++ includes: subsurfacefluxes.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - - def __init__(self, *args, **kwargs): - """ - __init__(cmf::upslope::connections::DarcyKinematic self, cmf::upslope::SoilLayer::ptr left, cmf::water::flux_node::ptr right, real FlowWidth, real Distance=0) -> DarcyKinematic - - DarcyKinematic(cmf::upslope::SoilLayer::ptr left, - cmf::water::flux_node::ptr right, real FlowWidth, real Distance=0) - - Creates the connection. - - Parameters: - ----------- - - left: Left node of the connection (needs to be soil water storage) - - right: Right node of the connection (can be any node) - - FlowWidth: the width of the connection - is multiplied by layer - thickness to get the interface area - - Distance: the length of the connection. If 0, the distance is - calculated from the position of the nodes - """ - _cmf_core.DarcyKinematic_swiginit(self, _cmf_core.new_DarcyKinematic(*args, **kwargs)) - __swig_destroy__ = _cmf_core.delete_DarcyKinematic -DarcyKinematic_swigregister = _cmf_core.DarcyKinematic_swigregister -DarcyKinematic_swigregister(DarcyKinematic) -DarcyKinematic.cell_connector = _cmf_core.cvar.DarcyKinematic_cell_connector - -class Richards_lateral(lateral_sub_surface_flux): - """ - - - Calculates the flux using Richard's equation for adjacent layers - - .. math:: - - - q_{lat} = \\frac{\\Psi_1 - \\Psi_2}{\\|C_1-C_2\\|} - K(\\theta) A - - where: - - :math:`q_{lat}` the lateral flow in :math:`m^3/day` - - :math:`\\Psi_i` the head of node i - - :math:`\\|C_1-C_2\\|` is the distance from Cell 1 to Cell 2 - - :math:`K(\\theta_{1,2}) = \\sqrt{K(\\theta_1) K(\\theta_2)}` - - :math:`A` the crosssectional area of the interface between storages 1 and 2 - - C++ includes: subsurfacefluxes.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - flow_thickness = _swig_property(_cmf_core.Richards_lateral_flow_thickness_get, _cmf_core.Richards_lateral_flow_thickness_set) - wet_right_node = _swig_property(_cmf_core.Richards_lateral_wet_right_node_get, _cmf_core.Richards_lateral_wet_right_node_set) - - def __init__(self, *args, **kwargs): - """ - __init__(cmf::upslope::connections::Richards_lateral self, cmf::upslope::SoilLayer::ptr left, cmf::water::flux_node::ptr right, real FlowWidth=0, real Distance=0) -> Richards_lateral - - Richards_lateral(cmf::upslope::SoilLayer::ptr left, - cmf::water::flux_node::ptr right, real FlowWidth=0, real Distance=0) - - Creates the connection. - - Parameters: - ----------- - - left: Left node of the connection (needs to be soil water storage) - - right: Right node of the connection (can be any node) - - FlowWidth: the width of the connection - is multiplied by layer - thickness to get the interface area - - Distance: the length of the connection. If 0, the distance is - calculated from the position of the nodes - """ - _cmf_core.Richards_lateral_swiginit(self, _cmf_core.new_Richards_lateral(*args, **kwargs)) - - def usebaseflow(*args, **kwargs): - """usebaseflow(bool use)""" - return _cmf_core.Richards_lateral_usebaseflow(*args, **kwargs) - - usebaseflow = staticmethod(usebaseflow) - __swig_destroy__ = _cmf_core.delete_Richards_lateral -Richards_lateral_swigregister = _cmf_core.Richards_lateral_swigregister -Richards_lateral_swigregister(Richards_lateral) - -def Richards_lateral_usebaseflow(*args, **kwargs): - """Richards_lateral_usebaseflow(bool use)""" - return _cmf_core.Richards_lateral_usebaseflow(*args, **kwargs) -Richards_lateral.cell_connector = _cmf_core.cvar.Richards_lateral_cell_connector - -class TOPModelFlow(flux_connection): - """ - - - Calculates a flux from a soil layer using TOPMODELs (Beven & Kirkby - 1979) exponential transmissivity concept. - - - - .. math:: - - T = T_0 \\exp(-D_i/m) - - where: :math:`T` is the actual - transmissivity of the profile in :math:`m^2/day` - - :math:`T0` is the transmissivity of the profile at saturation - - :math:`D_i` is the drained depth in m, calculated as :math:`(C-V)/A`, the capacity - of the layer - volume per area - - :math:`m` a scaling factor in m - - By using the transmissivity in Darcy's law and assuming the GW - gradient to be parallel to the topographic slope we get for the flow: - - - .. math:: - - q = T_0 \\exp(-D_i/m) w s - - where: :math:`q` is the flux in - :math:`m^3/day` - - :math:`w` is the flow width (unit contour length) - - :math:`s` is the topographic slope between layer and outlet - - TOPMODEL is based on the concept of drained depth, not, as cmf on the - concept of stored volume. Hence, negative volumes can occur if - - C++ includes: subsurfacefluxes.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - flow_width = _swig_property(_cmf_core.TOPModelFlow_flow_width_get, _cmf_core.TOPModelFlow_flow_width_set) - distance = _swig_property(_cmf_core.TOPModelFlow_distance_get, _cmf_core.TOPModelFlow_distance_set) - T0 = _swig_property(_cmf_core.TOPModelFlow_T0_get, _cmf_core.TOPModelFlow_T0_set) - m = _swig_property(_cmf_core.TOPModelFlow_m_get, _cmf_core.TOPModelFlow_m_set) - - def __init__(self, *args, **kwargs): - """ - __init__(cmf::upslope::connections::TOPModelFlow self, cmf::upslope::SoilLayer::ptr left, cmf::water::flux_node::ptr right, real T0, real m, real flowwidth, real distance=0) -> TOPModelFlow - - TOPModelFlow(cmf::upslope::SoilLayer::ptr left, - cmf::water::flux_node::ptr right, real T0, real m, real flowwidth, - real distance=0) - """ - _cmf_core.TOPModelFlow_swiginit(self, _cmf_core.new_TOPModelFlow(*args, **kwargs)) - __swig_destroy__ = _cmf_core.delete_TOPModelFlow -TOPModelFlow_swigregister = _cmf_core.TOPModelFlow_swigregister -TOPModelFlow_swigregister(TOPModelFlow) - -class Manning(flux_connection): - """ - - - Calculates the flux between two open water bodies, using Manning's - equation. - - This is the base class for a kinematic wave approach (topography - driven) and a diffusive wave approach (water table driven). The only - difference between both approaches is the calculation of the flux - driving slope. For the model, one of ManningKinematic or - ManningDiffusive connection is selected - - .. math:: - - - q_{Manning}&=& A R^{\\frac 2 3} \\sqrt{\\frac {\\Delta_z} n} - \\\\ A &=& \\frac V l \\mbox{, (Crosssectional area of the - wetted crossection, Volume per length)} \\\\ R &=& \\frac A - {P(d)} \\\\ P(d) &=& \\mbox{ the perimeter of the wetted - crosssection, a function of reach depth} \\\\ d(V) &=& \\mbox{ - the depth of the reach, a function of the volume} \\\\ \\Delta_z - &=& \\frac{\\|z_1 - z_2\\|}{l} \\mbox{ Slope of the reach} - \\\\ n&=&\\mbox{Manning friction number} - - For - the kinematic wave the slope of the river bed is used as slope - :math:`\\Delta_z = \\frac{|z_1 - z_2\\|}{l}`, - - while for the diffusive wave the slope is calculated from the actual - water head. :math:`\\Delta_z = \\|\\frac{h_1 - h_2}{l}` - - C++ includes: ManningConnection.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - - def __init__(self, *args, **kwargs): - raise AttributeError("No constructor defined - class is abstract") - __repr__ = _swig_repr - is_diffusive_wave = _swig_property(_cmf_core.Manning_is_diffusive_wave_get, _cmf_core.Manning_is_diffusive_wave_set) - flux_geometry = _swig_property(_cmf_core.Manning_flux_geometry_get, _cmf_core.Manning_flux_geometry_set) - __swig_destroy__ = _cmf_core.delete_Manning -Manning_swigregister = _cmf_core.Manning_swigregister -Manning_swigregister(Manning) - -class Manning_Diffusive(Manning): - """ - - - Connecting surface water bodies using a diffusive wave. - - This approach might not be numerical stable for deep water with small - gradient cmf for experimental reasons - - .. math:: - - - q_{Manning}&=& A R^{\\frac 2 3} \\sqrt{\\frac {\\Delta_z} n} - \\\\ A &=& \\frac V l \\mbox{, (Crosssectional area of the - wetted crossection, Volume per length)} \\\\ R &=& \\frac A - {P(d)} \\\\ P(d) &=& \\mbox{ the perimeter of the wetted - crosssection, a function of reach depth} \\\\ d(V) &=& \\mbox{ - the depth of the reach a function of the volume} \\\\ \\Delta_z - = \\|\\frac{h_1 - h_2}{l} \\mbox{ Slope of the reach - waterlevels} \\\\ n&=&\\mbox{Manning friction number} - - - - - C++ includes: ManningConnection.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - linear_slope_width = _swig_property(_cmf_core.Manning_Diffusive_linear_slope_width_get, _cmf_core.Manning_Diffusive_linear_slope_width_set) - - def __init__(self, *args, **kwargs): - """ - __init__(cmf::river::Manning_Diffusive self, cmf::river::OpenWaterStorage::ptr left, cmf::water::flux_node::ptr right, IChannel reachtype) -> Manning_Diffusive - - Manning_Diffusive(cmf::river::OpenWaterStorage::ptr left, - cmf::water::flux_node::ptr right, const cmf::river::IChannel - &reachtype) - - Creates a diffusive wave connection between to open water storages. - - Parameters: - ----------- - - left: right: The nodes to be connected by the diffusive wave. Left - needs to be an open water storage - - reachtype: The channel geometry - """ - _cmf_core.Manning_Diffusive_swiginit(self, _cmf_core.new_Manning_Diffusive(*args, **kwargs)) - __swig_destroy__ = _cmf_core.delete_Manning_Diffusive -Manning_Diffusive_swigregister = _cmf_core.Manning_Diffusive_swigregister -Manning_Diffusive_swigregister(Manning_Diffusive) -Manning_Diffusive.cell_connector = _cmf_core.cvar.Manning_Diffusive_cell_connector - -class Manning_Kinematic(Manning): - """ - - - Connecting surface water bodies using a kinematic wave. - - Note the fixed gradient :math:`\\Delta_z` - - .. math:: - - - q_{Manning}&=& A R^{\\frac 2 3} \\sqrt{\\frac {\\Delta_z} n} - \\\\ A &=& \\frac V l \\mbox{, (Crosssectional area of the - wetted crossection, Volume per length)} \\\\ R &=& \\frac A - {P(d)} \\\\ P(d) &=& \\mbox{ the perimeter of the wetted - crosssection, a function of reach depth} \\\\ d(V) &=& \\mbox{ - the depth of the reach a function of the volume} \\\\ \\Delta_z - &=& \\frac{\\|z_1 - z_2\\|}{l} \\mbox{ Slope of the reach} - \\\\ n&=&\\mbox{Manning friction number} - - - - C++ includes: ManningConnection.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - - def __init__(self, *args, **kwargs): - """ - __init__(cmf::river::Manning_Kinematic self, cmf::river::OpenWaterStorage::ptr left, cmf::water::flux_node::ptr right, IChannel reachtype) -> Manning_Kinematic - - Manning_Kinematic(cmf::river::OpenWaterStorage::ptr left, - cmf::water::flux_node::ptr right, const cmf::river::IChannel - &reachtype) - - Creates a kinematic wave connection between to open water storages. - - Parameters: - ----------- - - left: right: The nodes to be connected by the kinematic wave. Left - needs to be an open water storage - - reachtype: The channel geometry - """ - _cmf_core.Manning_Kinematic_swiginit(self, _cmf_core.new_Manning_Kinematic(*args, **kwargs)) - __swig_destroy__ = _cmf_core.delete_Manning_Kinematic -Manning_Kinematic_swigregister = _cmf_core.Manning_Kinematic_swigregister -Manning_Kinematic_swigregister(Manning_Kinematic) -Manning_Kinematic.cell_connector = _cmf_core.cvar.Manning_Kinematic_cell_connector - -class CanopyOverflow(flux_connection): - """ - - - Calculates the overflow of a canopy storage using a kinematic wave - approach. - - This model routes only water that exceeds the canopy capacity to the - ground with an ad hoc estimated function: - - .. math:: - - q_{CO} = - \\left(\\frac{V_{act}-V_{max}}{V_{max}}\\right) ^2 \\cdot 2400 - \\frac{A_{cell}}{1000} - - With: :math:`q_{CO}(t)[\\frac{m^3}{day}]`: - The flux from canopy to the ground - - :math:`V_{act}[mm]=1000 [mm/m] \\frac{V_{canopy}[m^3]}{A_{cell} [m^2]}` - The stored water of the canopy in mm - - :math:`V_{max}[mm]=c_{LAI}[mm] LAI` The capacity of the canopy in mm, - defined by the factor CanopyCapacityPerLAI [mm/LAI], and the leaf area - index LAI. (see: cmf::upslope::Vegetation) - - C++ includes: surfacefluxes.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - - def __init__(self, *args, **kwargs): - """ - __init__(cmf::upslope::connections::CanopyOverflow self, cmf::water::WaterStorage::ptr Canopy, cmf::water::flux_node::ptr target, Cell cell) -> CanopyOverflow - - CanopyOverflow(cmf::water::WaterStorage::ptr Canopy, - cmf::water::flux_node::ptr target, cmf::upslope::Cell &cell) - """ - _cmf_core.CanopyOverflow_swiginit(self, _cmf_core.new_CanopyOverflow(*args, **kwargs)) - - def use_for_cell(*args, **kwargs): - """use_for_cell(Cell cell) -> CanopyOverflow""" - return _cmf_core.CanopyOverflow_use_for_cell(*args, **kwargs) - - use_for_cell = staticmethod(use_for_cell) - __swig_destroy__ = _cmf_core.delete_CanopyOverflow -CanopyOverflow_swigregister = _cmf_core.CanopyOverflow_swigregister -CanopyOverflow_swigregister(CanopyOverflow) - -def CanopyOverflow_use_for_cell(*args, **kwargs): - """CanopyOverflow_use_for_cell(Cell cell) -> CanopyOverflow""" - return _cmf_core.CanopyOverflow_use_for_cell(*args, **kwargs) - -class RutterInterception(flux_connection): - """ - - - Interception storage overflow according to the Rutter and Morton - (1977) model. - - Calculates the interception overflow as a storage depending fraction - of incoming rainfall The Rutter model of interception reads as follows - after Meuser, A., 1990. Effects of afforestation on run-off - characteristics. Agric. For. Meteorol. 50: 125-138.: - - - .. math:: - - \\frac{dI_C(t)}{dt}=P(t)(1-p_F-p_S)-P(t)(1-p_F- - p_S)\\frac{I_C(t)}{I_CMAX}-f_I(E-e)(t) - - With :math:`I_C` the current - canopy storage and :math:`P(t)` the current rainfall. - - The second term of the equation denotes the flux from the canopy to - the ground. The implemented formula for canopy storage overflow reads - then as: - - .. math:: - - q_{CO}(t) = - P_{net}(t)\\frac{V_{act}[mm]}{V_{max}[mm]} - - With: - :math:`q_{CO}(t)[\\frac{m^3}{day}]`: The flux from canopy to the ground - - :math:`P_{net}(t)[\\frac{m^3}{day}]`: The flux from the rain to the canopy - - :math:`V_{act}[mm]=1000 [mm/m] \\frac{V_{canopy}[m^3]}{A_{cell} [m^2]}` - The stored water of the canopy in mm - - :math:`V_{max}[mm]=c_{LAI}[mm]\\cdot LAI` The capacity of the canopy in - mm, defined by the factor CanopyCapacityPerLAI [mm/LAI], and the leaf - area index LAI. (see: cmf::upslope::vegetation::Vegetation) - - C++ includes: surfacefluxes.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - - def __init__(self, *args, **kwargs): - """ - __init__(cmf::upslope::connections::RutterInterception self, cmf::water::WaterStorage::ptr Canopy, cmf::water::flux_node::ptr target, Cell cell) -> RutterInterception - - RutterInterception(cmf::water::WaterStorage::ptr Canopy, - cmf::water::flux_node::ptr target, cmf::upslope::Cell &cell) - """ - _cmf_core.RutterInterception_swiginit(self, _cmf_core.new_RutterInterception(*args, **kwargs)) - - def use_for_cell(*args, **kwargs): - """use_for_cell(Cell cell) -> RutterInterception""" - return _cmf_core.RutterInterception_use_for_cell(*args, **kwargs) - - use_for_cell = staticmethod(use_for_cell) - __swig_destroy__ = _cmf_core.delete_RutterInterception -RutterInterception_swigregister = _cmf_core.RutterInterception_swigregister -RutterInterception_swigregister(RutterInterception) - -def RutterInterception_use_for_cell(*args, **kwargs): - """RutterInterception_use_for_cell(Cell cell) -> RutterInterception""" - return _cmf_core.RutterInterception_use_for_cell(*args, **kwargs) - -class SimpleTindexSnowMelt(flux_connection): - """ - - - Calculates snow melt using a simple degree day method. - - - - .. math:: - - q_{melt} [mm/day] = (T-T_{thres}) * r - - Usage: - - C++ includes: surfacefluxes.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - SnowMeltRate = _swig_property(_cmf_core.SimpleTindexSnowMelt_SnowMeltRate_get, _cmf_core.SimpleTindexSnowMelt_SnowMeltRate_set) - - def __init__(self, *args, **kwargs): - """ - __init__(cmf::upslope::connections::SimpleTindexSnowMelt self, cmf::water::WaterStorage::ptr snow, cmf::water::flux_node::ptr surface_water, Cell cell, real rate=7.0) -> SimpleTindexSnowMelt - - SimpleTindexSnowMelt(cmf::water::WaterStorage::ptr snow, - cmf::water::flux_node::ptr surface_water, cmf::upslope::Cell &cell, - real rate=7.0) - - Creates a new snow melt connection. - - Parameters: - ----------- - - snow: Snow storage, usually cel.snow - - surface_water: target of the melted water (usually cell.surfacewater) - - cell: The cell, needed to get weather and area - - rate: The rate of snow melt, given in mm/(degC day), default = 7.0 - """ - _cmf_core.SimpleTindexSnowMelt_swiginit(self, _cmf_core.new_SimpleTindexSnowMelt(*args, **kwargs)) - - def use_for_cell(*args, **kwargs): - """use_for_cell(Cell cell)""" - return _cmf_core.SimpleTindexSnowMelt_use_for_cell(*args, **kwargs) - - use_for_cell = staticmethod(use_for_cell) - __swig_destroy__ = _cmf_core.delete_SimpleTindexSnowMelt -SimpleTindexSnowMelt_swigregister = _cmf_core.SimpleTindexSnowMelt_swigregister -SimpleTindexSnowMelt_swigregister(SimpleTindexSnowMelt) - -def SimpleTindexSnowMelt_use_for_cell(*args, **kwargs): - """SimpleTindexSnowMelt_use_for_cell(Cell cell)""" - return _cmf_core.SimpleTindexSnowMelt_use_for_cell(*args, **kwargs) - -class EnergyBudgetSnowMelt(flux_connection): - """ - - - Calculates snow melt using the surface energy budget method. - - C++ includes: surfacefluxes.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - - def __init__(self, *args, **kwargs): - """ - __init__(cmf::upslope::connections::EnergyBudgetSnowMelt self, cmf::water::WaterStorage::ptr snow, cmf::water::flux_node::ptr surface_water, Cell cell) -> EnergyBudgetSnowMelt - - EnergyBudgetSnowMelt(cmf::water::WaterStorage::ptr snow, - cmf::water::flux_node::ptr surface_water, cmf::upslope::Cell &cell) - """ - _cmf_core.EnergyBudgetSnowMelt_swiginit(self, _cmf_core.new_EnergyBudgetSnowMelt(*args, **kwargs)) - - def use_for_cell(*args, **kwargs): - """use_for_cell(Cell cell)""" - return _cmf_core.EnergyBudgetSnowMelt_use_for_cell(*args, **kwargs) - - use_for_cell = staticmethod(use_for_cell) - __swig_destroy__ = _cmf_core.delete_EnergyBudgetSnowMelt -EnergyBudgetSnowMelt_swigregister = _cmf_core.EnergyBudgetSnowMelt_swigregister -EnergyBudgetSnowMelt_swigregister(EnergyBudgetSnowMelt) - -def EnergyBudgetSnowMelt_use_for_cell(*args, **kwargs): - """EnergyBudgetSnowMelt_use_for_cell(Cell cell)""" - return _cmf_core.EnergyBudgetSnowMelt_use_for_cell(*args, **kwargs) - - -def snowfraction(*args, **kwargs): - """ - snowfraction(real T) -> real - - real - cmf::upslope::connections::snowfraction(real T) - - A function to calculate the snow fraction of the precipitation - according to the air temperature. - - Returns 0.0 for T>+1 degC, 1.0 for T<-1degC and interpolates linear - between. Values between 0 and 1 can be interpreted as sleet - """ - return _cmf_core.snowfraction(*args, **kwargs) -class Rainfall(flux_connection): - """ - - - A connection routing rainfall to surface water and to an eventually - existing canopy storage. - - C++ includes: AtmosphericFluxes.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - Throughfall = _swig_property(_cmf_core.Rainfall_Throughfall_get, _cmf_core.Rainfall_Throughfall_set) - InterceptedRainfall = _swig_property(_cmf_core.Rainfall_InterceptedRainfall_get, _cmf_core.Rainfall_InterceptedRainfall_set) - - def __init__(self, *args, **kwargs): - """ - __init__(cmf::upslope::connections::Rainfall self, cmf::water::flux_node::ptr target, Cell cell, bool getthroughfall=True, bool getintercepted=True) -> Rainfall - - Rainfall(cmf::water::flux_node::ptr target, cmf::upslope::Cell &cell, - bool getthroughfall=true, bool getintercepted=true) - - Creates a new Rainfall connection. - """ - _cmf_core.Rainfall_swiginit(self, _cmf_core.new_Rainfall(*args, **kwargs)) - __swig_destroy__ = _cmf_core.delete_Rainfall -Rainfall_swigregister = _cmf_core.Rainfall_swigregister -Rainfall_swigregister(Rainfall) - -class Snowfall(flux_connection): - """ - - - A connection routing snowfall (precipitation below freezing Temp) to - the snow pack. - - C++ includes: AtmosphericFluxes.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - - def __init__(self, *args, **kwargs): - """ - __init__(cmf::upslope::connections::Snowfall self, cmf::water::flux_node::ptr target, Cell cell) -> Snowfall - - Snowfall(cmf::water::flux_node::ptr target, cmf::upslope::Cell &cell) - - """ - _cmf_core.Snowfall_swiginit(self, _cmf_core.new_Snowfall(*args, **kwargs)) - __swig_destroy__ = _cmf_core.delete_Snowfall -Snowfall_swigregister = _cmf_core.Snowfall_swigregister -Snowfall_swigregister(Snowfall) - -class MatrixInfiltration(flux_connection): - """ - - - Connects the surfacewater and the most upper layer using a Richards - equation like infiltration model. - - The potential infiltration is calculated according to the Richards - equation. The gradient is from the cell surface to the center of the - first layer and the conductivity is the geometric mean of the wetted - surface ( :math:`K_{sat}`) and the conductivity of the layer center ( - :math:`K(\\theta_{layer})` - - .. math:: - - q_{max} &=& - \\frac{\\Psi_{surface} - \\Psi_{soil}}{\\Delta z} K A_{cell} - \\\\ K &=& \\sqrt{K\\left(\\theta_{layer}\\right)K_{sat}} - \\\\ \\Delta z &=& z_{cell} - z_{layer center} - - - - - If the surface water is modeled by a distinct water storage, the - actual infiltration is given as the product of the potential - infiltration with the coverage of the surface water - cmf::upslope::Cell::surface_water_coverage - - .. math:: - - q_{act} = q_{max} - \\frac{A_{water}}{A_{cell}} - - If the surface water is no storage on its own, but just a water - distribution node, the actual infiltration is the minimum of the - potential infiltration and the current inflow (rain, snow melt) to the - surface - - .. math:: - - q_{act} = \\min\\left(q_{max}, - \\sum{q_{in,surfacewater}}\\right) - - C++ includes: infiltration.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - - def __init__(self, *args, **kwargs): - """ - __init__(cmf::upslope::connections::MatrixInfiltration self, cmf::upslope::SoilLayer::ptr soilwater, cmf::water::flux_node::ptr surfacewater) -> MatrixInfiltration - - MatrixInfiltration(cmf::upslope::SoilLayer::ptr soilwater, - cmf::water::flux_node::ptr surfacewater) - """ - _cmf_core.MatrixInfiltration_swiginit(self, _cmf_core.new_MatrixInfiltration(*args, **kwargs)) - - def use_for_cell(*args, **kwargs): - """use_for_cell(Cell c)""" - return _cmf_core.MatrixInfiltration_use_for_cell(*args, **kwargs) - - use_for_cell = staticmethod(use_for_cell) - __swig_destroy__ = _cmf_core.delete_MatrixInfiltration -MatrixInfiltration_swigregister = _cmf_core.MatrixInfiltration_swigregister -MatrixInfiltration_swigregister(MatrixInfiltration) - -def MatrixInfiltration_use_for_cell(*args, **kwargs): - """MatrixInfiltration_use_for_cell(Cell c)""" - return _cmf_core.MatrixInfiltration_use_for_cell(*args, **kwargs) - -class GreenAmptInfiltration(flux_connection): - """ - - - Connects the surfacewater and the most upper layer using a Green-Ampt - equation like infiltration. - - The Green-Ampt formula is given as: - - .. math:: - - q(t) = -K_s \\frac{dh}{dz} - A - - where: :math:`q(t)` is the infiltration rate in m3/day - - :math:`K_s` is the saturated conductivity in m/day - - :math:`\\frac{dh}{dz}` is the hydraulic gradient in the wetting front - - :math:`A` is the surface area of the cell - - The gradient in the wetting front is calculated as: - - - .. math:: - - \\frac{dh}{dz} = \\frac{h_f - h_0}{Z_f} = - \\frac{|\\Psi_f| + Z_f}{Z_f} - - where: :math:`h_f` is the hydraulic - head at the bottom of the wetting front in m - - :math:`h_0` is the hydraulic head at the surface in m - - :math:`Z_f` is the length of the wetting front in m - - Since :math:`Z_f` is unknown, the depth of the wetting front can be - approximated by: - - .. math:: - - Z_f = \\frac{F}{\\theta_s - - \\theta_i} - - with: :math:`F` the accumulated volume per area of - infiltrated water - - :math:`\\theta_s, \\theta_i` the volumetric water content at saturation - resp. at start of the infiltration - - If the surface water is modeled by a distinct water storage, the - actual infiltration is given as the product of the potential - infiltration with the coverage of the surface water - cmf::upslope::Cell::surface_water_coverage - - .. math:: - - q_{act} = q_{max} - \\frac{A_{water}}{A_{cell}} - - If the surface water is no storage on its own, but just a water - distribution node, the actual infiltration is the minimum of the - potential infiltration and the current inflow (rain, snow melt) to the - surface - - .. math:: - - q_{act} = \\min\\left(q_{max}, - \\sum{q_{in,surfacewater}}\\right) - - C++ includes: infiltration.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - - def __init__(self, *args, **kwargs): - """ - __init__(cmf::upslope::connections::GreenAmptInfiltration self, cmf::upslope::SoilLayer::ptr soilwater, cmf::water::flux_node::ptr surfacewater) -> GreenAmptInfiltration - - GreenAmptInfiltration(cmf::upslope::SoilLayer::ptr soilwater, - cmf::water::flux_node::ptr surfacewater) - """ - _cmf_core.GreenAmptInfiltration_swiginit(self, _cmf_core.new_GreenAmptInfiltration(*args, **kwargs)) - - def use_for_cell(*args, **kwargs): - """use_for_cell(Cell c)""" - return _cmf_core.GreenAmptInfiltration_use_for_cell(*args, **kwargs) - - use_for_cell = staticmethod(use_for_cell) - __swig_destroy__ = _cmf_core.delete_GreenAmptInfiltration -GreenAmptInfiltration_swigregister = _cmf_core.GreenAmptInfiltration_swigregister -GreenAmptInfiltration_swigregister(GreenAmptInfiltration) - -def GreenAmptInfiltration_use_for_cell(*args, **kwargs): - """GreenAmptInfiltration_use_for_cell(Cell c)""" - return _cmf_core.GreenAmptInfiltration_use_for_cell(*args, **kwargs) - -class SimpleInfiltration(flux_connection): - """ - - - Connects the surfacewater and the most upper layer using a simplified - infiltration model suitable for conceptional models. - - - - .. math:: - - q_{inf} = \\left(1-e_{sat}\\left(W, W_0\\right)\\right) - q_{inf,pot} - - where: :math:`q_{inf}` Effective infiltration from - surface to first layer (soil) - - :math:`e_{sat}(W, W_0)` Saturation excess, ranging from 0 (nowhere saturated - soil layer) to 1 (fully saturated). :math:`W` is the average wetness - calculated from the soil layer, :math:`W_0` is a parameter denoting the - wetness, where 50% of the layer is saturated using a sigmoidal - function: :math:`e_{sat}(W_{soil}, W_0) = \\left(1+e^{-(W-W_0)0.2(1-W_0)}\\right)^{-1}` - - :math:`q_{inf,pot}` is the potential infiltration, given by the incoming - fluxes limited by the saturated conductivity: :math:`q_{inf,pot} = \\min(q_{in}, K_{sat} A)` :math:`q_{in}` Sum of incoming fluxes to the - surfacewater in :math:`m^3/day` - - :math:`K_{sat}` Saturated conductivity in :math:`m/day` - - :math:`A` Cell area in :math:`m^2` - - C++ includes: infiltration.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - W0 = _swig_property(_cmf_core.SimpleInfiltration_W0_get, _cmf_core.SimpleInfiltration_W0_set) - - def __init__(self, *args, **kwargs): - """ - __init__(cmf::upslope::connections::SimpleInfiltration self, cmf::upslope::SoilLayer::ptr soilwater, cmf::water::flux_node::ptr surfacewater, real W0=0.9) -> SimpleInfiltration - - SimpleInfiltration(cmf::upslope::SoilLayer::ptr soilwater, - cmf::water::flux_node::ptr surfacewater, real W0=0.9) - - Creates the connection between surfacewater and first soil layer. - - Parameters: - ----------- - - soilwater: the infiltration target - - surfacewater: the infiltration source - - W0: the 50% saturation value - """ - _cmf_core.SimpleInfiltration_swiginit(self, _cmf_core.new_SimpleInfiltration(*args, **kwargs)) - - def use_for_cell(*args, **kwargs): - """use_for_cell(Cell c)""" - return _cmf_core.SimpleInfiltration_use_for_cell(*args, **kwargs) - - use_for_cell = staticmethod(use_for_cell) - __swig_destroy__ = _cmf_core.delete_SimpleInfiltration -SimpleInfiltration_swigregister = _cmf_core.SimpleInfiltration_swigregister -SimpleInfiltration_swigregister(SimpleInfiltration) - -def SimpleInfiltration_use_for_cell(*args, **kwargs): - """SimpleInfiltration_use_for_cell(Cell c)""" - return _cmf_core.SimpleInfiltration_use_for_cell(*args, **kwargs) - -class SWATPercolation(flux_connection): - """ - - - A tipping bucket percolation approach similar to the approach in SWAT. - - - - .. math:: - - q_{perc} &=& - V_{H_2O,drain}\\left(1-e^{-\\frac 1{-TT_{perc}}}\\right) - \\\\ TT_{perc} &=& \\frac{V_{pores,drain} - V_{field - cap.}}{K_{sat}} \\\\ V_{x,drain} &=& V_{x,drain} - V_{field cap.} - - - - - C++ includes: Percolation.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - - def use_for_cell(*args, **kwargs): - """use_for_cell(Cell cell, bool no_override=True)""" - return _cmf_core.SWATPercolation_use_for_cell(*args, **kwargs) - - use_for_cell = staticmethod(use_for_cell) - - def __init__(self, *args, **kwargs): - """ - __init__(cmf::upslope::connections::SWATPercolation self, cmf::upslope::SoilLayer::ptr upperLayer, cmf::upslope::SoilLayer::ptr lowerLayer) -> SWATPercolation - - SWATPercolation(cmf::upslope::SoilLayer::ptr upperLayer, - cmf::upslope::SoilLayer::ptr lowerLayer) - """ - _cmf_core.SWATPercolation_swiginit(self, _cmf_core.new_SWATPercolation(*args, **kwargs)) - __swig_destroy__ = _cmf_core.delete_SWATPercolation -SWATPercolation_swigregister = _cmf_core.SWATPercolation_swigregister -SWATPercolation_swigregister(SWATPercolation) - -def SWATPercolation_use_for_cell(*args, **kwargs): - """SWATPercolation_use_for_cell(Cell cell, bool no_override=True)""" - return _cmf_core.SWATPercolation_use_for_cell(*args, **kwargs) - -class Richards(flux_connection): - """ - - - Calculates flow according to the Richards equation. - - - - .. math:: - - q_{Richards} &=& - \\frac{\\Delta\\Psi_{tot}}{d} K(\\theta) A \\\\ - \\Psi_{tot} &= &\\Psi_{M}(\\theta) + h - - where - :math:`\\Delta\\Psi_{tot} [m]` is the difference of the total water - potentials of the two soil layers - - :math:`d [m]` is the distance between the two soil layers - - :math:`K(\\theta)\\left[\\frac m{day}\\right]` is the geometric - mean conductivity (see SoilType::Kunsat) - - :math:`A [m^2]` is the crosssectional area of the flux - - :math:`\\Psi_M(\\theta) [m]` is the matrix potential (see - SoilType::MatrixPotential) - - :math:`h [m]` is the height of a soil layer above sea level - - C++ includes: Percolation.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - - def __init__(self, *args, **kwargs): - """ - __init__(cmf::upslope::connections::Richards self, cmf::upslope::SoilLayer::ptr left, cmf::water::flux_node::ptr right) -> Richards - - Richards(cmf::upslope::SoilLayer::ptr left, cmf::water::flux_node::ptr - right) - - Creates a Richards equation connection between two soil layers (left - and right, rather top and bottom) of the same cell. - """ - _cmf_core.Richards_swiginit(self, _cmf_core.new_Richards(*args, **kwargs)) - - def use_for_cell(*args, **kwargs): - """use_for_cell(Cell cell, bool no_override=True)""" - return _cmf_core.Richards_use_for_cell(*args, **kwargs) - - use_for_cell = staticmethod(use_for_cell) - __swig_destroy__ = _cmf_core.delete_Richards -Richards_swigregister = _cmf_core.Richards_swigregister -Richards_swigregister(Richards) - -def Richards_use_for_cell(*args, **kwargs): - """Richards_use_for_cell(Cell cell, bool no_override=True)""" - return _cmf_core.Richards_use_for_cell(*args, **kwargs) - -class SimplRichards(flux_connection): - """ - - - Calculates flow according to a simplified Richards equation. - - - - .. math:: - - q_{Richards} &=& (K(\\theta) - K(\\theta_r)) - A \\\\ - - where :math:`d [m]` is the distance between - the two soil layers - - :math:`K(\\theta)\\left[\\frac m{day}\\right]` is the geometric - mean conductivity (see SoilType::Kunsat) - - :math:`A [m^2]` is the crosssectional area of the flux - - C++ includes: Percolation.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - - def __init__(self, *args, **kwargs): - """ - __init__(cmf::upslope::connections::SimplRichards self, cmf::upslope::SoilLayer::ptr left, cmf::water::flux_node::ptr right) -> SimplRichards - - SimplRichards(cmf::upslope::SoilLayer::ptr left, - cmf::water::flux_node::ptr right) - """ - _cmf_core.SimplRichards_swiginit(self, _cmf_core.new_SimplRichards(*args, **kwargs)) - - def use_for_cell(*args, **kwargs): - """use_for_cell(Cell cell, bool no_override=True)""" - return _cmf_core.SimplRichards_use_for_cell(*args, **kwargs) - - use_for_cell = staticmethod(use_for_cell) - __swig_destroy__ = _cmf_core.delete_SimplRichards -SimplRichards_swigregister = _cmf_core.SimplRichards_swigregister -SimplRichards_swigregister(SimplRichards) - -def SimplRichards_use_for_cell(*args, **kwargs): - """SimplRichards_use_for_cell(Cell cell, bool no_override=True)""" - return _cmf_core.SimplRichards_use_for_cell(*args, **kwargs) - -class FreeDrainagePercolation(flux_connection): - """ - - - Calculates a free drainage (unit gradient) from a layer to somewhere - else. - - - - .. math:: - - q = K(\\theta) A - - where: :math:`q` Flux from the layer to the - other side of the connection in :math:`m^3/day` - - :math:`K(\\theta)` Actual conductivity in :math:`m/day` depending on the water - content of the layer :math:`\\theta` - - :math:`A` Cell area in :math:`m^2` - - C++ includes: Percolation.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - - def __init__(self, *args, **kwargs): - """ - __init__(cmf::upslope::connections::FreeDrainagePercolation self, cmf::upslope::SoilLayer::ptr left, cmf::water::flux_node::ptr right) -> FreeDrainagePercolation - - FreeDrainagePercolation(cmf::upslope::SoilLayer::ptr left, - cmf::water::flux_node::ptr right) - """ - _cmf_core.FreeDrainagePercolation_swiginit(self, _cmf_core.new_FreeDrainagePercolation(*args, **kwargs)) - __swig_destroy__ = _cmf_core.delete_FreeDrainagePercolation -FreeDrainagePercolation_swigregister = _cmf_core.FreeDrainagePercolation_swigregister -FreeDrainagePercolation_swigregister(FreeDrainagePercolation) - -class LayerBypass(flux_connection): - """ - - - A simplification of macro pore flux for swelling soils. - - Connects the surfacewater of the cell with deeper layers, assuming the - presence of cracks. At saturation level of the target layer, the - cracks are closed - - .. math:: - - q_{crack} = K_{max,crack} - \\left(1-\\left(\\frac{w-w_0}{1-w_0}\\right)^\\beta\\right) - A - - where: :math:`q_{crack}` is the flux from the surface water to the - target layer in m3/day - - :math:`K_{max,crack}` is the maximum conductivity of the cracks in m/day - - :math:`w` is the actual wetness of the target layer - - :math:`w_0` is saturation, where the shrinkage of the cracks starts - - :math:`\\beta` is an empirical shape parameter of the crack size/wetness - relation - - :math:`A` is the area of the cell - - C++ includes: Percolation.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - Kmax = _swig_property(_cmf_core.LayerBypass_Kmax_get, _cmf_core.LayerBypass_Kmax_set) - w0 = _swig_property(_cmf_core.LayerBypass_w0_get, _cmf_core.LayerBypass_w0_set) - beta = _swig_property(_cmf_core.LayerBypass_beta_get, _cmf_core.LayerBypass_beta_set) - - def K(self, *args, **kwargs): - """ - K(LayerBypass self, real w) -> real - - real K(real w) - - the actual crack conductivity - - Parameters: - ----------- - - w: the wetness of the target layer - """ - return _cmf_core.LayerBypass_K(self, *args, **kwargs) - - - def __init__(self, *args, **kwargs): - """ - __init__(cmf::upslope::connections::LayerBypass self, cmf::water::flux_node::ptr left, cmf::upslope::SoilLayer::ptr right, real Kmax=100., real w0=0.0, real beta=1.0) -> LayerBypass - - LayerBypass(cmf::water::flux_node::ptr left, - cmf::upslope::SoilLayer::ptr right, real Kmax=100., real w0=0.0, real - beta=1.0) - - Creates a layer bypass connection. - - Parameters: - ----------- - - left: The source of the flux, usually the surfacewater of the cell - - right: The target soil layer - - Kmax: maximum conductivity of the cracks in m/day - - w0: is the actual wetness of the target layer - - beta: is an empirical shape parameter of the crack size/wetness - relation - """ - _cmf_core.LayerBypass_swiginit(self, _cmf_core.new_LayerBypass(*args, **kwargs)) - __swig_destroy__ = _cmf_core.delete_LayerBypass -LayerBypass.K = new_instancemethod(_cmf_core.LayerBypass_K, None, LayerBypass) -LayerBypass_swigregister = _cmf_core.LayerBypass_swigregister -LayerBypass_swigregister(LayerBypass) - -class RootUptakeStessFunction(object): - """ - - - An abstract class to calculate the actual transpiration from potential - transpiration. - - Implementations of WaterStressFunction are used by ET connections - derived from cmf::upslope::ET::stressedET - - C++ includes: waterstress.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - - def __init__(self, *args, **kwargs): - raise AttributeError("No constructor defined - class is abstract") - __repr__ = _swig_repr - - def Tact(self, *args, **kwargs): - """ - Tact(RootUptakeStessFunction self, stressedET connection, real Tpot) -> real - - virtual real Tact(const stressedET *connection, real Tpot) const =0 - - Calculates the water stress for a layer. - - Parameters: - ----------- - - connection: The stressedET connection this stress function belongs to - - Tpot: Potential Transpiration in mm/day (for the full profile) - - Actual flux from layer in m3/day - """ - return _cmf_core.RootUptakeStessFunction_Tact(self, *args, **kwargs) - - - def copy(self, *args, **kwargs): - """ - copy(RootUptakeStessFunction self) -> RootUptakeStessFunction - - virtual cmf::upslope::ET::RootUptakeStessFunction* copy() const =0 - - Creates a new copy of this wetness. - """ - return _cmf_core.RootUptakeStessFunction_copy(self, *args, **kwargs) - - - def to_string(self, *args, **kwargs): - """ - to_string(RootUptakeStessFunction self) -> std::string - - virtual - std::string to_string() const =0 - """ - return _cmf_core.RootUptakeStessFunction_to_string(self, *args, **kwargs) - - __swig_destroy__ = _cmf_core.delete_RootUptakeStessFunction -RootUptakeStessFunction.Tact = new_instancemethod(_cmf_core.RootUptakeStessFunction_Tact, None, RootUptakeStessFunction) -RootUptakeStessFunction.copy = new_instancemethod(_cmf_core.RootUptakeStessFunction_copy, None, RootUptakeStessFunction) -RootUptakeStessFunction.to_string = new_instancemethod(_cmf_core.RootUptakeStessFunction_to_string, None, RootUptakeStessFunction) -RootUptakeStessFunction_swigregister = _cmf_core.RootUptakeStessFunction_swigregister -RootUptakeStessFunction_swigregister(RootUptakeStessFunction) - -class SuctionStress(RootUptakeStessFunction): - """ - - - The classical suction depending transpiration Stress curve after - Feddes. - - The ability of roots to take water from the soil up is limited by the - suction pressure (matrix potential) of the soil. The stress is defined - using a trapezoid function, with P0 being the pressure, where water - uptake is prohibited by saturation. Between P0 and P1 the saturation - stress gets lower. Between P1 and P2, no stress occurs ( ET=ETpot) and - with a pressure below P2, water uptake is limited by drought. P3 - indicates the highest suction (lowest pressure) to which plants can - extract water (wilting point). - - Default values: :math:`P_0 = \\infty, P_1=\\infty, P_2=-5m, P_3=-160m`, - resulting in no saturation stress and draught stress starting at -5m - and a wilting point of -160m. - - If one would like to include saturation stress, typical values for P0 - and P1 are 0.0m and 0.1m. By changing P2 and P3, you can account for - different drought sensibility for different plant types. - - C++ includes: waterstress.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - P0 = _swig_property(_cmf_core.SuctionStress_P0_get, _cmf_core.SuctionStress_P0_set) - P1 = _swig_property(_cmf_core.SuctionStress_P1_get, _cmf_core.SuctionStress_P1_set) - P2 = _swig_property(_cmf_core.SuctionStress_P2_get, _cmf_core.SuctionStress_P2_set) - P3 = _swig_property(_cmf_core.SuctionStress_P3_get, _cmf_core.SuctionStress_P3_set) - - def __init__(self, *args): - """ - __init__(cmf::upslope::ET::SuctionStress self, real P0=1e308, real P1=1e307, real P2=-5, real P3=-160) -> SuctionStress - __init__(cmf::upslope::ET::SuctionStress self, SuctionStress other) -> SuctionStress - - SuctionStress(const SuctionStress &other) - """ - _cmf_core.SuctionStress_swiginit(self, _cmf_core.new_SuctionStress(*args)) - - def copy(self, *args, **kwargs): - """ - copy(SuctionStress self) -> SuctionStress - - cmf::upslope::ET::SuctionStress* copy() const - - Creates a new copy of this wetness. - """ - return _cmf_core.SuctionStress_copy(self, *args, **kwargs) - - __swig_destroy__ = _cmf_core.delete_SuctionStress -SuctionStress.copy = new_instancemethod(_cmf_core.SuctionStress_copy, None, SuctionStress) -SuctionStress_swigregister = _cmf_core.SuctionStress_swigregister -SuctionStress_swigregister(SuctionStress) - -class ContentStress(RootUptakeStessFunction): - """ - - - A simple water content based stress model based on Feddes (1978) - - stress a is piecewise linear function based on water content - - if :math:`\\theta>\\theta_d \\rightarrow ET = ET_{pot}` - - if :math:`\\theta_d>\\theta > \\theta_{wilt} \\rightarrow ET = \\frac{\\theta_d - \\theta}{\\theta_d - \\theta_{wilt}} ET_{pot}` - - if :math:`\\theta_{wilt}>\\theta \\rightarrow ET = 0.0` - - The parameters :math:`\\theta_{d,w}` can be omitted (or set to a negative - value) to use default values derived from the layer properties. The - critical water content (where stress starts) is then defined (conf. - Feddes 1978) as the center between field capacity ( :math:`\\theta_{fc}`) - and the wilting point ( :math:`\\theta_{wp}`). :math:`\\theta_w = \\theta(pF=4.2)`: Water content at pF=4.2 - - :math:`\\theta_d = 1/2 (\\theta(pF=1.8) + \\theta(pF=4.2))` - - C++ includes: waterstress.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - theta_d = _swig_property(_cmf_core.ContentStress_theta_d_get, _cmf_core.ContentStress_theta_d_set) - theta_w = _swig_property(_cmf_core.ContentStress_theta_w_get, _cmf_core.ContentStress_theta_w_set) - - def copy(self, *args, **kwargs): - """ - copy(ContentStress self) -> ContentStress - - cmf::upslope::ET::ContentStress* copy() const - - Creates a new copy of this wetness. - """ - return _cmf_core.ContentStress_copy(self, *args, **kwargs) - - - def __init__(self, *args, **kwargs): - """ - __init__(cmf::upslope::ET::ContentStress self, real theta_d=-1, real theta_w=-1) -> ContentStress - - ContentStress(real theta_d=-1, real theta_w=-1) - - Creates a new ContentStress for critical water content theta_d in vol - Water/vol Soil and wilting point theta_w. - """ - _cmf_core.ContentStress_swiginit(self, _cmf_core.new_ContentStress(*args, **kwargs)) - __swig_destroy__ = _cmf_core.delete_ContentStress -ContentStress.copy = new_instancemethod(_cmf_core.ContentStress_copy, None, ContentStress) -ContentStress_swigregister = _cmf_core.ContentStress_swigregister -ContentStress_swigregister(ContentStress) - -class VolumeStress(RootUptakeStessFunction): - """ - - - A WaterStressFunction based on the stored water volume of a layer. - - If the layer contains more water than V1, ET is not limited ( - ET=ETpot). Below V1 ET goes linear to 0.0 at V0 - - C++ includes: waterstress.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - V1 = _swig_property(_cmf_core.VolumeStress_V1_get, _cmf_core.VolumeStress_V1_set) - V0 = _swig_property(_cmf_core.VolumeStress_V0_get, _cmf_core.VolumeStress_V0_set) - - def __init__(self, *args): - """ - __init__(cmf::upslope::ET::VolumeStress self, real V1, real V0) -> VolumeStress - __init__(cmf::upslope::ET::VolumeStress self, VolumeStress other) -> VolumeStress - - VolumeStress(const VolumeStress &other) - """ - _cmf_core.VolumeStress_swiginit(self, _cmf_core.new_VolumeStress(*args)) - - def copy(self, *args, **kwargs): - """ - copy(VolumeStress self) -> VolumeStress - - cmf::upslope::ET::VolumeStress* copy() const - - Creates a new copy of this wetness. - """ - return _cmf_core.VolumeStress_copy(self, *args, **kwargs) - - __swig_destroy__ = _cmf_core.delete_VolumeStress -VolumeStress.copy = new_instancemethod(_cmf_core.VolumeStress_copy, None, VolumeStress) -VolumeStress_swigregister = _cmf_core.VolumeStress_swigregister -VolumeStress_swigregister(VolumeStress) - -class log_wind_profile(aerodynamic_resistance): - """ - - - , A logarithmic wind profile - - Todo Cite literature for this windprofile and insert equation - - C++ includes: ET.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - - def __init__(self, *args, **kwargs): - """ - __init__(cmf::atmosphere::log_wind_profile self, Cell _cell) -> log_wind_profile - - log_wind_profile(cmf::upslope::Cell &_cell) - """ - _cmf_core.log_wind_profile_swiginit(self, _cmf_core.new_log_wind_profile(*args, **kwargs)) - __swig_destroy__ = _cmf_core.delete_log_wind_profile -log_wind_profile_swigregister = _cmf_core.log_wind_profile_swigregister -log_wind_profile_swigregister(log_wind_profile) - -class transpiration_method(object): - """ - - - Abstract class. Child classes are defining a method for transpiration - calculation. - - C++ includes: ET.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - - def __init__(self, *args, **kwargs): - raise AttributeError("No constructor defined - class is abstract") - __repr__ = _swig_repr - - def transp_from_layer(self, *args, **kwargs): - """ - transp_from_layer(transpiration_method self, cmf::upslope::SoilLayer::ptr arg2, Time t) -> double - - virtual - double transp_from_layer(cmf::upslope::SoilLayer::ptr, cmf::math::Time - t)=0 - - returns the transpiration rate from one layer in m3/day - """ - return _cmf_core.transpiration_method_transp_from_layer(self, *args, **kwargs) - - __swig_destroy__ = _cmf_core.delete_transpiration_method -transpiration_method.transp_from_layer = new_instancemethod(_cmf_core.transpiration_method_transp_from_layer, None, transpiration_method) -transpiration_method_swigregister = _cmf_core.transpiration_method_swigregister -transpiration_method_swigregister(transpiration_method) - -class soil_evaporation_method(object): - """ - - - Abstract class. Child classes are defining a method for soil - evaporation calculation. - - C++ includes: ET.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - - def __init__(self, *args, **kwargs): - raise AttributeError("No constructor defined - class is abstract") - __repr__ = _swig_repr - - def evap_from_layer(self, *args, **kwargs): - """ - evap_from_layer(soil_evaporation_method self, cmf::upslope::SoilLayer::ptr arg2, Time t) -> double - - virtual - double evap_from_layer(cmf::upslope::SoilLayer::ptr, cmf::math::Time - t)=0 - - returns the soil evaporation rate from one layer in m3/day - """ - return _cmf_core.soil_evaporation_method_evap_from_layer(self, *args, **kwargs) - - __swig_destroy__ = _cmf_core.delete_soil_evaporation_method -soil_evaporation_method.evap_from_layer = new_instancemethod(_cmf_core.soil_evaporation_method_evap_from_layer, None, soil_evaporation_method) -soil_evaporation_method_swigregister = _cmf_core.soil_evaporation_method_swigregister -soil_evaporation_method_swigregister(soil_evaporation_method) - -class surface_water_evaporation_method(object): - """ - - - Abstract class. Child classes are defining a method for surface water - evaporation calculation. - - C++ includes: ET.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - - def __init__(self, *args, **kwargs): - raise AttributeError("No constructor defined - class is abstract") - __repr__ = _swig_repr - - def evap_from_openwater(self, *args, **kwargs): - """ - evap_from_openwater(surface_water_evaporation_method self, cmf::river::OpenWaterStorage::ptr arg2, Time arg3) -> double - - virtual double - evap_from_openwater(cmf::river::OpenWaterStorage::ptr, - cmf::math::Time)=0 - """ - return _cmf_core.surface_water_evaporation_method_evap_from_openwater(self, *args, **kwargs) - - __swig_destroy__ = _cmf_core.delete_surface_water_evaporation_method -surface_water_evaporation_method.evap_from_openwater = new_instancemethod(_cmf_core.surface_water_evaporation_method_evap_from_openwater, None, surface_water_evaporation_method) -surface_water_evaporation_method_swigregister = _cmf_core.surface_water_evaporation_method_swigregister -surface_water_evaporation_method_swigregister(surface_water_evaporation_method) - -class canopy_evaporation_method(object): - """ - - - Abstract class. Child classes are defining a method for intercepted - canopy water evaporation calculation. - - C++ includes: ET.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - - def __init__(self, *args, **kwargs): - raise AttributeError("No constructor defined - class is abstract") - __repr__ = _swig_repr - - def evap_from_canopy(self, *args, **kwargs): - """ - evap_from_canopy(canopy_evaporation_method self, cmf::water::WaterStorage::ptr arg2, Time arg3) -> double - - virtual double evap_from_canopy(cmf::water::WaterStorage::ptr, - cmf::math::Time)=0 - """ - return _cmf_core.canopy_evaporation_method_evap_from_canopy(self, *args, **kwargs) - - __swig_destroy__ = _cmf_core.delete_canopy_evaporation_method -canopy_evaporation_method.evap_from_canopy = new_instancemethod(_cmf_core.canopy_evaporation_method_evap_from_canopy, None, canopy_evaporation_method) -canopy_evaporation_method_swigregister = _cmf_core.canopy_evaporation_method_swigregister -canopy_evaporation_method_swigregister(canopy_evaporation_method) - -class snow_evaporation_method(object): - """ - - - Abstract class. Child classes are defining a method for snow - evaporation calculation. - - C++ includes: ET.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - - def __init__(self, *args, **kwargs): - raise AttributeError("No constructor defined - class is abstract") - __repr__ = _swig_repr - - def evap_from_snow(self, *args, **kwargs): - """ - evap_from_snow(snow_evaporation_method self, cmf::water::WaterStorage::ptr snow, Time t) -> double - - virtual - double evap_from_snow(cmf::water::WaterStorage::ptr snow, - cmf::math::Time t)=0 - """ - return _cmf_core.snow_evaporation_method_evap_from_snow(self, *args, **kwargs) - - __swig_destroy__ = _cmf_core.delete_snow_evaporation_method -snow_evaporation_method.evap_from_snow = new_instancemethod(_cmf_core.snow_evaporation_method_evap_from_snow, None, snow_evaporation_method) -snow_evaporation_method_swigregister = _cmf_core.snow_evaporation_method_swigregister -snow_evaporation_method_swigregister(snow_evaporation_method) - -class transpiration(flux_connection): - """ - - - Flux connection using a transpiration_method. - - C++ includes: ET.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - - def __init__(self, *args, **kwargs): - """ - __init__(cmf::upslope::ET::transpiration self, cmf::upslope::SoilLayer::ptr source, cmf::water::flux_node::ptr ET_target, std::shared_ptr< cmf::upslope::ET::transpiration_method > _method, std::string method_name) -> transpiration - - transpiration(cmf::upslope::SoilLayer::ptr source, - cmf::water::flux_node::ptr ET_target, std::shared_ptr< - transpiration_method > _method, std::string method_name) - """ - _cmf_core.transpiration_swiginit(self, _cmf_core.new_transpiration(*args, **kwargs)) - __swig_destroy__ = _cmf_core.delete_transpiration -transpiration_swigregister = _cmf_core.transpiration_swigregister -transpiration_swigregister(transpiration) - -class soil_evaporation(flux_connection): - """ - - - Flux_connection using a soil_evaporation_method. - - C++ includes: ET.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - - def __init__(self, *args, **kwargs): - """ - __init__(cmf::upslope::ET::soil_evaporation self, cmf::upslope::SoilLayer::ptr source, cmf::water::flux_node::ptr ET_target, std::shared_ptr< cmf::upslope::ET::soil_evaporation_method > _method, std::string method_name) -> soil_evaporation - - soil_evaporation(cmf::upslope::SoilLayer::ptr source, - cmf::water::flux_node::ptr ET_target, std::shared_ptr< - soil_evaporation_method > _method, std::string method_name) - """ - _cmf_core.soil_evaporation_swiginit(self, _cmf_core.new_soil_evaporation(*args, **kwargs)) - __swig_destroy__ = _cmf_core.delete_soil_evaporation -soil_evaporation_swigregister = _cmf_core.soil_evaporation_swigregister -soil_evaporation_swigregister(soil_evaporation) - -class canopy_evaporation(flux_connection): - """ - - - Flux connection using a canopy_evaporation_method. - - C++ includes: ET.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - - def __init__(self, *args, **kwargs): - """ - __init__(cmf::upslope::ET::canopy_evaporation self, cmf::water::WaterStorage::ptr source, cmf::water::flux_node::ptr ET_target, std::shared_ptr< cmf::upslope::ET::canopy_evaporation_method > _method, std::string method_name) -> canopy_evaporation - - canopy_evaporation(cmf::water::WaterStorage::ptr source, - cmf::water::flux_node::ptr ET_target, std::shared_ptr< - canopy_evaporation_method > _method, std::string method_name) - """ - _cmf_core.canopy_evaporation_swiginit(self, _cmf_core.new_canopy_evaporation(*args, **kwargs)) - __swig_destroy__ = _cmf_core.delete_canopy_evaporation -canopy_evaporation_swigregister = _cmf_core.canopy_evaporation_swigregister -canopy_evaporation_swigregister(canopy_evaporation) - -class snow_evaporation(flux_connection): - """ - - - Flux connection using a snow_evaporation_method. - - C++ includes: ET.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - - def __init__(self, *args, **kwargs): - """ - __init__(cmf::upslope::ET::snow_evaporation self, cmf::water::WaterStorage::ptr source, cmf::water::flux_node::ptr ET_target, std::shared_ptr< cmf::upslope::ET::snow_evaporation_method > _method, std::string method_name) -> snow_evaporation - - snow_evaporation(cmf::water::WaterStorage::ptr source, - cmf::water::flux_node::ptr ET_target, std::shared_ptr< - snow_evaporation_method > _method, std::string method_name) - """ - _cmf_core.snow_evaporation_swiginit(self, _cmf_core.new_snow_evaporation(*args, **kwargs)) - __swig_destroy__ = _cmf_core.delete_snow_evaporation -snow_evaporation_swigregister = _cmf_core.snow_evaporation_swigregister -snow_evaporation_swigregister(snow_evaporation) - -class surface_water_evaporation(flux_connection): - """ - - - Flux connection using an surface_water_evaporation_method. - - C++ includes: ET.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - - def __init__(self, *args, **kwargs): - """ - __init__(cmf::upslope::ET::surface_water_evaporation self, cmf::river::OpenWaterStorage::ptr source, cmf::water::flux_node::ptr ET_target, std::shared_ptr< cmf::upslope::ET::surface_water_evaporation_method > _method, std::string method_name) -> surface_water_evaporation - - surface_water_evaporation(cmf::river::OpenWaterStorage::ptr source, - cmf::water::flux_node::ptr ET_target, std::shared_ptr< - surface_water_evaporation_method > _method, std::string method_name) - - """ - _cmf_core.surface_water_evaporation_swiginit(self, _cmf_core.new_surface_water_evaporation(*args, **kwargs)) - __swig_destroy__ = _cmf_core.delete_surface_water_evaporation -surface_water_evaporation_swigregister = _cmf_core.surface_water_evaporation_swigregister -surface_water_evaporation_swigregister(surface_water_evaporation) - - -def PenmanMonteith(*args): - """ - PenmanMonteith(real Rn, real ra, real rs, real T, real vap_press_deficit) -> real - PenmanMonteith(Weather A, Vegetation veg, double h) -> real - - real - cmf::upslope::ET::PenmanMonteith(cmf::atmosphere::Weather A, const - cmf::upslope::vegetation::Vegetation &veg, double h) - - Returns the potential ET after Penman-Monteith using some - simplifications for a weather and a vegetation object. - - aerodynamic and surface resistances, and a vapor pressure deficit - - Parameters: - ----------- - - A: Current weather - - veg: Vegetation data - - h: Height above sea level in m (for air pressure estimation) - """ - return _cmf_core.PenmanMonteith(*args) -class stressedET(flux_connection): - """ - - - An abstract base class for ET Methods with a WaterStressFunction. - - C++ includes: ET.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - - def __init__(self, *args, **kwargs): - raise AttributeError("No constructor defined - class is abstract") - __repr__ = _swig_repr - - def set_stressfunction(self, *args, **kwargs): - """ - set_stressfunction(stressedET self, RootUptakeStessFunction stressfunction) - - void - set_stressfunction(const RootUptakeStessFunction &stressfunction) - - Sets the stress function to limit water uptake. - """ - return _cmf_core.stressedET_set_stressfunction(self, *args, **kwargs) - - - def get_layer(self, *args, **kwargs): - """ - get_layer(stressedET self) -> cmf::upslope::SoilLayer::ptr - - SoilLayer::ptr get_layer() const - """ - return _cmf_core.stressedET_get_layer(self, *args, **kwargs) - - - def ETpot(self, *args, **kwargs): - """ - ETpot(stressedET self, Time t) -> real - - virtual - real ETpot(cmf::math::Time t) const - """ - return _cmf_core.stressedET_ETpot(self, *args, **kwargs) - - __swig_destroy__ = _cmf_core.delete_stressedET -stressedET.set_stressfunction = new_instancemethod(_cmf_core.stressedET_set_stressfunction, None, stressedET) -stressedET.get_layer = new_instancemethod(_cmf_core.stressedET_get_layer, None, stressedET) -stressedET.ETpot = new_instancemethod(_cmf_core.stressedET_ETpot, None, stressedET) -stressedET_swigregister = _cmf_core.stressedET_swigregister -stressedET_swigregister(stressedET) - -class constantETpot(stressedET): - """ - - - A constant evapotranspiration. - - Uses a constant measured or elsewhere modelled ETpot. Actual - Evapotranspiration is calculated from rootdepth and actual matrix - potential in the layers using Tact. The value of ETpot can be changed - during runtime - - C++ includes: ET.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - ETpot_value = _swig_property(_cmf_core.constantETpot_ETpot_value_get, _cmf_core.constantETpot_ETpot_value_set) - - def GetETpot(self, *args, **kwargs): - """ - GetETpot(constantETpot self, Time t) -> real - - real GetETpot(cmf::math::Time t) const - """ - return _cmf_core.constantETpot_GetETpot(self, *args, **kwargs) - - - def __init__(self, *args, **kwargs): - """ - __init__(cmf::upslope::ET::constantETpot self, cmf::upslope::SoilLayer::ptr source, cmf::water::flux_node::ptr ET_target, double constantETpot_value) -> constantETpot - - constantETpot(cmf::upslope::SoilLayer::ptr source, - cmf::water::flux_node::ptr ET_target, double constantETpot_value) - """ - _cmf_core.constantETpot_swiginit(self, _cmf_core.new_constantETpot(*args, **kwargs)) - __swig_destroy__ = _cmf_core.delete_constantETpot -constantETpot.GetETpot = new_instancemethod(_cmf_core.constantETpot_GetETpot, None, constantETpot) -constantETpot_swigregister = _cmf_core.constantETpot_swigregister -constantETpot_swigregister(constantETpot) - -class timeseriesETpot(stressedET): - """ - - - A timeseries driven evapotranspiration. - - Uses a timeseries of measured or elsewhere modelled ETpot. Actual - Evapotranspiration is calculated from rootdepth and actual matrix - potential in the layers using Tact. The value of ETpot can be changed - during runtime - - C++ includes: ET.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - ETpot_data = _swig_property(_cmf_core.timeseriesETpot_ETpot_data_get, _cmf_core.timeseriesETpot_ETpot_data_set) - - def __init__(self, *args, **kwargs): - """ - __init__(cmf::upslope::ET::timeseriesETpot self, cmf::upslope::SoilLayer::ptr source, cmf::water::flux_node::ptr ET_target, timeseries ETpot_values) -> timeseriesETpot - - timeseriesETpot(cmf::upslope::SoilLayer::ptr source, - cmf::water::flux_node::ptr ET_target, cmf::math::timeseries - ETpot_values) - """ - _cmf_core.timeseriesETpot_swiginit(self, _cmf_core.new_timeseriesETpot(*args, **kwargs)) - __swig_destroy__ = _cmf_core.delete_timeseriesETpot -timeseriesETpot_swigregister = _cmf_core.timeseriesETpot_swigregister -timeseriesETpot_swigregister(timeseriesETpot) - -class PenmanMonteithET(stressedET): - """ - - - Calculates the potential evapotranspiration according to FAO(1998) - - Governing equations: - - .. math:: - - \\lambda ET &=& - \\frac{\\Delta\\left(R_n - G\\right)+\\rho_a c_p - \\frac{e_s - e_a}{r_a}}{\\Delta + - \\gamma\\left(1+\\frac{r_s}{r_a}\\right)} \\mbox{ FAO 1998, - Eq. 3} \\\\ \\mbox{With:} \\\\ \\Delta &=& 4098 - \\frac{0.6108 e^{17.27 T}}{(T+237.3)^2} \\frac{kPa}{^\\circ C} - \\mbox{ (FAO 1998, Eq. 13)} \\\\ T &=& \\mbox{Actual - Temperature in } ^\\circ C \\\\ R_n &=& \\mbox{net Radiation - (see Atmosphere) in } \\frac{MJ}{m^2day} \\\\ G &=& 0 \\ - \\frac{MJ}{m^2day} \\mbox{ if daily average (FAO 1998, Eq. 42)} - \\\\ && 0.1 R_n \\ \\mbox{ if day time (FAO 1998, Eq. 45)} - \\\\ && 0.5 R_n \\ \\mbox{ if night time (FAO 1998, Eq. 46)} - \\\\ \\gamma &=& \\frac{c_p P}{\\epsilon \\lambda} - \\mbox{ (FAO 1998,Eq. 8): Psychrometric constant } - \\frac{kPa}{^\\circ C} \\\\ c_p &=& 0.001013 - \\frac{MJ}{kg\\ ^\\circ C}\\mbox{ specific heat at constant - pressure } \\\\ P &=& 101.3 - \\left(\\frac{293-0.0065z}{293}\\right)^{5.26} \\mbox{ (FAO - 1998,Eq. 7)} \\\\ \\epsilon &=& 0.622 \\frac{mol/g \\mbox{ - vapor}}{mol/g \\mbox{ liquid water}} \\\\ \\lambda &=& 2.45 - \\frac{MJ}{kg} \\mbox{ (FAO 1998,Eq. 8)} \\\\ R &=& 0.287 - \\frac{kJ}{kg\\ k}\\mbox{ Spec. gas const.} \\\\ \\rho_a - &=& \\frac{P}{1.01(T+273)R} \\mbox{ (FAO 1998,Box. 6)} \\\\ - e_s &=& \\mbox{ Sat. vapor press. } [kPa] \\\\ e_a &=& \\mbox{ - Act. vapor press. } [kPa] \\\\ r_a &=& - \\frac{\\ln\\left(\\frac{2-d}{z_{om}}\\right)\\ln\\left(\\frac{2-d}{z_{oh}}\\right)}{k^2 - u_2} \\mbox{ (FAO 1998, Eq. 4/Box 4} \\frac s m \\\\ && - d=\\frac 2 3 h,z_{om}=0.123 h,z_{oh}=0.1 z_{om}, k=0.41 \\\\ h - &=& \\mbox{ Vegetation height in }m \\\\ u_2 &=& \\mbox{ - Windspeed in 2m above canopy } \\frac m s \\\\ r_s &=& - \\frac{r_l}{LAI_{Active}} \\mbox{ (FAO 1998, Eq. 5/Box 5)} - \\frac s m \\\\ && r_l=100 \\frac s m, LAI_{Active}=0.5 LAI - - - - - C++ includes: ET.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - daily = _swig_property(_cmf_core.PenmanMonteithET_daily_get, _cmf_core.PenmanMonteithET_daily_set) - - def __init__(self, *args, **kwargs): - """ - __init__(cmf::upslope::ET::PenmanMonteithET self, cmf::upslope::SoilLayer::ptr source, cmf::water::flux_node::ptr ET_target) -> PenmanMonteithET - - PenmanMonteithET(cmf::upslope::SoilLayer::ptr source, - cmf::water::flux_node::ptr ET_target) - """ - _cmf_core.PenmanMonteithET_swiginit(self, _cmf_core.new_PenmanMonteithET(*args, **kwargs)) - - def r_s(*args, **kwargs): - """r_s(Vegetation veg) -> real""" - return _cmf_core.PenmanMonteithET_r_s(*args, **kwargs) - - r_s = staticmethod(r_s) - - def r_a(*args, **kwargs): - """r_a(Weather A, real veg_height) -> real""" - return _cmf_core.PenmanMonteithET_r_a(*args, **kwargs) - - r_a = staticmethod(r_a) - - def use_for_cell(*args, **kwargs): - """use_for_cell(Cell cell)""" - return _cmf_core.PenmanMonteithET_use_for_cell(*args, **kwargs) - - use_for_cell = staticmethod(use_for_cell) - __swig_destroy__ = _cmf_core.delete_PenmanMonteithET -PenmanMonteithET_swigregister = _cmf_core.PenmanMonteithET_swigregister -PenmanMonteithET_swigregister(PenmanMonteithET) - -def PenmanMonteithET_r_s(*args, **kwargs): - """PenmanMonteithET_r_s(Vegetation veg) -> real""" - return _cmf_core.PenmanMonteithET_r_s(*args, **kwargs) - -def PenmanMonteithET_r_a(*args, **kwargs): - """PenmanMonteithET_r_a(Weather A, real veg_height) -> real""" - return _cmf_core.PenmanMonteithET_r_a(*args, **kwargs) - -def PenmanMonteithET_use_for_cell(*args, **kwargs): - """PenmanMonteithET_use_for_cell(Cell cell)""" - return _cmf_core.PenmanMonteithET_use_for_cell(*args, **kwargs) - -class PriestleyTaylorET(stressedET): - """ - - - Calculates the Evapotranspiration using Priestley-Taylor equation. - - - - .. math:: - - lambda ET &=& \\alpha \\frac{\\Delta}{\\Delta + - \\gamma} \\left(R_n - G\\right) - - where: :math:`\\Delta = 4098 \\frac{0.6108 e^{17.27 T}}{(T+237.3)^2} \\frac{kPa}{^\\circ C}`, - the slope of the vapor pressure/ temperature curve - - :math:`\\gamma = \\frac{c_p P}{\\epsilon \\lambda} \\frac{kPa}{^\\circ C}` Psychrometric constant - - :math:`\\lambda = 2.45 \\frac{MJ}{kg}` the latent heat of vaporization - - :math:`R_n \\frac{MJ}{m^2day}` net Radiation (see Atmosphere) - - :math:`G` Ground heat flux - - :math:`\\alpha` the Priestley-Taylor constant (default 1.26 for humid - climates) - - C++ includes: ET.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - daily = _swig_property(_cmf_core.PriestleyTaylorET_daily_get, _cmf_core.PriestleyTaylorET_daily_set) - alpha = _swig_property(_cmf_core.PriestleyTaylorET_alpha_get, _cmf_core.PriestleyTaylorET_alpha_set) - - def __init__(self, *args, **kwargs): - """ - __init__(cmf::upslope::ET::PriestleyTaylorET self, cmf::upslope::SoilLayer::ptr source, cmf::water::flux_node::ptr ET_target, real alpha=1.26) -> PriestleyTaylorET - - PriestleyTaylorET(cmf::upslope::SoilLayer::ptr source, - cmf::water::flux_node::ptr ET_target, real alpha=1.26) - """ - _cmf_core.PriestleyTaylorET_swiginit(self, _cmf_core.new_PriestleyTaylorET(*args, **kwargs)) - - def use_for_cell(*args, **kwargs): - """use_for_cell(Cell cell)""" - return _cmf_core.PriestleyTaylorET_use_for_cell(*args, **kwargs) - - use_for_cell = staticmethod(use_for_cell) - __swig_destroy__ = _cmf_core.delete_PriestleyTaylorET -PriestleyTaylorET_swigregister = _cmf_core.PriestleyTaylorET_swigregister -PriestleyTaylorET_swigregister(PriestleyTaylorET) - -def PriestleyTaylorET_use_for_cell(*args, **kwargs): - """PriestleyTaylorET_use_for_cell(Cell cell)""" - return _cmf_core.PriestleyTaylorET_use_for_cell(*args, **kwargs) - -class HargreaveET(stressedET): - """ - - - Calculates the Evapotranspiration using Hargreave's equation. - - - - .. math:: - - ET_{rc} = 0.0135 K_T\\ s_0 \\sqrt{\\Delta T} (T + - 17.8) - - where: :math:`ET_{rc}` the reference crop evapotranspiration - in mm/day - - :math:`K_T = 0.00185{\\Delta T}^2 - 0.0433 \\Delta T + 0.4023` - Continentality factor as given in the reference - - :math:`\\Delta T = |T_{max} - T_{min}|[K]` Daily temperature range - - :math:`T [^\\circ C]` daily mean temperature - - :math:`s_0 = 15.392 d_r \\left(\\omega_s\\sin(\\Phi) \\sin{\\gamma} + \\cos{\\Phi}\\cos{\\gamma} * \\sin(\\omega_s)\\right)` the extraterrestrial solar radiation - in mm/day - - :math:`d_r = 1 + 0.0033 \\cos(DOY\\frac{2 \\pi}{365})` relative - distance between earth and sun - - :math:`\\omega_s = \\arccos(-\\tan{\\Phi} \\tan{\\gamma})` - sunset hour angle (radians) - - :math:`\\gamma = 0.4039 \\sin(DOY\\frac{2 \\pi}{365} - 1.405)` - solar declination (radians) - - :math:`\\Phi` geographic latitude (radians) - - See: SAMANI, Zohrab.Estimating solar radiation and evapotranspiration - using minimum climatological data. Journal of Irrigation and Drainage - Engineering, 2000, 126. Jg., Nr. 4, S. 265-267. Crop specific - potential evapotranspiration is scaled by LAI: :math:`ET_{pot} = ET_{rc} \\frac{LAI}{2.88}`. - - C++ includes: ET.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - - def __init__(self, *args, **kwargs): - """ - __init__(cmf::upslope::ET::HargreaveET self, cmf::upslope::SoilLayer::ptr source, cmf::water::flux_node::ptr ET_target, real latitude=51.0) -> HargreaveET - - HargreaveET(cmf::upslope::SoilLayer::ptr source, - cmf::water::flux_node::ptr ET_target, real latitude=51.0) - """ - _cmf_core.HargreaveET_swiginit(self, _cmf_core.new_HargreaveET(*args, **kwargs)) - lat = _swig_property(_cmf_core.HargreaveET_lat_get, _cmf_core.HargreaveET_lat_set) - - def use_for_cell(*args, **kwargs): - """use_for_cell(Cell cell)""" - return _cmf_core.HargreaveET_use_for_cell(*args, **kwargs) - - use_for_cell = staticmethod(use_for_cell) - __swig_destroy__ = _cmf_core.delete_HargreaveET -HargreaveET_swigregister = _cmf_core.HargreaveET_swigregister -HargreaveET_swigregister(HargreaveET) - -def HargreaveET_use_for_cell(*args, **kwargs): - """HargreaveET_use_for_cell(Cell cell)""" - return _cmf_core.HargreaveET_use_for_cell(*args, **kwargs) - -class TurcET(stressedET): - """ - - - Calculates ETpot after Turc (DVWK). - - ETact is calculated using a WaterStressFunction - - :math:`ET_{pot,Turc} = 0.0031 C (R_G + 209) \\frac{T}{T + 15}` - - C++ includes: ET.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - - def __init__(self, *args, **kwargs): - """ - __init__(cmf::upslope::ET::TurcET self, cmf::upslope::SoilLayer::ptr source, cmf::water::flux_node::ptr ET_target) -> TurcET - - TurcET(cmf::upslope::SoilLayer::ptr source, cmf::water::flux_node::ptr - ET_target) - """ - _cmf_core.TurcET_swiginit(self, _cmf_core.new_TurcET(*args, **kwargs)) - - def use_for_cell(*args, **kwargs): - """use_for_cell(Cell cell)""" - return _cmf_core.TurcET_use_for_cell(*args, **kwargs) - - use_for_cell = staticmethod(use_for_cell) - __swig_destroy__ = _cmf_core.delete_TurcET -TurcET_swigregister = _cmf_core.TurcET_swigregister -TurcET_swigregister(TurcET) - -def TurcET_use_for_cell(*args, **kwargs): - """TurcET_use_for_cell(Cell cell)""" - return _cmf_core.TurcET_use_for_cell(*args, **kwargs) - -class CanopyStorageEvaporation(flux_connection): - """ - - - Calculates the evaporation from a canopy storage. - - C++ includes: ET.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - - def __init__(self, *args, **kwargs): - """ - __init__(cmf::upslope::ET::CanopyStorageEvaporation self, cmf::water::WaterStorage::ptr CanopyStorage, cmf::water::flux_node::ptr ET_target, Cell cell) -> CanopyStorageEvaporation - - CanopyStorageEvaporation(cmf::water::WaterStorage::ptr CanopyStorage, - cmf::water::flux_node::ptr ET_target, cmf::upslope::Cell &cell) - """ - _cmf_core.CanopyStorageEvaporation_swiginit(self, _cmf_core.new_CanopyStorageEvaporation(*args, **kwargs)) - __swig_destroy__ = _cmf_core.delete_CanopyStorageEvaporation -CanopyStorageEvaporation_swigregister = _cmf_core.CanopyStorageEvaporation_swigregister -CanopyStorageEvaporation_swigregister(CanopyStorageEvaporation) - -class PenmanEvaporation(flux_connection): - """ - - - Calculates evaporation from an open water body. - - C++ includes: ET.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - - def __init__(self, *args, **kwargs): - """ - __init__(cmf::upslope::ET::PenmanEvaporation self, cmf::river::OpenWaterStorage::ptr source, cmf::water::flux_node::ptr Evap_target, Meteorology meteo) -> PenmanEvaporation - - PenmanEvaporation(cmf::river::OpenWaterStorage::ptr source, - cmf::water::flux_node::ptr Evap_target, const - cmf::atmosphere::Meteorology &meteo) - """ - _cmf_core.PenmanEvaporation_swiginit(self, _cmf_core.new_PenmanEvaporation(*args, **kwargs)) - __swig_destroy__ = _cmf_core.delete_PenmanEvaporation -PenmanEvaporation_swigregister = _cmf_core.PenmanEvaporation_swigregister -PenmanEvaporation_swigregister(PenmanEvaporation) - -class ShuttleworthWallace(transpiration_method, soil_evaporation_method, surface_water_evaporation_method, canopy_evaporation_method, snow_evaporation_method, aerodynamic_resistance): - """ - - - Calculates the sum of soil evaporation and transpiration according to - Shuttleworth & Wallace 1985, as implemented in BROOK 90 (Federer 1990) - - The difference to BROOK90 is, that the actual transpiration is not - calculated by plant resitance and potential gradient between plant and - soil, but by an piecewise linear function of the pF value :math:`pF = \\log_{10}\\left(-\\Psi [hPa]\\right)`: - - .. math:: - - - \\frac{T_{act}}{T_{pot}} = \\begin{cases}1 & pF \\le 3.35 - \\\\ \\frac{pF - 4.2}{3.35 - 4.2} & pF \\in [3.35 .. 4.2] - \\\\ 0 & pF \\ge 4.2\\end{cases} - - Calculation procedure, as in BROOK 90: - - Evapotranspiration from the canopy: :math:`\\lambda ET_{canopy} = \\frac{r_{ac} \\Delta\\ R_{n,canopy} + c_p\\rho D_0}{\\Delta \\gamma r_{ac} + \\gamma r_{sc}}` - - Evaporation from the ground: :math:`\\lambda E_{ground} = \\frac{r_{as} \\Delta\\ R_{n,ground} + c_p\\rho D_0}{\\Delta \\gamma r_{as} + \\gamma r_{ss}}` - - with :math:`\\Delta = \\frac{de_s}{dT} = 4098\\ 0.6108 \\exp\\left(\\frac{17.27 T}{T+237.3}\\right)(T+237.3)^{-2}`, - the slope of the sat. vap. press. T function - - :math:`R_{n,ground} = R_n \\exp(-C_R LAI)`, the net radiation flux in - the ground - - :math:`R_{n_canopy} = R_n - R_{n,ground}`, the net radiation flux in the - canopy - - :math:`\\lambda,c_p\\rho,\\gamma,C_R` constants lambda, c_p_rho, - gamma, C_R - - :math:`D_0` vapor pressure deficit at effective source height, see - function D0 - - :math:`r_{ac}, r_{sc}, r_{as}, r_{ss}` Resistances for the vapor pressure - (see below) - - C++ includes: ShuttleworthWallace.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - RAA = _swig_property(_cmf_core.ShuttleworthWallace_RAA_get, _cmf_core.ShuttleworthWallace_RAA_set) - RAC = _swig_property(_cmf_core.ShuttleworthWallace_RAC_get, _cmf_core.ShuttleworthWallace_RAC_set) - RAS = _swig_property(_cmf_core.ShuttleworthWallace_RAS_get, _cmf_core.ShuttleworthWallace_RAS_set) - RSS = _swig_property(_cmf_core.ShuttleworthWallace_RSS_get, _cmf_core.ShuttleworthWallace_RSS_set) - RSC = _swig_property(_cmf_core.ShuttleworthWallace_RSC_get, _cmf_core.ShuttleworthWallace_RSC_set) - refresh_counter = _swig_property(_cmf_core.ShuttleworthWallace_refresh_counter_get, _cmf_core.ShuttleworthWallace_refresh_counter_set) - - def refresh(self, *args): - """ - refresh(ShuttleworthWallace self, Time t) - refresh(ShuttleworthWallace self) - - void refresh() - """ - return _cmf_core.ShuttleworthWallace_refresh(self, *args) - - PTR = _swig_property(_cmf_core.ShuttleworthWallace_PTR_get, _cmf_core.ShuttleworthWallace_PTR_set) - PSNVP = _swig_property(_cmf_core.ShuttleworthWallace_PSNVP_get, _cmf_core.ShuttleworthWallace_PSNVP_set) - ASNVP = _swig_property(_cmf_core.ShuttleworthWallace_ASNVP_get, _cmf_core.ShuttleworthWallace_ASNVP_set) - GER = _swig_property(_cmf_core.ShuttleworthWallace_GER_get, _cmf_core.ShuttleworthWallace_GER_set) - PIR = _swig_property(_cmf_core.ShuttleworthWallace_PIR_get, _cmf_core.ShuttleworthWallace_PIR_set) - AIR = _swig_property(_cmf_core.ShuttleworthWallace_AIR_get, _cmf_core.ShuttleworthWallace_AIR_set) - GIR = _swig_property(_cmf_core.ShuttleworthWallace_GIR_get, _cmf_core.ShuttleworthWallace_GIR_set) - ATR_sum = _swig_property(_cmf_core.ShuttleworthWallace_ATR_sum_get, _cmf_core.ShuttleworthWallace_ATR_sum_set) - ATR = _swig_property(_cmf_core.ShuttleworthWallace_ATR_get, _cmf_core.ShuttleworthWallace_ATR_set) - KSNVP = _swig_property(_cmf_core.ShuttleworthWallace_KSNVP_get, _cmf_core.ShuttleworthWallace_KSNVP_set) - allow_dew = _swig_property(_cmf_core.ShuttleworthWallace_allow_dew_get, _cmf_core.ShuttleworthWallace_allow_dew_set) - - def set_RSS_parameters(*args, **kwargs): - """set_RSS_parameters(double _RSSa=500., double _RSSb=1.0, double _RSSa_pot=-3.22)""" - return _cmf_core.ShuttleworthWallace_set_RSS_parameters(*args, **kwargs) - - set_RSS_parameters = staticmethod(set_RSS_parameters) - - def __init__(self, *args, **kwargs): - """ - __init__(cmf::upslope::ET::ShuttleworthWallace self, Cell cell, bool allow_dew=True) -> ShuttleworthWallace - - ShuttleworthWallace(cmf::upslope::Cell &cell, bool allow_dew=true) - - Calculates the transpiration and the soil evaporation from dry - surfaces. - """ - _cmf_core.ShuttleworthWallace_swiginit(self, _cmf_core.new_ShuttleworthWallace(*args, **kwargs)) - - def use_for_cell(*args, **kwargs): - """use_for_cell(Cell cell) -> ShuttleworthWallace""" - return _cmf_core.ShuttleworthWallace_use_for_cell(*args, **kwargs) - - use_for_cell = staticmethod(use_for_cell) - __swig_destroy__ = _cmf_core.delete_ShuttleworthWallace -ShuttleworthWallace.refresh = new_instancemethod(_cmf_core.ShuttleworthWallace_refresh, None, ShuttleworthWallace) -ShuttleworthWallace_swigregister = _cmf_core.ShuttleworthWallace_swigregister -ShuttleworthWallace_swigregister(ShuttleworthWallace) - -def ShuttleworthWallace_set_RSS_parameters(*args, **kwargs): - """ShuttleworthWallace_set_RSS_parameters(double _RSSa=500., double _RSSb=1.0, double _RSSa_pot=-3.22)""" - return _cmf_core.ShuttleworthWallace_set_RSS_parameters(*args, **kwargs) - -def ShuttleworthWallace_use_for_cell(*args, **kwargs): - """ShuttleworthWallace_use_for_cell(Cell cell) -> ShuttleworthWallace""" - return _cmf_core.ShuttleworthWallace_use_for_cell(*args, **kwargs) - - -class project_list_wrapper: - def __init__(self,getitem,getlen,name): - self.__get = getitem - self.__len = getlen - self.name = name - def __len__(self): - return int(self.__len()) - def __getitem__(self,index): - if (type(index)==slice): - return [self.__get(i) for i in range(*index.indices(len(self)))] - try: - gen=iter(index) - return [self.__get(it) for it in gen] - except TypeError: - return self.__get(index) - def __iter__(self): - for i in range(len(self)): - yield self.__get(i) - def __repr__(self): - return '[%i %s of project]' % (len(self),self.name) - - -class project(StateVariableOwner): - """ - - - The study area, holding all cells, outlets and streams. - - Todo Describe tracers - - C++ includes: project.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - - def remove_node(self, *args, **kwargs): - """ - remove_node(project self, cmf::water::flux_node::ptr node) -> size_t - - size_t - remove_node(cmf::water::flux_node::ptr node) - - Removes a node from the repository. - - Removes a node (boundary condition or water storage) from the node - repository of the project. NOTE: If you have other references to this - node, the node is not deleted. If you are creating a new solver, the - node will not be part of the solver. - """ - return _cmf_core.project_remove_node(self, *args, **kwargs) - - solutes = _swig_property(_cmf_core.project_solutes_get) - meteo_stations = _swig_property(_cmf_core.project_meteo_stations_get, _cmf_core.project_meteo_stations_set) - rainfall_stations = _swig_property(_cmf_core.project_rainfall_stations_get, _cmf_core.project_rainfall_stations_set) - - def use_IDW_meteo(self, *args, **kwargs): - """ - use_IDW_meteo(project self, double z_weight=0, double power=2) - - void - use_IDW_meteo(double z_weight=0, double power=2) - - Uses IDW interpolation to generate meterological data for each cell of - project. - - Creates a meteo-data source for each cell, using spatial interpolated - data from all meteorological stations of the project using Inverse - Distance Weighted (IDW) interpolation. The meteorolgical value f is - calculated with IDW for position x,y,z and time t as follows: - - - .. math:: - - f(x,y,z,t) &=& \\sum^N_{i=1}{f_i(t) w_i(x,y,z)} - \\\\ w_i(x,y,z) &=& - \\frac{d_i(x,y,z)^{-p}}{\\sum^N_{j=0}{d_j(x,y,z)^{-p}}} \\\\ - d_i(x,y,z) &=& w_z \\left|z-z_i\\right| + - \\sqrt{\\left(x-x_i\\right)^2 + \\left(y-y_i\\right)^2} - - - :math:`N` is the number of stations - - :math:`f_i(t)` the meteorological value at time t, eg. Temperature, Humidity - - :math:`w_i` is the weight of station i - - :math:`d_i` is the distance from x,y,z to station i - - :math:`p` the power of the weighting function, usually 2. - - :math:`x_i,y_i,z_i` is the position of station i in space - - :math:`w_z` is a factor to weight the vertical distance between stations and - the cell. 0 results in a pure horizontal interpolation (normal IDW). - If :math:`w_z=1`, height difference is as important as horizontal distance, - and with :math:`w_z>1` the height difference is weighted more important than - horizontal distance See: IDW_Meteorology - - Parameters: - ----------- - - z_weight: :math:`w_z` the weight of height difference between cell and - station - - power: the power of the distance weight - """ - return _cmf_core.project_use_IDW_meteo(self, *args, **kwargs) - - - def use_nearest_meteo(self, *args, **kwargs): - """ - use_nearest_meteo(project self, double z_weight=0) - - void - use_nearest_meteo(double z_weight=0) - - Connects all cells of the project with its nearest meteorological - station. - - Distance is calculated as follows: - - .. math:: - - d_i(x,y,z) = w_z - \\left|z-z_i\\right| + \\sqrt{\\left(x-x_i\\right)^2 + - \\left(y-y_i\\right)^2} - - :math:`d_i` is the distance from x,y,z to - station i - - :math:`p` the power of the weighting function, usually 2. - - :math:`x_i,y_i,z_i` is the position of station i in space - - :math:`w_z` is a factor to weight the vertical distance between stations and - the cell. 0 results in a pure horizontal interpolation (normal IDW). - If :math:`w_z=1`, height difference is as important as horizontal distance, - and with :math:`w_z>1` the height difference is weighted more important than - horizontal distance - - Parameters: - ----------- - - z_weight: :math:`w_z` the weight of height difference between cell and - station - """ - return _cmf_core.project_use_nearest_meteo(self, *args, **kwargs) - - - def use_IDW_rainfall(self, *args, **kwargs): - """ - use_IDW_rainfall(project self, double z_weight=0, double power=2) - - void - use_IDW_rainfall(double z_weight=0, double power=2) - - Uses IDW interpolation to generate rainfall data for each cell of - project. - - Creates a rainfall-data source for each cell, using spatial - interpolated data from all meteorological stations of the project - using Inverse Distance Weighted (IDW) interpolation. The rainfall - intensity P is calculated with IDW for position x,y,z and time t as - follows: - - .. math:: - - P(x,y,z,t) &=& \\sum^N_{i=1}{P_i(t) - w_i(x,y,z)} \\\\ w_i(x,y,z) &=& - \\frac{d_i(x,y,z)^{-p}}{\\sum^N_{j=0}{d_j(x,y,z)^{-p}}} \\\\ - d_i(x,y,z) &=& w_z \\left|z-z_i\\right| + - \\sqrt{\\left(x-x_i\\right)^2 + \\left(y-y_i\\right)^2} - - - :math:`N` is the number of stations - - :math:`P_i(t)` the meteorological value at time t, eg. Temperature, Humidity - - :math:`w_i` is the weight of station i - - :math:`d_i` is the distance from x,y,z to station i - - :math:`p` the power of the weighting function, usually 2. - - :math:`x_i,y_i,z_i` is the position of station i in space - - :math:`w_z` is a factor to weight the vertical distance between stations and - the cell. 0 results in a pure horizontal interpolation (normal IDW). - If :math:`w_z=1`, height difference is as important as horizontal distance, - and with :math:`w_z>1` the height difference is weighted more important than - horizontal distance See: IDW_Meteorology - - Parameters: - ----------- - - z_weight: :math:`w_z` the weight of height difference between cell and - station - - power: the power of the distance weight - """ - return _cmf_core.project_use_IDW_rainfall(self, *args, **kwargs) - - - def use_nearest_rainfall(self, *args, **kwargs): - """ - use_nearest_rainfall(project self, double z_weight=0) - - void - use_nearest_rainfall(double z_weight=0) - - Connects all cells of the project with its nearest rainfall station. - - Distance is calculated as follows: - - .. math:: - - d_i(x,y,z) = w_z - \\left|z-z_i\\right| + \\sqrt{\\left(x-x_i\\right)^2 + - \\left(y-y_i\\right)^2} - - :math:`d_i` is the distance from x,y,z to - station i - - :math:`p` the power of the weighting function, usually 2. - - :math:`x_i,y_i,z_i` is the position of station i in space - - :math:`w_z` is a factor to weight the vertical distance between stations and - the cell. 0 results in a pure horizontal interpolation (normal IDW). - If :math:`w_z=1`, height difference is as important as horizontal distance, - and with :math:`w_z>1` the height difference is weighted more important than - horizontal distance - - Parameters: - ----------- - - z_weight: :math:`w_z` the weight of height difference between cell and - station - """ - return _cmf_core.project_use_nearest_rainfall(self, *args, **kwargs) - - - def get_cell(self, *args, **kwargs): - """ - get_cell(project self, ptrdiff_t index) -> Cell - - upslope::Cell& - get_cell(ptrdiff_t index) - - Returns the reference to the cell at index in the project. - """ - return _cmf_core.project_get_cell(self, *args, **kwargs) - - - def size(self, *args, **kwargs): - """ - size(project self) -> size_t - - size_t size() const - - The number of cells in the project. - """ - return _cmf_core.project_size(self, *args, **kwargs) - - - def __init__(self, *args, **kwargs): - """ - __init__(cmf::project self, std::string solute_names) -> project - - project(std::string - solute_names="") - - Creates a new project. - - Parameters: - ----------- - - solute_names: A string representing the names of the solutes to be - used in the project. Sepereate solute names with space. - """ - _cmf_core.project_swiginit(self, _cmf_core.new_project(*args, **kwargs)) - __swig_destroy__ = _cmf_core.delete_project - - def NewCell(self, *args, **kwargs): - """ - NewCell(project self, double x, double y, double z, double area, bool with_surfacewater=False) -> Cell - - cmf::upslope::Cell* - NewCell(double x, double y, double z, double area, bool - with_surfacewater=false) - - Creates a new cell. - - A new cell, owned by the project - - Parameters: - ----------- - - x: y: z: Position of the cell center in project coordinates (m) - - area: Area of the cell in m^2 - - with_surfacewater: If true, the cell will own a surfacewater storage - upon creation - """ - return _cmf_core.project_NewCell(self, *args, **kwargs) - - - def NewOutlet(self, *args, **kwargs): - """ - NewOutlet(project self, std::string name, double x=0, double y=0, double z=0) -> cmf::water::DirichletBoundary::ptr - - cmf::water::DirichletBoundary::ptr NewOutlet(std::string name, double - x=0, double y=0, double z=0) - - Creates a new Dirichlet boundary condition and adds it to the list of - outlets The potential of the Dirichlet boundary equals z, but can be - changed. - - Parameters: - ----------- - - name: Name of the boundary condition for output - - x: y: z: Position of the boundary condition in project coordinates - - """ - return _cmf_core.project_NewOutlet(self, *args, **kwargs) - - - def NewStorage(self, *args, **kwargs): - """ - NewStorage(project self, std::string name, double x=0, double y=0, double z=0) -> cmf::water::WaterStorage::ptr - - cmf::water::WaterStorage::ptr NewStorage(std::string name, double x=0, - double y=0, double z=0) - - Creates a new generic water storage at position x,y,z. - - The storage is added to the project nodes A new water storage, owned - by the project - - Parameters: - ----------- - - name: Name of the generic water storage for output - - x: y: z: Position of the generic water storage condition in project - coordinates - """ - return _cmf_core.project_NewStorage(self, *args, **kwargs) - - - def NewOpenStorage(self, *args, **kwargs): - """ - NewOpenStorage(project self, std::string name, double x, double y, double z, double area) -> cmf::river::OpenWaterStorage::ptr - - cmf::river::OpenWaterStorage::ptr NewOpenStorage(std::string name, - double x, double y, double z, double area) - - Creates a new open water storage with a prism geometry. - - The open water storage is added to the project nodes A new open water - storage, owned by the project - - Parameters: - ----------- - - name: Name of the open water storage for output - - x: y: z: Position of the open water storage in project coordinates - - area: Surface area of the open water storage - """ - return _cmf_core.project_NewOpenStorage(self, *args, **kwargs) - - - def NewNeumannBoundary(self, *args, **kwargs): - """ - NewNeumannBoundary(project self, std::string name, cmf::water::WaterStorage::ptr target) -> cmf::water::NeumannBoundary::ptr - - cmf::water::NeumannBoundary::ptr NewNeumannBoundary(std::string name, - cmf::water::WaterStorage::ptr target) - - Creates a new Neumann boundary for a target water storage. - - The boundary is stored with the project A new Neumann boundary - - Parameters: - ----------- - - name: The name of the boundary condition - - target: The water storage to which the Neumann boundary is bound - """ - return _cmf_core.project_NewNeumannBoundary(self, *args, **kwargs) - - - def NewReach(self, *args, **kwargs): - """ - NewReach(project self, double x, double y, double z, IChannel shape, bool diffusive=False) -> cmf::river::Reach::ptr - - cmf::river::Reach::ptr - NewReach(double x, double y, double z, cmf::river::IChannel &shape, - bool diffusive=false) - - Creates a new reach. - - A new reach, owned by the project - - Parameters: - ----------- - - x: y: z: Position of the reach in project coordinates - - shape: Crossectional geometry of the river. Any class inheriting from - cmf::water::IChannel - - diffusive: If true, this reach uses by default a diffusive wave - connection - """ - return _cmf_core.project_NewReach(self, *args, **kwargs) - - - def get_reach(self, *args, **kwargs): - """ - get_reach(project self, ptrdiff_t index) -> cmf::river::Reach::ptr - - cmf::river::Reach::ptr get_reach(ptrdiff_t index) - - Returns the reach at index. - """ - return _cmf_core.project_get_reach(self, *args, **kwargs) - - - def reach_count(self, *args, **kwargs): - """ - reach_count(project self) -> size_t - - size_t - reach_count() const - - Returns the number of reaches in this project. - """ - return _cmf_core.project_reach_count(self, *args, **kwargs) - - - def get_node(self, *args, **kwargs): - """ - get_node(project self, ptrdiff_t index) -> cmf::water::flux_node::ptr - - cmf::water::flux_node::ptr get_node(ptrdiff_t index) - - Returns the node from the project nodes at index. - """ - return _cmf_core.project_get_node(self, *args, **kwargs) - - - def node_count(self, *args, **kwargs): - """ - node_count(project self) -> size_t - - size_t node_count() - const - - Returns the number of nodes saved with this project. - """ - return _cmf_core.project_node_count(self, *args, **kwargs) - - - def get_storages(self, *args, **kwargs): - """ - get_storages(project self) -> node_list - - cmf::water::node_list get_storages() - - Returns a list of all storages of this project. - """ - return _cmf_core.project_get_storages(self, *args, **kwargs) - - cells = _swig_property(_cmf_core.project_cells_get) - - def __repr__(self): - return "cmf.project(%i cells, %i meteo stations, %i project nodes)" % (len(self.cells),len(self.meteo_stations),len(self.nodes)) - def __len__(self): - return self.size() - def __getitem__(self,index): - if isinstance(index,slice): - return [self[i] for i in range(*index.indices(len(self)))] - else: - return self.get_cell(index) - def __iter__(self): - for i in range(self.size()): - yield self.get_cell(i) - @property - def reaches(self): - "Returns the reaches of the project" - return project_list_wrapper(self.get_reach,self.reach_count,'reaches') - @property - def nodes(self): - "Returns the nodes of the project" - return project_list_wrapper(self.get_node,self.node_count,'nodes') - -project.remove_node = new_instancemethod(_cmf_core.project_remove_node, None, project) -project.use_IDW_meteo = new_instancemethod(_cmf_core.project_use_IDW_meteo, None, project) -project.use_nearest_meteo = new_instancemethod(_cmf_core.project_use_nearest_meteo, None, project) -project.use_IDW_rainfall = new_instancemethod(_cmf_core.project_use_IDW_rainfall, None, project) -project.use_nearest_rainfall = new_instancemethod(_cmf_core.project_use_nearest_rainfall, None, project) -project.get_cell = new_instancemethod(_cmf_core.project_get_cell, None, project) -project.size = new_instancemethod(_cmf_core.project_size, None, project) -project.NewCell = new_instancemethod(_cmf_core.project_NewCell, None, project) -project.NewOutlet = new_instancemethod(_cmf_core.project_NewOutlet, None, project) -project.NewStorage = new_instancemethod(_cmf_core.project_NewStorage, None, project) -project.NewOpenStorage = new_instancemethod(_cmf_core.project_NewOpenStorage, None, project) -project.NewNeumannBoundary = new_instancemethod(_cmf_core.project_NewNeumannBoundary, None, project) -project.NewReach = new_instancemethod(_cmf_core.project_NewReach, None, project) -project.get_reach = new_instancemethod(_cmf_core.project_get_reach, None, project) -project.reach_count = new_instancemethod(_cmf_core.project_reach_count, None, project) -project.get_node = new_instancemethod(_cmf_core.project_get_node, None, project) -project.node_count = new_instancemethod(_cmf_core.project_node_count, None, project) -project.get_storages = new_instancemethod(_cmf_core.project_get_storages, None, project) -project_swigregister = _cmf_core.project_swigregister -project_swigregister(project) - -class SoluteWaterIntegrator(Integrator): - """ - - - A SoluteWaterIntegrator implements the cmf::math::Integrator - interface, but consists of two independent ODE-solvers. - - Added statevariables are sorted by waterstorages and solute storages - and assigned to the correct solver. - - C++ includes: WaterSoluteIntegrator.h - """ - - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - - def copy(self, *args, **kwargs): - """ - copy(SoluteWaterIntegrator self) -> SoluteWaterIntegrator - - virtual cmf::math::SoluteWaterIntegrator* copy() const - - Polymorphic copy constructor. - """ - return _cmf_core.SoluteWaterIntegrator_copy(self, *args, **kwargs) - - - def __init__(self, *args): - """ - __init__(cmf::math::SoluteWaterIntegrator self, solute_vector solutes, Integrator water_integrator, Integrator solute_integrator) -> SoluteWaterIntegrator - __init__(cmf::math::SoluteWaterIntegrator self, solute_vector solutes, Integrator water_integrator, Integrator solute_integrator, StateVariableOwner states) -> SoluteWaterIntegrator - - SoluteWaterIntegrator(cmf::water::solute_vector solutes, const - cmf::math::Integrator &water_integrator, const cmf::math::Integrator - &solute_integrator, cmf::math::StateVariableOwner &states) - - Creates a new SoluteWaterIntegrator. - - Parameters: - ----------- - - solutes: Solutes of the project - - water_integrator: Template for the integrator of WaterStorage state - variables - - solute_integrator: Template for the integrator of soluteStorage state - variables - - states: States to be added to the integrators - """ - _cmf_core.SoluteWaterIntegrator_swiginit(self, _cmf_core.new_SoluteWaterIntegrator(*args)) - __swig_destroy__ = _cmf_core.delete_SoluteWaterIntegrator - - def to_string(self, *args, **kwargs): - """ - to_string(SoluteWaterIntegrator self) -> std::string - - std::string to_string() const - """ - return _cmf_core.SoluteWaterIntegrator_to_string(self, *args, **kwargs) - -SoluteWaterIntegrator.copy = new_instancemethod(_cmf_core.SoluteWaterIntegrator_copy, None, SoluteWaterIntegrator) -SoluteWaterIntegrator.to_string = new_instancemethod(_cmf_core.SoluteWaterIntegrator_to_string, None, SoluteWaterIntegrator) -SoluteWaterIntegrator_swigregister = _cmf_core.SoluteWaterIntegrator_swigregister -SoluteWaterIntegrator_swigregister(SoluteWaterIntegrator) - - - +# This file was automatically generated by SWIG (http://www.swig.org). +# Version 3.0.12 +# +# Do not make changes to this file unless you know what you are doing--modify +# the SWIG interface file instead. + +from sys import version_info as _swig_python_version_info +if _swig_python_version_info >= (3, 0, 0): + new_instancemethod = lambda func, inst, cls: _cmf_core.SWIG_PyInstanceMethod_New(func) +else: + from new import instancemethod as new_instancemethod +if _swig_python_version_info >= (2, 7, 0): + def swig_import_helper(): + import importlib + pkg = __name__.rpartition('.')[0] + mname = '.'.join((pkg, '_cmf_core')).lstrip('.') + try: + return importlib.import_module(mname) + except ImportError: + return importlib.import_module('_cmf_core') + _cmf_core = swig_import_helper() + del swig_import_helper +elif _swig_python_version_info >= (2, 6, 0): + def swig_import_helper(): + from os.path import dirname + import imp + fp = None + try: + fp, pathname, description = imp.find_module('_cmf_core', [dirname(__file__)]) + except ImportError: + import _cmf_core + return _cmf_core + try: + _mod = imp.load_module('_cmf_core', fp, pathname, description) + finally: + if fp is not None: + fp.close() + return _mod + _cmf_core = swig_import_helper() + del swig_import_helper +else: + import _cmf_core +del _swig_python_version_info + +try: + _swig_property = property +except NameError: + pass # Python < 2.2 doesn't have 'property'. + +try: + import builtins as __builtin__ +except ImportError: + import __builtin__ + +def _swig_setattr_nondynamic(self, class_type, name, value, static=1): + if (name == "thisown"): + return self.this.own(value) + if (name == "this"): + if type(value).__name__ == 'SwigPyObject': + self.__dict__[name] = value + return + method = class_type.__swig_setmethods__.get(name, None) + if method: + return method(self, value) + if (not static): + object.__setattr__(self, name, value) + else: + raise AttributeError("You cannot add attributes to %s" % self) + + +def _swig_setattr(self, class_type, name, value): + return _swig_setattr_nondynamic(self, class_type, name, value, 0) + + +def _swig_getattr(self, class_type, name): + if (name == "thisown"): + return self.this.own() + method = class_type.__swig_getmethods__.get(name, None) + if method: + return method(self) + raise AttributeError("'%s' object has no attribute '%s'" % (class_type.__name__, name)) + + +def _swig_repr(self): + try: + strthis = "proxy of " + self.this.__repr__() + except __builtin__.Exception: + strthis = "" + return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,) + + +def _swig_setattr_nondynamic_method(set): + def set_attr(self, name, value): + if (name == "thisown"): + return self.this.own(value) + if hasattr(self, name) or (name == "this"): + set(self, name, value) + else: + raise AttributeError("You cannot add attributes to %s" % self) + return set_attr + + +SHARED_PTR_DISOWN = _cmf_core.SHARED_PTR_DISOWN + +def get_parallel_threads(*args): + """ + get_parallel_threads() -> int + + int + cmf::math::get_parallel_threads() + + Returns the max number of threads used by OpenMP in parallel sections + of the code. + """ + return _cmf_core.get_parallel_threads(*args) + +def set_parallel_threads(*args, **kwargs): + """ + set_parallel_threads(int numthreads) -> int + + int + cmf::math::set_parallel_threads(int numthreads) + + Set the number of threads used by OpenMP in parallel sections of the + code. + """ + return _cmf_core.set_parallel_threads(*args, **kwargs) +class cubicspline(object): + """ + + + Interpolates points with a cubic spline interpolation. + + Code is modified + after:http://ganeshtiwaridotcomdotnp.blogspot.de/2009/12/c-c-code- + cubic- spline-interpolation.html + + C++ includes: spline.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + + def __init__(self, *args, **kwargs): + """ + __init__(cmf::math::cubicspline self, cmf::math::num_array const & x, cmf::math::num_array const & y) -> cubicspline + + cubicspline(const cmf::math::num_array &x, const cmf::math::num_array + &y) + """ + _cmf_core.cubicspline_swiginit(self, _cmf_core.new_cubicspline(*args, **kwargs)) + + def generate(self, *args, **kwargs): + """ + generate(cubicspline self) + + void + generate() + """ + return _cmf_core.cubicspline_generate(self, *args, **kwargs) + + + def size(self, *args, **kwargs): + """ + size(cubicspline self) -> size_t + + size_t size() + const + """ + return _cmf_core.cubicspline_size(self, *args, **kwargs) + + + def __call__(self, *args, **kwargs): + """__call__(cubicspline self, real x) -> real""" + return _cmf_core.cubicspline___call__(self, *args, **kwargs) + + __swig_destroy__ = _cmf_core.delete_cubicspline +cubicspline.generate = new_instancemethod(_cmf_core.cubicspline_generate, None, cubicspline) +cubicspline.size = new_instancemethod(_cmf_core.cubicspline_size, None, cubicspline) +cubicspline.__call__ = new_instancemethod(_cmf_core.cubicspline___call__, None, cubicspline) +cubicspline_swigregister = _cmf_core.cubicspline_swigregister +cubicspline_swigregister(cubicspline) + +class point(object): + """ + + + 2D-Point Class. + + Used as location property anywhere in the text Calculation of + distances + + +,-,-=,*= Operators overloaded + + C++ includes: geometry.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + x = _swig_property(_cmf_core.point_x_get, _cmf_core.point_x_set) + y = _swig_property(_cmf_core.point_y_get, _cmf_core.point_y_set) + z = _swig_property(_cmf_core.point_z_get, _cmf_core.point_z_set) + + def __init__(self, *args): + """ + __init__(cmf::geometry::point self) -> point + __init__(cmf::geometry::point self, point p) -> point + __init__(cmf::geometry::point self, double x_, double y_, double z_=0.0) -> point + + point(double x_, + double y_, double z_=0.0) + + Creates a point from two doubles. + """ + _cmf_core.point_swiginit(self, _cmf_core.new_point(*args)) + + def distanceTo(self, *args, **kwargs): + """ + distanceTo(point self, point p) -> double + + double + distanceTo(point p) const + + Returns the horizontal euclidian distance to another point p. + + :math:`\\sqrt{(this.x-p.x)^2+(this.y-p.y)^2}` + """ + return _cmf_core.point_distanceTo(self, *args, **kwargs) + + + def z_weight_distance(self, *args, **kwargs): + """ + z_weight_distance(point self, point p, double z_weight) -> double + + double z_weight_distance(point p, double z_weight) const + + Returns the horizontal euclidian distance plus the absolute of the + height difference times a factor. + + :math:`\\sqrt{(this.x-p.x)^2+(this.y-p.y)^2}\\ +\\ w_{z}|this.z-p.z|` + + """ + return _cmf_core.point_z_weight_distance(self, *args, **kwargs) + + + def distance3DTo(self, *args, **kwargs): + """ + distance3DTo(point self, point p) -> double + + double + distance3DTo(point p) const + + Returns the euclidian distance in space to another point p. + """ + return _cmf_core.point_distance3DTo(self, *args, **kwargs) + + + def distance(*args, **kwargs): + """distance(point p1, point p2) -> double""" + return _cmf_core.point_distance(*args, **kwargs) + + distance = staticmethod(distance) + + def distance_max(self, *args, **kwargs): + """ + distance_max(point self, point p) -> double + + double + distance_max(point p) const + + Returns the distance by the maximum orthogonal offset. + """ + return _cmf_core.point_distance_max(self, *args, **kwargs) + + + def azimuth(self, *args, **kwargs): + """ + azimuth(point self, point p) -> double + + double + azimuth(point p) const + + Returns the azimuth angle of the line :math:`\\overline{this,p}` to the + Azimuth in degrees. + """ + return _cmf_core.point_azimuth(self, *args, **kwargs) + + + def angleToXAxis(self, *args, **kwargs): + """ + angleToXAxis(point self, point p) -> double + + double + angleToXAxis(point p) const + + Returns the angle between the line :math:`\\overline{this,p}` to the + x-Axis in degrees. + """ + return _cmf_core.point_angleToXAxis(self, *args, **kwargs) + + + def sum(self, *args, **kwargs): + """ + sum(point self) -> double + + double sum() const + + Returns x+y+z. + """ + return _cmf_core.point_sum(self, *args, **kwargs) + + + def length(self, *args, **kwargs): + """ + length(point self) -> double + + double length() + const + """ + return _cmf_core.point_length(self, *args, **kwargs) + + + def __add__(self, *args, **kwargs): + """__add__(point self, point p) -> point""" + return _cmf_core.point___add__(self, *args, **kwargs) + + + def __iadd__(self, *args, **kwargs): + """__iadd__(point self, point left) -> point""" + return _cmf_core.point___iadd__(self, *args, **kwargs) + + + def __sub__(self, *args, **kwargs): + """__sub__(point self, point p) -> point""" + return _cmf_core.point___sub__(self, *args, **kwargs) + + + def __isub__(self, *args, **kwargs): + """__isub__(point self, point left) -> point""" + return _cmf_core.point___isub__(self, *args, **kwargs) + + + def __mul__(self, *args): + """ + __mul__(point self, double left) -> point + __mul__(point self, point p) -> point + """ + return _cmf_core.point___mul__(self, *args) + + + def __imul__(self, *args): + """ + __imul__(point self, double left) -> point + __imul__(point self, point left) -> point + """ + return _cmf_core.point___imul__(self, *args) + + + def __truediv__(self, *args): + return _cmf_core.point___truediv__(self, *args) + __div__ = __truediv__ + + + + def __itruediv__(self, *args): + return _cmf_core.point___itruediv__(self, *args) + __idiv__ = __itruediv__ + + + + def __eq__(self, *args, **kwargs): + """__eq__(point self, point p) -> bool""" + return _cmf_core.point___eq__(self, *args, **kwargs) + + + def __ne__(self, *args, **kwargs): + """__ne__(point self, point p) -> bool""" + return _cmf_core.point___ne__(self, *args, **kwargs) + + + def __len__(self, *args, **kwargs): + """__len__(point self) -> int""" + return _cmf_core.point___len__(self, *args, **kwargs) + + + def __rmul__(self, *args, **kwargs): + """__rmul__(point self, double val) -> point""" + return _cmf_core.point___rmul__(self, *args, **kwargs) + + + def __rdiv__(self, *args, **kwargs): + """__rdiv__(point self, double val) -> point""" + return _cmf_core.point___rdiv__(self, *args, **kwargs) + + + def __getitem__(self,index) : + if isinstance(index,slice): + return [self[i] for i in range(*index.indices(len(self)))] + if index==0 : + return self.x + elif index==1 : + return self.y + elif index==2 : + return self.z + else : + raise IndexError("Only Index 0 .. 2 are allowed") + def __setitem__(self,index,value) : + if index==0 : + self.x=value + elif index==1 : + self.y=value + elif index==2 : + self.z=value + else : + raise IndexError("Only Index 0 .. 2 are allowed") + def __iter__(self): + yield self.x + yield self.y + yield self.z + def __repr__(self): + return 'cmf.point(%g,%g,%g)' % (self.x,self.y,self.z) + + __swig_destroy__ = _cmf_core.delete_point +point.distanceTo = new_instancemethod(_cmf_core.point_distanceTo, None, point) +point.z_weight_distance = new_instancemethod(_cmf_core.point_z_weight_distance, None, point) +point.distance3DTo = new_instancemethod(_cmf_core.point_distance3DTo, None, point) +point.distance_max = new_instancemethod(_cmf_core.point_distance_max, None, point) +point.azimuth = new_instancemethod(_cmf_core.point_azimuth, None, point) +point.angleToXAxis = new_instancemethod(_cmf_core.point_angleToXAxis, None, point) +point.sum = new_instancemethod(_cmf_core.point_sum, None, point) +point.length = new_instancemethod(_cmf_core.point_length, None, point) +point.__add__ = new_instancemethod(_cmf_core.point___add__, None, point) +point.__iadd__ = new_instancemethod(_cmf_core.point___iadd__, None, point) +point.__sub__ = new_instancemethod(_cmf_core.point___sub__, None, point) +point.__isub__ = new_instancemethod(_cmf_core.point___isub__, None, point) +point.__mul__ = new_instancemethod(_cmf_core.point___mul__, None, point) +point.__imul__ = new_instancemethod(_cmf_core.point___imul__, None, point) +point.__eq__ = new_instancemethod(_cmf_core.point___eq__, None, point) +point.__ne__ = new_instancemethod(_cmf_core.point___ne__, None, point) +point.__len__ = new_instancemethod(_cmf_core.point___len__, None, point) +point.__rmul__ = new_instancemethod(_cmf_core.point___rmul__, None, point) +point.__rdiv__ = new_instancemethod(_cmf_core.point___rdiv__, None, point) +point_swigregister = _cmf_core.point_swigregister +point_swigregister(point) +cvar = _cmf_core.cvar +PI = cvar.PI + +def point_distance(*args, **kwargs): + """point_distance(point p1, point p2) -> double""" + return _cmf_core.point_distance(*args, **kwargs) + + +def dot(*args, **kwargs): + """ + dot(point p1, point p2) -> double + + double + cmf::geometry::dot(const point &p1, const point &p2) + """ + return _cmf_core.dot(*args, **kwargs) + +def distance(*args, **kwargs): + """ + distance(point p1, point p2) -> double + + double + cmf::geometry::distance(const point &p1, const point &p2) + """ + return _cmf_core.distance(*args, **kwargs) +class point_vector(object): + """ + + + Holds three arrays x,y and z for fast access of point coordinates. + + C++ includes: geometry.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + X = _swig_property(_cmf_core.point_vector_X_get, _cmf_core.point_vector_X_set) + Y = _swig_property(_cmf_core.point_vector_Y_get, _cmf_core.point_vector_Y_set) + Z = _swig_property(_cmf_core.point_vector_Z_get, _cmf_core.point_vector_Z_set) + + def __init__(self, *args, **kwargs): + """ + __init__(cmf::geometry::point_vector self, ptrdiff_t size) -> point_vector + + point_vector(ptrdiff_t size) + + Create a point vector of a specific size. + """ + _cmf_core.point_vector_swiginit(self, _cmf_core.new_point_vector(*args, **kwargs)) + + def get(self, *args, **kwargs): + """ + get(point_vector self, ptrdiff_t index) -> point + + point + get(ptrdiff_t index) const + + Return a point at index. + """ + return _cmf_core.point_vector_get(self, *args, **kwargs) + + + def set(self, *args, **kwargs): + """ + set(point_vector self, ptrdiff_t index, point p) + + void + set(ptrdiff_t index, cmf::geometry::point p) + + Change the point at index. + """ + return _cmf_core.point_vector_set(self, *args, **kwargs) + + + def size(self, *args, **kwargs): + """ + size(point_vector self) -> size_t + + size_t + size() const + + Return the number of points in the point_vector. + """ + return _cmf_core.point_vector_size(self, *args, **kwargs) + + __swig_destroy__ = _cmf_core.delete_point_vector +point_vector.get = new_instancemethod(_cmf_core.point_vector_get, None, point_vector) +point_vector.set = new_instancemethod(_cmf_core.point_vector_set, None, point_vector) +point_vector.size = new_instancemethod(_cmf_core.point_vector_size, None, point_vector) +point_vector_swigregister = _cmf_core.point_vector_swigregister +point_vector_swigregister(point_vector) + + +import datetime +import struct + + +def minimum(*args, **kwargs): + """minimum(real a, real b) -> real""" + return _cmf_core.minimum(*args, **kwargs) + +def maximum(*args, **kwargs): + """maximum(real a, real b) -> real""" + return _cmf_core.maximum(*args, **kwargs) + +def minmax(*args, **kwargs): + """minmax(real x, real min, real max) -> real""" + return _cmf_core.minmax(*args, **kwargs) + +def mean(*args, **kwargs): + """mean(real a, real b) -> real""" + return _cmf_core.mean(*args, **kwargs) + +def geo_mean(*args, **kwargs): + """geo_mean(real a, real b) -> real""" + return _cmf_core.geo_mean(*args, **kwargs) + +def harmonic_mean(*args, **kwargs): + """harmonic_mean(real a, real b) -> real""" + return _cmf_core.harmonic_mean(*args, **kwargs) + +def piecewise_linear(*args, **kwargs): + """piecewise_linear(real x, real xmin, real xmax, real ymin=0, real ymax=1) -> real""" + return _cmf_core.piecewise_linear(*args, **kwargs) + +def boltzmann(*args, **kwargs): + """boltzmann(real x, real x_half, real tau) -> real""" + return _cmf_core.boltzmann(*args, **kwargs) + +def sign(*args, **kwargs): + """sign(real x) -> real""" + return _cmf_core.sign(*args, **kwargs) + +def square(*args, **kwargs): + """square(real x) -> real""" + return _cmf_core.square(*args, **kwargs) +JULIANDAY_0_1_1900 = _cmf_core.JULIANDAY_0_1_1900 +class Time(object): + """ + + + A time class, used to pass around current modelling times. + + Timespans and dates in cmf are used with a special object, called + Time. An extra class has the advantage, that the user does not have to + remember, which unit of time he or she uses or what time unit is + accepted by a specific function of the model. Arithmetic and boolean + operators are supported by Time. Internally the time classes stores + the time as integer milliseconds, therefore rounding issues will only + appear at very small time ranges. Absolute time (like dates) are + represented as milliseconds gone by from Dec, 31st 1899. Microsoft + Excel dates are represented as days from that time, using floating + point numbers, therefore it is very simple to convert Excel time + representations to cmf time. + + Another object is Date, which is doesn't provide the operators, but + has a nice printed version and some special date functions, like day + of year (DOY) and provides access to the current hour of day and so + on, which only applyto dates and not to time spans. You can convert + Time to Date an vice versa. The printing is not culture aware and uses + the European representation. If you use the Python standard library + datetime, conversion between Python time and cmf time is possible + + Creating absolute time values (dates) Creating time spans + + In principle, there are three ways to create time spans. One is to use + one of the static functions, another is to multiply an existing time + span (like one of the build in constants) or to substrate two absolute + times. + + Available constants : 4.1 seconds + + : 2.3 hours (138 min) + + : 2.3 hours (138 min) + + : 60 hours (2.5 days) + + : 7 days + + : 365/12 days (30.4167 days) + + : 365 days + + Available operators: + + time + time = time, time - time = time + + time * float = time ,time / float = time + + time/time=float + + >, <, ==, != + + Conversions + + Converting to python datetime + + Converting to numbers + + t.AsMilliseconds() + + t.AsSeconds() + + t.AsMinutes() + + t.AsHours() + + t.AsDays() + + t.AsYears() + + Creating time ranges + + C++ includes: time.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + ms_per_day = _cmf_core.Time_ms_per_day + + def __init__(self, *args): + """ + __init__(cmf::math::Time self, int day, int month, int year, int hour=0, int minute=0, int second=0, int ms=0) -> Time + __init__(cmf::math::Time self, Date date) -> Time + __init__(cmf::math::Time self, Time t) -> Time + __init__(cmf::math::Time self) -> Time + + Time(long long ms) + """ + _cmf_core.Time_swiginit(self, _cmf_core.new_Time(*args)) + + def AsDays(self, *args, **kwargs): + """ + AsDays(Time self) -> double + + double AsDays() const + + Time in days. + """ + return _cmf_core.Time_AsDays(self, *args, **kwargs) + + + def AsHours(self, *args, **kwargs): + """ + AsHours(Time self) -> double + + double AsHours() + const + + Time in hours. + """ + return _cmf_core.Time_AsHours(self, *args, **kwargs) + + + def AsMinutes(self, *args, **kwargs): + """ + AsMinutes(Time self) -> double + + double AsMinutes() + const + + Time in minutes. + """ + return _cmf_core.Time_AsMinutes(self, *args, **kwargs) + + + def AsSeconds(self, *args, **kwargs): + """ + AsSeconds(Time self) -> double + + double AsSeconds() + const + + Time in seconds. + """ + return _cmf_core.Time_AsSeconds(self, *args, **kwargs) + + + def AsMilliseconds(self, *args, **kwargs): + """ + AsMilliseconds(Time self) -> long long + + long long + AsMilliseconds() const + + Time in milliseconds. + """ + return _cmf_core.Time_AsMilliseconds(self, *args, **kwargs) + + + def AsDate(self, *args, **kwargs): + """ + AsDate(Time self) -> Date + + Date AsDate() const + + """ + return _cmf_core.Time_AsDate(self, *args, **kwargs) + + + def to_string(self, *args, **kwargs): + """ + to_string(Time self, char seperator) -> std::string + + std::string + to_string(char seperator=':') + """ + return _cmf_core.Time_to_string(self, *args, **kwargs) + + + def is_not_0(self, *args, **kwargs): + """ + is_not_0(Time self) -> bool + + bool is_not_0() + const + """ + return _cmf_core.Time_is_not_0(self, *args, **kwargs) + + + def DOY(self, *args, **kwargs): + """ + DOY(Time self) -> double + + double DOY() const + """ + return _cmf_core.Time_DOY(self, *args, **kwargs) + + + def __add__(self, *args, **kwargs): + """__add__(Time self, Time t1) -> Time""" + return _cmf_core.Time___add__(self, *args, **kwargs) + + + def __sub__(self, *args, **kwargs): + """__sub__(Time self, Time t1) -> Time""" + return _cmf_core.Time___sub__(self, *args, **kwargs) + + + def __iadd__(self, *args, **kwargs): + """__iadd__(Time self, Time t1) -> Time""" + return _cmf_core.Time___iadd__(self, *args, **kwargs) + + + def __isub__(self, *args, **kwargs): + """__isub__(Time self, Time t1) -> Time""" + return _cmf_core.Time___isub__(self, *args, **kwargs) + + + def __mod__(self, *args, **kwargs): + """__mod__(Time self, Time t1) -> Time""" + return _cmf_core.Time___mod__(self, *args, **kwargs) + + + def __mul__(self, *args): + """ + __mul__(Time self, double x) -> Time + __mul__(Time self, long long x) -> Time + __mul__(Time self, int x) -> Time + """ + return _cmf_core.Time___mul__(self, *args) + + + def __imul__(self, *args): + """ + __imul__(Time self, double x) -> Time + __imul__(Time self, long long x) -> Time + __imul__(Time self, int x) -> Time + """ + return _cmf_core.Time___imul__(self, *args) + + + def __itruediv__(self, *args): + return _cmf_core.Time___itruediv__(self, *args) + __idiv__ = __itruediv__ + + + + def __imod__(self, *args, **kwargs): + """__imod__(Time self, Time t1) -> Time""" + return _cmf_core.Time___imod__(self, *args, **kwargs) + + + def __truediv__(self, *args): + return _cmf_core.Time___truediv__(self, *args) + __div__ = __truediv__ + + + + def times_in(self, *args, **kwargs): + """ + times_in(Time self, Time t1) -> long long + + long long + times_in(const Time &t1) const + + Returns the number of times this is included in t1. + """ + return _cmf_core.Time_times_in(self, *args, **kwargs) + + + def __lt__(self, *args, **kwargs): + """__lt__(Time self, Time t1) -> bool""" + return _cmf_core.Time___lt__(self, *args, **kwargs) + + + def __gt__(self, *args, **kwargs): + """__gt__(Time self, Time t1) -> bool""" + return _cmf_core.Time___gt__(self, *args, **kwargs) + + + def __le__(self, *args, **kwargs): + """__le__(Time self, Time t1) -> bool""" + return _cmf_core.Time___le__(self, *args, **kwargs) + + + def __ge__(self, *args, **kwargs): + """__ge__(Time self, Time t1) -> bool""" + return _cmf_core.Time___ge__(self, *args, **kwargs) + + + def __eq__(self, *args, **kwargs): + """__eq__(Time self, Time t1) -> bool""" + return _cmf_core.Time___eq__(self, *args, **kwargs) + + + def __ne__(self, *args, **kwargs): + """__ne__(Time self, Time t1) -> bool""" + return _cmf_core.Time___ne__(self, *args, **kwargs) + + + def __repr__(self): + if self>year*40: + return self.AsDate().to_string() + else: + return self.to_string() + def __nonzero__(self): + return self.is_not_0() + def __rmul__(self,other): + return self*other + def __radd__(self,other): + return self + other + def AsPython(self): + d=self.AsDate() + return datetime.datetime(d.year,d.month,d.day,d.hour,d.minute,d.second,d.ms*1000) + year = property(lambda self: self.AsDate().year) + month = property(lambda self: self.AsDate().month) + day = property(lambda self: self.AsDate().day) + hour = property(lambda self: self.AsDate().hour) + minute = property(lambda self: self.AsDate().minute) + second = property(lambda self: self.AsDate().second) + ms = property(lambda self: self.AsDate().ms) + + __swig_destroy__ = _cmf_core.delete_Time +Time.AsDays = new_instancemethod(_cmf_core.Time_AsDays, None, Time) +Time.AsHours = new_instancemethod(_cmf_core.Time_AsHours, None, Time) +Time.AsMinutes = new_instancemethod(_cmf_core.Time_AsMinutes, None, Time) +Time.AsSeconds = new_instancemethod(_cmf_core.Time_AsSeconds, None, Time) +Time.AsMilliseconds = new_instancemethod(_cmf_core.Time_AsMilliseconds, None, Time) +Time.AsDate = new_instancemethod(_cmf_core.Time_AsDate, None, Time) +Time.to_string = new_instancemethod(_cmf_core.Time_to_string, None, Time) +Time.is_not_0 = new_instancemethod(_cmf_core.Time_is_not_0, None, Time) +Time.DOY = new_instancemethod(_cmf_core.Time_DOY, None, Time) +Time.__add__ = new_instancemethod(_cmf_core.Time___add__, None, Time) +Time.__sub__ = new_instancemethod(_cmf_core.Time___sub__, None, Time) +Time.__iadd__ = new_instancemethod(_cmf_core.Time___iadd__, None, Time) +Time.__isub__ = new_instancemethod(_cmf_core.Time___isub__, None, Time) +Time.__mod__ = new_instancemethod(_cmf_core.Time___mod__, None, Time) +Time.__mul__ = new_instancemethod(_cmf_core.Time___mul__, None, Time) +Time.__imul__ = new_instancemethod(_cmf_core.Time___imul__, None, Time) +Time.__imod__ = new_instancemethod(_cmf_core.Time___imod__, None, Time) +Time.times_in = new_instancemethod(_cmf_core.Time_times_in, None, Time) +Time.__lt__ = new_instancemethod(_cmf_core.Time___lt__, None, Time) +Time.__gt__ = new_instancemethod(_cmf_core.Time___gt__, None, Time) +Time.__le__ = new_instancemethod(_cmf_core.Time___le__, None, Time) +Time.__ge__ = new_instancemethod(_cmf_core.Time___ge__, None, Time) +Time.__eq__ = new_instancemethod(_cmf_core.Time___eq__, None, Time) +Time.__ne__ = new_instancemethod(_cmf_core.Time___ne__, None, Time) +Time_swigregister = _cmf_core.Time_swigregister +Time_swigregister(Time) +Debug = cvar.Debug +__compiledate__ = cvar.__compiledate__ +Pi = cvar.Pi + +class Date(object): + """ + + + An absolute time, not for calculation. Date and Time are + interchangable. + + C++ includes: time.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + year = _swig_property(_cmf_core.Date_year_get, _cmf_core.Date_year_set) + month = _swig_property(_cmf_core.Date_month_get, _cmf_core.Date_month_set) + day = _swig_property(_cmf_core.Date_day_get, _cmf_core.Date_day_set) + hour = _swig_property(_cmf_core.Date_hour_get, _cmf_core.Date_hour_set) + minute = _swig_property(_cmf_core.Date_minute_get, _cmf_core.Date_minute_set) + second = _swig_property(_cmf_core.Date_second_get, _cmf_core.Date_second_set) + ms = _swig_property(_cmf_core.Date_ms_get, _cmf_core.Date_ms_set) + + def __init__(self, *args): + """ + __init__(cmf::math::Date self, int _day, int _month, int _year, int _hour=0, int _minute=0, int _second=0, int _ms=0) -> Date + __init__(cmf::math::Date self, Time time) -> Date + + Date(const Time &time) + + Creates a new date from time (based on the 31.12.1899, like in + Excel(TM)) + """ + _cmf_core.Date_swiginit(self, _cmf_core.new_Date(*args)) + + def ToTime(self, *args, **kwargs): + """ + ToTime(Date self) -> Time + + Time ToTime() + + Converts a date to Time (based on the 31.12.1899, like in Excel(TM) + """ + return _cmf_core.Date_ToTime(self, *args, **kwargs) + + + def DOY(self, *args, **kwargs): + """ + DOY(Date self) -> double + + double DOY() + + Returns the day of year. + """ + return _cmf_core.Date_DOY(self, *args, **kwargs) + + + def to_string(self, *args, **kwargs): + """ + to_string(Date self) -> std::string + + std::string + to_string() + + Returns a string representing the date. + """ + return _cmf_core.Date_to_string(self, *args, **kwargs) + + + def __repr__(self): + return self.to_string() + def AsPython(self): + return datetime.datetime(self.year,self.month,self.day,self.hour,self.minute,self.second,self.ms*1000) + + __swig_destroy__ = _cmf_core.delete_Date +Date.ToTime = new_instancemethod(_cmf_core.Date_ToTime, None, Date) +Date.DOY = new_instancemethod(_cmf_core.Date_DOY, None, Date) +Date.to_string = new_instancemethod(_cmf_core.Date_to_string, None, Date) +Date_swigregister = _cmf_core.Date_swigregister +Date_swigregister(Date) + +class timeseries(object): + """ + + + A timeseries is a list of values, equally distributed over time. + + To create one, one have to provide as start date and a step size. The + end time is calculated from the number of values. Values queried for + times before the start time are returned as the first item, values + after the end time equal the last item. A timeseries with only one + item reacts like a scalar value. + + Creating a time series + + With this technique it is simple to read files or databases to fill + timeseries. Using a timeseries + + C++ includes: timeseries.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + + def interpolationpower(self, *args, **kwargs): + """ + interpolationpower(timeseries self) -> int + + int + interpolationpower() const + + Method for the interpolation (0 - Nearest neighbor, 1- linear, 2 - + cubic spline (not implemented yet) + """ + return _cmf_core.timeseries_interpolationpower(self, *args, **kwargs) + + + def add(self, *args, **kwargs): + """ + add(timeseries self, double Value) + + void add(double + Value) + + Appends a measurement. + """ + return _cmf_core.timeseries_add(self, *args, **kwargs) + + + def is_empty(self, *args, **kwargs): + """ + is_empty(timeseries self) -> bool + + bool + is_empty() const + + returns true if no values are added to the timeseries + """ + return _cmf_core.timeseries_is_empty(self, *args, **kwargs) + + + def clear(self, *args, **kwargs): + """ + clear(timeseries self) + + void clear() + """ + return _cmf_core.timeseries_clear(self, *args, **kwargs) + + + def adress(self, *args, **kwargs): + """ + adress(timeseries self) -> size_t + + size_t adress() + const + """ + return _cmf_core.timeseries_adress(self, *args, **kwargs) + + + def copy(self, *args, **kwargs): + """ + copy(timeseries self) -> timeseries + + timeseries copy() + const + """ + return _cmf_core.timeseries_copy(self, *args, **kwargs) + + + def size(self, *args, **kwargs): + """ + size(timeseries self) -> size_t + + size_t size() + const + + Number of items in the timeseries. + """ + return _cmf_core.timeseries_size(self, *args, **kwargs) + + + def count_values(self, *args, **kwargs): + """ + count_values(timeseries self) -> size_t + + size_t + count_values() const + + Number of valid values (=size - # of NaN's) + """ + return _cmf_core.timeseries_count_values(self, *args, **kwargs) + + + def __init__(self, *args, **kwargs): + """ + __init__(cmf::math::timeseries self, Time begin, Time step, int interpolationmethod=1, size_t count=0) -> timeseries + + timeseries(const cmf::math::timeseries &ts) + """ + _cmf_core.timeseries_swiginit(self, _cmf_core.new_timeseries(*args, **kwargs)) + + def from_array(*args, **kwargs): + """from_array(Time begin, Time step, cmf::math::num_array const & data) -> timeseries""" + return _cmf_core.timeseries_from_array(*args, **kwargs) + + from_array = staticmethod(from_array) + + def from_scalar(*args, **kwargs): + """from_scalar(double scalar) -> timeseries""" + return _cmf_core.timeseries_from_scalar(*args, **kwargs) + + from_scalar = staticmethod(from_scalar) + + def from_file(*args, **kwargs): + """from_file(std::string filename) -> timeseries""" + return _cmf_core.timeseries_from_file(*args, **kwargs) + + from_file = staticmethod(from_file) + + def get_t(self, *args, **kwargs): + """ + get_t(timeseries self, Time t) -> double + + double + get_t(cmf::math::Time t) const + """ + return _cmf_core.timeseries_get_t(self, *args, **kwargs) + + + def get_i(self, *args, **kwargs): + """ + get_i(timeseries self, ptrdiff_t i) -> double + + double + get_i(ptrdiff_t i) const + """ + return _cmf_core.timeseries_get_i(self, *args, **kwargs) + + + def set_t(self, *args, **kwargs): + """ + set_t(timeseries self, Time t, double value) + + void + set_t(cmf::math::Time t, double value) + """ + return _cmf_core.timeseries_set_t(self, *args, **kwargs) + + + def set_i(self, *args, **kwargs): + """ + set_i(timeseries self, ptrdiff_t i, double value) + + void + set_i(ptrdiff_t i, double value) + """ + return _cmf_core.timeseries_set_i(self, *args, **kwargs) + + + def get_slice(self, *args): + """ + get_slice(timeseries self, Time _begin, Time _end, Time _step) -> timeseries + get_slice(timeseries self, ptrdiff_t _begin, ptrdiff_t _end, ptrdiff_t step=1) -> timeseries + + cmf::math::timeseries get_slice(ptrdiff_t _begin, ptrdiff_t _end, + ptrdiff_t step=1) + """ + return _cmf_core.timeseries_get_slice(self, *args) + + + def set_slice(self, *args): + """ + set_slice(timeseries self, Time _begin, Time _end, timeseries values) + set_slice(timeseries self, ptrdiff_t _begin, ptrdiff_t _end, timeseries _values) + + void + set_slice(ptrdiff_t _begin, ptrdiff_t _end, cmf::math::timeseries + _values) + """ + return _cmf_core.timeseries_set_slice(self, *args) + + + def remove_nodata(self, *args, **kwargs): + """ + remove_nodata(timeseries self, double nodata_value) + + void + remove_nodata(double nodata_value) + """ + return _cmf_core.timeseries_remove_nodata(self, *args, **kwargs) + + + def __iadd__(self, *args): + """ + __iadd__(timeseries self, timeseries arg2) -> timeseries + __iadd__(timeseries self, double arg2) -> timeseries + """ + return _cmf_core.timeseries___iadd__(self, *args) + + + def __isub__(self, *args): + """ + __isub__(timeseries self, timeseries arg2) -> timeseries + __isub__(timeseries self, double arg2) -> timeseries + """ + return _cmf_core.timeseries___isub__(self, *args) + + + def __imul__(self, *args): + """ + __imul__(timeseries self, timeseries arg2) -> timeseries + __imul__(timeseries self, double arg2) -> timeseries + """ + return _cmf_core.timeseries___imul__(self, *args) + + + def __itruediv__(self, *args): + return _cmf_core.timeseries___itruediv__(self, *args) + __idiv__ = __itruediv__ + + + + def __add__(self, *args): + """ + __add__(timeseries self, timeseries arg2) -> timeseries + __add__(timeseries self, double arg2) -> timeseries + """ + return _cmf_core.timeseries___add__(self, *args) + + + def __sub__(self, *args): + """ + __sub__(timeseries self, timeseries arg2) -> timeseries + __sub__(timeseries self, double arg2) -> timeseries + """ + return _cmf_core.timeseries___sub__(self, *args) + + + def __mul__(self, *args): + """ + __mul__(timeseries self, timeseries arg2) -> timeseries + __mul__(timeseries self, double arg2) -> timeseries + """ + return _cmf_core.timeseries___mul__(self, *args) + + + def __truediv__(self, *args): + return _cmf_core.timeseries___truediv__(self, *args) + __div__ = __truediv__ + + + + def __neg__(self, *args, **kwargs): + """__neg__(timeseries self) -> timeseries""" + return _cmf_core.timeseries___neg__(self, *args, **kwargs) + + + def inv(self, *args, **kwargs): + """ + inv(timeseries self) -> timeseries + + timeseries inv() + const + """ + return _cmf_core.timeseries_inv(self, *args, **kwargs) + + + def reduce_min(self, *args, **kwargs): + """ + reduce_min(timeseries self, Time begin, Time step) -> timeseries + + timeseries + reduce_min(cmf::math::Time begin, cmf::math::Time step) const + + Creates a timeseries with a bigger timestep, containing the minimum. + + """ + return _cmf_core.timeseries_reduce_min(self, *args, **kwargs) + + + def reduce_max(self, *args, **kwargs): + """ + reduce_max(timeseries self, Time begin, Time step) -> timeseries + + timeseries + reduce_max(cmf::math::Time begin, cmf::math::Time step) const + + Creates a timeseries with a bigger timestep, containing the maximum. + + """ + return _cmf_core.timeseries_reduce_max(self, *args, **kwargs) + + + def reduce_sum(self, *args, **kwargs): + """ + reduce_sum(timeseries self, Time begin, Time step) -> timeseries + + timeseries + reduce_sum(cmf::math::Time begin, cmf::math::Time step) const + + Creates a timeseries with a bigger timestep, containing the sum. + """ + return _cmf_core.timeseries_reduce_sum(self, *args, **kwargs) + + + def reduce_avg(self, *args, **kwargs): + """ + reduce_avg(timeseries self, Time begin, Time step) -> timeseries + + timeseries + reduce_avg(cmf::math::Time begin, cmf::math::Time step) const + + Creates a timeseries with a bigger timestep, containing the average. + + """ + return _cmf_core.timeseries_reduce_avg(self, *args, **kwargs) + + + def floating_avg(self, *args): + """ + floating_avg(timeseries self, Time window_width) -> timeseries + floating_avg(timeseries self, size_t window_size) -> timeseries + + timeseries floating_avg(size_t window_size) const + """ + return _cmf_core.timeseries_floating_avg(self, *args) + + + def floating_max(self, *args, **kwargs): + """ + floating_max(timeseries self, Time window_width) -> timeseries + + timeseries floating_max(cmf::math::Time window_width) const + """ + return _cmf_core.timeseries_floating_max(self, *args, **kwargs) + + + def floating_min(self, *args, **kwargs): + """ + floating_min(timeseries self, Time window_width) -> timeseries + + timeseries floating_min(cmf::math::Time window_width) const + """ + return _cmf_core.timeseries_floating_min(self, *args, **kwargs) + + + def mean(self, *args, **kwargs): + """ + mean(timeseries self) -> double + + double mean() + const + """ + return _cmf_core.timeseries_mean(self, *args, **kwargs) + + + def min(self, *args, **kwargs): + """ + min(timeseries self) -> double + + double min() const + + """ + return _cmf_core.timeseries_min(self, *args, **kwargs) + + + def max(self, *args, **kwargs): + """ + max(timeseries self) -> double + + double max() const + + """ + return _cmf_core.timeseries_max(self, *args, **kwargs) + + + def log(self, *args, **kwargs): + """ + log(timeseries self) -> timeseries + + timeseries log() + const + """ + return _cmf_core.timeseries_log(self, *args, **kwargs) + + + def log10(self, *args, **kwargs): + """ + log10(timeseries self) -> timeseries + + timeseries + log10() const + """ + return _cmf_core.timeseries_log10(self, *args, **kwargs) + + + def power(self, *args, **kwargs): + """ + power(timeseries self, double exponent) -> timeseries + + timeseries + power(double exponent) const + """ + return _cmf_core.timeseries_power(self, *args, **kwargs) + + + def exp(self, *args, **kwargs): + """ + exp(timeseries self) -> timeseries + + timeseries exp() + const + """ + return _cmf_core.timeseries_exp(self, *args, **kwargs) + + begin = _swig_property(_cmf_core.timeseries_begin_get) + step = _swig_property(_cmf_core.timeseries_step_get) + end = _swig_property(_cmf_core.timeseries_end_get) + + def __len__(self, *args, **kwargs): + """__len__(timeseries self) -> ptrdiff_t""" + return _cmf_core.timeseries___len__(self, *args, **kwargs) + + + def __repr__(self): + return "cmf.timeseries(%s:%s:%s,count=%i)" % (self.begin,self.end,self.step,self.size()) + def extend(self,list) : + """ Adds the values of a sequence to the timeseries""" + for item in list : + self.add(float(item)) + def __getitem__(self,index): + if isinstance(index,int): + return self.get_i(index) + elif isinstance(index,slice): + if index.step: + return self.get_slice(index.start,index.stop,index.step) + else: + return self.get_slice(index.start,index.stop) + else: + return self.get_t(index) + def __setitem__(self,index,value): + if isinstance(index,int): + self.set_i(index,value) + elif isinstance(index,slice): + if index.step: + raise ValueError("Slices must be continous, when used for setting") + else: + if not isinstance(value,timeseries): + value=timeseries(value) + self.set_slice(index.start,index.stop,value) + else: + self.set_t(index,value) + def __iter__(self): + for i in xrange(self.size()): + yield self.get_i(i) + def interpolate(self,begin,end,step): + """ Returns a generator returning the interpolated values at the timesteps """ + if step>self.step(): + ts=self.reduce_avg(begin,step) + else: + ts=self + for t in timerange(step,end,step): + yield ts[t] + def __radd__(self,other): + return self + other; + def __rmul__(self,other): + return self + other; + def __rsub__(self,other): + res=-self + res+=other + return res + def __rdiv__(self,other): + res=self.inv() + res*=other + return res + def iter_time(self, as_float=0): + """Returns an iterator to iterate over each timestep + as_float if True, the timesteps will returned as floating point numbers representing the days after 1.1.0001 00:00 + """ + for i in xrange(len(self)): + if as_float: + yield ((self.begin + self.step * i) - cmf.Time(1,1,1)).AsDays() + else: + yield self.begin + self.step * i + def to_buffer(self): + """Returns a binary buffer filled with the data of self""" + return struct.pack('qqqq%id' % self.size(),self.begin.AsMilliseconds(),self.step.AsMilliseconds(),self.interpolationpower(), *self) + def to_file(self,f): + """ Saves a timeseries in a special binary format. + The format consists of 4 integers with 64 bit, indicating the milliseconds after the 31.12.1899 00:00 of the beginning of the timeseries, the milliseconds of the time step, + the interpolation power and the number of values. The following 64 bit floats, are the values of the timeseries + """ + if isinstance(f,str): + f=open(f,'wb') + elif not hasattr(f,'write'): + raise TypeError("The file f must be either an object providing a write method, like a file, or a valid file name") + f.write(struct.pack('qqqq%id' % self.size(), self.size(), self.begin.AsMilliseconds(),self.step.AsMilliseconds(),self.interpolationpower(), *self)) + def to_pandas(self): + """ + Returns the timeseries as a pandas Series object + :return: A pandas.Series object with the timesteps as index + """ + import pandas as pd + import numpy as np + + return pd.Series(data=np.array(self),index=(t.AsPython() for t in self.iter_time())) + + @classmethod + def from_sequence(cls,begin,step,sequence=[],interpolation_mode=1): + res=cls(begin,step,interpolation_mode) + res.extend(sequence) + return res + + @classmethod + def from_buffer(cls,buf): + header_length=struct.calcsize('qqqq') + header=struct.unpack('qqqq',buffer[:header_length]) + res=cls(header[1]*ms,header[2]*ms,header[3]) + res.extend(struct.unpack('%id' % header[0],*buffer(buf,header_length,header[0]*8))) + return res + @classmethod + def from_file(cls,f): + """ Loads a timeseries saved with to_file from a file + Description of the file layout: + byte: + 0 Number of (int64) + 8 Begin of timeseries (in ms since 31.12.1899 00:00) (int64) + 16 Step size of timeseries (in ms) (int64) + 24 Interpolation power (int64) + 32 First value of timeseries (float64) + """ + if isinstance(f,str): + f=open(f,'rb') + elif not hasattr(f,'read'): + raise TypeError("The file f must either implement a 'read' method, like a file, or must be a vild file name") + header_length=struct.calcsize('qqqq') + header=struct.unpack('qqqq',f.read(header_length)) + res=cls(header[1]*ms,header[2]*ms,header[3]) + res.extend(struct.unpack('%id' % header[0],f.read(-1))) + return res + + __swig_destroy__ = _cmf_core.delete_timeseries +timeseries.interpolationpower = new_instancemethod(_cmf_core.timeseries_interpolationpower, None, timeseries) +timeseries.add = new_instancemethod(_cmf_core.timeseries_add, None, timeseries) +timeseries.is_empty = new_instancemethod(_cmf_core.timeseries_is_empty, None, timeseries) +timeseries.clear = new_instancemethod(_cmf_core.timeseries_clear, None, timeseries) +timeseries.adress = new_instancemethod(_cmf_core.timeseries_adress, None, timeseries) +timeseries.copy = new_instancemethod(_cmf_core.timeseries_copy, None, timeseries) +timeseries.size = new_instancemethod(_cmf_core.timeseries_size, None, timeseries) +timeseries.count_values = new_instancemethod(_cmf_core.timeseries_count_values, None, timeseries) +timeseries.get_t = new_instancemethod(_cmf_core.timeseries_get_t, None, timeseries) +timeseries.get_i = new_instancemethod(_cmf_core.timeseries_get_i, None, timeseries) +timeseries.set_t = new_instancemethod(_cmf_core.timeseries_set_t, None, timeseries) +timeseries.set_i = new_instancemethod(_cmf_core.timeseries_set_i, None, timeseries) +timeseries.get_slice = new_instancemethod(_cmf_core.timeseries_get_slice, None, timeseries) +timeseries.set_slice = new_instancemethod(_cmf_core.timeseries_set_slice, None, timeseries) +timeseries.remove_nodata = new_instancemethod(_cmf_core.timeseries_remove_nodata, None, timeseries) +timeseries.__iadd__ = new_instancemethod(_cmf_core.timeseries___iadd__, None, timeseries) +timeseries.__isub__ = new_instancemethod(_cmf_core.timeseries___isub__, None, timeseries) +timeseries.__imul__ = new_instancemethod(_cmf_core.timeseries___imul__, None, timeseries) +timeseries.__add__ = new_instancemethod(_cmf_core.timeseries___add__, None, timeseries) +timeseries.__sub__ = new_instancemethod(_cmf_core.timeseries___sub__, None, timeseries) +timeseries.__mul__ = new_instancemethod(_cmf_core.timeseries___mul__, None, timeseries) +timeseries.__neg__ = new_instancemethod(_cmf_core.timeseries___neg__, None, timeseries) +timeseries.inv = new_instancemethod(_cmf_core.timeseries_inv, None, timeseries) +timeseries.reduce_min = new_instancemethod(_cmf_core.timeseries_reduce_min, None, timeseries) +timeseries.reduce_max = new_instancemethod(_cmf_core.timeseries_reduce_max, None, timeseries) +timeseries.reduce_sum = new_instancemethod(_cmf_core.timeseries_reduce_sum, None, timeseries) +timeseries.reduce_avg = new_instancemethod(_cmf_core.timeseries_reduce_avg, None, timeseries) +timeseries.floating_avg = new_instancemethod(_cmf_core.timeseries_floating_avg, None, timeseries) +timeseries.floating_max = new_instancemethod(_cmf_core.timeseries_floating_max, None, timeseries) +timeseries.floating_min = new_instancemethod(_cmf_core.timeseries_floating_min, None, timeseries) +timeseries.mean = new_instancemethod(_cmf_core.timeseries_mean, None, timeseries) +timeseries.min = new_instancemethod(_cmf_core.timeseries_min, None, timeseries) +timeseries.max = new_instancemethod(_cmf_core.timeseries_max, None, timeseries) +timeseries.log = new_instancemethod(_cmf_core.timeseries_log, None, timeseries) +timeseries.log10 = new_instancemethod(_cmf_core.timeseries_log10, None, timeseries) +timeseries.power = new_instancemethod(_cmf_core.timeseries_power, None, timeseries) +timeseries.exp = new_instancemethod(_cmf_core.timeseries_exp, None, timeseries) +timeseries.__len__ = new_instancemethod(_cmf_core.timeseries___len__, None, timeseries) +timeseries_swigregister = _cmf_core.timeseries_swigregister +timeseries_swigregister(timeseries) +ms = cvar.ms +sec = cvar.sec +min = cvar.min +h = cvar.h +day = cvar.day +week = cvar.week +year = cvar.year +month = cvar.month +never = cvar.never + +def timeseries_from_array(*args, **kwargs): + """timeseries_from_array(Time begin, Time step, cmf::math::num_array const & data) -> timeseries""" + return _cmf_core.timeseries_from_array(*args, **kwargs) + +def timeseries_from_scalar(*args, **kwargs): + """timeseries_from_scalar(double scalar) -> timeseries""" + return _cmf_core.timeseries_from_scalar(*args, **kwargs) + +def timeseries_from_file(*args, **kwargs): + """timeseries_from_file(std::string filename) -> timeseries""" + return _cmf_core.timeseries_from_file(*args, **kwargs) + + +def nash_sutcliffe(*args, **kwargs): + """ + nash_sutcliffe(timeseries model, timeseries observation) -> double + + double + cmf::math::nash_sutcliffe(const cmf::math::timeseries &model, const + cmf::math::timeseries &observation) + + Calculates the Nash-Sutcliffe efficiency of a modeled timeseries in + comparison with an observed timeseries. + + The Nash-Sutcliffe efficiancy is defined as: + + .. math:: + + E = 1 - + \\frac{\\sum_{t=1}^{T}(M_t - O_t)^2}{\\sum_{t=1}^{T}(O_t - + \\overline{O})^2} + + where :math:`T` is the number of observation time + steps + + :math:`M` is the timeseries of model results matchinig O + + :math:`O` is the timeseries containing observations + + :math:`\\overline{O}` is the arithmetic mean of observations + """ + return _cmf_core.nash_sutcliffe(*args, **kwargs) + +def AsCMFtime(date): + """Converts a python datetime to cmf.Time""" + return Time(date.day,date.month,date.year,date.hour,date.minute,date.second,date.microsecond/1000) +def timerange(start,end,step=day): + """Creates a generator of cmf.Time, similar to the Python range function""" + return [start+step*x for x in range(0,int((end-start)/step))] +def xtimerange(start,end,step=day): + """Creates a generator of cmf.Time, similar to the Python range function""" + return (start+step*x for x in range(0,int((end-start)/step))) + +class integratable(object): + """ + + + integratable is a functionality for different classes for integrating + values over time. + + Main usage of an integratable is the calculation of average fluxes + over time e.g. + + .. math:: + + + \\int_{t_0}^{t_{end}}q\\left(t,V_i,V_j\\right)dt + + C++ includes: statevariable.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def integrate(self, *args, **kwargs): + """ + integrate(integratable self, Time t) + + virtual + void integrate(Time t)=0 + + Integrates the variable until time t. + """ + return _cmf_core.integratable_integrate(self, *args, **kwargs) + + + def reset(self, *args, **kwargs): + """ + reset(integratable self, Time t) + + virtual void + reset(Time t)=0 + + Sets the start time of the integral. + """ + return _cmf_core.integratable_reset(self, *args, **kwargs) + + + def sum(self, *args, **kwargs): + """ + sum(integratable self) -> double + + virtual double + sum() const =0 + + Get the integral from the last reset until the last call of integrate. + + """ + return _cmf_core.integratable_sum(self, *args, **kwargs) + + + def avg(self, *args, **kwargs): + """ + avg(integratable self) -> double + + virtual double + avg() const =0 + + Returns average of the integrated variable (eg. flux) from the last + reset until the last call of integrate. + """ + return _cmf_core.integratable_avg(self, *args, **kwargs) + + __swig_destroy__ = _cmf_core.delete_integratable +integratable.integrate = new_instancemethod(_cmf_core.integratable_integrate, None, integratable) +integratable.reset = new_instancemethod(_cmf_core.integratable_reset, None, integratable) +integratable.sum = new_instancemethod(_cmf_core.integratable_sum, None, integratable) +integratable.avg = new_instancemethod(_cmf_core.integratable_avg, None, integratable) +integratable_swigregister = _cmf_core.integratable_swigregister +integratable_swigregister(integratable) + +class integratable_list(object): + """ + + + A list of cmf::math::integratable objects. + + Todo TODO: Complete collection interface (getitem with slicing etc.) + + C++ includes: statevariable.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + + def append(self, *args, **kwargs): + """ + append(integratable_list self, cmf::math::integratable::ptr add) + + void + append(cmf::math::integratable::ptr add) + + Adds an integratable to the list. + """ + return _cmf_core.integratable_list_append(self, *args, **kwargs) + + + def remove(self, *args, **kwargs): + """ + remove(integratable_list self, cmf::math::integratable::ptr rm) + + void + remove(cmf::math::integratable::ptr rm) + + Removes an integratable from the list. + """ + return _cmf_core.integratable_list_remove(self, *args, **kwargs) + + + def __getitem(self, *args, **kwargs): + """__getitem(integratable_list self, int index) -> cmf::math::integratable::ptr""" + return _cmf_core.integratable_list___getitem(self, *args, **kwargs) + + + def size(self, *args, **kwargs): + """ + size(integratable_list self) -> size_t + + size_t + size() const + + Number of integratables in the list. + """ + return _cmf_core.integratable_list_size(self, *args, **kwargs) + + + def avg(self, *args, **kwargs): + """ + avg(integratable_list self) -> cmf::math::num_array + + cmf::math::num_array avg() const + """ + return _cmf_core.integratable_list_avg(self, *args, **kwargs) + + + def sum(self, *args, **kwargs): + """ + sum(integratable_list self) -> cmf::math::num_array + + cmf::math::num_array sum() const + """ + return _cmf_core.integratable_list_sum(self, *args, **kwargs) + + + def reset(self, *args, **kwargs): + """ + reset(integratable_list self, Time t) + + void + reset(Time t) + """ + return _cmf_core.integratable_list_reset(self, *args, **kwargs) + + + def integrate(self, *args, **kwargs): + """ + integrate(integratable_list self, Time t) + + void + integrate(Time t) + """ + return _cmf_core.integratable_list_integrate(self, *args, **kwargs) + + + def __init__(self, *args): + """ + __init__(cmf::math::integratable_list self) -> integratable_list + __init__(cmf::math::integratable_list self, integratable_list for_copy) -> integratable_list + + integratable_list(const integratable_list &for_copy) + """ + _cmf_core.integratable_list_swiginit(self, _cmf_core.new_integratable_list(*args)) + + def __len__(self, *args, **kwargs): + """__len__(integratable_list self) -> size_t""" + return _cmf_core.integratable_list___len__(self, *args, **kwargs) + + + def __iter__(self): + for i in xrange(len(self)): + yield self[i] + def __getitem__(self,index): + if isinstance(index,slice): + return [self.__getitem(i) for i in range(*index.indices(len(self)))] + else: + try: + it=iter(index) + return [self.__getitem(i) for i in it] + except: + return self.__getitem(index) + + __swig_destroy__ = _cmf_core.delete_integratable_list +integratable_list.append = new_instancemethod(_cmf_core.integratable_list_append, None, integratable_list) +integratable_list.remove = new_instancemethod(_cmf_core.integratable_list_remove, None, integratable_list) +integratable_list.__getitem = new_instancemethod(_cmf_core.integratable_list___getitem, None, integratable_list) +integratable_list.size = new_instancemethod(_cmf_core.integratable_list_size, None, integratable_list) +integratable_list.avg = new_instancemethod(_cmf_core.integratable_list_avg, None, integratable_list) +integratable_list.sum = new_instancemethod(_cmf_core.integratable_list_sum, None, integratable_list) +integratable_list.reset = new_instancemethod(_cmf_core.integratable_list_reset, None, integratable_list) +integratable_list.integrate = new_instancemethod(_cmf_core.integratable_list_integrate, None, integratable_list) +integratable_list.__len__ = new_instancemethod(_cmf_core.integratable_list___len__, None, integratable_list) +integratable_list_swigregister = _cmf_core.integratable_list_swigregister +integratable_list_swigregister(integratable_list) + +class StateVariable(object): + """ + + + Abstract class state variable. + + Simple exponential system class header implementing a state variable: + + C++ includes: statevariable.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def dxdt(self, *args, **kwargs): + """ + dxdt(StateVariable self, Time time) -> real + + virtual real + dxdt(const cmf::math::Time &time)=0 + + Returns the derivate of the state variable at time time. + """ + return _cmf_core.StateVariable_dxdt(self, *args, **kwargs) + + + def get_abs_errtol(self, *args, **kwargs): + """ + get_abs_errtol(StateVariable self, real rel_errtol) -> real + + virtual real get_abs_errtol(real rel_errtol) const + """ + return _cmf_core.StateVariable_get_abs_errtol(self, *args, **kwargs) + + + def to_string(self, *args, **kwargs): + """ + to_string(StateVariable self) -> std::string + + virtual + std::string to_string() const =0 + """ + return _cmf_core.StateVariable_to_string(self, *args, **kwargs) + + __swig_destroy__ = _cmf_core.delete_StateVariable + state = _swig_property(_cmf_core.StateVariable_state_get, _cmf_core.StateVariable_state_set) + + def __repr__(self): + return self.to_string() + +StateVariable.dxdt = new_instancemethod(_cmf_core.StateVariable_dxdt, None, StateVariable) +StateVariable.get_abs_errtol = new_instancemethod(_cmf_core.StateVariable_get_abs_errtol, None, StateVariable) +StateVariable.to_string = new_instancemethod(_cmf_core.StateVariable_to_string, None, StateVariable) +StateVariable_swigregister = _cmf_core.StateVariable_swigregister +StateVariable_swigregister(StateVariable) + +class StateVariableOwner(object): + """ + + + An abstract class, that owns one or more state variables, that can add + them to a vector of state variables in a certain order. + + C++ includes: statevariable.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def get_states(self, *args, **kwargs): + """ + get_states(StateVariableOwner self) -> StateVariableList + + virtual StateVariableList get_states()=0 + + Add the state variables, owned by an object derived from + StateVariableOwner, to the given vector. + """ + return _cmf_core.StateVariableOwner_get_states(self, *args, **kwargs) + + __swig_destroy__ = _cmf_core.delete_StateVariableOwner +StateVariableOwner.get_states = new_instancemethod(_cmf_core.StateVariableOwner_get_states, None, StateVariableOwner) +StateVariableOwner_swigregister = _cmf_core.StateVariableOwner_swigregister +StateVariableOwner_swigregister(StateVariableOwner) + +class StateVariableList(StateVariableOwner): + """Proxy of C++ cmf::math::StateVariableList class.""" + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + + def append(self, *args, **kwargs): + """ + append(StateVariableList self, cmf::math::StateVariable::ptr sv) + + void + append(StateVariable::ptr sv) + """ + return _cmf_core.StateVariableList_append(self, *args, **kwargs) + + + def extend(self, *args, **kwargs): + """ + extend(StateVariableList self, StateVariableOwner svo) + + void + extend(StateVariableOwner &svo) + """ + return _cmf_core.StateVariableList_extend(self, *args, **kwargs) + + + def __iadd__(self, *args): + """ + __iadd__(StateVariableList self, StateVariableList food) -> StateVariableList + __iadd__(StateVariableList self, StateVariableOwner svo) -> StateVariableList + """ + return _cmf_core.StateVariableList___iadd__(self, *args) + + + def size(self, *args, **kwargs): + """ + size(StateVariableList self) -> size_t + + size_t + size() const + """ + return _cmf_core.StateVariableList_size(self, *args, **kwargs) + + __swig_destroy__ = _cmf_core.delete_StateVariableList + + def __len__(self, *args, **kwargs): + """__len__(StateVariableList self) -> size_t""" + return _cmf_core.StateVariableList___len__(self, *args, **kwargs) + + + def __init__(self, *args, **kwargs): + """__init__(cmf::math::StateVariableList self) -> StateVariableList""" + _cmf_core.StateVariableList_swiginit(self, _cmf_core.new_StateVariableList(*args, **kwargs)) +StateVariableList.append = new_instancemethod(_cmf_core.StateVariableList_append, None, StateVariableList) +StateVariableList.extend = new_instancemethod(_cmf_core.StateVariableList_extend, None, StateVariableList) +StateVariableList.__iadd__ = new_instancemethod(_cmf_core.StateVariableList___iadd__, None, StateVariableList) +StateVariableList.size = new_instancemethod(_cmf_core.StateVariableList_size, None, StateVariableList) +StateVariableList.__len__ = new_instancemethod(_cmf_core.StateVariableList___len__, None, StateVariableList) +StateVariableList_swigregister = _cmf_core.StateVariableList_swigregister +StateVariableList_swigregister(StateVariableList) + +class Integrator(StateVariableOwner): + """ + + + Base class for any kind of integrator. + + Pure virtual functions: Integrate + + copy Please provide a custom copy constructor + + C++ includes: integrator.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def get_dxdt(self, *args, **kwargs): + """ + get_dxdt(Integrator self, Time time) -> cmf::math::num_array + + cmf::math::num_array get_dxdt(Time time) const + """ + return _cmf_core.Integrator_get_dxdt(self, *args, **kwargs) + + + def add_states(self, *args, **kwargs): + """ + add_states(Integrator self, StateVariableOwner stateOwner) + + virtual + void add_states(cmf::math::StateVariableOwner &stateOwner) + + Add state variables from a StateVariableOwner. + """ + return _cmf_core.Integrator_add_states(self, *args, **kwargs) + + + def add_single_state(self, *args, **kwargs): + """ + add_single_state(Integrator self, cmf::math::StateVariable::ptr state) + + virtual void add_single_state(cmf::math::StateVariable::ptr state) + + Adds a single state variable to the integrator. + """ + return _cmf_core.Integrator_add_single_state(self, *args, **kwargs) + + integratables = _swig_property(_cmf_core.Integrator_integratables_get, _cmf_core.Integrator_integratables_set) + reset_integratables = _swig_property(_cmf_core.Integrator_reset_integratables_get, _cmf_core.Integrator_reset_integratables_set) + use_OpenMP = _swig_property(_cmf_core.Integrator_use_OpenMP_get, _cmf_core.Integrator_use_OpenMP_set) + + def size(self, *args, **kwargs): + """ + size(Integrator self) -> size_t + + size_t size() + const + + returns the number of state variables + """ + return _cmf_core.Integrator_size(self, *args, **kwargs) + + + def get_state(self, *args, **kwargs): + """ + get_state(Integrator self, ptrdiff_t position) -> real + + real + get_state(ptrdiff_t position) const + + Returns the statevariable at position Simplifies the assessment of + state variables. + """ + return _cmf_core.Integrator_get_state(self, *args, **kwargs) + + + def set_state(self, *args, **kwargs): + """ + set_state(Integrator self, ptrdiff_t position, real newState) + + void + set_state(ptrdiff_t position, real newState) + + Simplifies the assessment of state variables. + """ + return _cmf_core.Integrator_set_state(self, *args, **kwargs) + + + def get_states(self, *args): + """ + get_states(Integrator self) -> cmf::math::num_array + get_states(Integrator self) -> StateVariableList + + StateVariableList get_states() + + gets the state variables of the integrator + """ + return _cmf_core.Integrator_get_states(self, *args) + + __swig_destroy__ = _cmf_core.delete_Integrator + + def get_t(self, *args, **kwargs): + """ + get_t(Integrator self) -> Time + + cmf::math::Time + get_t() const + + Returns the current model time. + """ + return _cmf_core.Integrator_get_t(self, *args, **kwargs) + + + def set_t(self, *args, **kwargs): + """ + set_t(Integrator self, Time val) + + void + set_t(cmf::math::Time val) + + Sets the current model time. + """ + return _cmf_core.Integrator_set_t(self, *args, **kwargs) + + + def get_dt(self, *args, **kwargs): + """ + get_dt(Integrator self) -> Time + + cmf::math::Time + get_dt() const + + Returns the last time step. + """ + return _cmf_core.Integrator_get_dt(self, *args, **kwargs) + + + def reset(self, *args, **kwargs): + """ + reset(Integrator self) + + virtual void + reset() + + Resets any saved history (for multistep methods) + """ + return _cmf_core.Integrator_reset(self, *args, **kwargs) + + + def copy(self, *args, **kwargs): + """ + copy(Integrator self) -> Integrator + + virtual + Integrator* copy() const =0 + + Polymorphic copy constructor. + """ + return _cmf_core.Integrator_copy(self, *args, **kwargs) + + + def integrate(self, *args, **kwargs): + """ + integrate(Integrator self, Time t_max, Time dt) -> int + + virtual int + integrate(cmf::math::Time t_max, cmf::math::Time dt)=0 + + Integrates the vector of state variables. + + Parameters: + ----------- + + t_max: To stop the model (if running in a model framework) at time + steps of value exchange e.g. full hours, the next value exchange time + can be given + + dt: Takes the proposed time step, and changes it into the effectively + used time step according to the local stiffness of the problem and + MaxTime + """ + return _cmf_core.Integrator_integrate(self, *args, **kwargs) + + + def integrate_until(self, *args, **kwargs): + """ + integrate_until(Integrator self, Time t_max, Time dt, bool reset=False) + + void + integrate_until(cmf::math::Time t_max, cmf::math::Time dt=Time(), bool + reset=false) + + Integrates the vector of state variables until t_max. + + Parameters: + ----------- + + t_max: Time, the solver should run to + + dt: Time step (may be omitted) + + reset: If true, solver is reseted before integration starts + """ + return _cmf_core.Integrator_integrate_until(self, *args, **kwargs) + + + def __getitem__(self, *args, **kwargs): + """__getitem__(Integrator self, int index) -> cmf::math::StateVariable::ptr""" + return _cmf_core.Integrator___getitem__(self, *args, **kwargs) + + + def __call__(self,t,reset=False): + if t int + + int + get_error_position() const + + Returns the position of the biggest error. + """ + return _cmf_core.BDF2_get_error_position(self, *args, **kwargs) + + max_order = _swig_property(_cmf_core.BDF2_max_order_get, _cmf_core.BDF2_max_order_set) + + def __init__(self, *args): + """ + __init__(cmf::math::BDF2 self, real epsilon=1e-9, Time tStepMin) -> BDF2 + __init__(cmf::math::BDF2 self, StateVariableOwner states, real epsilon=1e-9, Time tStepMin) -> BDF2 + __init__(cmf::math::BDF2 self, Integrator templ) -> BDF2 + + BDF2(const Integrator + &templ) + + Constructs a new BDF2 integrator. + + Parameters: + ----------- + + templ: Template to be used to construct a BDF2 method + """ + _cmf_core.BDF2_swiginit(self, _cmf_core.new_BDF2(*args)) + __swig_destroy__ = _cmf_core.delete_BDF2 +BDF2.get_error_position = new_instancemethod(_cmf_core.BDF2_get_error_position, None, BDF2) +BDF2_swigregister = _cmf_core.BDF2_swigregister +BDF2_swigregister(BDF2) + +class ExplicitEuler_fixed(Integrator): + """ + + + An explicit Euler integrator, with a fixed time step. + + C++ includes: explicit_euler.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + + def __init__(self, *args): + """ + __init__(cmf::math::ExplicitEuler_fixed self, StateVariableOwner states) -> ExplicitEuler_fixed + __init__(cmf::math::ExplicitEuler_fixed self) -> ExplicitEuler_fixed + __init__(cmf::math::ExplicitEuler_fixed self, Integrator copy) -> ExplicitEuler_fixed + + ExplicitEuler_fixed(const Integrator ©) + + copy constructor + """ + _cmf_core.ExplicitEuler_fixed_swiginit(self, _cmf_core.new_ExplicitEuler_fixed(*args)) + __swig_destroy__ = _cmf_core.delete_ExplicitEuler_fixed +ExplicitEuler_fixed_swigregister = _cmf_core.ExplicitEuler_fixed_swigregister +ExplicitEuler_fixed_swigregister(ExplicitEuler_fixed) + +class HeunIntegrator(Integrator): + """ + + + A simple predictor - corrector solver. + + Not tested and very experimentally :math:`y^{n+1} = y^n + \\alpha f(y^n + f(y^n)dt)dt + (1-\\alpha)f(y^n)dt` + + C++ includes: explicit_euler.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + alpha = _swig_property(_cmf_core.HeunIntegrator_alpha_get, _cmf_core.HeunIntegrator_alpha_set) + + def __init__(self, *args): + """ + __init__(cmf::math::HeunIntegrator self, StateVariableOwner states, real Alpha=0.5) -> HeunIntegrator + __init__(cmf::math::HeunIntegrator self, real Alpha=0.5) -> HeunIntegrator + __init__(cmf::math::HeunIntegrator self, Integrator copy) -> HeunIntegrator + + HeunIntegrator(const Integrator ©) + + copy constructor + """ + _cmf_core.HeunIntegrator_swiginit(self, _cmf_core.new_HeunIntegrator(*args)) + __swig_destroy__ = _cmf_core.delete_HeunIntegrator +HeunIntegrator_swigregister = _cmf_core.HeunIntegrator_swigregister +HeunIntegrator_swigregister(HeunIntegrator) + +class ImplicitEuler(Integrator): + """ + + + An implicit (backward) Euler integrator using fixpoint iteration. + + C++ includes: implicit_euler.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + dt_min = _swig_property(_cmf_core.ImplicitEuler_dt_min_get, _cmf_core.ImplicitEuler_dt_min_set) + + def __init__(self, *args): + """ + __init__(cmf::math::ImplicitEuler self, StateVariableOwner states, real epsilon=1e-9, Time tStepMin) -> ImplicitEuler + __init__(cmf::math::ImplicitEuler self, real epsilon=1e-9, Time tStepMin) -> ImplicitEuler + __init__(cmf::math::ImplicitEuler self, Integrator arg2) -> ImplicitEuler + + ImplicitEuler(const Integrator &) + + copy constructor + """ + _cmf_core.ImplicitEuler_swiginit(self, _cmf_core.new_ImplicitEuler(*args)) + __swig_destroy__ = _cmf_core.delete_ImplicitEuler +ImplicitEuler_swigregister = _cmf_core.ImplicitEuler_swigregister +ImplicitEuler_swigregister(ImplicitEuler) + +class RKFIntegrator(Integrator): + """ + + + Integrates a vector of cmf::math::StateVariable with the Runge-Kutta- + Fehlberg (RKF54) method. + + C++ includes: RKFintegrator.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + + def __init__(self, *args): + """ + __init__(cmf::math::RKFIntegrator self, StateVariableOwner states, real epsilon=1e-9, Time dt_min) -> RKFIntegrator + __init__(cmf::math::RKFIntegrator self, real epsilon=1e-9, Time dt_min) -> RKFIntegrator + + RKFIntegrator(real epsilon=1e-9, cmf::math::Time + dt_min=cmf::math::timespan(1000)) + + Constructs a new RKFIntegrator. + + Parameters: + ----------- + + epsilon: relative error tolerance per time step (default=1e-9) + + dt_min: minimum time step (default=1s) + """ + _cmf_core.RKFIntegrator_swiginit(self, _cmf_core.new_RKFIntegrator(*args)) + __swig_destroy__ = _cmf_core.delete_RKFIntegrator +RKFIntegrator_swigregister = _cmf_core.RKFIntegrator_swigregister +RKFIntegrator_swigregister(RKFIntegrator) + +class CVodeIntegrator(Integrator): + """ + + + A wrapper class for the CVODE integrator from the SUNDIALS library. + + https://computation.llnl.gov/casc/sundials/main.html + + C++ includes: cvodeintegrator.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + preconditioner = _swig_property(_cmf_core.CVodeIntegrator_preconditioner_get, _cmf_core.CVodeIntegrator_preconditioner_set) + MaxNonLinearIterations = _swig_property(_cmf_core.CVodeIntegrator_MaxNonLinearIterations_get, _cmf_core.CVodeIntegrator_MaxNonLinearIterations_set) + MaxConvergenceFailures = _swig_property(_cmf_core.CVodeIntegrator_MaxConvergenceFailures_get, _cmf_core.CVodeIntegrator_MaxConvergenceFailures_set) + MaxErrorTestFailures = _swig_property(_cmf_core.CVodeIntegrator_MaxErrorTestFailures_get, _cmf_core.CVodeIntegrator_MaxErrorTestFailures_set) + maxl = _swig_property(_cmf_core.CVodeIntegrator_maxl_get, _cmf_core.CVodeIntegrator_maxl_set) + LinearSolver = _swig_property(_cmf_core.CVodeIntegrator_LinearSolver_get, _cmf_core.CVodeIntegrator_LinearSolver_set) + MaxOrder = _swig_property(_cmf_core.CVodeIntegrator_MaxOrder_get, _cmf_core.CVodeIntegrator_MaxOrder_set) + max_step = _swig_property(_cmf_core.CVodeIntegrator_max_step_get, _cmf_core.CVodeIntegrator_max_step_set) + + def initialize(self, *args, **kwargs): + """ + initialize(CVodeIntegrator self) + + void + initialize() + + Initializes the solver. Do not add or remove state variables after + initialization. The solver is automatically intialized when + integrating. + """ + return _cmf_core.CVodeIntegrator_initialize(self, *args, **kwargs) + + + def release(self, *args, **kwargs): + """ + release(CVodeIntegrator self) + + void + release() + + Releases the internal solver. Call release before you add state + variables or to change properties. + """ + return _cmf_core.CVodeIntegrator_release(self, *args, **kwargs) + + + def __init__(self, *args): + """ + __init__(cmf::math::CVodeIntegrator self, real epsilon=1e-9, char _preconditioner) -> CVodeIntegrator + __init__(cmf::math::CVodeIntegrator self, StateVariableOwner states, real epsilon=1e-9, char _preconditioner) -> CVodeIntegrator + __init__(cmf::math::CVodeIntegrator self, CVodeIntegrator templ) -> CVodeIntegrator + + CVodeIntegrator(const CVodeIntegrator &templ) + + copy constructor, creates a new CVODE integrator similiar to the + given, but without statevariables + """ + _cmf_core.CVodeIntegrator_swiginit(self, _cmf_core.new_CVodeIntegrator(*args)) + + def get_error(self, *args, **kwargs): + """ + get_error(CVodeIntegrator self) -> cmf::math::num_array + + cmf::math::num_array get_error() const + + Error vector of the integrator. + """ + return _cmf_core.CVodeIntegrator_get_error(self, *args, **kwargs) + + + def get_nonlinear_iterations(self, *args, **kwargs): + """ + get_nonlinear_iterations(CVodeIntegrator self) -> int + + int + get_nonlinear_iterations() const + + Returns the number of non-linear iterations performed. Calls + CVodeGetNumNonlinSolvIters. + """ + return _cmf_core.CVodeIntegrator_get_nonlinear_iterations(self, *args, **kwargs) + + + def get_rhsevals(self, *args, **kwargs): + """ + get_rhsevals(CVodeIntegrator self) -> int + + int + get_rhsevals() const + + Returns the number of evaluations of the right hand side of the ODE. + Calls CVodeGetNumRhsEvals. + """ + return _cmf_core.CVodeIntegrator_get_rhsevals(self, *args, **kwargs) + + + def copy(self, *args, **kwargs): + """ + copy(CVodeIntegrator self) -> CVodeIntegrator + + CVodeIntegrator* copy() const + + Polymorphic copy constructor. + """ + return _cmf_core.CVodeIntegrator_copy(self, *args, **kwargs) + + __swig_destroy__ = _cmf_core.delete_CVodeIntegrator + order = _swig_property(_cmf_core.CVodeIntegrator_order_get) +CVodeIntegrator.initialize = new_instancemethod(_cmf_core.CVodeIntegrator_initialize, None, CVodeIntegrator) +CVodeIntegrator.release = new_instancemethod(_cmf_core.CVodeIntegrator_release, None, CVodeIntegrator) +CVodeIntegrator.get_error = new_instancemethod(_cmf_core.CVodeIntegrator_get_error, None, CVodeIntegrator) +CVodeIntegrator.get_nonlinear_iterations = new_instancemethod(_cmf_core.CVodeIntegrator_get_nonlinear_iterations, None, CVodeIntegrator) +CVodeIntegrator.get_rhsevals = new_instancemethod(_cmf_core.CVodeIntegrator_get_rhsevals, None, CVodeIntegrator) +CVodeIntegrator.copy = new_instancemethod(_cmf_core.CVodeIntegrator_copy, None, CVodeIntegrator) +CVodeIntegrator_swigregister = _cmf_core.CVodeIntegrator_swigregister +CVodeIntegrator_swigregister(CVodeIntegrator) + +class MultiIntegrator(Integrator): + """ + + + The MultiIntegrator is a wrapper for a bunch integrators. The states + of the integrators should not have direct connections over integrator + boundaries. + + C++ includes: multiintegrator.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + + def copy(self, *args, **kwargs): + """ + copy(MultiIntegrator self) -> MultiIntegrator + + virtual + cmf::math::MultiIntegrator* copy() const + + Polymorphic copy constructor. + """ + return _cmf_core.MultiIntegrator_copy(self, *args, **kwargs) + + + def add_states_to_integrator(self, *args, **kwargs): + """ + add_states_to_integrator(MultiIntegrator self, StateVariableOwner stateOwner, int integrator_position) + + void + add_states_to_integrator(cmf::math::StateVariableOwner &stateOwner, + int integrator_position) + + Add state variables from a StateVariableOwner. + """ + return _cmf_core.MultiIntegrator_add_states_to_integrator(self, *args, **kwargs) + + + def __init__(self, *args, **kwargs): + """ + __init__(cmf::math::MultiIntegrator self, Integrator template_integrator, int count) -> MultiIntegrator + + MultiIntegrator(const cmf::math::Integrator &template_integrator, int + count) + + Creates a new MultiIntegrator. + + Parameters: + ----------- + + template_integrator: Template for the integrators + + count: Number of integrators + """ + _cmf_core.MultiIntegrator_swiginit(self, _cmf_core.new_MultiIntegrator(*args, **kwargs)) + __swig_destroy__ = _cmf_core.delete_MultiIntegrator +MultiIntegrator.copy = new_instancemethod(_cmf_core.MultiIntegrator_copy, None, MultiIntegrator) +MultiIntegrator.add_states_to_integrator = new_instancemethod(_cmf_core.MultiIntegrator_add_states_to_integrator, None, MultiIntegrator) +MultiIntegrator_swigregister = _cmf_core.MultiIntegrator_swigregister +MultiIntegrator_swigregister(MultiIntegrator) + +class Adsorption(object): + """ + + + Abstract class to use adsorption process for tracers on surfaces. + + Use the derived classes to use a certain isotherm + + C++ includes: adsorption.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def freesolute(self, *args, **kwargs): + """ + freesolute(Adsorption self, real xt, real V) -> real + + virtual + real freesolute(real xt, real V) const =0 + + Returns the mass of dissolved tracer as a function of the total tracer + mass in the solute storage and the water volume. + + Parameters: + ----------- + + xt: :math:`x_t` the total tracer mass in the storage + + V: :math:`V m^3` the water volume in the storage + + :math:`x_f` the dissolved mass of the tracer + """ + return _cmf_core.Adsorption_freesolute(self, *args, **kwargs) + + + def totalsolute(self, *args, **kwargs): + """ + totalsolute(Adsorption self, real xf, real V) -> real + + virtual + real totalsolute(real xf, real V) const =0 + + Returns the total mass of the tracer from the dissolved concetration + in tracer unit/m3. + + Parameters: + ----------- + + xf: :math:`x_f` the dissolved tracer mass in the storage + + V: :math:`V m^3` the water volume in the storage + + :math:`x_t` the total mass of the tracer + """ + return _cmf_core.Adsorption_totalsolute(self, *args, **kwargs) + + + def copy(self, *args, **kwargs): + """ + copy(Adsorption self, real m=-1) -> Adsorption + + virtual + Adsorption* copy(real m=-1) const =0 + + returns a copy of the Adsorption object. + + If the adsorption is depending on the sorbent mass, you can give a + positive value for the sorbent mass m. If the value is not given or + negative, m is used from the original object. + """ + return _cmf_core.Adsorption_copy(self, *args, **kwargs) + + __swig_destroy__ = _cmf_core.delete_Adsorption +Adsorption.freesolute = new_instancemethod(_cmf_core.Adsorption_freesolute, None, Adsorption) +Adsorption.totalsolute = new_instancemethod(_cmf_core.Adsorption_totalsolute, None, Adsorption) +Adsorption.copy = new_instancemethod(_cmf_core.Adsorption_copy, None, Adsorption) +Adsorption_swigregister = _cmf_core.Adsorption_swigregister +Adsorption_swigregister(Adsorption) + +class NullAdsorption(Adsorption): + """ + + + A class for tracers without interaction with the storage container. + freesolute returns xt. + + C++ includes: adsorption.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + + def copy(self, *args, **kwargs): + """ + copy(NullAdsorption self, real m=-1) -> NullAdsorption + + virtual + NullAdsorption* copy(real m=-1) const + + returns a copy of the Adsorption object. + + If the adsorption is depending on the sorbent mass, you can give a + positive value for the sorbent mass m. If the value is not given or + negative, m is used from the original object. + """ + return _cmf_core.NullAdsorption_copy(self, *args, **kwargs) + + __swig_destroy__ = _cmf_core.delete_NullAdsorption + + def __init__(self, *args, **kwargs): + """__init__(cmf::water::NullAdsorption self) -> NullAdsorption""" + _cmf_core.NullAdsorption_swiginit(self, _cmf_core.new_NullAdsorption(*args, **kwargs)) +NullAdsorption.copy = new_instancemethod(_cmf_core.NullAdsorption_copy, None, NullAdsorption) +NullAdsorption_swigregister = _cmf_core.NullAdsorption_swigregister +NullAdsorption_swigregister(NullAdsorption) + +class LinearAdsorption(Adsorption): + """ + + + This class calculates the adsorption equilibrium between sorbat and + sorbent using the linear (Henry) isotherme. + + Linear (Henry) isotherme: + + + + .. math:: + + \\frac{x_{ad}}{m} = K c + + where :math:`x_{ad} = x_{tot} - x_{free}` is the adsorbed tracer mass :math:`x_{tot}` is the total tracer + mass + + :math:`x_{free}` is the dissolved tracer mass + + :math:`m` is the mass of the sorbent in the same unit as the tracer mass + + :math:`K` is the Henry sorption coefficient + + :math:`c = \\frac{x_{free}}{V}` is the concentration of the tracer in + tracer mass per m3 + + CMF stores in a solute storage the total mass of a tracer and needs to + calculate the free tracer mass. Calculating :math:`x_{free}` from :math:`x_{tot}` + gives from the eq. above: + + .. math:: + + x_{free} = x_{tot} \\frac{V}{K m + + V} + + C++ includes: adsorption.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + K = _swig_property(_cmf_core.LinearAdsorption_K_get, _cmf_core.LinearAdsorption_K_set) + m = _swig_property(_cmf_core.LinearAdsorption_m_get, _cmf_core.LinearAdsorption_m_set) + + def __init__(self, *args): + """ + __init__(cmf::water::LinearAdsorption self, real K, real m) -> LinearAdsorption + __init__(cmf::water::LinearAdsorption self, LinearAdsorption other) -> LinearAdsorption + + LinearAdsorption(const LinearAdsorption &other) + """ + _cmf_core.LinearAdsorption_swiginit(self, _cmf_core.new_LinearAdsorption(*args)) + + def copy(self, *args, **kwargs): + """ + copy(LinearAdsorption self, real m=-1) -> LinearAdsorption + + LinearAdsorption* copy(real m=-1) const + + returns a copy of the Adsorption object. + + If the adsorption is depending on the sorbent mass, you can give a + positive value for the sorbent mass m. If the value is not given or + negative, m is used from the original object. + """ + return _cmf_core.LinearAdsorption_copy(self, *args, **kwargs) + + __swig_destroy__ = _cmf_core.delete_LinearAdsorption +LinearAdsorption.copy = new_instancemethod(_cmf_core.LinearAdsorption_copy, None, LinearAdsorption) +LinearAdsorption_swigregister = _cmf_core.LinearAdsorption_swigregister +LinearAdsorption_swigregister(LinearAdsorption) + +class FreundlichAdsorbtion(Adsorption): + """ + + + This class calculates the adsorption equilibrium between sorbat and + sorbent using the Freundlich isotherme. + + Freundlich isotherme: + + + + .. math:: + + \\frac{x_{ad}}{m} = K c^n + + where :math:`x_{ad} = x_{tot} - x_{free}` is the adsorbed tracer mass :math:`x_{tot}` is the total tracer + mass + + :math:`x_{free}` is the dissolved tracer mass + + :math:`m` is the mass of the sorbent in the same unit as the tracer mass + + :math:`K` is the Freundlich sorption coefficient + + :math:`c = \\frac{x_{free}}{V}` is the concentration of the tracer in + tracer mass per m3 + + :math:`n` is the Freundlich exponent + + CMF stores in a solute storage the total mass of a tracer and needs to + calculate the free tracer mass. The eq. above can not be rearanged to + get :math:`x_{free}` from :math:`x_{tot}`. Instead, the value is iterated + usingregula falsi. If n is near to 1, using LinearAdsorption will + speed up your calculations. The simplest physically based adsorption + model by Langmuir ( LangmuirAdsorption) has also a analytical solution + and is hence calculated faster then Freundlich. + + C++ includes: adsorption.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + K = _swig_property(_cmf_core.FreundlichAdsorbtion_K_get, _cmf_core.FreundlichAdsorbtion_K_set) + n = _swig_property(_cmf_core.FreundlichAdsorbtion_n_get, _cmf_core.FreundlichAdsorbtion_n_set) + m = _swig_property(_cmf_core.FreundlichAdsorbtion_m_get, _cmf_core.FreundlichAdsorbtion_m_set) + epsilon = _swig_property(_cmf_core.FreundlichAdsorbtion_epsilon_get, _cmf_core.FreundlichAdsorbtion_epsilon_set) + maxiter = _swig_property(_cmf_core.FreundlichAdsorbtion_maxiter_get, _cmf_core.FreundlichAdsorbtion_maxiter_set) + + def __init__(self, *args): + """ + __init__(cmf::water::FreundlichAdsorbtion self, real K, real n, real m, real epsilon=1e-12, int maxiter=100) -> FreundlichAdsorbtion + __init__(cmf::water::FreundlichAdsorbtion self, FreundlichAdsorbtion other) -> FreundlichAdsorbtion + + FreundlichAdsorbtion(const FreundlichAdsorbtion &other) + """ + _cmf_core.FreundlichAdsorbtion_swiginit(self, _cmf_core.new_FreundlichAdsorbtion(*args)) + + def copy(self, *args, **kwargs): + """ + copy(FreundlichAdsorbtion self, real m=-1) -> FreundlichAdsorbtion + + FreundlichAdsorbtion* copy(real m=-1) const + + returns a copy of the Adsorption object. + + If the adsorption is depending on the sorbent mass, you can give a + positive value for the sorbent mass m. If the value is not given or + negative, m is used from the original object. + """ + return _cmf_core.FreundlichAdsorbtion_copy(self, *args, **kwargs) + + __swig_destroy__ = _cmf_core.delete_FreundlichAdsorbtion +FreundlichAdsorbtion.copy = new_instancemethod(_cmf_core.FreundlichAdsorbtion_copy, None, FreundlichAdsorbtion) +FreundlichAdsorbtion_swigregister = _cmf_core.FreundlichAdsorbtion_swigregister +FreundlichAdsorbtion_swigregister(FreundlichAdsorbtion) + +class LangmuirAdsorption(Adsorption): + """ + + + This class calculates the adsorption equilibrium between sorbat and + sorbent using the Langmuir isotherme. + + Langmuir Adsorption: + + + + .. math:: + + \\frac{x_{ad}}{m} = q = \\frac{K c}{1 + K c} + + where + :math:`x_{ad} = x_{tot} - x_{free}` is the adsorbed tracer mass :math:`x_{tot}` + is the total tracer mass + + :math:`x_{free}` is the dissolved tracer mass + + :math:`m` is the mass of the sorbent in the same unit as the tracer mass + + :math:`K` is the Langmuir sorption coefficient + + :math:`c = \\frac{x_{free}}{V}` is the concentration of the tracer in + tracer mass per m3 + + CMF stores in a solute storage the total mass of a tracer and needs to + calculate the free tracer mass. The analytical solution for :math:`x_{free}` + from :math:`x_{tot}` is implemented in freesolute and derived usingsympy. If + you really want to see it, look in the code. + + http://en.wikipedia.org/wiki/Langmuir_equation + + C++ includes: adsorption.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + K = _swig_property(_cmf_core.LangmuirAdsorption_K_get, _cmf_core.LangmuirAdsorption_K_set) + m = _swig_property(_cmf_core.LangmuirAdsorption_m_get, _cmf_core.LangmuirAdsorption_m_set) + + def __init__(self, *args): + """ + __init__(cmf::water::LangmuirAdsorption self, real K, real m) -> LangmuirAdsorption + __init__(cmf::water::LangmuirAdsorption self, LangmuirAdsorption other) -> LangmuirAdsorption + + LangmuirAdsorption(const LangmuirAdsorption &other) + """ + _cmf_core.LangmuirAdsorption_swiginit(self, _cmf_core.new_LangmuirAdsorption(*args)) + + def copy(self, *args, **kwargs): + """ + copy(LangmuirAdsorption self, real m=-1) -> LangmuirAdsorption + + LangmuirAdsorption* copy(real m=-1) const + + returns a copy of the Adsorption object. + + If the adsorption is depending on the sorbent mass, you can give a + positive value for the sorbent mass m. If the value is not given or + negative, m is used from the original object. + """ + return _cmf_core.LangmuirAdsorption_copy(self, *args, **kwargs) + + __swig_destroy__ = _cmf_core.delete_LangmuirAdsorption +LangmuirAdsorption.copy = new_instancemethod(_cmf_core.LangmuirAdsorption_copy, None, LangmuirAdsorption) +LangmuirAdsorption_swigregister = _cmf_core.LangmuirAdsorption_swigregister +LangmuirAdsorption_swigregister(LangmuirAdsorption) + +class solute(object): + """ + + + A structure to identify a solute. + + C++ includes: Solute.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + """ + __init__(cmf::water::solute self, solute copy) -> solute + + solute(const + solute ©) + """ + _cmf_core.solute_swiginit(self, _cmf_core.new_solute(*args, **kwargs)) + + def __eq__(self, *args, **kwargs): + """__eq__(solute self, solute cmp) -> bool""" + return _cmf_core.solute___eq__(self, *args, **kwargs) + + + def __lt__(self, *args, **kwargs): + """__lt__(solute self, solute cmp) -> bool""" + return _cmf_core.solute___lt__(self, *args, **kwargs) + + + def __gt__(self, *args, **kwargs): + """__gt__(solute self, solute cmp) -> bool""" + return _cmf_core.solute___gt__(self, *args, **kwargs) + + + def __le__(self, *args, **kwargs): + """__le__(solute self, solute cmp) -> bool""" + return _cmf_core.solute___le__(self, *args, **kwargs) + + + def __ge__(self, *args, **kwargs): + """__ge__(solute self, solute cmp) -> bool""" + return _cmf_core.solute___ge__(self, *args, **kwargs) + + + def __ne__(self, *args, **kwargs): + """__ne__(solute self, solute cmp) -> bool""" + return _cmf_core.solute___ne__(self, *args, **kwargs) + + Name = _swig_property(_cmf_core.solute_Name_get, _cmf_core.solute_Name_set) + Unit = _swig_property(_cmf_core.solute_Unit_get, _cmf_core.solute_Unit_set) + Uptake = _swig_property(_cmf_core.solute_Uptake_get, _cmf_core.solute_Uptake_set) + Id = _swig_property(_cmf_core.solute_Id_get) + + def __repr__(self, *args, **kwargs): + """__repr__(solute self) -> std::string""" + return _cmf_core.solute___repr__(self, *args, **kwargs) + + __swig_destroy__ = _cmf_core.delete_solute +solute.__eq__ = new_instancemethod(_cmf_core.solute___eq__, None, solute) +solute.__lt__ = new_instancemethod(_cmf_core.solute___lt__, None, solute) +solute.__gt__ = new_instancemethod(_cmf_core.solute___gt__, None, solute) +solute.__le__ = new_instancemethod(_cmf_core.solute___le__, None, solute) +solute.__ge__ = new_instancemethod(_cmf_core.solute___ge__, None, solute) +solute.__ne__ = new_instancemethod(_cmf_core.solute___ne__, None, solute) +solute.__repr__ = new_instancemethod(_cmf_core.solute___repr__, None, solute) +solute_swigregister = _cmf_core.solute_swigregister +solute_swigregister(solute) + +class solute_vector(object): + """ + + + Manages the solutes of the model. + + C++ includes: Solute.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + + def size(self, *args, **kwargs): + """ + size(solute_vector self) -> size_t + + size_t size() + const + """ + return _cmf_core.solute_vector_size(self, *args, **kwargs) + + + def __init__(self, *args, **kwargs): + """ + __init__(cmf::water::solute_vector self, std::string str) -> solute_vector + + solute_vector(std::string str) + + Creates a solute vector from solute names, separated by whitespace. + E.g. solutes= solute_vector("dO18 dH2") + """ + _cmf_core.solute_vector_swiginit(self, _cmf_core.new_solute_vector(*args, **kwargs)) + + def get_solute(self, *args, **kwargs): + """ + get_solute(solute_vector self, int position) -> solute + + cmf::water::solute* get_solute(int position) + """ + return _cmf_core.solute_vector_get_solute(self, *args, **kwargs) + + + def __getitem__(self, *args, **kwargs): + """__getitem__(solute_vector self, int i) -> solute""" + return _cmf_core.solute_vector___getitem__(self, *args, **kwargs) + + + def __len__(self, *args, **kwargs): + """__len__(solute_vector self) -> size_t""" + return _cmf_core.solute_vector___len__(self, *args, **kwargs) + + + def __iter__(self): + for i in range(len(self)): + yield self[i] + def __repr__(self): + return str([s.Name for s in self]) + + __swig_destroy__ = _cmf_core.delete_solute_vector +solute_vector.size = new_instancemethod(_cmf_core.solute_vector_size, None, solute_vector) +solute_vector.get_solute = new_instancemethod(_cmf_core.solute_vector_get_solute, None, solute_vector) +solute_vector.__getitem__ = new_instancemethod(_cmf_core.solute_vector___getitem__, None, solute_vector) +solute_vector.__len__ = new_instancemethod(_cmf_core.solute_vector___len__, None, solute_vector) +solute_vector_swigregister = _cmf_core.solute_vector_swigregister +solute_vector_swigregister(solute_vector) + +class SoluteTimeseries(object): + """ + + + A map of concentration time series for solutes. + + C++ includes: Solute.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + + def conc(self, *args, **kwargs): + """ + conc(SoluteTimeseries self, Time t, solute _Solute) -> real + + real + conc(cmf::math::Time t, const cmf::water::solute &_Solute) const + """ + return _cmf_core.SoluteTimeseries_conc(self, *args, **kwargs) + + + def size(self, *args, **kwargs): + """ + size(SoluteTimeseries self) -> size_t + + size_t + size() const + + Returns the number of solutes in the solution. + """ + return _cmf_core.SoluteTimeseries_size(self, *args, **kwargs) + + + def __init__(self, *args): + """ + __init__(cmf::water::SoluteTimeseries self) -> SoluteTimeseries + __init__(cmf::water::SoluteTimeseries self, solute_vector solutes, Time begin, Time step) -> SoluteTimeseries + __init__(cmf::water::SoluteTimeseries self, SoluteTimeseries sts) -> SoluteTimeseries + + SoluteTimeseries(const cmf::water::SoluteTimeseries &sts) + """ + _cmf_core.SoluteTimeseries_swiginit(self, _cmf_core.new_SoluteTimeseries(*args)) + + def __getitem__(self, *args, **kwargs): + """__getitem__(SoluteTimeseries self, solute solute) -> timeseries""" + return _cmf_core.SoluteTimeseries___getitem__(self, *args, **kwargs) + + + def __setitem__(self, *args, **kwargs): + """__setitem__(SoluteTimeseries self, solute solute, timeseries concentration)""" + return _cmf_core.SoluteTimeseries___setitem__(self, *args, **kwargs) + + + def __len__(self, *args, **kwargs): + """__len__(SoluteTimeseries self) -> size_t""" + return _cmf_core.SoluteTimeseries___len__(self, *args, **kwargs) + + __swig_destroy__ = _cmf_core.delete_SoluteTimeseries +SoluteTimeseries.conc = new_instancemethod(_cmf_core.SoluteTimeseries_conc, None, SoluteTimeseries) +SoluteTimeseries.size = new_instancemethod(_cmf_core.SoluteTimeseries_size, None, SoluteTimeseries) +SoluteTimeseries.__getitem__ = new_instancemethod(_cmf_core.SoluteTimeseries___getitem__, None, SoluteTimeseries) +SoluteTimeseries.__setitem__ = new_instancemethod(_cmf_core.SoluteTimeseries___setitem__, None, SoluteTimeseries) +SoluteTimeseries.__len__ = new_instancemethod(_cmf_core.SoluteTimeseries___len__, None, SoluteTimeseries) +SoluteTimeseries_swigregister = _cmf_core.SoluteTimeseries_swigregister +SoluteTimeseries_swigregister(SoluteTimeseries) + +class SoluteStorage(StateVariable): + """ + + + A class for the storage of any tracer. + + The state is the amount (mol, kg etc. see cmf::water) of the tracer in + the storage. + + The derivative function is given by: + + .. math:: + + + \\frac{dX}{dt}&=&\\sum_{f=1}^{F}\\left( q_f [X]_f\\right) + + X_{in} - r^-X \\left[\\frac{mol}{day}\\right]\\\\ F&=& + \\mbox{Number of fluxes in water storage} \\\\ q_f&=& + \\mbox{Water flux in } \\frac{m^3}{day} \\\\ + \\left[X\\right]_f &=& \\mbox{Concentration of solute X in flux + }q_f \\mbox{ in } \\frac{mol}{m^3} \\\\ X_{in} &=& + \\mbox{Absolute source or sink term} \\frac{mol}{day} \\\\ r^- + &=& \\mbox{Decay rate} \\frac 1{day} \\\\ V &=& + \\mbox{Volume of water in water storage }\\left[m^3\\right] + + + + + C++ includes: SoluteStorage.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined") + __repr__ = _swig_repr + + def set_adsorption(self, *args, **kwargs): + """ + set_adsorption(SoluteStorage self, Adsorption newadsorption, real m=-1) + + void set_adsorption(const Adsorption &newadsorption, real m=-1) + """ + return _cmf_core.SoluteStorage_set_adsorption(self, *args, **kwargs) + + decay = _swig_property(_cmf_core.SoluteStorage_decay_get, _cmf_core.SoluteStorage_decay_set) + source = _swig_property(_cmf_core.SoluteStorage_source_get, _cmf_core.SoluteStorage_source_set) + Solute = _swig_property(_cmf_core.SoluteStorage_Solute_get) + + def conc(self, *args, **kwargs): + """ + conc(SoluteStorage self) -> real + + real conc() + const + + Returns the concentration of the solute. + """ + return _cmf_core.SoluteStorage_conc(self, *args, **kwargs) + + + def set_conc(self, *args, **kwargs): + """ + set_conc(SoluteStorage self, real NewConcentration) + + void + set_conc(real NewConcentration) + + set a new concentration of dissolved tracers. + + In case of adsorption functions, the isotherm is used + """ + return _cmf_core.SoluteStorage_set_conc(self, *args, **kwargs) + + __swig_destroy__ = _cmf_core.delete_SoluteStorage +SoluteStorage.set_adsorption = new_instancemethod(_cmf_core.SoluteStorage_set_adsorption, None, SoluteStorage) +SoluteStorage.conc = new_instancemethod(_cmf_core.SoluteStorage_conc, None, SoluteStorage) +SoluteStorage.set_conc = new_instancemethod(_cmf_core.SoluteStorage_set_conc, None, SoluteStorage) +SoluteStorage_swigregister = _cmf_core.SoluteStorage_swigregister +SoluteStorage_swigregister(SoluteStorage) + +class flux_node(object): + """ + + + Base class for everything that can be connected by fluxes. + + Flux nodes can be WaterStorages, flux end points, sinks, sources and + bridges to other model domains (e.g. Ponded water to river system). + The base class can be used where a simple routing, potentially with + mixing, is needed. + + C++ includes: flux_node.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + node_id = _swig_property(_cmf_core.flux_node_node_id_get) + + def is_storage(self, *args, **kwargs): + """ + is_storage(flux_node self) -> bool + + virtual + bool is_storage() const + + true, if this is a waterstorage + """ + return _cmf_core.flux_node_is_storage(self, *args, **kwargs) + + Name = _swig_property(_cmf_core.flux_node_Name_get, _cmf_core.flux_node_Name_set) + + def to_string(self, *args, **kwargs): + """ + to_string(flux_node self) -> std::string + + virtual + std::string to_string() const + """ + return _cmf_core.flux_node_to_string(self, *args, **kwargs) + + __swig_destroy__ = _cmf_core.delete_flux_node + + def __eq__(self, *args, **kwargs): + """__eq__(flux_node self, flux_node other) -> bool""" + return _cmf_core.flux_node___eq__(self, *args, **kwargs) + + + def RecalcFluxes(self, *args, **kwargs): + """ + RecalcFluxes(flux_node self, Time t) -> bool + + virtual + bool RecalcFluxes(cmf::math::Time t) + + Pure flux_nodes do not influence fluxes, therefore no recalculation of + fluxes is required by flux_node. + + WaterStorage overrides this, since state changes require an update of + the fluxes + """ + return _cmf_core.flux_node_RecalcFluxes(self, *args, **kwargs) + + + def connection_to(self, *args, **kwargs): + """ + connection_to(flux_node self, flux_node target) -> flux_connection + + cmf::water::flux_connection* connection_to(const cmf::water::flux_node + &target) + + Returns the connection between this and target. + """ + return _cmf_core.flux_node_connection_to(self, *args, **kwargs) + + + def remove_connection(self, *args, **kwargs): + """ + remove_connection(flux_node self, cmf::water::flux_node::ptr To) -> bool + + bool + remove_connection(cmf::water::flux_node::ptr To) + + Remove the connection. + """ + return _cmf_core.flux_node_remove_connection(self, *args, **kwargs) + + + def flux_to(self, *args, **kwargs): + """ + flux_to(flux_node self, flux_node target, Time t) -> real + + real + flux_to(const cmf::water::flux_node &target, cmf::math::Time t) + + Returns the actual flux between this and target (positive sign means + "from this into target") + """ + return _cmf_core.flux_node_flux_to(self, *args, **kwargs) + + + def flux3d_to(self, *args, **kwargs): + """ + flux3d_to(flux_node self, flux_node target, Time t) -> point + + cmf::geometry::point flux3d_to(const cmf::water::flux_node &target, + cmf::math::Time t) + """ + return _cmf_core.flux_node_flux3d_to(self, *args, **kwargs) + + + def get_3d_flux(self, *args, **kwargs): + """ + get_3d_flux(flux_node self, Time t) -> point + + cmf::geometry::point get_3d_flux(cmf::math::Time t) + + Returns the sum of all flux vectors. + """ + return _cmf_core.flux_node_get_3d_flux(self, *args, **kwargs) + + + def waterbalance(self, *args, **kwargs): + """ + waterbalance(flux_node self, Time t, flux_connection Without=None) -> real + + real + waterbalance(cmf::math::Time t, const flux_connection *Without=0) + const + + Returns the sum of all fluxes (positive and negative) at time t. + + Single fluxes can be excluded from the calculation + + Parameters: + ----------- + + t: Time of the query + + Without: A flux_connection that is excluded from the waterbalance + (e.g. to prevent closed circuits) + """ + return _cmf_core.flux_node_waterbalance(self, *args, **kwargs) + + + def __call__(self, *args, **kwargs): + """__call__(flux_node self, Time t) -> real""" + return _cmf_core.flux_node___call__(self, *args, **kwargs) + + + def conc(self, *args, **kwargs): + """ + conc(flux_node self, Time t, solute Solute) -> real + + virtual real + conc(cmf::math::Time t, const cmf::water::solute &Solute) const + + Returns the water quality of the flux_node, if it is not overridden + this is the mix of the incoming fluxes. + """ + return _cmf_core.flux_node_conc(self, *args, **kwargs) + + position = _swig_property(_cmf_core.flux_node_position_get, _cmf_core.flux_node_position_set) + + def is_empty(self, *args, **kwargs): + """ + is_empty(flux_node self) -> double + + virtual + double is_empty() const + + Returns true if the node has no water. + """ + return _cmf_core.flux_node_is_empty(self, *args, **kwargs) + + + def __init__(self, *args, **kwargs): + """ + __init__(cmf::water::flux_node self, project _project, point location) -> flux_node + + flux_node(cmf::project &_project, cmf::geometry::point + location=cmf::geometry::point()) + """ + _cmf_core.flux_node_swiginit(self, _cmf_core.new_flux_node(*args, **kwargs)) + project = _swig_property(_cmf_core.flux_node_project_get) + potential = _swig_property(_cmf_core.flux_node_potential_get, _cmf_core.flux_node_potential_set) + connections = _swig_property(_cmf_core.flux_node_connections_get) + + def __repr__(self): return self.to_string() + def fluxes(self,t): + return [(con.q(self,t),con[self]) for con in self.connections] + @property + def connected_nodes(self): + return [con[self] for con in self.connections] + +flux_node.is_storage = new_instancemethod(_cmf_core.flux_node_is_storage, None, flux_node) +flux_node.to_string = new_instancemethod(_cmf_core.flux_node_to_string, None, flux_node) +flux_node.__eq__ = new_instancemethod(_cmf_core.flux_node___eq__, None, flux_node) +flux_node.RecalcFluxes = new_instancemethod(_cmf_core.flux_node_RecalcFluxes, None, flux_node) +flux_node.connection_to = new_instancemethod(_cmf_core.flux_node_connection_to, None, flux_node) +flux_node.remove_connection = new_instancemethod(_cmf_core.flux_node_remove_connection, None, flux_node) +flux_node.flux_to = new_instancemethod(_cmf_core.flux_node_flux_to, None, flux_node) +flux_node.flux3d_to = new_instancemethod(_cmf_core.flux_node_flux3d_to, None, flux_node) +flux_node.get_3d_flux = new_instancemethod(_cmf_core.flux_node_get_3d_flux, None, flux_node) +flux_node.waterbalance = new_instancemethod(_cmf_core.flux_node_waterbalance, None, flux_node) +flux_node.__call__ = new_instancemethod(_cmf_core.flux_node___call__, None, flux_node) +flux_node.conc = new_instancemethod(_cmf_core.flux_node_conc, None, flux_node) +flux_node.is_empty = new_instancemethod(_cmf_core.flux_node_is_empty, None, flux_node) +flux_node_swigregister = _cmf_core.flux_node_swigregister +flux_node_swigregister(flux_node) + + +def count_node_references(*args, **kwargs): + """ + count_node_references(cmf::water::flux_node::ptr node) -> int + + int + cmf::water::count_node_references(flux_node::ptr node) + """ + return _cmf_core.count_node_references(*args, **kwargs) + +def get_higher_node(*args, **kwargs): + """ + get_higher_node(cmf::water::flux_node::ptr node1, cmf::water::flux_node::ptr node2) -> cmf::water::flux_node::ptr + + flux_node::ptr + cmf::water::get_higher_node(flux_node::ptr node1, flux_node::ptr + node2) + """ + return _cmf_core.get_higher_node(*args, **kwargs) + +def get_lower_node(*args, **kwargs): + """ + get_lower_node(cmf::water::flux_node::ptr node1, cmf::water::flux_node::ptr node2) -> cmf::water::flux_node::ptr + + flux_node::ptr + cmf::water::get_lower_node(flux_node::ptr node1, flux_node::ptr node2) + + """ + return _cmf_core.get_lower_node(*args, **kwargs) +class waterbalance_integrator(integratable): + """ + + + The waterbalance_integrator is an integratable for precise output of + the average water balance of a flux_node over time. + + It can be added to a solver (any cmf::math::Integrator), which is than + calling the integrate method at each substep. + + C++ includes: flux_node.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + + def integration_t(self, *args, **kwargs): + """ + integration_t(waterbalance_integrator self) -> Time + + cmf::math::Time + integration_t() const + + Returns the duration of the integration. + """ + return _cmf_core.waterbalance_integrator_integration_t(self, *args, **kwargs) + + + def t0(self, *args, **kwargs): + """ + t0(waterbalance_integrator self) -> Time + + cmf::math::Time t0() const + + Returns the start time of the integration. + """ + return _cmf_core.waterbalance_integrator_t0(self, *args, **kwargs) + + + def __get_node(self, *args, **kwargs): + """ + __get_node(waterbalance_integrator self) -> cmf::water::flux_node::ptr + + flux_node::ptr get_node() const + + Returns the node of this integrator. + """ + return _cmf_core.waterbalance_integrator___get_node(self, *args, **kwargs) + + + def __set_node(self, *args, **kwargs): + """ + __set_node(waterbalance_integrator self, cmf::water::flux_node::ptr node) + + void set_node(cmf::water::flux_node::ptr node) + """ + return _cmf_core.waterbalance_integrator___set_node(self, *args, **kwargs) + + + def __init__(self, *args, **kwargs): + """ + __init__(cmf::water::waterbalance_integrator self, cmf::water::flux_node::ptr node) -> waterbalance_integrator + + waterbalance_integrator(cmf::water::flux_node::ptr node) + """ + _cmf_core.waterbalance_integrator_swiginit(self, _cmf_core.new_waterbalance_integrator(*args, **kwargs)) + + node = _swig_property(_cmf_core.waterbalance_integrator___get_node, + _cmf_core.waterbalance_integrator___set_node) + + __swig_destroy__ = _cmf_core.delete_waterbalance_integrator +waterbalance_integrator.integration_t = new_instancemethod(_cmf_core.waterbalance_integrator_integration_t, None, waterbalance_integrator) +waterbalance_integrator.t0 = new_instancemethod(_cmf_core.waterbalance_integrator_t0, None, waterbalance_integrator) +waterbalance_integrator.__get_node = new_instancemethod(_cmf_core.waterbalance_integrator___get_node, None, waterbalance_integrator) +waterbalance_integrator.__set_node = new_instancemethod(_cmf_core.waterbalance_integrator___set_node, None, waterbalance_integrator) +waterbalance_integrator_swigregister = _cmf_core.waterbalance_integrator_swigregister +waterbalance_integrator_swigregister(waterbalance_integrator) + +class flux_connection(object): + """ + + + The connections in cmf hold the processes for the calculation of + fluxes between water storages and model boundaries. + + Todo Elaborate on this Represents a connection between flux_nodes, + where water fluxes occur. + + C++ includes: flux_connection.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def left_node(self, *args, **kwargs): + """ + left_node(flux_connection self) -> cmf::water::flux_node::ptr + + flux_node::ptr left_node() const + + Returns the left node of this connection. + """ + return _cmf_core.flux_connection_left_node(self, *args, **kwargs) + + + def right_node(self, *args, **kwargs): + """ + right_node(flux_connection self) -> cmf::water::flux_node::ptr + + flux_node::ptr right_node() const + + returns the right node of this connection + """ + return _cmf_core.flux_connection_right_node(self, *args, **kwargs) + + + def kill_me(self, *args, **kwargs): + """ + kill_me(flux_connection self) -> bool + + bool + kill_me() + + Deregisters this connection from its nodes. Returns true if only one + reference is left. + """ + return _cmf_core.flux_connection_kill_me(self, *args, **kwargs) + + + def refresh(self, *args, **kwargs): + """ + refresh(flux_connection self, Time t) + + void + refresh(cmf::math::Time t) + + Performes a new calculation of the flux. + """ + return _cmf_core.flux_connection_refresh(self, *args, **kwargs) + + connection_id = _swig_property(_cmf_core.flux_connection_connection_id_get) + + def __eq__(self, *args, **kwargs): + """__eq__(flux_connection self, flux_connection other) -> bool""" + return _cmf_core.flux_connection___eq__(self, *args, **kwargs) + + + def get_target(self, *args): + """ + get_target(flux_connection self, flux_node inquirer) -> cmf::water::flux_node::ptr + get_target(flux_connection self, int index) -> cmf::water::flux_node::ptr + + flux_node::ptr get_target(int index) const + + With index 0, the left node is returned, with index 1 the right node + of the connection. + """ + return _cmf_core.flux_connection_get_target(self, *args) + + + def exchange_target(self, *args, **kwargs): + """ + exchange_target(flux_connection self, cmf::water::flux_node::ptr oldtarget, cmf::water::flux_node::ptr newTarget) + + void exchange_target(flux_node::ptr oldtarget, flux_node::ptr + newTarget) + """ + return _cmf_core.flux_connection_exchange_target(self, *args, **kwargs) + + + def q(self, *args, **kwargs): + """ + q(flux_connection self, flux_node inquirer, Time t) -> real + + real q(const + flux_node &inquirer, cmf::math::Time t) + + Returns the current flux through a connection. Negative signs mean out + of the inquirer, positive are inflows to the inquirer. + """ + return _cmf_core.flux_connection_q(self, *args, **kwargs) + + + def conc(self, *args, **kwargs): + """ + conc(flux_connection self, Time t, solute _Solute) -> real + + real + conc(cmf::math::Time t, const cmf::water::solute &_Solute) + + Returns the concentration of the flux. + + If not overridden, it returns the concentration of the source of the + flux (direction depending) + """ + return _cmf_core.flux_connection_conc(self, *args, **kwargs) + + type = _swig_property(_cmf_core.flux_connection_type_get) + + def get_tracer_filter(self, *args): + """ + get_tracer_filter(flux_connection self) -> real + get_tracer_filter(flux_connection self, solute S) -> real + + real get_tracer_filter(solute S) + + A value ranging from 0 to 1 to filter tracers out of the water flux. + + """ + return _cmf_core.flux_connection_get_tracer_filter(self, *args) + + + def set_tracer_filter(self, *args): + """ + set_tracer_filter(flux_connection self, real value) + set_tracer_filter(flux_connection self, solute S, real value) + + void set_tracer_filter(solute S, real value) + """ + return _cmf_core.flux_connection_set_tracer_filter(self, *args) + + + def to_string(self, *args, **kwargs): + """ + to_string(flux_connection self) -> std::string + + virtual std::string to_string() const + """ + return _cmf_core.flux_connection_to_string(self, *args, **kwargs) + + + def short_string(self, *args, **kwargs): + """ + short_string(flux_connection self) -> std::string + + virtual std::string short_string() const + """ + return _cmf_core.flux_connection_short_string(self, *args, **kwargs) + + __swig_destroy__ = _cmf_core.delete_flux_connection + + def __repr__(self): + return self.to_string() + def __getitem__(self,index): + return self.get_target(index) + def __iter__(self): + yield self.get_target(0) + yield self.get_target(1) + def __contains__(self,cmp): + return cmp==self[0] or cmp==self[1] + +flux_connection.left_node = new_instancemethod(_cmf_core.flux_connection_left_node, None, flux_connection) +flux_connection.right_node = new_instancemethod(_cmf_core.flux_connection_right_node, None, flux_connection) +flux_connection.kill_me = new_instancemethod(_cmf_core.flux_connection_kill_me, None, flux_connection) +flux_connection.refresh = new_instancemethod(_cmf_core.flux_connection_refresh, None, flux_connection) +flux_connection.__eq__ = new_instancemethod(_cmf_core.flux_connection___eq__, None, flux_connection) +flux_connection.get_target = new_instancemethod(_cmf_core.flux_connection_get_target, None, flux_connection) +flux_connection.exchange_target = new_instancemethod(_cmf_core.flux_connection_exchange_target, None, flux_connection) +flux_connection.q = new_instancemethod(_cmf_core.flux_connection_q, None, flux_connection) +flux_connection.conc = new_instancemethod(_cmf_core.flux_connection_conc, None, flux_connection) +flux_connection.get_tracer_filter = new_instancemethod(_cmf_core.flux_connection_get_tracer_filter, None, flux_connection) +flux_connection.set_tracer_filter = new_instancemethod(_cmf_core.flux_connection_set_tracer_filter, None, flux_connection) +flux_connection.to_string = new_instancemethod(_cmf_core.flux_connection_to_string, None, flux_connection) +flux_connection.short_string = new_instancemethod(_cmf_core.flux_connection_short_string, None, flux_connection) +flux_connection_swigregister = _cmf_core.flux_connection_swigregister +flux_connection_swigregister(flux_connection) + + +def replace_node(*args, **kwargs): + """ + replace_node(cmf::water::flux_node::ptr oldnode, cmf::water::flux_node::ptr newnode) -> int + + int + cmf::water::replace_node(cmf::water::flux_node::ptr oldnode, + cmf::water::flux_node::ptr newnode) + """ + return _cmf_core.replace_node(*args, **kwargs) +class connection_list(object): + """ + + + A self sorting list of connections. + + C++ includes: flux_connection.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + + def append(self, *args, **kwargs): + """ + append(connection_list self, cmf::water::flux_connection::ptr connection) -> bool + + bool + append(cmf::water::flux_connection::ptr connection) + """ + return _cmf_core.connection_list_append(self, *args, **kwargs) + + + def extend(self, *args, **kwargs): + """ + extend(connection_list self, connection_list connections) + + void + extend(const connection_list &connections) + """ + return _cmf_core.connection_list_extend(self, *args, **kwargs) + + + def contains(self, *args, **kwargs): + """ + contains(connection_list self, cmf::water::flux_connection::ptr connection) -> bool + + bool + contains(cmf::water::flux_connection::ptr connection) const + """ + return _cmf_core.connection_list_contains(self, *args, **kwargs) + + + def remove(self, *args, **kwargs): + """ + remove(connection_list self, cmf::water::flux_connection::ptr connection) -> bool + + bool + remove(cmf::water::flux_connection::ptr connection) + """ + return _cmf_core.connection_list_remove(self, *args, **kwargs) + + + def do_action(self, *args, **kwargs): + """ + do_action(connection_list self, Time t, bool use_OpenMP=True) + + void + do_action(cmf::math::Time t, bool use_OpenMP=true) + """ + return _cmf_core.connection_list_do_action(self, *args, **kwargs) + + + def size(self, *args, **kwargs): + """ + size(connection_list self) -> size_t + + size_t + size() const + """ + return _cmf_core.connection_list_size(self, *args, **kwargs) + + + def at(self, *args, **kwargs): + """ + at(connection_list self, size_t pos) -> cmf::water::flux_connection::ptr + + cmf::water::flux_connection::ptr at(size_t pos) const + """ + return _cmf_core.connection_list_at(self, *args, **kwargs) + + + def begin(self, *args): + """ + begin(connection_list self) -> cmf::water::connection_list::iterator + begin(connection_list self) -> cmf::water::connection_list::const_iterator + + const_iterator begin() const + """ + return _cmf_core.connection_list_begin(self, *args) + + + def end(self, *args): + """ + end(connection_list self) -> cmf::water::connection_list::iterator + end(connection_list self) -> cmf::water::connection_list::const_iterator + + const_iterator end() const + """ + return _cmf_core.connection_list_end(self, *args) + + __swig_destroy__ = _cmf_core.delete_connection_list + + def __len__(self, *args, **kwargs): + """__len__(connection_list self) -> size_t""" + return _cmf_core.connection_list___len__(self, *args, **kwargs) + + + def __contains__(self, *args, **kwargs): + """__contains__(connection_list self, cmf::water::flux_connection::ptr const & con) -> bool""" + return _cmf_core.connection_list___contains__(self, *args, **kwargs) + + + def __repr__(self): + return repr(list(self)) + "" + def __getitem__(self,index): + return self.at(index) + def __iter__(self): + for i in xrange(len(self)): + yield self.at(i) + + + def __init__(self, *args, **kwargs): + """__init__(cmf::water::connection_list self) -> connection_list""" + _cmf_core.connection_list_swiginit(self, _cmf_core.new_connection_list(*args, **kwargs)) +connection_list.append = new_instancemethod(_cmf_core.connection_list_append, None, connection_list) +connection_list.extend = new_instancemethod(_cmf_core.connection_list_extend, None, connection_list) +connection_list.contains = new_instancemethod(_cmf_core.connection_list_contains, None, connection_list) +connection_list.remove = new_instancemethod(_cmf_core.connection_list_remove, None, connection_list) +connection_list.do_action = new_instancemethod(_cmf_core.connection_list_do_action, None, connection_list) +connection_list.size = new_instancemethod(_cmf_core.connection_list_size, None, connection_list) +connection_list.at = new_instancemethod(_cmf_core.connection_list_at, None, connection_list) +connection_list.begin = new_instancemethod(_cmf_core.connection_list_begin, None, connection_list) +connection_list.end = new_instancemethod(_cmf_core.connection_list_end, None, connection_list) +connection_list.__len__ = new_instancemethod(_cmf_core.connection_list___len__, None, connection_list) +connection_list.__contains__ = new_instancemethod(_cmf_core.connection_list___contains__, None, connection_list) +connection_list_swigregister = _cmf_core.connection_list_swigregister +connection_list_swigregister(connection_list) + +class flux_integrator(integratable): + """ + + + The flux_integrator is an integratable for precise output of average + fluxes over time. + + It can be added to solver (any cmf::math::Integrator), which is then + calling the integrate method at each substep. + + C++ includes: flux_connection.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + + def integration_t(self, *args, **kwargs): + """ + integration_t(flux_integrator self) -> Time + + cmf::math::Time integration_t() const + + Returns the duration of the integration. + """ + return _cmf_core.flux_integrator_integration_t(self, *args, **kwargs) + + + def t0(self, *args, **kwargs): + """ + t0(flux_integrator self) -> Time + + cmf::math::Time t0() const + + Returns the start time of the integration. + """ + return _cmf_core.flux_integrator_t0(self, *args, **kwargs) + + invert = _swig_property(_cmf_core.flux_integrator_invert_get, _cmf_core.flux_integrator_invert_set) + + def connection(self, *args, **kwargs): + """ + connection(flux_integrator self) -> cmf::water::flux_connection::ptr + + flux_connection::ptr connection() const + + Returns the flux_connection. + """ + return _cmf_core.flux_integrator_connection(self, *args, **kwargs) + + + def __init__(self, *args): + """ + __init__(cmf::water::flux_integrator self, flux_connection connection) -> flux_integrator + __init__(cmf::water::flux_integrator self, cmf::water::flux_node::ptr left, cmf::water::flux_node::ptr right) -> flux_integrator + + flux_integrator(cmf::water::flux_node::ptr left, + cmf::water::flux_node::ptr right) + + Creates a flux_integrator from the endpoints of a connection. Throws + if there is no connection between the endpoints. + """ + _cmf_core.flux_integrator_swiginit(self, _cmf_core.new_flux_integrator(*args)) + __swig_destroy__ = _cmf_core.delete_flux_integrator +flux_integrator.integration_t = new_instancemethod(_cmf_core.flux_integrator_integration_t, None, flux_integrator) +flux_integrator.t0 = new_instancemethod(_cmf_core.flux_integrator_t0, None, flux_integrator) +flux_integrator.connection = new_instancemethod(_cmf_core.flux_integrator_connection, None, flux_integrator) +flux_integrator_swigregister = _cmf_core.flux_integrator_swigregister +flux_integrator_swigregister(flux_integrator) + +class linear_scale(object): + """ + + + A linear scaling functor, with slope and displacement. + + C++ includes: boundary_condition.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + displacement = _swig_property(_cmf_core.linear_scale_displacement_get, _cmf_core.linear_scale_displacement_set) + slope = _swig_property(_cmf_core.linear_scale_slope_get, _cmf_core.linear_scale_slope_set) + + def __call__(self, *args, **kwargs): + """__call__(linear_scale self, real value) -> real""" + return _cmf_core.linear_scale___call__(self, *args, **kwargs) + + + def __init__(self, *args, **kwargs): + """ + __init__(cmf::water::linear_scale self, real _slope=1, real _displacement=0) -> linear_scale + + linear_scale(real _slope=1, real _displacement=0) + + Creates a linear scale (by default it is a unity scale, :math:`a=1; b=0`) + """ + _cmf_core.linear_scale_swiginit(self, _cmf_core.new_linear_scale(*args, **kwargs)) + __swig_destroy__ = _cmf_core.delete_linear_scale +linear_scale.__call__ = new_instancemethod(_cmf_core.linear_scale___call__, None, linear_scale) +linear_scale_swigregister = _cmf_core.linear_scale_swigregister +linear_scale_swigregister(linear_scale) + +class DirichletBoundary(flux_node): + """ + + + Dirichlet (constant head) boundary condition. + + This boundary condition can be used either as a pure sink boundary + condition or as a conditional source / sink boundary condition. The + constant head of the boundary condition is interpreted and handled by + the connections of the boundary condition. Not head aware connections, + should not be used, since they are ignoring the constant head. + + C++ includes: boundary_condition.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + + def set_conc(self, *args, **kwargs): + """ + set_conc(DirichletBoundary self, solute _Solute, double value) + + virtual void set_conc(const cmf::water::solute &_Solute, double value) + + """ + return _cmf_core.DirichletBoundary_set_conc(self, *args, **kwargs) + + is_source = _swig_property(_cmf_core.DirichletBoundary_is_source_get, _cmf_core.DirichletBoundary_is_source_set) + + def RecalcFluxes(self, *args, **kwargs): + """ + RecalcFluxes(DirichletBoundary self, Time t) -> bool + + virtual bool RecalcFluxes(cmf::math::Time t) + + Pure flux_nodes do not influence fluxes, therefore no recalculation of + fluxes is required by flux_node. + + WaterStorage overrides this, since state changes require an update of + the fluxes + """ + return _cmf_core.DirichletBoundary_RecalcFluxes(self, *args, **kwargs) + + + def __init__(self, *args, **kwargs): + """ + __init__(cmf::water::DirichletBoundary self, project _p, real potential, point Location) -> DirichletBoundary + + DirichletBoundary(cmf::project &_p, real potential, + cmf::geometry::point Location=cmf::geometry::point()) + """ + _cmf_core.DirichletBoundary_swiginit(self, _cmf_core.new_DirichletBoundary(*args, **kwargs)) + + def __repr__(self): + return self.to_string() + + __swig_destroy__ = _cmf_core.delete_DirichletBoundary +DirichletBoundary.set_conc = new_instancemethod(_cmf_core.DirichletBoundary_set_conc, None, DirichletBoundary) +DirichletBoundary.RecalcFluxes = new_instancemethod(_cmf_core.DirichletBoundary_RecalcFluxes, None, DirichletBoundary) +DirichletBoundary_swigregister = _cmf_core.DirichletBoundary_swigregister +DirichletBoundary_swigregister(DirichletBoundary) + +class NeumannBoundary(flux_node): + """ + + + A Neumann boundary condition (constant flux boundary condition) + + The flux is a timeseries, but can be used as a scalar. To scale the + timeseries to the specific conditions of this boundary condition the + linear_scale flux_scale can be used. + + C++ includes: boundary_condition.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + + def get_flux(self, *args, **kwargs): + """ + get_flux(NeumannBoundary self) -> timeseries + + cmf::math::timeseries get_flux() + + The timeseries of the boundary flux. + """ + return _cmf_core.NeumannBoundary_get_flux(self, *args, **kwargs) + + + def set_flux(self, *args): + """ + set_flux(NeumannBoundary self, timeseries new_flux) + set_flux(NeumannBoundary self, double new_flux) + + void + set_flux(double new_flux) + + Set a constant as the boundary flux. + """ + return _cmf_core.NeumannBoundary_set_flux(self, *args) + + flux_scale = _swig_property(_cmf_core.NeumannBoundary_flux_scale_get, _cmf_core.NeumannBoundary_flux_scale_set) + concentration = _swig_property(_cmf_core.NeumannBoundary_concentration_get, _cmf_core.NeumannBoundary_concentration_set) + + def __call__(self, *args, **kwargs): + """__call__(NeumannBoundary self, Time t) -> real""" + return _cmf_core.NeumannBoundary___call__(self, *args, **kwargs) + + + def connect_to(self, *args, **kwargs): + """ + connect_to(NeumannBoundary self, cmf::water::flux_node::ptr target) + + void + connect_to(cmf::water::flux_node::ptr target) + """ + return _cmf_core.NeumannBoundary_connect_to(self, *args, **kwargs) + + + def __init__(self, *args): + """ + __init__(cmf::water::NeumannBoundary self, project _project, timeseries _flux, SoluteTimeseries _concentration, point loc) -> NeumannBoundary + __init__(cmf::water::NeumannBoundary self, project _project, point loc) -> NeumannBoundary + + NeumannBoundary(cmf::project &_project, cmf::geometry::point + loc=cmf::geometry::point()) + """ + _cmf_core.NeumannBoundary_swiginit(self, _cmf_core.new_NeumannBoundary(*args)) + + def create(*args, **kwargs): + """create(cmf::water::flux_node::ptr target) -> cmf::water::NeumannBoundary::ptr""" + return _cmf_core.NeumannBoundary_create(*args, **kwargs) + + create = staticmethod(create) + + def __repr__(self): + return self.to_string() + + + flux = property(get_flux,set_flux,"The flux over the boundary condition") + + __swig_destroy__ = _cmf_core.delete_NeumannBoundary +NeumannBoundary.get_flux = new_instancemethod(_cmf_core.NeumannBoundary_get_flux, None, NeumannBoundary) +NeumannBoundary.set_flux = new_instancemethod(_cmf_core.NeumannBoundary_set_flux, None, NeumannBoundary) +NeumannBoundary.__call__ = new_instancemethod(_cmf_core.NeumannBoundary___call__, None, NeumannBoundary) +NeumannBoundary.connect_to = new_instancemethod(_cmf_core.NeumannBoundary_connect_to, None, NeumannBoundary) +NeumannBoundary_swigregister = _cmf_core.NeumannBoundary_swigregister +NeumannBoundary_swigregister(NeumannBoundary) + +def NeumannBoundary_create(*args, **kwargs): + """NeumannBoundary_create(cmf::water::flux_node::ptr target) -> cmf::water::NeumannBoundary::ptr""" + return _cmf_core.NeumannBoundary_create(*args, **kwargs) + +class NeumannFlux(flux_connection): + """ + + + Connection between Neumann-boundary and a flux node. + + This flux_connection is created, when connecting a Neumann boundary + condition with a state variable using Neumann::connect_to + + C++ includes: boundary_condition.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + + def __init__(self, *args, **kwargs): + """ + __init__(cmf::water::NeumannFlux self, std::shared_ptr< cmf::water::NeumannBoundary > left, cmf::water::flux_node::ptr right) -> NeumannFlux + + NeumannFlux(std::shared_ptr< NeumannBoundary > left, + cmf::water::flux_node::ptr right) + """ + _cmf_core.NeumannFlux_swiginit(self, _cmf_core.new_NeumannFlux(*args, **kwargs)) + __swig_destroy__ = _cmf_core.delete_NeumannFlux +NeumannFlux_swigregister = _cmf_core.NeumannFlux_swigregister +NeumannFlux_swigregister(NeumannFlux) + +class WaterStorage(StateVariable, StateVariableOwner, flux_node): + """ + + + A state variable for the storage of water. + + A class for the storage of water. The state is the volume of water + stored in :math:`m^3` The derivative function is given by: + + + .. math:: + + \\frac{dV}{dt}&=&\\sum_{f=1}^{F} q_f \\\\ + F&=& \\mbox{Number of fluxes in water storage} \\\\ q_f&=& + \\mbox{Water flux in } \\frac{m^3}{day} \\\\ + + + + + Todo Check the head based state mode + + C++ includes: WaterStorage.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + + def __init__(self, *args, **kwargs): + """ + __init__(cmf::water::WaterStorage self, project project, std::string const & Name, double InitialState=0, double scale=1) -> WaterStorage + + WaterStorage(cmf::project &project, const std::string &Name="", + double InitialState=0, double scale=1) + + creates a water storage (abstract class) + + Parameters: + ----------- + + project: The project the waterstorage belongs to + + Name: Name of the water storage + + InitialState: Initial water content in m3 + + scale: A kind of "standard size" in m3 of the water storage to + scale tolerances, default 1m3 + """ + _cmf_core.WaterStorage_swiginit(self, _cmf_core.new_WaterStorage(*args, **kwargs)) + + def from_node(*args, **kwargs): + """from_node(cmf::water::flux_node::ptr node) -> std::shared_ptr< cmf::water::WaterStorage >""" + return _cmf_core.WaterStorage_from_node(*args, **kwargs) + + from_node = staticmethod(from_node) + + def Solute(self, *args): + """ + Solute(WaterStorage self, solute _Solute) -> SoluteStorage + Solute(WaterStorage self, solute _Solute) -> SoluteStorage + + const + SoluteStorage& Solute(const cmf::water::solute &_Solute) const + """ + return _cmf_core.WaterStorage_Solute(self, *args) + + + def conc(self, *args): + """ + conc(WaterStorage self, solute _Solute) -> real + conc(WaterStorage self, Time t, solute _Solute) -> real + conc(WaterStorage self, solute _Solute, real NewConcetration) + + void + conc(const cmf::water::solute &_Solute, real NewConcetration) + + Sets a new concentration. + """ + return _cmf_core.WaterStorage_conc(self, *args) + + + def cast(*args, **kwargs): + """cast(std::shared_ptr< cmf::water::flux_node > node) -> std::shared_ptr< cmf::water::WaterStorage >""" + return _cmf_core.WaterStorage_cast(*args, **kwargs) + + cast = staticmethod(cast) + + def create(*args, **kwargs): + """create(project _project, real initial_state=0.0, real scale=1.0) -> std::shared_ptr< cmf::water::WaterStorage >""" + return _cmf_core.WaterStorage_create(*args, **kwargs) + + create = staticmethod(create) + volume = _swig_property(_cmf_core.WaterStorage_volume_get, _cmf_core.WaterStorage_volume_set) + statevariable = _swig_property(_cmf_core.WaterStorage_statevariable_get, _cmf_core.WaterStorage_statevariable_set) + + def __repr__(self): + return self.to_string() + + __swig_destroy__ = _cmf_core.delete_WaterStorage +WaterStorage.Solute = new_instancemethod(_cmf_core.WaterStorage_Solute, None, WaterStorage) +WaterStorage.conc = new_instancemethod(_cmf_core.WaterStorage_conc, None, WaterStorage) +WaterStorage_swigregister = _cmf_core.WaterStorage_swigregister +WaterStorage_swigregister(WaterStorage) + +def WaterStorage_from_node(*args, **kwargs): + """WaterStorage_from_node(cmf::water::flux_node::ptr node) -> std::shared_ptr< cmf::water::WaterStorage >""" + return _cmf_core.WaterStorage_from_node(*args, **kwargs) + +def WaterStorage_cast(*args, **kwargs): + """WaterStorage_cast(std::shared_ptr< cmf::water::flux_node > node) -> std::shared_ptr< cmf::water::WaterStorage >""" + return _cmf_core.WaterStorage_cast(*args, **kwargs) + +def WaterStorage_create(*args, **kwargs): + """WaterStorage_create(project _project, real initial_state=0.0, real scale=1.0) -> std::shared_ptr< cmf::water::WaterStorage >""" + return _cmf_core.WaterStorage_create(*args, **kwargs) + +class waterbalance_connection(flux_connection): + """ + + + Routes the sum of all other fluxes to a target. + + + + .. math:: + + q_{1,0} = \\sum_{i=2}^N{q_{1,i}(V_1,V_i,t)} + + where: + :math:`q_{i,j}` is the flux between the two node i and j. Subscript 0 is the + right node, subscript 1 is the left node and 2..N are the nodes + connected to the left node, except for the right node + + C++ includes: simple_connections.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + + def __init__(self, *args, **kwargs): + """ + __init__(cmf::water::waterbalance_connection self, cmf::water::flux_node::ptr source, cmf::water::flux_node::ptr target) -> waterbalance_connection + + waterbalance_connection(flux_node::ptr source, flux_node::ptr target) + + """ + _cmf_core.waterbalance_connection_swiginit(self, _cmf_core.new_waterbalance_connection(*args, **kwargs)) + __swig_destroy__ = _cmf_core.delete_waterbalance_connection +waterbalance_connection_swigregister = _cmf_core.waterbalance_connection_swigregister +waterbalance_connection_swigregister(waterbalance_connection) + +class external_control_connection(flux_connection): + """ + + + Flux from one node to another, controlled by the user or an external + program, by changing the flux constant. + + It is easy to create negative volumes in water storages with this + connection, which can be hazard to the solver, since most connections + rely on a positive volume in a storage. Handle with care! + + C++ includes: simple_connections.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + flux = _swig_property(_cmf_core.external_control_connection_flux_get, _cmf_core.external_control_connection_flux_set) + + def __init__(self, *args, **kwargs): + """ + __init__(cmf::water::external_control_connection self, cmf::water::flux_node::ptr source, cmf::water::flux_node::ptr target, real flux_value=0) -> external_control_connection + + external_control_connection(flux_node::ptr source, flux_node::ptr + target, real flux_value=0) + """ + _cmf_core.external_control_connection_swiginit(self, _cmf_core.new_external_control_connection(*args, **kwargs)) + __swig_destroy__ = _cmf_core.delete_external_control_connection +external_control_connection_swigregister = _cmf_core.external_control_connection_swigregister +external_control_connection_swigregister(external_control_connection) + + +def set_flux(*args, **kwargs): + """ + set_flux(cmf::water::flux_node::ptr source, cmf::water::flux_node::ptr target, real flux_value) + + void + cmf::water::set_flux(flux_node::ptr source, flux_node::ptr target, + real flux_value) + + Sets a constant flux between two nodes, if an + external_control_connection exists. + """ + return _cmf_core.set_flux(*args, **kwargs) + +def can_set_flux(*args, **kwargs): + """ + can_set_flux(cmf::water::flux_node::ptr source, cmf::water::flux_node::ptr target) -> bool + + bool + cmf::water::can_set_flux(flux_node::ptr source, flux_node::ptr target) + + Checks if a constant flux between two nodes can be set. + + Returns true if the nodes are connected by an + external_control_connection + """ + return _cmf_core.can_set_flux(*args, **kwargs) +class kinematic_wave(flux_connection): + """ + + + Calculates flux out of a storage as a linear function of its volume to + a power. + + Deprecated kinematic_wave is superseeded by LinearStorageConnection + and PowerLawConnection + + + + .. math:: + + q = \\frac 1 {t_r} {\\left(\\frac{V - V_{residual}}{V_0} + \\right)^\\beta} + + where: :math:`V_{residual} [m^3]` The volume of + water not flowing out (default = 0) + + :math:`V_0` The reference volume to scale the exponent (default = 1m3/day) + + :math:`\\beta` A parameter to shape the response curve. In case of + :math:`\\beta \\neq 1`, :math:`t_r` is not a residence time, but just a + parameter. + + :math:`t_r [days]` The residence time of the water in this storage in days + + WARNING: :math:`\\beta < 0.5` may lead to numerical troubles and have a + dubious hydrological meaning. Please avoid. + + C++ includes: simple_connections.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + residencetime = _swig_property(_cmf_core.kinematic_wave_residencetime_get, _cmf_core.kinematic_wave_residencetime_set) + exponent = _swig_property(_cmf_core.kinematic_wave_exponent_get, _cmf_core.kinematic_wave_exponent_set) + residual = _swig_property(_cmf_core.kinematic_wave_residual_get, _cmf_core.kinematic_wave_residual_set) + V0 = _swig_property(_cmf_core.kinematic_wave_V0_get, _cmf_core.kinematic_wave_V0_set) + + def __init__(self, *args, **kwargs): + """ + __init__(cmf::water::kinematic_wave self, cmf::water::WaterStorage::ptr source, cmf::water::flux_node::ptr target, real residencetime, real exponent=1.0, real residual=0.0, real V0=1.0) -> kinematic_wave + + kinematic_wave(WaterStorage::ptr source, flux_node::ptr target, real + residencetime, real exponent=1.0, real residual=0.0, real V0=1.0) + + Creates a kinematic wave connection. + + + + .. math:: + + q = \\frac 1 {t_r} {\\left(\\frac{V - V_{residual}}{V_0} + \\right)^\\beta} + + Parameters: + ----------- + + source: Water storage from which the water flows out. Flux is a + function of source.volume + + target: Target node (boundary condition or storage). Does not + influence the strength of the flow + + residencetime: :math:`t_r [days]` The residence time of the water in this + storage + + exponent: :math:`\\beta [-]` An empirical exponent to shape the flux + function (default = 1 (linear function)) + + residual: :math:`V_{residual} [m^3]` The volume of water not flowing out + (default = 0) + + V0: :math:`V_0` The reference volume to scale the exponent + """ + _cmf_core.kinematic_wave_swiginit(self, _cmf_core.new_kinematic_wave(*args, **kwargs)) + __swig_destroy__ = _cmf_core.delete_kinematic_wave +kinematic_wave_swigregister = _cmf_core.kinematic_wave_swigregister +kinematic_wave_swigregister(kinematic_wave) + +class LinearStorageConnection(flux_connection): + """ + + + Calculates flux out of a storage as a linear function of its volume. + + This connection serves the same purpose as the old kinematic_wave + connection, but the parameters are easier to explain + + + + .. math:: + + q = \\frac{V - V_{residual}}{t_r} + + where: :math:`V` The actual + volume of water stored in source + + :math:`V_{residual} [m^3]` The volume of water not flowing out (default = 0) + :math:`t_r` is the residence time in the source. + + C++ includes: simple_connections.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + residencetime = _swig_property(_cmf_core.LinearStorageConnection_residencetime_get, _cmf_core.LinearStorageConnection_residencetime_set) + residual = _swig_property(_cmf_core.LinearStorageConnection_residual_get, _cmf_core.LinearStorageConnection_residual_set) + + def __init__(self, *args, **kwargs): + """ + __init__(cmf::water::LinearStorageConnection self, cmf::water::WaterStorage::ptr source, cmf::water::flux_node::ptr target, real residencetime, real residual=0.0) -> LinearStorageConnection + + LinearStorageConnection(WaterStorage::ptr source, flux_node::ptr + target, real residencetime, real residual=0.0) + + Creates a linear storage connection or Nash-box. + + + + .. math:: + + q = \\frac{V - V_{residual}}{t_r}} + + Parameters: + ----------- + + source: Water storage from which the water flows out. Flux is a + function of source.volume + + target: Target node (boundary condition or storage). Does not + influence the strength of the flow + + residencetime: :math:`t_r [days]` The residence time of the water in this + storage + + residual: :math:`V_{residual} [m^3]` The volume of water not flowing out + (default = 0) + """ + _cmf_core.LinearStorageConnection_swiginit(self, _cmf_core.new_LinearStorageConnection(*args, **kwargs)) + __swig_destroy__ = _cmf_core.delete_LinearStorageConnection +LinearStorageConnection_swigregister = _cmf_core.LinearStorageConnection_swigregister +LinearStorageConnection_swigregister(LinearStorageConnection) + +class PowerLawConnection(flux_connection): + """ + + + Calculates flux out of a storage as a linear function of its volume to + a power. + + This connection serves the same purpose as the old kinematic_wave + connection, but the parameters are easier to explain. + + + + .. math:: + + q = Q_0 {\\left(\\frac{V - V_{residual}}{V_0} + \\right)^\\beta} + + where: :math:`V` The actual volume of water + stored in source + + :math:`V_{residual} [m^3]` The volume of water not flowing out (default = 0) + + :math:`V_0` A reference volume to scale the outflux. One can see :math:`V_0` as + the inflection point of the outflow curve + + :math:`\\beta` A parameter to shape the response curve. :math:`Q_0` is the + outflow from the source in :math:`\\frac{m^3}{day}`, when :math:`V = V_0`. + + WARNING: :math:`\\beta < 0.5` may lead to numerical troubles and have a + dubious hydrological meaning. Please avoid. + + C++ includes: simple_connections.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + Q0 = _swig_property(_cmf_core.PowerLawConnection_Q0_get, _cmf_core.PowerLawConnection_Q0_set) + beta = _swig_property(_cmf_core.PowerLawConnection_beta_get, _cmf_core.PowerLawConnection_beta_set) + residual = _swig_property(_cmf_core.PowerLawConnection_residual_get, _cmf_core.PowerLawConnection_residual_set) + V0 = _swig_property(_cmf_core.PowerLawConnection_V0_get, _cmf_core.PowerLawConnection_V0_set) + + def __init__(self, *args, **kwargs): + """ + __init__(cmf::water::PowerLawConnection self, cmf::water::WaterStorage::ptr source, cmf::water::flux_node::ptr target, real Q0, real V0, real beta=1.0, real residual=0.0) -> PowerLawConnection + + PowerLawConnection(WaterStorage::ptr source, flux_node::ptr target, + real Q0, real V0, real beta=1.0, real residual=0.0) + + Creates a power law connection. + + Parameters: + ----------- + + source: Water storage from which the water flows out. Flux is a + function of source.volume + + target: Target node (boundary condition or storage). Does not + influence the strength of the flow + + Q0: Reference flow :math:`Q_0 = q(V_0)` Outflow when the source storage + equals the reference volume + + V0: Reference volume :math:`V_0` The reference volume to scale the exponent + + beta: :math:`\\beta [-]` An empirical exponent to shape the flux + function (default = 1 (linear function)) + + residual: :math:`V_{residual} [m^3]` The volume of water not flowing out + (default = 0) + """ + _cmf_core.PowerLawConnection_swiginit(self, _cmf_core.new_PowerLawConnection(*args, **kwargs)) + __swig_destroy__ = _cmf_core.delete_PowerLawConnection +PowerLawConnection_swigregister = _cmf_core.PowerLawConnection_swigregister +PowerLawConnection_swigregister(PowerLawConnection) + +class ExponentialDeclineConnection(flux_connection): + """ + + + A conceptual TOPmodel inspired connection. + + + + .. math:: + + q = Q_0 \\cdot e^{(V-V_0)/m} + + C++ includes: simple_connections.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + Q0 = _swig_property(_cmf_core.ExponentialDeclineConnection_Q0_get, _cmf_core.ExponentialDeclineConnection_Q0_set) + m = _swig_property(_cmf_core.ExponentialDeclineConnection_m_get, _cmf_core.ExponentialDeclineConnection_m_set) + V0 = _swig_property(_cmf_core.ExponentialDeclineConnection_V0_get, _cmf_core.ExponentialDeclineConnection_V0_set) + + def __init__(self, *args, **kwargs): + """ + __init__(cmf::water::ExponentialDeclineConnection self, cmf::water::WaterStorage::ptr source, cmf::water::flux_node::ptr target, real Q0, real V0, real m) -> ExponentialDeclineConnection + + ExponentialDeclineConnection(WaterStorage::ptr source, + flux_node::ptr target, real Q0, real V0, real m) + + creates the exponential decline connection + """ + _cmf_core.ExponentialDeclineConnection_swiginit(self, _cmf_core.new_ExponentialDeclineConnection(*args, **kwargs)) + __swig_destroy__ = _cmf_core.delete_ExponentialDeclineConnection +ExponentialDeclineConnection_swigregister = _cmf_core.ExponentialDeclineConnection_swigregister +ExponentialDeclineConnection_swigregister(ExponentialDeclineConnection) + +class ConstraintLinearStorageConnection(flux_connection): + """ + + + Calculates flux out of a storage as a linear function of its volume to + a power, constraint by the volume stored in the target storage. + + + + .. math:: + + q = \\frac {1}{t_r} \\left({V_{l} - V_{l,min}}\\right) + \\cdot \\left(\\frac{V_{r,max}-V_{r}}{V_{r,max}}\\right) + + where: :math:`V_l` The actual volume stored by the left water storage + + :math:`V_{l,min} [m^3]` The volume of water not flowing out (default = 0) + + :math:`\\beta` A parameter to shape the response curve. In case of + :math:`\\beta \\neq 1`, :math:`t_r` is not a residence time, but just a + parameter. + + :math:`t_r [days]` The residence time of the water in this storage in days + + :math:`V_{r,max}` The capacity of the right water storage in m3 + + :math:`V_{r}` The actual volume of the right water storage + + :math:`\\gamma` A shape parameter for the target capacity constriction + + C++ includes: simple_connections.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + residencetime = _swig_property(_cmf_core.ConstraintLinearStorageConnection_residencetime_get, _cmf_core.ConstraintLinearStorageConnection_residencetime_set) + Vlmin = _swig_property(_cmf_core.ConstraintLinearStorageConnection_Vlmin_get, _cmf_core.ConstraintLinearStorageConnection_Vlmin_set) + Vrmax = _swig_property(_cmf_core.ConstraintLinearStorageConnection_Vrmax_get, _cmf_core.ConstraintLinearStorageConnection_Vrmax_set) + + def __init__(self, *args, **kwargs): + """ + __init__(cmf::water::ConstraintLinearStorageConnection self, cmf::water::WaterStorage::ptr source, cmf::water::WaterStorage::ptr target, real residencetime=1.0, real Vlmin=0.0, real Vrmax=1.0) -> ConstraintLinearStorageConnection + + ConstraintLinearStorageConnection(WaterStorage::ptr source, + WaterStorage::ptr target, real residencetime=1.0, real Vlmin=0.0, real + Vrmax=1.0) + + Creates a kinematic wave connection. + + + + .. math:: + + q = \\frac 1 {t_r} {\\left(\\frac{V - V_{residual}}{V_0} + \\right)^\\beta} + + Parameters: + ----------- + + source: Water storage from which the water flows out. Flux is a + function of source.volume + + target: Target node (boundary condition or storage). Does not + influence the strength of the flow + + residencetime: :math:`t_r [days]` The residence time of the water in this + storage + + Vlmin: :math:`V_{l,min} [m^3]` The volume of water not flowing out + (default = 0) + + Vrmax: :math:`V_{r,max}` Capacity of the target water storage in m3 + """ + _cmf_core.ConstraintLinearStorageConnection_swiginit(self, _cmf_core.new_ConstraintLinearStorageConnection(*args, **kwargs)) + __swig_destroy__ = _cmf_core.delete_ConstraintLinearStorageConnection +ConstraintLinearStorageConnection_swigregister = _cmf_core.ConstraintLinearStorageConnection_swigregister +ConstraintLinearStorageConnection_swigregister(ConstraintLinearStorageConnection) + +class bidirectional_kinematic_exchange(flux_connection): + """ + + + A conceptual flux between two storages that can be positive as well as + negative. + + The state of the right node is not monitored, hence negative volumes + of the right node can occur! Deprecated Behaviour unclear, will be + removed + + .. math:: + + q = q_{spill}^*-q_{suc}^* \\\\ q_{spill}^* = + q_{spill} + \\left(\\frac{V-V_{spill,min}}{V_{spill,min}}\\right)^{\\beta_{spill}} + \\\\ q_{suc}^* = q_{suc} + \\left(\\frac{V_{suc,max}-V}{V_{suc,max}}\\right)^{\\beta_{suc}} + + + where: :math:`q` is the flow to the target + + :math:`q_{spill}^*` is the actual spill flow to the target + + :math:`q_{spill}` is the spill flow at :math:`V = 2V_{spill}` + + :math:`q_{suc}^*` is the actual suction flow from the target + + :math:`q_{suc}` is the sucked flow from the target when :math:`V=0.0` + + :math:`\\beta` is a shape forming exponent for spill and suction flow. + + C++ includes: simple_connections.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + Vmaxsuc = _swig_property(_cmf_core.bidirectional_kinematic_exchange_Vmaxsuc_get, _cmf_core.bidirectional_kinematic_exchange_Vmaxsuc_set) + Vminspill = _swig_property(_cmf_core.bidirectional_kinematic_exchange_Vminspill_get, _cmf_core.bidirectional_kinematic_exchange_Vminspill_set) + qspill = _swig_property(_cmf_core.bidirectional_kinematic_exchange_qspill_get, _cmf_core.bidirectional_kinematic_exchange_qspill_set) + qsuc = _swig_property(_cmf_core.bidirectional_kinematic_exchange_qsuc_get, _cmf_core.bidirectional_kinematic_exchange_qsuc_set) + beta_suc = _swig_property(_cmf_core.bidirectional_kinematic_exchange_beta_suc_get, _cmf_core.bidirectional_kinematic_exchange_beta_suc_set) + beta_spill = _swig_property(_cmf_core.bidirectional_kinematic_exchange_beta_spill_get, _cmf_core.bidirectional_kinematic_exchange_beta_spill_set) + + def __init__(self, *args, **kwargs): + """ + __init__(cmf::water::bidirectional_kinematic_exchange self, cmf::water::WaterStorage::ptr source, cmf::water::flux_node::ptr target, real Vminspill, real Vmaxsuc, real qspill, real qsuc, real beta_spill, real beta_suc) -> bidirectional_kinematic_exchange + + bidirectional_kinematic_exchange(WaterStorage::ptr source, + flux_node::ptr target, real Vminspill, real Vmaxsuc, real qspill, real + qsuc, real beta_spill, real beta_suc) + + Creates a kinematic wave connection. + + Parameters: + ----------- + + source: Water storage from which the water flows out. Flux is a + function of source.volume + + target: Target node (boundary condition or storage). Does not + influence the strength of the flow + + Vmaxsuc: Suction starts below this threshold volume of source + + Vminspill: Spilling starts above this threshold volume of source + + qspill: Spill flow at 2*Vminspill in m3/day + + qsuc: Suction flow at V=0 m3 + + beta_suc: beta_spill: Exponent for spill / suction flow + """ + _cmf_core.bidirectional_kinematic_exchange_swiginit(self, _cmf_core.new_bidirectional_kinematic_exchange(*args, **kwargs)) + __swig_destroy__ = _cmf_core.delete_bidirectional_kinematic_exchange +bidirectional_kinematic_exchange_swigregister = _cmf_core.bidirectional_kinematic_exchange_swigregister +bidirectional_kinematic_exchange_swigregister(bidirectional_kinematic_exchange) + +class constraint_kinematic_wave(flux_connection): + """ + + + Calculates flux out of a storage as a linear function of its volume to + a power, constraint by the volume stored in the target storage. + + Deprecated Will be replaced by ConstraintLinearStorageConnection, + without beta and gamma. + + .. math:: + + q = \\frac 1 {t_r} + {\\left(\\frac{V_{l} - V_{residual}}{V_0} \\right)^\\beta} + \\left(\\frac{V_{r,max}-V_{r}}{V_{r,max}}\\right)^\\gamma + + where: :math:`V_l` The actual volume stored by the left water storage + + :math:`V_{residual} [m^3]` The volume of water not flowing out (default = 0) + + :math:`V_0` The reference volume to scale the exponent (default = 1m3/day) + + :math:`\\beta` A parameter to shape the response curve. In case of + :math:`\\beta \\neq 1`, :math:`t_r` is not a residence time, but just a + parameter. + + :math:`t_r [days]` The residence time of the water in this storage in days + + :math:`V_{r,max}` The capacity of the right water storage in m3 + + :math:`V_{r}` The actual volume of the right water storage + + :math:`\\gamma` A shape parameter for the target capacity constriction + + C++ includes: simple_connections.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + residencetime = _swig_property(_cmf_core.constraint_kinematic_wave_residencetime_get, _cmf_core.constraint_kinematic_wave_residencetime_set) + beta = _swig_property(_cmf_core.constraint_kinematic_wave_beta_get, _cmf_core.constraint_kinematic_wave_beta_set) + residual = _swig_property(_cmf_core.constraint_kinematic_wave_residual_get, _cmf_core.constraint_kinematic_wave_residual_set) + V0 = _swig_property(_cmf_core.constraint_kinematic_wave_V0_get, _cmf_core.constraint_kinematic_wave_V0_set) + Vrmax = _swig_property(_cmf_core.constraint_kinematic_wave_Vrmax_get, _cmf_core.constraint_kinematic_wave_Vrmax_set) + gamma = _swig_property(_cmf_core.constraint_kinematic_wave_gamma_get, _cmf_core.constraint_kinematic_wave_gamma_set) + + def __init__(self, *args, **kwargs): + """ + __init__(cmf::water::constraint_kinematic_wave self, cmf::water::WaterStorage::ptr source, cmf::water::WaterStorage::ptr target, real residencetime=1.0, real exponent=1.0, real residual=0.0, real V0=1.0, real Vrmax=1.0, real gamma=1.0) -> constraint_kinematic_wave + + constraint_kinematic_wave(WaterStorage::ptr source, WaterStorage::ptr + target, real residencetime=1.0, real exponent=1.0, real residual=0.0, + real V0=1.0, real Vrmax=1.0, real gamma=1.0) + + Creates a kinematic wave connection. + + + + .. math:: + + q = \\frac 1 {t_r} {\\left(\\frac{V - V_{residual}}{V_0} + \\right)^\\beta} + + Parameters: + ----------- + + source: Water storage from which the water flows out. Flux is a + function of source.volume + + target: Target node (boundary condition or storage). Does not + influence the strength of the flow + + residencetime: :math:`t_r [days]` The residence time of the water in this + storage + + exponent: :math:`\\beta [-]` An empirical exponent to shape the flux + function (default = 1 (linear function)) + + residual: :math:`V_{residual} [m^3]` The volume of water not flowing out + (default = 0) + + V0: :math:`V_0` The reference volume to scale the exponent + + Vrmax: :math:`V_{r,max}` Capacity of the target water storage in m3 + + gamma: :math:`\\gamma` Target capacity constriction curve shape + """ + _cmf_core.constraint_kinematic_wave_swiginit(self, _cmf_core.new_constraint_kinematic_wave(*args, **kwargs)) + __swig_destroy__ = _cmf_core.delete_constraint_kinematic_wave +constraint_kinematic_wave_swigregister = _cmf_core.constraint_kinematic_wave_swigregister +constraint_kinematic_wave_swigregister(constraint_kinematic_wave) + +class TechnicalFlux(flux_connection): + """ + + + Produces a constant but changeable flux from a source to a target, if + enough water is present in the source. + + + + .. math:: + + q=\\begin{cases}0 & V_{source}\\le V_{min}\\\\ q_0 + \\frac{V_{source} - V_{min}}{t_{decr} q_{0} - V_{min}} & V_{source} + \\le t_{decr} q_{0}\\\\ q_{0} & \\end{cases} + + This is similar to a neumann boundary, however this is not a boundary + condition, but water is taken from the source (left) water storage and + limited by that water storage. + + C++ includes: simple_connections.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + MaxFlux = _swig_property(_cmf_core.TechnicalFlux_MaxFlux_get, _cmf_core.TechnicalFlux_MaxFlux_set) + MinState = _swig_property(_cmf_core.TechnicalFlux_MinState_get, _cmf_core.TechnicalFlux_MinState_set) + FluxDecreaseTime = _swig_property(_cmf_core.TechnicalFlux_FluxDecreaseTime_get, _cmf_core.TechnicalFlux_FluxDecreaseTime_set) + + def __init__(self, *args, **kwargs): + """ + __init__(cmf::water::TechnicalFlux self, cmf::water::WaterStorage::ptr source, cmf::water::flux_node::ptr target, real maximum_flux, real minimal_state=0, Time flux_decrease_time) -> TechnicalFlux + + TechnicalFlux(cmf::water::WaterStorage::ptr source, + cmf::water::flux_node::ptr target, real maximum_flux, real + minimal_state=0, cmf::math::Time flux_decrease_time=cmf::math::h) + + Produces a constant but changeable flux from a source to a target, if + enough water is present in the source. + + Parameters: + ----------- + + source: The source of the water + + target: The target of the water + + maximum_flux: The requested flux :math:`q_{0}` + + minimal_state: Minimal volume of stored water in source + + flux_decrease_time: ( cmf::math::Time) + """ + _cmf_core.TechnicalFlux_swiginit(self, _cmf_core.new_TechnicalFlux(*args, **kwargs)) + __swig_destroy__ = _cmf_core.delete_TechnicalFlux +TechnicalFlux_swigregister = _cmf_core.TechnicalFlux_swigregister +TechnicalFlux_swigregister(TechnicalFlux) + +class generic_gradient_connection(flux_connection): + """ + + + A generic node-to-node gradient based connection. + + This connection is similar to the Darcy-connection, but there are no + restrictions concerning the type of nodes. However, the left side + needs to be a water storage + + .. math:: + + q = K A + \\frac{\\Psi_{l}-\\Psi_{r}}{d} + + where: :math:`q`: the resulting + flux in :math:`m^3/day` + + :math:`K`: the conductivity of the connection + + :math:`A`: the area of the connection cross section + + :math:`\\Psi`: The hydraulic head of the (l)eft, resp. (r)ight node of the + connection + + :math:`d`: The topographic length of the connection in m + + C++ includes: simple_connections.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + K = _swig_property(_cmf_core.generic_gradient_connection_K_get, _cmf_core.generic_gradient_connection_K_set) + A = _swig_property(_cmf_core.generic_gradient_connection_A_get, _cmf_core.generic_gradient_connection_A_set) + d = _swig_property(_cmf_core.generic_gradient_connection_d_get, _cmf_core.generic_gradient_connection_d_set) + + def __init__(self, *args, **kwargs): + """ + __init__(cmf::water::generic_gradient_connection self, cmf::water::WaterStorage::ptr left, cmf::water::WaterStorage::ptr right, real K, real d=1.0, real A=1.0) -> generic_gradient_connection + + generic_gradient_connection(cmf::water::WaterStorage::ptr left, + cmf::water::WaterStorage::ptr right, real K, real d=1.0, real A=1.0) + + Creates a generic gradient based flux, if enough water is present in + the source. + + Parameters: + ----------- + + left: The left node of the connection + + right: The right node of the connection + + K: the conductivity of the connection in m/day + + d: the topographic lenght of the connection in m + + A: the area of the connection cross section in m2 + """ + _cmf_core.generic_gradient_connection_swiginit(self, _cmf_core.new_generic_gradient_connection(*args, **kwargs)) + __swig_destroy__ = _cmf_core.delete_generic_gradient_connection +generic_gradient_connection_swigregister = _cmf_core.generic_gradient_connection_swigregister +generic_gradient_connection_swigregister(generic_gradient_connection) + +class statecontrol_connection(flux_connection): + """ + + + Calculates a flux to or from a water storage to hold it's state at a + more or less constant level. + + + + .. math:: + + q=\\frac{h_1 - h_{target}}{t_c [days]} + + where: :math:`q` the + resulting flux in m3/day + + :math:`h_1` the reference state + + :math:`h_{target}` the state of the target (right) node + + :math:`t_c` the time to reach the target state + + C++ includes: simple_connections.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + reaction_time = _swig_property(_cmf_core.statecontrol_connection_reaction_time_get, _cmf_core.statecontrol_connection_reaction_time_set) + target_state = _swig_property(_cmf_core.statecontrol_connection_target_state_get, _cmf_core.statecontrol_connection_target_state_set) + + def __init__(self, *args, **kwargs): + """ + __init__(cmf::water::statecontrol_connection self, cmf::water::WaterStorage::ptr controlled_storage, cmf::water::flux_node::ptr other_end, real target_state, Time reaction_time) -> statecontrol_connection + + statecontrol_connection(cmf::water::WaterStorage::ptr + controlled_storage, cmf::water::flux_node::ptr other_end, real + target_state, cmf::math::Time reaction_time) + + Creates a flux connection to control the state of a storage. + + Parameters: + ----------- + + controlled_storage: Water storage, to be controlled + + other_end: source of missing water or target of excessive water + + target_state: State the controlled storage should hold ( + :math:`h_{target}`) + + reaction_time: Time to reach state ( :math:`t_c`) + """ + _cmf_core.statecontrol_connection_swiginit(self, _cmf_core.new_statecontrol_connection(*args, **kwargs)) + __swig_destroy__ = _cmf_core.delete_statecontrol_connection +statecontrol_connection_swigregister = _cmf_core.statecontrol_connection_swigregister +statecontrol_connection_swigregister(statecontrol_connection) + +class node_list(StateVariableOwner): + """ + + + A collection of nodes for fast access of the waterbalance. + + In setups with many storages and rather fast computations, the speed + of data access for output generation can take a high portion of the + total run time. To accelerate data access, one can use the node_list + object + + Todo Add a get_volume / set_volume function pair, to complement + get_potential / set_potential + + C++ includes: collections.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + + def size(self, *args, **kwargs): + """ + size(node_list self) -> size_t + + size_t size() + const + + The number of nodes. + """ + return _cmf_core.node_list_size(self, *args, **kwargs) + + + def __init__(self, *args): + """ + __init__(cmf::water::node_list self) -> node_list + __init__(cmf::water::node_list self, node_list forcopy) -> node_list + + node_list(const cmf::water::node_list &forcopy) + + Copy the node_list. + """ + _cmf_core.node_list_swiginit(self, _cmf_core.new_node_list(*args)) + + def __iadd__(self, *args, **kwargs): + """__iadd__(node_list self, node_list right) -> node_list""" + return _cmf_core.node_list___iadd__(self, *args, **kwargs) + + + def __add__(self, *args, **kwargs): + """__add__(node_list self, node_list right) -> node_list""" + return _cmf_core.node_list___add__(self, *args, **kwargs) + + + def __get(self, *args, **kwargs): + """ + __get(node_list self, ptrdiff_t index) -> cmf::water::flux_node::ptr + + flux_node::ptr + get(ptrdiff_t index) const + + Returns a node in the node_list. + """ + return _cmf_core.node_list___get(self, *args, **kwargs) + + + def __getslice(self, *args, **kwargs): + """ + __getslice(node_list self, ptrdiff_t begin, ptrdiff_t end, ptrdiff_t step=1) -> node_list + + node_list + getslice(ptrdiff_t begin, ptrdiff_t end, ptrdiff_t step=1) const + + Returns a slice of the node_list. + """ + return _cmf_core.node_list___getslice(self, *args, **kwargs) + + + def append(self, *args, **kwargs): + """ + append(node_list self, cmf::water::flux_node::ptr node) + + void + append(flux_node::ptr node) + + Adds a flux node to the list. + """ + return _cmf_core.node_list_append(self, *args, **kwargs) + + + def remove(self, *args, **kwargs): + """ + remove(node_list self, cmf::water::flux_node::ptr node) -> bool + + bool + remove(flux_node::ptr node) + + Removes a flux node from the list, returns true if successful. + """ + return _cmf_core.node_list_remove(self, *args, **kwargs) + + + def global_water_balance(self, *args, **kwargs): + """ + global_water_balance(node_list self, Time t) -> real + + real global_water_balance(cmf::math::Time t) const + + Returns the sum of the water balances of the nodes. + + + + .. math:: + + \\sigma_{global} = + \\sum_{i=0}^N{\\sum_{j=0}^{C_i}{q_{ij}(t)}} + + Replaces slow Python code like: + """ + return _cmf_core.node_list_global_water_balance(self, *args, **kwargs) + + + def water_balance(self, *args, **kwargs): + """ + water_balance(node_list self, Time t) -> cmf::math::num_array + + cmf::math::num_array water_balance(cmf::math::Time t) const + + Returns the water balance of each vector as a vector. + + + + .. math:: + + \\sigma_i = \\sum_{j=0}^{C_i}{q_{ij}(t)} + + Replaces slow Python code like: + """ + return _cmf_core.node_list_water_balance(self, *args, **kwargs) + + + def conc(self, *args, **kwargs): + """ + conc(node_list self, Time t, solute _Solute) -> cmf::math::num_array + + cmf::math::num_array conc(cmf::math::Time t, const cmf::water::solute + &_Solute) const + + Returns an array holding the concentration of all the flux nodes for + the given solute. + """ + return _cmf_core.node_list_conc(self, *args, **kwargs) + + + def set_solute_source(self, *args, **kwargs): + """ + set_solute_source(node_list self, solute _Solute, cmf::math::num_array source_fluxes) -> ptrdiff_t + + ptrdiff_t set_solute_source(const cmf::water::solute &_Solute, + cmf::math::num_array source_fluxes) + + Sets the source flux of a solute storage associated with a node (node + has to be a water storage) + """ + return _cmf_core.node_list_set_solute_source(self, *args, **kwargs) + + + def get_fluxes_to(self, *args, **kwargs): + """ + get_fluxes_to(node_list self, node_list targets, Time t) -> cmf::math::num_array + + cmf::math::num_array get_fluxes_to(const cmf::water::node_list + &targets, cmf::math::Time t) const + + A fast method to perform flux queries as a batch. + + The node lists left and right should have the same length. + + The vector containing the flux from left to right at the same position + + Parameters: + ----------- + + targets: A node_list containing the source nodes + + t: The time for the fluxes + + Replaces slow Python code like: + """ + return _cmf_core.node_list_get_fluxes_to(self, *args, **kwargs) + + + def get_fluxes3d_to(self, *args, **kwargs): + """ + get_fluxes3d_to(node_list self, node_list targets, Time t) -> point_vector + + cmf::geometry::point_vector get_fluxes3d_to(const + cmf::water::node_list &targets, cmf::math::Time t) const + + Returns the flux vectors to the nodes of a given target node_list. + """ + return _cmf_core.node_list_get_fluxes3d_to(self, *args, **kwargs) + + + def get_fluxes3d(self, *args, **kwargs): + """ + get_fluxes3d(node_list self, Time t) -> point_vector + + cmf::geometry::point_vector get_fluxes3d(cmf::math::Time t) const + + Returns the current flow vector for each node. + """ + return _cmf_core.node_list_get_fluxes3d(self, *args, **kwargs) + + + def get_positions(self, *args, **kwargs): + """ + get_positions(node_list self) -> point_vector + + cmf::geometry::point_vector get_positions() const + + Returns the positions of the nodes. + """ + return _cmf_core.node_list_get_positions(self, *args, **kwargs) + + __swig_destroy__ = _cmf_core.delete_node_list + potentials = _swig_property(_cmf_core.node_list_potentials_get, _cmf_core.node_list_potentials_set) + + def __getitem__(self,index): + if isinstance(index,slice): + return self.__getslice(*index.indices(self.size())) + else: + try: + it = iter(index) + return node_list(self.__get(i) for i in it) + except: + return self.__get(index) + + def __len__(self): + return self.size() + def __iter__(self): + for i in xrange(self.size()): + yield self[i] + def __repr__(self): + if len(self): return "[%i nodes: %s ... %s]" % (len(self),self[0], self[-1]) + else: return "[empty node list]" + def extend(self,sequence): + """Extends the node list with the sequence (any iterable will do) """ + for o in sequence: + self.append(o) + @staticmethod + def from_sequence(sequence): + """Returns a new node list populated from the sequence (any iterable will do) """ + nl=node_list() + nl.extend(sequence) + return nl + +node_list.size = new_instancemethod(_cmf_core.node_list_size, None, node_list) +node_list.__iadd__ = new_instancemethod(_cmf_core.node_list___iadd__, None, node_list) +node_list.__add__ = new_instancemethod(_cmf_core.node_list___add__, None, node_list) +node_list.__get = new_instancemethod(_cmf_core.node_list___get, None, node_list) +node_list.__getslice = new_instancemethod(_cmf_core.node_list___getslice, None, node_list) +node_list.append = new_instancemethod(_cmf_core.node_list_append, None, node_list) +node_list.remove = new_instancemethod(_cmf_core.node_list_remove, None, node_list) +node_list.global_water_balance = new_instancemethod(_cmf_core.node_list_global_water_balance, None, node_list) +node_list.water_balance = new_instancemethod(_cmf_core.node_list_water_balance, None, node_list) +node_list.conc = new_instancemethod(_cmf_core.node_list_conc, None, node_list) +node_list.set_solute_source = new_instancemethod(_cmf_core.node_list_set_solute_source, None, node_list) +node_list.get_fluxes_to = new_instancemethod(_cmf_core.node_list_get_fluxes_to, None, node_list) +node_list.get_fluxes3d_to = new_instancemethod(_cmf_core.node_list_get_fluxes3d_to, None, node_list) +node_list.get_fluxes3d = new_instancemethod(_cmf_core.node_list_get_fluxes3d, None, node_list) +node_list.get_positions = new_instancemethod(_cmf_core.node_list_get_positions, None, node_list) +node_list_swigregister = _cmf_core.node_list_swigregister +node_list_swigregister(node_list) + +class NeumannBoundary_list(object): + """ + + + Provides fast access to Neumann boundaries for flux update. + + If many Neumann boundary conditions are present in a project, a fast + data exchange to update the fluxes might be needed. + + With this specialized list a num_array can be passed to the boundary + conditions for a fast flux update If a multiple system layout for the + cmf setup is chosen, we might have a node_list Dirichlet boundary + conditions (dbc), a corresponding NeumannBoundary_list (nbc) of + Neumann boundaries and a node_list containing the storages connected + with the NeumannBoundary_list (storages). The fast data exchange is + written in Python as: + + C++ includes: collections.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + + def get(self, *args, **kwargs): + """ + get(NeumannBoundary_list self, ptrdiff_t index) -> cmf::water::NeumannBoundary::ptr + + NeumannBoundary::ptr get(ptrdiff_t index) const + + Returns the Neumann boundary condition at position index. + + From Python you can use [] + """ + return _cmf_core.NeumannBoundary_list_get(self, *args, **kwargs) + + + def get_fluxes(self, *args, **kwargs): + """ + get_fluxes(NeumannBoundary_list self, Time t) -> cmf::math::num_array + + cmf::math::num_array get_fluxes(cmf::math::Time t=cmf::math::Time()) + const + + Returns the fluxes of the items as an array. + + get_fluxes and set_fluxes are wrapped with the Python property fluxes + + """ + return _cmf_core.NeumannBoundary_list_get_fluxes(self, *args, **kwargs) + + + def append(self, *args, **kwargs): + """ + append(NeumannBoundary_list self, cmf::water::NeumannBoundary::ptr nbc) + + void + append(NeumannBoundary::ptr nbc) + + Appends a neumann boundary to this list. + """ + return _cmf_core.NeumannBoundary_list_append(self, *args, **kwargs) + + + def size(self, *args, **kwargs): + """ + size(NeumannBoundary_list self) -> size_t + + size_t + size() const + + returns the number of stored boundary conditions + """ + return _cmf_core.NeumannBoundary_list_size(self, *args, **kwargs) + + + def __init__(self, *args): + """ + __init__(cmf::water::NeumannBoundary_list self) -> NeumannBoundary_list + __init__(cmf::water::NeumannBoundary_list self, node_list copy) -> NeumannBoundary_list + __init__(cmf::water::NeumannBoundary_list self, NeumannBoundary_list copy) -> NeumannBoundary_list + + NeumannBoundary_list(const NeumannBoundary_list ©) + """ + _cmf_core.NeumannBoundary_list_swiginit(self, _cmf_core.new_NeumannBoundary_list(*args)) + + def to_node_list(self, *args, **kwargs): + """ + to_node_list(NeumannBoundary_list self) -> node_list + + cmf::water::node_list to_node_list() const + + Creates a node_list from this NeumannBoundary_list. + """ + return _cmf_core.NeumannBoundary_list_to_node_list(self, *args, **kwargs) + + + def global_water_balance(self, *args, **kwargs): + """ + global_water_balance(NeumannBoundary_list self, Time t) -> real + + real + global_water_balance(cmf::math::Time t) const + + Returns the sum of the water balances of the nodes + + + .. math:: + + \\sigma_{global} = + \\sum_{i=0}^N{\\sum_{j=0}^{C_i}{q_{ij}(t)}} + + . + + Replaces slow Python code like: + """ + return _cmf_core.NeumannBoundary_list_global_water_balance(self, *args, **kwargs) + + + def water_balance(self, *args, **kwargs): + """ + water_balance(NeumannBoundary_list self, Time t) -> cmf::math::num_array + + cmf::math::num_array water_balance(cmf::math::Time t) const + + Returns the water balance of each vector as a vector + + .. math:: + + \\sigma_i + = \\sum_{j=0}^{C_i}{q_{ij}(t)} + + . + + Replaces slow Python code like: + """ + return _cmf_core.NeumannBoundary_list_water_balance(self, *args, **kwargs) + + fluxes = _swig_property(_cmf_core.NeumannBoundary_list_fluxes_get, _cmf_core.NeumannBoundary_list_fluxes_set) + + def __getitem__(self,index): + return self.get(index) + def __len__(self): + return self.size() + def __iter__(self): + for i in xrange(self.size()): + yield self[i] + def extend(self,sequence): + """Extends the list of Neumann boundaries with the sequence (any iterable will do) """ + for o in sequence: + self.append(o) + @staticmethod + def from_sequence(sequence): + """Returns a new list of Neumann boundaries populated from the sequence (any iterable will do) """ + nl=NeumannBoundary_list() + nl.extend(sequence) + return nl + + __swig_destroy__ = _cmf_core.delete_NeumannBoundary_list +NeumannBoundary_list.get = new_instancemethod(_cmf_core.NeumannBoundary_list_get, None, NeumannBoundary_list) +NeumannBoundary_list.get_fluxes = new_instancemethod(_cmf_core.NeumannBoundary_list_get_fluxes, None, NeumannBoundary_list) +NeumannBoundary_list.append = new_instancemethod(_cmf_core.NeumannBoundary_list_append, None, NeumannBoundary_list) +NeumannBoundary_list.size = new_instancemethod(_cmf_core.NeumannBoundary_list_size, None, NeumannBoundary_list) +NeumannBoundary_list.to_node_list = new_instancemethod(_cmf_core.NeumannBoundary_list_to_node_list, None, NeumannBoundary_list) +NeumannBoundary_list.global_water_balance = new_instancemethod(_cmf_core.NeumannBoundary_list_global_water_balance, None, NeumannBoundary_list) +NeumannBoundary_list.water_balance = new_instancemethod(_cmf_core.NeumannBoundary_list_water_balance, None, NeumannBoundary_list) +NeumannBoundary_list_swigregister = _cmf_core.NeumannBoundary_list_swigregister +NeumannBoundary_list_swigregister(NeumannBoundary_list) + +class SystemBridge(flux_node): + """ + + + A SystemBridge is an advanced feature for tuning of the calculation + time. + + A SystemBridge can be used to replace an existing connection between + nodes. It is created using the system_bridge function. After + installation, the two nodes can more safely be added to different + integrator systems. One node (called upper) is connected with the + system bridge with the connection formerly connecting the nodes, the + second node (called lower) is connected to the system bridge with as a + Neumann boundary condition. The flux equals the average flux of the + connection upper <-> SystemBridge. Therefore, the downward flux needs + to be integrated over time by the solver the upper node belongs to. + Use as an upper system (system upper node is belonging to) the faster + reacting system. For the connection between upper and SystemBridge, + the SystemBridge reacts as an Dirichlet boundary condition, providing + the potential of the lower node. + + The following example code creates a system bridge between the nodes + upper and lower. To integrate the flux over each timestep + automatically, the systembridge is added to the solver of upper, as an + integratable + + C++ includes: system_bridge.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined") + __repr__ = _swig_repr + + def get_upper_node(self, *args, **kwargs): + """ + get_upper_node(SystemBridge self) -> cmf::water::flux_node::ptr + + flux_node::ptr get_upper_node() const + + Returns the upper node. + """ + return _cmf_core.SystemBridge_get_upper_node(self, *args, **kwargs) + + + def get_lower_node(self, *args, **kwargs): + """ + get_lower_node(SystemBridge self) -> cmf::water::flux_node::ptr + + flux_node::ptr get_lower_node() const + + Returns the lower node. + """ + return _cmf_core.SystemBridge_get_lower_node(self, *args, **kwargs) + + + def get_down_flux(self, *args, **kwargs): + """ + get_down_flux(SystemBridge self) -> double + + double get_down_flux() const + + Returns the currently integrated flux to the lower node. + """ + return _cmf_core.SystemBridge_get_down_flux(self, *args, **kwargs) + + + def down_flux_integrator(self, *args, **kwargs): + """ + down_flux_integrator(SystemBridge self) -> cmf::water::flux_integrator::ptr + + flux_integrator::ptr down_flux_integrator() const + """ + return _cmf_core.SystemBridge_down_flux_integrator(self, *args, **kwargs) + + __swig_destroy__ = _cmf_core.delete_SystemBridge +SystemBridge.get_upper_node = new_instancemethod(_cmf_core.SystemBridge_get_upper_node, None, SystemBridge) +SystemBridge.get_lower_node = new_instancemethod(_cmf_core.SystemBridge_get_lower_node, None, SystemBridge) +SystemBridge.get_down_flux = new_instancemethod(_cmf_core.SystemBridge_get_down_flux, None, SystemBridge) +SystemBridge.down_flux_integrator = new_instancemethod(_cmf_core.SystemBridge_down_flux_integrator, None, SystemBridge) +SystemBridge_swigregister = _cmf_core.SystemBridge_swigregister +SystemBridge_swigregister(SystemBridge) + +class SystemBridgeConnection(flux_connection): + """ + + + Connects a system bridge with its lower node. Is created automatically + when creating a SystemBridge. + + C++ includes: system_bridge.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined") + __repr__ = _swig_repr + __swig_destroy__ = _cmf_core.delete_SystemBridgeConnection +SystemBridgeConnection_swigregister = _cmf_core.SystemBridgeConnection_swigregister +SystemBridgeConnection_swigregister(SystemBridgeConnection) + + +def system_bridge(*args, **kwargs): + """ + system_bridge(project p, cmf::water::flux_node::ptr upper, cmf::water::flux_node::ptr lower) -> cmf::water::SystemBridge::ptr + + SystemBridge::ptr + cmf::water::system_bridge(cmf::project &p, flux_node::ptr upper, + flux_node::ptr lower) + + Creates a SystemBridge object. + + This is an advanced feature for tuning of the calculation time. + + A SystemBridge can be used to replace an existing connection between + nodes. After installation, the two nodes can more safely be added to + different integrator systems. One node (called upper) is connected + with the system bridge with the connection formerly connecting the + nodes, the second node (called lower) is connected to the system + bridge with as a Neumann boundary condition. The flux equals the + average flux of the connection upper <-> SystemBridge. Therefore, the + system bridge must become an integratable of the integrator system the + upper node belongs to. Use as an upper system (system upper node is + belonging to) the faster reacting system. For the connection between + upper and SystemBridge, the SystemBridge reacts as an Dirichlet + boundary condition, providing the potential of the lower node. + """ + return _cmf_core.system_bridge(*args, **kwargs) + +def integrate_over(item,solver=None): + """Returns a suitable cmf.integratable implementation for item, if available. + The created integratable is integrated by solver, if given""" + try: + it = iter(item) + except: + it=None + if it: + res = integratable_list() + for i in it: + integ = integrate_over(i,solver) + res.append(integ) + return res + elif isinstance(item,flux_node): + res = waterbalance_integrator(item) + elif isinstance(item,flux_connection): + res = flux_integrator(item) + else: + raise TypeError("""Only the waterbalance of flux_nodes and the flux of flux_connections + are integratable. Received: """ + str(item)) + if isinstance(solver,Integrator): + solver.integratables.append(res) + return res + + +def vapour_pressure(*args, **kwargs): + """ + vapour_pressure(double T) -> double + + double + cmf::atmosphere::vapour_pressure(double T) + + Returns the saturated vapor pressure in Pa for temperature T [degC]. + + The saturated vapor pressure :math:`e_s` is calculated follwing the + following formula + + .. math:: + + e_s = 0.6108 \\exp{\\frac{17.27 + T}{T+237.3}} + + The definition is + fromhttp://www.fao.org/docrep/X0490E/x0490e07.htm#concepts + """ + return _cmf_core.vapour_pressure(*args, **kwargs) + +def vpd_from_rH(*args, **kwargs): + """ + vpd_from_rH(double T, double rH) -> double + + double + cmf::atmosphere::vpd_from_rH(double T, double rH) + + Returns the vapor pressure deficit in Pa for temperature T [degC] and + rel. + + humidity rH [%] + + The vapor pressure deficit :math:`e_s - e_a` is calculated from rel. + humidity as: + + .. math:: + + e_s - e_a = (1-rH/100) * e_s(T) + + The definition + is fromhttp://www.fao.org/docrep/X0490E/x0490e07.htm#concepts + + Parameters: + ----------- + + T: Air temperature in degC + + rH: Rel. humidity in % + + :math:`e_s(T)` is calculated using cmf::atmosphere::vapor_pressure(double) + + """ + return _cmf_core.vpd_from_rH(*args, **kwargs) + +def rH_from_vpd(*args, **kwargs): + """ + rH_from_vpd(double T, double vpd) -> double + + double + cmf::atmosphere::rH_from_vpd(double T, double vpd) + + Returns the rel. + + humidity in % for temperature T [degC] and vapor pressure deficit vpd + [Pa] + + the rel. humidity is calculated from the vapor pressure deficit :math:`vpd = e_s - e_a` as: + + .. math:: + + rH = 100 * \\frac{e_a}{e_s(T)}, e_a = e_s(T) - + vpd + + The definition is + fromhttp://www.fao.org/docrep/X0490E/x0490e07.htm#concepts + + Parameters: + ----------- + + T: Air temperature in degC + + vpd: Vapor pressure deficit in Pa + + :math:`e_s(T)` is calculated using cmf::atmosphere::vapor_pressure(double) + + """ + return _cmf_core.rH_from_vpd(*args, **kwargs) + +def global_radiation(*args, **kwargs): + """ + global_radiation(Time t, double height, double sunshine_fraction, double longitude=8, double latitude=51, double time_zone=1, bool daily=False) -> double + + double + cmf::atmosphere::global_radiation(cmf::math::Time t, double height, + double sunshine_fraction, double longitude=8, double latitude=51, + double time_zone=1, bool daily=0) + + Calculates the global radiation in MJ/(m2 day) from the sun position + and the sunshine fraction. + + Parameters: + ----------- + + t: actual time step + + height: Height above sea level + + sunshine_fraction: Fraction of sunshine hours per potential sunshine + duration in h/h + + longitude: latitude: Geographical position in degree. Latitude is + only taken into acount for subdaily calculation + + time_zone: Offset by timezone from GMT, eg. central Europe=1 US west + coast = -8 + + daily: If true, the average radiation for the whole day is given + (therefore latitude and time zone ignored), otherwise the average of + the current hour is returned + + The calculation of the global radiation + followshttp://www.fao.org/docrep/X0490E/x0490e07.htm#radiation. + + The following formula is used: + + .. math:: + + \\phi &=& + \\frac{(\\mbox{geogr. Latitude})^\\circ \\pi}{180^\\circ} + \\mbox{ Latitude in }rad \\\\ \\delta &=& 0.409 + \\sin\\left(\\frac{2\\pi}{365}DOY - 1.39\\right) \\mbox{ + Declination, DOY is day of year}\\\\ \\omega_s &=& + \\arccos(-\\tan\\phi\\tan\\delta) \\mbox{ Sunset angle} + \\\\ G_{sc} &=& 0.0802 \\frac{MJ}{m^2min} \\mbox{Solar + constant} \\\\ d_r &=& 1+0.033 + \\cos\\left(\\frac{2\\pi}{365}DOY\\right) \\mbox{Inverse + relative distance Earth-Sun} \\\\ b &=& + \\frac{2\\pi(DOY-81)}{364}\\\\ S_c &=& + 0.1645\\sin(2b)-0.1255\\cos(b)-0.025\\sin(b) \\mbox{ Seasonal + correction for solar time} \\\\ \\omega &=& \\frac {\\pi} + {12} \\left(t_h+\\frac{(\\mbox{geogr. + Longitude})^\\circ}{15}-\\mbox{Timezone}+S_c-12\\right) + \\mbox{ solar time in }rad \\\\ \\mbox{If daily} \\\\ R_a + &=& \\frac{24\\ 60}{\\pi}G_{sc}\\ d_r \\left(\\omega_s + \\sin\\phi \\sin\\delta + \\cos\\phi \\cos\\delta + \\sin\\omega_s\\right) \\mbox{Extraterrestrial radiation } + \\frac{MJ}{m^2 day} \\\\ \\mbox{If hourly} \\\\ R_a &=& + \\frac{12\\ 24\\ 60}{\\pi}G_{sc}\\ d_r + \\left(\\left(\\omega^+ -\\omega^-\\right) \\sin\\phi + \\sin\\delta + \\cos\\phi \\cos\\delta + \\left(\\sin\\omega^+ - \\sin\\omega^-\\right)\\right) + \\\\ && \\omega^+,\\omega^- = \\omega + \\pm\\frac{\\pi}{24} \\\\ \\frac n N &=& + \\mbox{Fractional sunshine duration} \\\\ R_s &=& + \\left(0.25+\\left(0.5+2\\ + 10^{-5}z\\right)\\frac{n}{N}\\right)R_a \\mbox{Global + radiation in }\\frac{MJ}{m^2 day} \\\\ && z=\\mbox{Height + a.s.l. in }m \\\\ + + + """ + return _cmf_core.global_radiation(*args, **kwargs) + +def Pressure(*args, **kwargs): + """ + Pressure(double height) -> double + + double + cmf::atmosphere::Pressure(double height) + + Returns the average air pressure for a height (m a.s.l.) + """ + return _cmf_core.Pressure(*args, **kwargs) +class Weather(object): + """ + + + A structure holding meteorological information, excluding + precipitation + + C++ includes: Weather.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + T = _swig_property(_cmf_core.Weather_T_get, _cmf_core.Weather_T_set) + Tmax = _swig_property(_cmf_core.Weather_Tmax_get, _cmf_core.Weather_Tmax_set) + Tmin = _swig_property(_cmf_core.Weather_Tmin_get, _cmf_core.Weather_Tmin_set) + Tground = _swig_property(_cmf_core.Weather_Tground_get, _cmf_core.Weather_Tground_set) + Windspeed = _swig_property(_cmf_core.Weather_Windspeed_get, _cmf_core.Weather_Windspeed_set) + e_a = _swig_property(_cmf_core.Weather_e_a_get, _cmf_core.Weather_e_a_set) + e_s = _swig_property(_cmf_core.Weather_e_s_get, _cmf_core.Weather_e_s_set) + sunshine = _swig_property(_cmf_core.Weather_sunshine_get, _cmf_core.Weather_sunshine_set) + Rs = _swig_property(_cmf_core.Weather_Rs_get, _cmf_core.Weather_Rs_set) + daylength = _swig_property(_cmf_core.Weather_daylength_get, _cmf_core.Weather_daylength_set) + instrument_height = _swig_property(_cmf_core.Weather_instrument_height_get, _cmf_core.Weather_instrument_height_set) + + def Rn(self, *args, **kwargs): + """ + Rn(Weather self, double albedo, bool daily=False) -> double + + double Rn(double + albedo, bool daily=false) const + + Calculates the net radiation flux :math:`R_n \\left[\\frac{MJ}{m^2 day}\\right]`. + + + + .. math:: + + R_{n} &=& R_{ns} - R_{nl} \\\\ \\mbox{ Net + short wave radiation: }R_{ns} &=& (1-\\alpha) R_s \\\\ \\mbox{ + Net long wave radiation: }R_{nl} &=& R_{black}\\ \\beta_{v}\\ + \\beta_{c} \\\\ \\mbox{Black body radiation: } R_{black} &=& + \\left\\{\\begin{array}{cl} \\sigma T^4 & \\mbox{for less + than daily time steps} \\\\ \\sigma \\frac {T_{max}^4 + + T_{min}^4} 2 & \\mbox{for daily time steps} \\end{array} + \\right. \\\\ T &=& \\mbox{Temperature }[K] \\\\ \\sigma + &=& 4.903\\ 10^{-9} \\frac{MJ}{K^4 m^2 day} \\mbox{ Stefan- + Boltzmann constant } \\\\ \\mbox{Long wave reflectance: } + \\\\ \\mbox{by water vapor: }\\beta_{v} &=& 0.34 - 0.14 + \\sqrt{e_a} \\\\ \\mbox{ by clouds: }\\beta_{c} &=& 0.1 + + 0.9 \\frac n N + + + + Parameters: + ----------- + + albedo: the albedo :math:`\\alpha` of the surface + + daily: If true, the net radiation for daily averages will be + calculated + """ + return _cmf_core.Weather_Rn(self, *args, **kwargs) + + + def __init__(self, *args, **kwargs): + """ + __init__(cmf::atmosphere::Weather self, double T=15.0, double Tmax=17.0, double Tmin=13.0, double rH=70.0, double wind=2.0, double sunshine=0.5, double Rs=15, double daylength=12) -> Weather + + Weather(double T=15.0, double Tmax=17.0, double Tmin=13.0, double + rH=70.0, double wind=2.0, double sunshine=0.5, double Rs=15, double + daylength=12) + + Creates a "weather" from given data. + + Parameters: + ----------- + + T: actual Temperature in deg C + + Tmax: daily maximum Temperature in deg C + + Tmin: daily minimum Temperature in deg C + + rH: actual relative humidity in % [0..100] + + wind: actual wind speed in m/s + + sunshine: actual fraction of sunshine duration per potential sunshine + duration in h/h + + Rs: actual incoming shortwave global radiation in MJ/(m2 day) + + daylength: length of the day in h + """ + _cmf_core.Weather_swiginit(self, _cmf_core.new_Weather(*args, **kwargs)) + + def to_string(self, *args, **kwargs): + """ + to_string(Weather self) -> std::string + + std::string to_string() const + + Returns a string representation. + """ + return _cmf_core.Weather_to_string(self, *args, **kwargs) + + + def set_snow_threshold(*args, **kwargs): + """set_snow_threshold(double new_threshold)""" + return _cmf_core.Weather_set_snow_threshold(*args, **kwargs) + + set_snow_threshold = staticmethod(set_snow_threshold) + + def get_snow_threshold(*args, **kwargs): + """get_snow_threshold() -> double""" + return _cmf_core.Weather_get_snow_threshold(*args, **kwargs) + + get_snow_threshold = staticmethod(get_snow_threshold) + + def __iadd__(self, *args, **kwargs): + """__iadd__(Weather self, Weather w) -> Weather""" + return _cmf_core.Weather___iadd__(self, *args, **kwargs) + + + def __imul__(self, *args, **kwargs): + """__imul__(Weather self, double factor) -> Weather""" + return _cmf_core.Weather___imul__(self, *args, **kwargs) + + + def __add__(self, *args, **kwargs): + """__add__(Weather self, Weather w) -> Weather""" + return _cmf_core.Weather___add__(self, *args, **kwargs) + + + def __mul__(self, *args, **kwargs): + """__mul__(Weather self, double factor) -> Weather""" + return _cmf_core.Weather___mul__(self, *args, **kwargs) + + + def __repr__(self): + return "cmf.Weather(Tmin=%0.2f,Tmax=%0.2f)" % (self.Tmin,self.Tmax) + def __str__(self): + return self.to_string() + + __swig_destroy__ = _cmf_core.delete_Weather +Weather.Rn = new_instancemethod(_cmf_core.Weather_Rn, None, Weather) +Weather.to_string = new_instancemethod(_cmf_core.Weather_to_string, None, Weather) +Weather.__iadd__ = new_instancemethod(_cmf_core.Weather___iadd__, None, Weather) +Weather.__imul__ = new_instancemethod(_cmf_core.Weather___imul__, None, Weather) +Weather.__add__ = new_instancemethod(_cmf_core.Weather___add__, None, Weather) +Weather.__mul__ = new_instancemethod(_cmf_core.Weather___mul__, None, Weather) +Weather_swigregister = _cmf_core.Weather_swigregister +Weather_swigregister(Weather) + +def Weather_set_snow_threshold(*args, **kwargs): + """Weather_set_snow_threshold(double new_threshold)""" + return _cmf_core.Weather_set_snow_threshold(*args, **kwargs) + +def Weather_get_snow_threshold(*args): + """Weather_get_snow_threshold() -> double""" + return _cmf_core.Weather_get_snow_threshold(*args) + +class Meteorology(object): + """ + + + An abstract class, for objects generating Weather records at a + specific time. + + C++ includes: meteorology.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def __call__(self, *args, **kwargs): + """__call__(Meteorology self, Time t) -> Weather""" + return _cmf_core.Meteorology___call__(self, *args, **kwargs) + + + def get_weather(self, *args, **kwargs): + """ + get_weather(Meteorology self, Time t) -> Weather + + virtual cmf::atmosphere::Weather get_weather(cmf::math::Time t) const + =0 + + Returns the Weather at time t. Pure virtual function. Must get + implemented by child functions. + """ + return _cmf_core.Meteorology_get_weather(self, *args, **kwargs) + + + def copy(self, *args, **kwargs): + """ + copy(Meteorology self) -> Meteorology + + virtual + Meteorology* copy() const =0 + + Returns a copy of the meteorology object. Pure virtual function, needs + to be implemented. + """ + return _cmf_core.Meteorology_copy(self, *args, **kwargs) + + + def get_instrument_height(self, *args, **kwargs): + """ + get_instrument_height(Meteorology self) -> real + + virtual real + get_instrument_height() const =0 + + Returns the height of the instruments above canopy. + """ + return _cmf_core.Meteorology_get_instrument_height(self, *args, **kwargs) + + __swig_destroy__ = _cmf_core.delete_Meteorology +Meteorology.__call__ = new_instancemethod(_cmf_core.Meteorology___call__, None, Meteorology) +Meteorology.get_weather = new_instancemethod(_cmf_core.Meteorology_get_weather, None, Meteorology) +Meteorology.copy = new_instancemethod(_cmf_core.Meteorology_copy, None, Meteorology) +Meteorology.get_instrument_height = new_instancemethod(_cmf_core.Meteorology_get_instrument_height, None, Meteorology) +Meteorology_swigregister = _cmf_core.Meteorology_swigregister +Meteorology_swigregister(Meteorology) + +class ConstantMeteorology(Meteorology): + """ + + + A primitive implementation of the Meteorology interface. + + Holds a Weather record and returns it for any date + + C++ includes: meteorology.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + weather = _swig_property(_cmf_core.ConstantMeteorology_weather_get, _cmf_core.ConstantMeteorology_weather_set) + + def __init__(self, *args): + """ + __init__(cmf::atmosphere::ConstantMeteorology self) -> ConstantMeteorology + __init__(cmf::atmosphere::ConstantMeteorology self, Weather w) -> ConstantMeteorology + __init__(cmf::atmosphere::ConstantMeteorology self, ConstantMeteorology other) -> ConstantMeteorology + + ConstantMeteorology(const cmf::atmosphere::ConstantMeteorology &other) + + Copy constructor. + """ + _cmf_core.ConstantMeteorology_swiginit(self, _cmf_core.new_ConstantMeteorology(*args)) + + def copy(self, *args, **kwargs): + """ + copy(ConstantMeteorology self) -> ConstantMeteorology + + ConstantMeteorology* copy() const + + Creates a new instannce of the ConstantMeteorology with the same + weather. + """ + return _cmf_core.ConstantMeteorology_copy(self, *args, **kwargs) + + __swig_destroy__ = _cmf_core.delete_ConstantMeteorology +ConstantMeteorology.copy = new_instancemethod(_cmf_core.ConstantMeteorology_copy, None, ConstantMeteorology) +ConstantMeteorology_swigregister = _cmf_core.ConstantMeteorology_swigregister +ConstantMeteorology_swigregister(ConstantMeteorology) + +class MeteoStation(object): + """ + + + A meteorological station holding timeseries to create Weather records. + + In order to calculate ETpot with cmf a big amount of meteorological + data is needed, more data than usually available. The MeteoStation + class can estimate missing data from a minimal set. As more data, as + one provides, the better the calculation of ETpot becomes. The minimal + data needed is Tmin and Tmax (daily) and precipitation. To calculate + the global radiation (although measured global radiation could be + inserted), the position of meteorological station in geographic + coordinates has to be set. + + A meteorological station is created by + cmf::atmosphere::MeteoStationList::add_station . Usage from python: + + There are two modes for the meteorology: daily=true and daily=false. + If daily=true, Radiation is given as a daily mean value. If + daily=false, Radiation is given as an hourly mean value, which shows + the dial ETpot variation but results in erronous results if the + timestep is daily. + + C++ includes: meteorology.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + Latitude = _swig_property(_cmf_core.MeteoStation_Latitude_get, _cmf_core.MeteoStation_Latitude_set) + Longitude = _swig_property(_cmf_core.MeteoStation_Longitude_get, _cmf_core.MeteoStation_Longitude_set) + Timezone = _swig_property(_cmf_core.MeteoStation_Timezone_get, _cmf_core.MeteoStation_Timezone_set) + x = _swig_property(_cmf_core.MeteoStation_x_get, _cmf_core.MeteoStation_x_set) + y = _swig_property(_cmf_core.MeteoStation_y_get, _cmf_core.MeteoStation_y_set) + z = _swig_property(_cmf_core.MeteoStation_z_get, _cmf_core.MeteoStation_z_set) + Name = _swig_property(_cmf_core.MeteoStation_Name_get, _cmf_core.MeteoStation_Name_set) + + def get_position(self, *args, **kwargs): + """ + get_position(MeteoStation self) -> point + + cmf::geometry::point get_position() const + """ + return _cmf_core.MeteoStation_get_position(self, *args, **kwargs) + + daily = _swig_property(_cmf_core.MeteoStation_daily_get, _cmf_core.MeteoStation_daily_set) + InstrumentHeight = _swig_property(_cmf_core.MeteoStation_InstrumentHeight_get, _cmf_core.MeteoStation_InstrumentHeight_set) + + def __init__(self, *args, **kwargs): + """ + __init__(cmf::atmosphere::MeteoStation self, MeteoStation other) -> MeteoStation + + MeteoStation(const cmf::atmosphere::MeteoStation &other) + + Copy c'tor. + """ + _cmf_core.MeteoStation_swiginit(self, _cmf_core.new_MeteoStation(*args, **kwargs)) + + def get_data(self, *args, **kwargs): + """ + get_data(MeteoStation self, Time t, double height) -> Weather + + cmf::atmosphere::Weather get_data(cmf::math::Time t, double height) + const + + Returns the current Atmosphere state. Uses default values for missing + timeseries. + """ + return _cmf_core.MeteoStation_get_data(self, *args, **kwargs) + + + def use_for_cell(self, *args, **kwargs): + """ + use_for_cell(MeteoStation self, Cell c) + + void use_for_cell(cmf::upslope::Cell &c) + + Connects this meteostation as a meteo data provider with the cell. + """ + return _cmf_core.MeteoStation_use_for_cell(self, *args, **kwargs) + + + def SetSunshineFraction(self, *args, **kwargs): + """ + SetSunshineFraction(MeteoStation self, timeseries sunshine_duration) + + void + SetSunshineFraction(cmf::math::timeseries sunshine_duration) + + Calculates a timeseries of the sunshine fraction (to put into + Sunshine) from a timeseries of absolute sunshine duration. + + seehttp://www.fao.org/docrep/X0490E/x0490e07.htm#radiation + + + .. math:: + + \\phi &=& \\frac{(\\mbox{geogr. + Latitude})^\\circ \\pi}{180^\\circ} \\mbox{ Latitude in }rad + \\\\ \\delta &=& 0.409 \\sin\\left(\\frac{2\\pi}{365}DOY + - 1.39\\right) \\mbox{ Declination, DOY is day of year}\\\\ + \\omega_s &=& \\arccos(-\\tan\\phi\\tan\\delta) \\mbox{ + Sunset angle in }rad \\\\ N &=& \\frac{24}{\\pi}\\omega_s + \\mbox{ potential duration of sunshine in }h \\\\ \\frac n N + &=& n\\mbox{ absolute sunshine duration in }h + + + """ + return _cmf_core.MeteoStation_SetSunshineFraction(self, *args, **kwargs) + + T = _swig_property(_cmf_core.MeteoStation_T_get, _cmf_core.MeteoStation_T_set) + Tmax = _swig_property(_cmf_core.MeteoStation_Tmax_get, _cmf_core.MeteoStation_Tmax_set) + Tmin = _swig_property(_cmf_core.MeteoStation_Tmin_get, _cmf_core.MeteoStation_Tmin_set) + Tground = _swig_property(_cmf_core.MeteoStation_Tground_get, _cmf_core.MeteoStation_Tground_set) + Windspeed = _swig_property(_cmf_core.MeteoStation_Windspeed_get, _cmf_core.MeteoStation_Windspeed_set) + rHmean = _swig_property(_cmf_core.MeteoStation_rHmean_get, _cmf_core.MeteoStation_rHmean_set) + rHmin = _swig_property(_cmf_core.MeteoStation_rHmin_get, _cmf_core.MeteoStation_rHmin_set) + rHmax = _swig_property(_cmf_core.MeteoStation_rHmax_get, _cmf_core.MeteoStation_rHmax_set) + Tdew = _swig_property(_cmf_core.MeteoStation_Tdew_get, _cmf_core.MeteoStation_Tdew_set) + Sunshine = _swig_property(_cmf_core.MeteoStation_Sunshine_get, _cmf_core.MeteoStation_Sunshine_set) + Rs = _swig_property(_cmf_core.MeteoStation_Rs_get, _cmf_core.MeteoStation_Rs_set) + T_lapse = _swig_property(_cmf_core.MeteoStation_T_lapse_get, _cmf_core.MeteoStation_T_lapse_set) + + def TimeseriesDictionary(self): + return {"Tmin":self.Tmin, + "Tmax":self.Tmax, + "Tdew":self.Tdew, + "T":self.T, + "rHmean":self.rHmean, + "rHmax":self.rHmax, + "rHmin":self.rHmin, + "Sunshine":self.Sunshine, + "Windspeed":self.Windspeed, + "Rs" : self.Rs} + def __repr__(self): + return "cmf.MeteoStation(%s,lat=%0.5g,lon=%0.5g,z=%6.1f)" % (self.Name,self.Latitude,self.Longitude,self.z) + + __swig_destroy__ = _cmf_core.delete_MeteoStation +MeteoStation.get_position = new_instancemethod(_cmf_core.MeteoStation_get_position, None, MeteoStation) +MeteoStation.get_data = new_instancemethod(_cmf_core.MeteoStation_get_data, None, MeteoStation) +MeteoStation.use_for_cell = new_instancemethod(_cmf_core.MeteoStation_use_for_cell, None, MeteoStation) +MeteoStation.SetSunshineFraction = new_instancemethod(_cmf_core.MeteoStation_SetSunshineFraction, None, MeteoStation) +MeteoStation_swigregister = _cmf_core.MeteoStation_swigregister +MeteoStation_swigregister(MeteoStation) + +class MeteoStationReference(Meteorology): + """ + + + A reference to a meteorological station. + + Returns the weather at a given time for its place using + MeteoStation::T_lapse + + C++ includes: meteorology.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + + def get_station(self, *args, **kwargs): + """ + get_station(MeteoStationReference self) -> cmf::atmosphere::MeteoStation::ptr + + MeteoStation::ptr get_station() const + + Returns the station referenced. + """ + return _cmf_core.MeteoStationReference_get_station(self, *args, **kwargs) + + + def get_position(self, *args, **kwargs): + """ + get_position(MeteoStationReference self) -> point + + cmf::geometry::point get_position() const + + Returns the position of the reference. + """ + return _cmf_core.MeteoStationReference_get_position(self, *args, **kwargs) + + + def __init__(self, *args): + """ + __init__(cmf::atmosphere::MeteoStationReference self, cmf::atmosphere::MeteoStation::ptr station, point location) -> MeteoStationReference + __init__(cmf::atmosphere::MeteoStationReference self, MeteoStationReference copy) -> MeteoStationReference + + MeteoStationReference(const MeteoStationReference ©) + """ + _cmf_core.MeteoStationReference_swiginit(self, _cmf_core.new_MeteoStationReference(*args)) + + def copy(self, *args, **kwargs): + """ + copy(MeteoStationReference self) -> MeteoStationReference + + MeteoStationReference* copy() const + + Returns a copy of the meteorology object. Pure virtual function, needs + to be implemented. + """ + return _cmf_core.MeteoStationReference_copy(self, *args, **kwargs) + + __swig_destroy__ = _cmf_core.delete_MeteoStationReference +MeteoStationReference.get_station = new_instancemethod(_cmf_core.MeteoStationReference_get_station, None, MeteoStationReference) +MeteoStationReference.get_position = new_instancemethod(_cmf_core.MeteoStationReference_get_position, None, MeteoStationReference) +MeteoStationReference.copy = new_instancemethod(_cmf_core.MeteoStationReference_copy, None, MeteoStationReference) +MeteoStationReference_swigregister = _cmf_core.MeteoStationReference_swigregister +MeteoStationReference_swigregister(MeteoStationReference) + +class MeteoStationList(object): + """ + + + A list of meteorological stations. + + Can find the nearest station for a position and calculate the + temperature lapse + + C++ includes: meteorology.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + + def __len__(self, *args, **kwargs): + """ + __len__(MeteoStationList self) -> size_t + + size_t size() const + + Returns the number of stations. + """ + return _cmf_core.MeteoStationList___len__(self, *args, **kwargs) + + + def __getitem__(self, *args): + """ + __getitem__(MeteoStationList self, ptrdiff_t index) -> cmf::atmosphere::MeteoStation::ptr + __getitem__(MeteoStationList self, std::string const & Name) -> cmf::atmosphere::MeteoStation::ptr + """ + return _cmf_core.MeteoStationList___getitem__(self, *args) + + + def calculate_Temp_lapse(self, *args, **kwargs): + """ + calculate_Temp_lapse(MeteoStationList self, Time begin, Time step, Time end) -> double + + double + calculate_Temp_lapse(cmf::math::Time begin, cmf::math::Time step, + cmf::math::Time end) + + Calculates the temperature lapse from all stations in the list and + sets the T_lapse attribute of each station. + + Returns the average lapse over the whole period. + """ + return _cmf_core.MeteoStationList_calculate_Temp_lapse(self, *args, **kwargs) + + + def add_station(self, *args, **kwargs): + """ + add_station(MeteoStationList self, std::string name, point position, double latitude=51.0, double longitude=8.0, double tz=1.0, Time startTime, Time timestep) -> cmf::atmosphere::MeteoStation::ptr + + MeteoStation::ptr add_station(std::string name, cmf::geometry::point + position, double latitude=51.0, double longitude=8.0, double tz=1.0, + cmf::math::Time startTime=cmf::math::Time(1, 1, 2001), cmf::math::Time + timestep=cmf::math::day) + + Creates a meteorological station at a certain position and adds it to + the list. + + Parameters: + ----------- + + name: Name of the station + + position: The location of the station in map coordinates + + latitude: Latitude of the study area (for solar radiation) + + longitude: Longitude of the study area (for solar time) + + tz: Time zone of the study area (e.g Germany +1,U.S. Pacific time -8 + + startTime: Date of the beginning of the climatic data (may be changed + for each time series later) + + timestep: Frequency of climatic data (may be changed for each time + series later) + """ + return _cmf_core.MeteoStationList_add_station(self, *args, **kwargs) + + + def remove_station(self, *args, **kwargs): + """ + remove_station(MeteoStationList self, ptrdiff_t index) -> ptrdiff_t + + ptrdiff_t + remove_station(ptrdiff_t index) + + Removes a station and returns the number of remaining references to + the removed station. If the station is deleted, 0 is returned. + """ + return _cmf_core.MeteoStationList_remove_station(self, *args, **kwargs) + + + def __init__(self, *args): + """ + __init__(cmf::atmosphere::MeteoStationList self) -> MeteoStationList + __init__(cmf::atmosphere::MeteoStationList self, MeteoStationList copy) -> MeteoStationList + + MeteoStationList(const MeteoStationList ©) + + Copy c'tor. + """ + _cmf_core.MeteoStationList_swiginit(self, _cmf_core.new_MeteoStationList(*args)) + + def reference_to_nearest(self, *args, **kwargs): + """ + reference_to_nearest(MeteoStationList self, point position, double z_weight=0) -> MeteoStationReference + + MeteoStationReference reference_to_nearest(const cmf::geometry::point + &position, double z_weight=0) const + + Creates a MeteoStationReference from the nearest station to position + at position. + + The distance is calculated as :math:`d=\\sqrt{(x_{s} - x_{l})^2 + (y_{s} - y_{l})^2} + \\lambda_z\\|z_{s} - z_{l}\\|` Where :math:`s` is the + station and :math:`l` is the locatable A Meteorology using the data of the + nearest station to position + + Parameters: + ----------- + + position: The position (any locatable, like e.g. Cell possible) to + look for the station. The reference should be owned by the locatable + + z_weight: The weight of the height difference :math:`\\lambda_z` + """ + return _cmf_core.MeteoStationList_reference_to_nearest(self, *args, **kwargs) + + + def __iter__(self): + for i in xrange(len(self)): + yield self[i] + def __repr__(self): + return "list of %i cmf meteorological stations" % len(self) + + __swig_destroy__ = _cmf_core.delete_MeteoStationList +MeteoStationList.__len__ = new_instancemethod(_cmf_core.MeteoStationList___len__, None, MeteoStationList) +MeteoStationList.__getitem__ = new_instancemethod(_cmf_core.MeteoStationList___getitem__, None, MeteoStationList) +MeteoStationList.calculate_Temp_lapse = new_instancemethod(_cmf_core.MeteoStationList_calculate_Temp_lapse, None, MeteoStationList) +MeteoStationList.add_station = new_instancemethod(_cmf_core.MeteoStationList_add_station, None, MeteoStationList) +MeteoStationList.remove_station = new_instancemethod(_cmf_core.MeteoStationList_remove_station, None, MeteoStationList) +MeteoStationList.reference_to_nearest = new_instancemethod(_cmf_core.MeteoStationList_reference_to_nearest, None, MeteoStationList) +MeteoStationList_swigregister = _cmf_core.MeteoStationList_swigregister +MeteoStationList_swigregister(MeteoStationList) + +class IDW_Meteorology(Meteorology): + """ + + + Regionalizes meteorological measurements using a simple inverse + distance weighted (IDW) method. + + See: IDW + + C++ includes: meteorology.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + + def __init__(self, *args): + """ + __init__(cmf::atmosphere::IDW_Meteorology self, point position, MeteoStationList stations, double z_weight, double power) -> IDW_Meteorology + __init__(cmf::atmosphere::IDW_Meteorology self, IDW_Meteorology copy) -> IDW_Meteorology + + IDW_Meteorology(const IDW_Meteorology ©) + + Copy c'tor. + """ + _cmf_core.IDW_Meteorology_swiginit(self, _cmf_core.new_IDW_Meteorology(*args)) + + def copy(self, *args, **kwargs): + """ + copy(IDW_Meteorology self) -> IDW_Meteorology + + virtual IDW_Meteorology* copy() const + + Returns a copy of the meteorology object. Pure virtual function, needs + to be implemented. + """ + return _cmf_core.IDW_Meteorology_copy(self, *args, **kwargs) + + __swig_destroy__ = _cmf_core.delete_IDW_Meteorology +IDW_Meteorology.copy = new_instancemethod(_cmf_core.IDW_Meteorology_copy, None, IDW_Meteorology) +IDW_Meteorology_swigregister = _cmf_core.IDW_Meteorology_swigregister +IDW_Meteorology_swigregister(IDW_Meteorology) + +class aerodynamic_resistance(object): + """ + + + Abstract class. Child classes can be used to calculate aerodynamic + resistances against turbulent heat fluxes. + + C++ includes: meteorology.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def get_aerodynamic_resistance(self, *args, **kwargs): + """ + get_aerodynamic_resistance(aerodynamic_resistance self, double & r_ag, double & r_ac, Time t) + + virtual void get_aerodynamic_resistance(double &r_ag, double &r_ac, + cmf::math::Time t) const =0 + + aerodynamic resistance from ground to atmosphere (r_ag) and from + canopy to atmosphere (r_ac) + """ + return _cmf_core.aerodynamic_resistance_get_aerodynamic_resistance(self, *args, **kwargs) + + __swig_destroy__ = _cmf_core.delete_aerodynamic_resistance +aerodynamic_resistance.get_aerodynamic_resistance = new_instancemethod(_cmf_core.aerodynamic_resistance_get_aerodynamic_resistance, None, aerodynamic_resistance) +aerodynamic_resistance_swigregister = _cmf_core.aerodynamic_resistance_swigregister +aerodynamic_resistance_swigregister(aerodynamic_resistance) + +class RainSource(flux_node): + """ + + + An abstract class for different types of rainfall sources. + + C++ includes: precipitation.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def __call__(self, *args, **kwargs): + """__call__(RainSource self, Time t) -> real""" + return _cmf_core.RainSource___call__(self, *args, **kwargs) + + + def get_intensity(self, *args, **kwargs): + """ + get_intensity(RainSource self, Time t) -> real + + virtual real get_intensity(cmf::math::Time t) const =0 + + Returns the actual rainfall intensity in mm/day. + """ + return _cmf_core.RainSource_get_intensity(self, *args, **kwargs) + + + def __repr__(self): + return self.to_string() + + __swig_destroy__ = _cmf_core.delete_RainSource +RainSource.__call__ = new_instancemethod(_cmf_core.RainSource___call__, None, RainSource) +RainSource.get_intensity = new_instancemethod(_cmf_core.RainSource_get_intensity, None, RainSource) +RainSource_swigregister = _cmf_core.RainSource_swigregister +RainSource_swigregister(RainSource) + +class ConstantRainSource(RainSource): + """ + + + A simple implementation of RainSource. + + Returns intensity for any time step. + + C++ includes: precipitation.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + intensity = _swig_property(_cmf_core.ConstantRainSource_intensity_get, _cmf_core.ConstantRainSource_intensity_set) + + def __init__(self, *args, **kwargs): + """ + __init__(cmf::atmosphere::ConstantRainSource self, project _project, point location, real _intensity) -> ConstantRainSource + + ConstantRainSource(cmf::project &_project, cmf::geometry::point + location, real _intensity) + + Creates a new ConstantRainSource. + + Consider using Cell::set_rainfall for internal creation of a constant + rain source, instead of direct use + + Parameters: + ----------- + + _project: The project the rain source is belonging to. + + location: The location of the rain source + + _intensity: The constant rainfall intensity in mm/day + """ + _cmf_core.ConstantRainSource_swiginit(self, _cmf_core.new_ConstantRainSource(*args, **kwargs)) + + def set_conc(self, *args, **kwargs): + """ + set_conc(ConstantRainSource self, solute Solute, real value) + + void set_conc(const cmf::water::solute &Solute, real value) + + Sets the concentration of a solute in the rainfall. + """ + return _cmf_core.ConstantRainSource_set_conc(self, *args, **kwargs) + + + def __repr__(self): + return self.to_string() + + __swig_destroy__ = _cmf_core.delete_ConstantRainSource +ConstantRainSource.set_conc = new_instancemethod(_cmf_core.ConstantRainSource_set_conc, None, ConstantRainSource) +ConstantRainSource_swigregister = _cmf_core.ConstantRainSource_swigregister +ConstantRainSource_swigregister(ConstantRainSource) + +class TimeseriesRainSource(RainSource): + """ + + + A rainsource with a timeseries. + + Simpler to use than a rainfall station if there are only few cells in + the project + + C++ includes: precipitation.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined") + __repr__ = _swig_repr + data = _swig_property(_cmf_core.TimeseriesRainSource_data_get, _cmf_core.TimeseriesRainSource_data_set) + concentrations = _swig_property(_cmf_core.TimeseriesRainSource_concentrations_get, _cmf_core.TimeseriesRainSource_concentrations_set) + __swig_destroy__ = _cmf_core.delete_TimeseriesRainSource +TimeseriesRainSource_swigregister = _cmf_core.TimeseriesRainSource_swigregister +TimeseriesRainSource_swigregister(TimeseriesRainSource) + +class RainfallStation(object): + """ + + + RainfallStation describes a rainfall timeseries in mm/day at a certain + place. + + Use RainfallStationReference or IDWRainfall to distribute the data + into space + + C++ includes: precipitation.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + Location = _swig_property(_cmf_core.RainfallStation_Location_get, _cmf_core.RainfallStation_Location_set) + + def create(*args, **kwargs): + """create(size_t Id, std::string Name, timeseries Data, point position) -> cmf::atmosphere::RainfallStation::ptr""" + return _cmf_core.RainfallStation_create(*args, **kwargs) + + create = staticmethod(create) + id = _swig_property(_cmf_core.RainfallStation_id_get) + name = _swig_property(_cmf_core.RainfallStation_name_get) + data = _swig_property(_cmf_core.RainfallStation_data_get, _cmf_core.RainfallStation_data_set) + + def __repr__(self, *args, **kwargs): + """ + __repr__(RainfallStation self) -> std::string + + std::string tostring() const + + Returns the name and the mean yearly rainfall. + """ + return _cmf_core.RainfallStation___repr__(self, *args, **kwargs) + + concentration = _swig_property(_cmf_core.RainfallStation_concentration_get, _cmf_core.RainfallStation_concentration_set) + + def use_for_cell(self, *args, **kwargs): + """ + use_for_cell(RainfallStation self, Cell c) + + void use_for_cell(cmf::upslope::Cell &c) + + Connects a cell with this rainfall station. + """ + return _cmf_core.RainfallStation_use_for_cell(self, *args, **kwargs) + + + def __init__(self, *args, **kwargs): + """ + __init__(cmf::atmosphere::RainfallStation self, RainfallStation copy) -> RainfallStation + + RainfallStation(const RainfallStation ©) + + copy c'tor + """ + _cmf_core.RainfallStation_swiginit(self, _cmf_core.new_RainfallStation(*args, **kwargs)) + + def __call__(self, *args, **kwargs): + """__call__(RainfallStation self, Time t) -> double""" + return _cmf_core.RainfallStation___call__(self, *args, **kwargs) + + __swig_destroy__ = _cmf_core.delete_RainfallStation +RainfallStation.__repr__ = new_instancemethod(_cmf_core.RainfallStation___repr__, None, RainfallStation) +RainfallStation.use_for_cell = new_instancemethod(_cmf_core.RainfallStation_use_for_cell, None, RainfallStation) +RainfallStation.__call__ = new_instancemethod(_cmf_core.RainfallStation___call__, None, RainfallStation) +RainfallStation_swigregister = _cmf_core.RainfallStation_swigregister +RainfallStation_swigregister(RainfallStation) + +def RainfallStation_create(*args, **kwargs): + """RainfallStation_create(size_t Id, std::string Name, timeseries Data, point position) -> cmf::atmosphere::RainfallStation::ptr""" + return _cmf_core.RainfallStation_create(*args, **kwargs) + +class RainfallStationList(object): + """ + + + A list of rainfall stations. + + C++ includes: precipitation.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + + def __len__(self, *args, **kwargs): + """ + __len__(RainfallStationList self) -> size_t + + size_t size() const + + Returns the number of rainfall stations. + """ + return _cmf_core.RainfallStationList___len__(self, *args, **kwargs) + + + def __getitem__(self, *args): + """ + __getitem__(RainfallStationList self, ptrdiff_t index) -> cmf::atmosphere::RainfallStation::ptr + __getitem__(RainfallStationList self, ptrdiff_t index) -> cmf::atmosphere::RainfallStation::ptr const + """ + return _cmf_core.RainfallStationList___getitem__(self, *args) + + + def add(self, *args, **kwargs): + """ + add(RainfallStationList self, std::string Name, timeseries Data, point Position) -> cmf::atmosphere::RainfallStation::ptr + + RainfallStation::ptr add(std::string Name, cmf::math::timeseries Data, + cmf::geometry::point Position) + + Creates a new RainfallStation and adds it to the list. + + Usage: The position of the rainfall station will be used as identifier + A new rainfall station + + Parameters: + ----------- + + Name: Name of the station + + Data: Rainfall timeseries + + Position: Spatial position of the new station + """ + return _cmf_core.RainfallStationList_add(self, *args, **kwargs) + + + def remove(self, *args, **kwargs): + """ + remove(RainfallStationList self, ptrdiff_t index) + + void remove(ptrdiff_t index) + + Removes the station at index from this list. + """ + return _cmf_core.RainfallStationList_remove(self, *args, **kwargs) + + + def __repr__(self): + return repr(list(self)) + def __iter__(self): + for i in range(len(self)): + yield self[i] + + + def __init__(self, *args, **kwargs): + """__init__(cmf::atmosphere::RainfallStationList self) -> RainfallStationList""" + _cmf_core.RainfallStationList_swiginit(self, _cmf_core.new_RainfallStationList(*args, **kwargs)) + __swig_destroy__ = _cmf_core.delete_RainfallStationList +RainfallStationList.__len__ = new_instancemethod(_cmf_core.RainfallStationList___len__, None, RainfallStationList) +RainfallStationList.__getitem__ = new_instancemethod(_cmf_core.RainfallStationList___getitem__, None, RainfallStationList) +RainfallStationList.add = new_instancemethod(_cmf_core.RainfallStationList_add, None, RainfallStationList) +RainfallStationList.remove = new_instancemethod(_cmf_core.RainfallStationList_remove, None, RainfallStationList) +RainfallStationList_swigregister = _cmf_core.RainfallStationList_swigregister +RainfallStationList_swigregister(RainfallStationList) + +class RainfallStationReference(RainSource): + """ + + + References a single RainfallStation to provide rainfall intensity + data. + + C++ includes: precipitation.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined") + __repr__ = _swig_repr + + def from_nearest_station(*args, **kwargs): + """from_nearest_station(project project, point position, double z_weight) -> cmf::atmosphere::RainfallStationReference::ptr""" + return _cmf_core.RainfallStationReference_from_nearest_station(*args, **kwargs) + + from_nearest_station = staticmethod(from_nearest_station) + + def from_station_id(*args, **kwargs): + """from_station_id(project project, point position, size_t id) -> cmf::atmosphere::RainfallStationReference::ptr""" + return _cmf_core.RainfallStationReference_from_station_id(*args, **kwargs) + + from_station_id = staticmethod(from_station_id) + + def __repr__(self): + return self.to_string() + + __swig_destroy__ = _cmf_core.delete_RainfallStationReference +RainfallStationReference_swigregister = _cmf_core.RainfallStationReference_swigregister +RainfallStationReference_swigregister(RainfallStationReference) + +def RainfallStationReference_from_nearest_station(*args, **kwargs): + """RainfallStationReference_from_nearest_station(project project, point position, double z_weight) -> cmf::atmosphere::RainfallStationReference::ptr""" + return _cmf_core.RainfallStationReference_from_nearest_station(*args, **kwargs) + +def RainfallStationReference_from_station_id(*args, **kwargs): + """RainfallStationReference_from_station_id(project project, point position, size_t id) -> cmf::atmosphere::RainfallStationReference::ptr""" + return _cmf_core.RainfallStationReference_from_station_id(*args, **kwargs) + +class IDWRainfall(RainSource): + """ + + + A RainSource using a spatially interpolated rainfall intensity from + all stations. + + Interpolation method is inverse distance weighted (IDW) + + C++ includes: precipitation.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined") + __repr__ = _swig_repr + + def create(*args, **kwargs): + """create(project project, point position, double z_weight, double power) -> cmf::atmosphere::RainSource::ptr""" + return _cmf_core.IDWRainfall_create(*args, **kwargs) + + create = staticmethod(create) + + def __repr__(self): + return self.to_string() + + __swig_destroy__ = _cmf_core.delete_IDWRainfall +IDWRainfall_swigregister = _cmf_core.IDWRainfall_swigregister +IDWRainfall_swigregister(IDWRainfall) + +def IDWRainfall_create(*args, **kwargs): + """IDWRainfall_create(project project, point position, double z_weight, double power) -> cmf::atmosphere::RainSource::ptr""" + return _cmf_core.IDWRainfall_create(*args, **kwargs) + +class Vegetation(object): + """ + + + Holds the vegetation parameters for the calculation of ET and + fractionating rainfall. Not every ET method uses all parameters. + + C++ includes: StructVegetation.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + LAI = _swig_property(_cmf_core.Vegetation_LAI_get, _cmf_core.Vegetation_LAI_set) + Height = _swig_property(_cmf_core.Vegetation_Height_get, _cmf_core.Vegetation_Height_set) + albedo = _swig_property(_cmf_core.Vegetation_albedo_get, _cmf_core.Vegetation_albedo_set) + snow_albedo = _swig_property(_cmf_core.Vegetation_snow_albedo_get, _cmf_core.Vegetation_snow_albedo_set) + CanopyCapacityPerLAI = _swig_property(_cmf_core.Vegetation_CanopyCapacityPerLAI_get, _cmf_core.Vegetation_CanopyCapacityPerLAI_set) + RootDepth = _swig_property(_cmf_core.Vegetation_RootDepth_get, _cmf_core.Vegetation_RootDepth_set) + RootContent = _swig_property(_cmf_core.Vegetation_RootContent_get, _cmf_core.Vegetation_RootContent_set) + fraction_at_rootdepth = _swig_property(_cmf_core.Vegetation_fraction_at_rootdepth_get, _cmf_core.Vegetation_fraction_at_rootdepth_set) + StomatalResistance = _swig_property(_cmf_core.Vegetation_StomatalResistance_get, _cmf_core.Vegetation_StomatalResistance_set) + CanopyClosure = _swig_property(_cmf_core.Vegetation_CanopyClosure_get, _cmf_core.Vegetation_CanopyClosure_set) + CanopyPARExtinction = _swig_property(_cmf_core.Vegetation_CanopyPARExtinction_get, _cmf_core.Vegetation_CanopyPARExtinction_set) + LeafWidth = _swig_property(_cmf_core.Vegetation_LeafWidth_get, _cmf_core.Vegetation_LeafWidth_set) + + def RootLength(self, *args, **kwargs): + """ + RootLength(Vegetation self) -> double + + double RootLength() + const + + Returns the average root length in m/m2. + """ + return _cmf_core.Vegetation_RootLength(self, *args, **kwargs) + + + def RootFraction(self, *args): + """ + RootFraction(Vegetation self, double upperBoundary, double lowerBoundary) -> double + RootFraction(Vegetation self, cmf::math::num_array const & thickness) -> cmf::math::num_array + + cmf::math::num_array RootFraction(const cmf::math::num_array + &thickness) const + """ + return _cmf_core.Vegetation_RootFraction(self, *args) + + + def __init__(self, *args, **kwargs): + """ + __init__(cmf::upslope::vegetation::Vegetation self, double _LAI=2.88, double _Height=0.12, double _RootDepth=0.25, double _StomatalResistance=100, double _albedo=0.23, double _CanopyClosure=1, double _CanopyCapacityPerLAI=0.1, double _fraction_at_rootdepth=1.0) -> Vegetation + + Vegetation(double + _LAI=2.88, double _Height=0.12, double _RootDepth=0.25, double + _StomatalResistance=100, double _albedo=0.23, double _CanopyClosure=1, + double _CanopyCapacityPerLAI=0.1, double _fraction_at_rootdepth=1.0) + + """ + _cmf_core.Vegetation_swiginit(self, _cmf_core.new_Vegetation(*args, **kwargs)) + + def __repr__(self, *args, **kwargs): + """__repr__(Vegetation self) -> std::string""" + return _cmf_core.Vegetation___repr__(self, *args, **kwargs) + + __swig_destroy__ = _cmf_core.delete_Vegetation +Vegetation.RootLength = new_instancemethod(_cmf_core.Vegetation_RootLength, None, Vegetation) +Vegetation.RootFraction = new_instancemethod(_cmf_core.Vegetation_RootFraction, None, Vegetation) +Vegetation.__repr__ = new_instancemethod(_cmf_core.Vegetation___repr__, None, Vegetation) +Vegetation_swigregister = _cmf_core.Vegetation_swigregister +Vegetation_swigregister(Vegetation) + +class CellConnector(object): + """ + + + A helper class to connect cells with flux_connection objects. This is + generated by flux_connection classes, intended to connect cells. + + C++ includes: cell.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + + def __init__(self, *args, **kwargs): + """ + __init__(cmf::upslope::CellConnector self, cmf::upslope::connectorfunction connector) -> CellConnector + + CellConnector(connectorfunction connector) + """ + _cmf_core.CellConnector_swiginit(self, _cmf_core.new_CellConnector(*args, **kwargs)) + + def __call__(self, *args, **kwargs): + """__call__(CellConnector self, Cell cell1, Cell cell2, ptrdiff_t start_at_layer=0)""" + return _cmf_core.CellConnector___call__(self, *args, **kwargs) + + + def connect(self, *args, **kwargs): + """ + connect(CellConnector self, Cell cell1, Cell cell2, ptrdiff_t start_at_layer=0) + + void + connect(cmf::upslope::Cell &cell1, cmf::upslope::Cell &cell2, + ptrdiff_t start_at_layer=0) const + """ + return _cmf_core.CellConnector_connect(self, *args, **kwargs) + + __swig_destroy__ = _cmf_core.delete_CellConnector +CellConnector.__call__ = new_instancemethod(_cmf_core.CellConnector___call__, None, CellConnector) +CellConnector.connect = new_instancemethod(_cmf_core.CellConnector_connect, None, CellConnector) +CellConnector_swigregister = _cmf_core.CellConnector_swigregister +CellConnector_swigregister(CellConnector) + +class Cell(StateVariableOwner): + """ + + + This class is the basic landscape object. + + It is the owner of water storages, and the upper and lower boundary + conditions of the system (rainfall, atmospheric vapor, deep + groundwater) + + C++ includes: cell.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + x = _swig_property(_cmf_core.Cell_x_get, _cmf_core.Cell_x_set) + y = _swig_property(_cmf_core.Cell_y_get, _cmf_core.Cell_y_set) + z = _swig_property(_cmf_core.Cell_z_get, _cmf_core.Cell_z_set) + + def get_position(self, *args, **kwargs): + """ + get_position(Cell self) -> point + + cmf::geometry::point get_position() const + + Returns the location of the cell. + """ + return _cmf_core.Cell_get_position(self, *args, **kwargs) + + + def m3_to_mm(self, *args, **kwargs): + """ + m3_to_mm(Cell self, double volume) -> double + + double + m3_to_mm(double volume) const + + Converts a volume in m3 in mm for the cell area. + """ + return _cmf_core.Cell_m3_to_mm(self, *args, **kwargs) + + + def mm_to_m3(self, *args, **kwargs): + """ + mm_to_m3(Cell self, double depth) -> double + + double + mm_to_m3(double depth) const + """ + return _cmf_core.Cell_mm_to_m3(self, *args, **kwargs) + + + def InvalidateSatDepth(self, *args, **kwargs): + """ + InvalidateSatDepth(Cell self) + + void + InvalidateSatDepth() const + + Marks the saturated depth as unvalid. This is done automatically, when + the state of a layer changes. + """ + return _cmf_core.Cell_InvalidateSatDepth(self, *args, **kwargs) + + vegetation = _swig_property(_cmf_core.Cell_vegetation_get, _cmf_core.Cell_vegetation_set) + + def set_aerodynamic_resistance(self, *args, **kwargs): + """ + set_aerodynamic_resistance(Cell self, cmf::atmosphere::aerodynamic_resistance::ptr Ra) + + void + set_aerodynamic_resistance(cmf::atmosphere::aerodynamic_resistance::ptr + Ra) + + Sets the method to calculate aerodynamic resistance against turbulent + sensible heat fluxes. + """ + return _cmf_core.Cell_set_aerodynamic_resistance(self, *args, **kwargs) + + + def set_weather(self, *args, **kwargs): + """ + set_weather(Cell self, Weather weather) + + void + set_weather(const cmf::atmosphere::Weather &weather) + + Sets the weather for this cell. Connectivity to a meteorological + station is lost. + """ + return _cmf_core.Cell_set_weather(self, *args, **kwargs) + + + def set_rainfall(self, *args, **kwargs): + """ + set_rainfall(Cell self, double rainfall) + + void + set_rainfall(double rainfall) + + Exchanges a timeseries of rainfall with a constant flux. + """ + return _cmf_core.Cell_set_rainfall(self, *args, **kwargs) + + + def get_rainfall(self, *args, **kwargs): + """ + get_rainfall(Cell self, Time t) -> double + + double + get_rainfall(cmf::math::Time t) const + + Returns the current rainfall flux in m3/day. + """ + return _cmf_core.Cell_get_rainfall(self, *args, **kwargs) + + + def __set_rain_source(self, *args, **kwargs): + """ + __set_rain_source(Cell self, cmf::atmosphere::RainSource::ptr new_source) + + void + set_rain_source(cmf::atmosphere::RainSource::ptr new_source) + + Changes the current source of rainfall. + """ + return _cmf_core.Cell___set_rain_source(self, *args, **kwargs) + + + def __get_rain_source(self, *args, **kwargs): + """ + __get_rain_source(Cell self) -> cmf::atmosphere::RainSource::ptr + + cmf::atmosphere::RainSource::ptr get_rain_source() + + Returns the current source for rainfall. + """ + return _cmf_core.Cell___get_rain_source(self, *args, **kwargs) + + + def set_uptakestress(self, *args, **kwargs): + """ + set_uptakestress(Cell self, RootUptakeStessFunction stressfunction) + + void + set_uptakestress(const ET::RootUptakeStessFunction &stressfunction) + + Uses the given WaterStressFunction for all stressedET like connections + to the transpiration target. + """ + return _cmf_core.Cell_set_uptakestress(self, *args, **kwargs) + + + def __get_evaporation(self, *args, **kwargs): + """ + __get_evaporation(Cell self) -> cmf::water::flux_node::ptr + + cmf::water::flux_node::ptr get_evaporation() + + Returns the end point of all evaporation of this cell (a + cmf::water::flux_node) + """ + return _cmf_core.Cell___get_evaporation(self, *args, **kwargs) + + + def __get_transpiration(self, *args, **kwargs): + """ + __get_transpiration(Cell self) -> cmf::water::flux_node::ptr + + cmf::water::flux_node::ptr get_transpiration() + + Returns the end point of all transpiration of this cell (a + cmf::water::flux_node) + """ + return _cmf_core.Cell___get_transpiration(self, *args, **kwargs) + + + def get_surfacewater(self, *args, **kwargs): + """ + get_surfacewater(Cell self) -> cmf::water::flux_node::ptr + + cmf::water::flux_node::ptr get_surfacewater() + + returns the surface water of this cell. This is either a flux node or + a cmf::upslope::SurfaceWater + """ + return _cmf_core.Cell_get_surfacewater(self, *args, **kwargs) + + + def surfacewater_as_storage(self, *args, **kwargs): + """ + surfacewater_as_storage(Cell self) + + void surfacewater_as_storage() + + Makes the surfacewater of this cell a cmf::upslope::SurfaceWater + storage. + """ + return _cmf_core.Cell_surfacewater_as_storage(self, *args, **kwargs) + + + def add_storage(self, *args): + """ + add_storage(Cell self, std::string Name, char storage_role, bool isopenwater=False) -> cmf::water::WaterStorage::ptr + add_storage(Cell self, cmf::water::WaterStorage::ptr storage) -> ptrdiff_t + + ptrdiff_t + add_storage(cmf::water::WaterStorage::ptr storage) + + Bounds an existing storage to the cell. + """ + return _cmf_core.Cell_add_storage(self, *args) + + + def remove_storage(self, *args, **kwargs): + """ + remove_storage(Cell self, cmf::water::WaterStorage::ptr storage) + + void + remove_storage(cmf::water::WaterStorage::ptr storage) + """ + return _cmf_core.Cell_remove_storage(self, *args, **kwargs) + + + def storage_count(self, *args, **kwargs): + """ + storage_count(Cell self) -> size_t + + size_t + storage_count() const + """ + return _cmf_core.Cell_storage_count(self, *args, **kwargs) + + + def get_storage(self, *args, **kwargs): + """ + get_storage(Cell self, ptrdiff_t index) -> cmf::water::WaterStorage::ptr + + cmf::water::WaterStorage::ptr get_storage(ptrdiff_t index) const + """ + return _cmf_core.Cell_get_storage(self, *args, **kwargs) + + + def get_canopy(self, *args, **kwargs): + """ + get_canopy(Cell self) -> cmf::water::WaterStorage::ptr + + cmf::water::WaterStorage::ptr get_canopy() const + """ + return _cmf_core.Cell_get_canopy(self, *args, **kwargs) + + + def get_snow(self, *args, **kwargs): + """ + get_snow(Cell self) -> cmf::water::WaterStorage::ptr + + cmf::water::WaterStorage::ptr get_snow() const + """ + return _cmf_core.Cell_get_snow(self, *args, **kwargs) + + + def snow_coverage(self, *args, **kwargs): + """ + snow_coverage(Cell self) -> real + + real + snow_coverage() const + """ + return _cmf_core.Cell_snow_coverage(self, *args, **kwargs) + + + def albedo(self, *args, **kwargs): + """ + albedo(Cell self) -> real + + real albedo() + const + """ + return _cmf_core.Cell_albedo(self, *args, **kwargs) + + surface_amplitude = _swig_property(_cmf_core.Cell_surface_amplitude_get, _cmf_core.Cell_surface_amplitude_set) + + def surface_water_coverage(self, *args, **kwargs): + """ + surface_water_coverage(Cell self) -> real + + real surface_water_coverage() const + + Returns the coverage of the surface water. + + The covered fraction (0..1) is simply modelled as a piecewise linear + function of the surface water depth. If the depth is above the + aggregate height, the coverage is 1, below it is given as + + .. math:: + + c = + \\frac{h_{water}}{\\Delta h_{surface}} + + with c the coverage, + :math:`h_{water}` the depth of the surface water and :math:`\\Delta h_{surface}` + the amplitude of the surface roughness + """ + return _cmf_core.Cell_surface_water_coverage(self, *args, **kwargs) + + + def heat_flux(self, *args, **kwargs): + """ + heat_flux(Cell self, Time t) -> real + + real + heat_flux(cmf::math::Time t) const + + Calculates the surface heat balance. + + Parameters: + ----------- + + t: Time step + """ + return _cmf_core.Cell_heat_flux(self, *args, **kwargs) + + Tground = _swig_property(_cmf_core.Cell_Tground_get, _cmf_core.Cell_Tground_set) + + def leave_wetness(self, *args, **kwargs): + """ + leave_wetness(Cell self) -> real + + real + leave_wetness() const + + Return the fraction of wet leaves in the canopy if a canopy water + storage exists. + + If no canopy storage is present, it returns 0.0 (=empty). The fraction + of wet leaves are calculated as the linear filling of the canopy + storage. + """ + return _cmf_core.Cell_leave_wetness(self, *args, **kwargs) + + Id = _swig_property(_cmf_core.Cell_Id_get, _cmf_core.Cell_Id_set) + + def get_WKB(self, *args, **kwargs): + """ + get_WKB(Cell self) -> cmf::bytestring + + cmf::bytestring + get_WKB() const + """ + return _cmf_core.Cell_get_WKB(self, *args, **kwargs) + + + def set_WKB(self, *args, **kwargs): + """ + set_WKB(Cell self, cmf::bytestring wkb) + + void + set_WKB(cmf::bytestring wkb) + """ + return _cmf_core.Cell_set_WKB(self, *args, **kwargs) + + + def get_weather(self, *args, **kwargs): + """ + get_weather(Cell self, Time t) -> Weather + + cmf::atmosphere::Weather get_weather(cmf::math::Time t) const + + Returns the current meteorological conditions of the cell at time t. + + """ + return _cmf_core.Cell_get_weather(self, *args, **kwargs) + + + def layer_count(self, *args, **kwargs): + """ + layer_count(Cell self) -> size_t + + size_t + layer_count() const + + Returns the number of layers of the cell. + """ + return _cmf_core.Cell_layer_count(self, *args, **kwargs) + + + def get_layer(self, *args, **kwargs): + """ + get_layer(Cell self, ptrdiff_t ndx) -> cmf::upslope::SoilLayer::ptr + + cmf::upslope::SoilLayer::ptr get_layer(ptrdiff_t ndx) const + + Returns the layer at position ndx. + + From python this function is masked as a sequence: + """ + return _cmf_core.Cell_get_layer(self, *args, **kwargs) + + + def add_layer(self, *args): + """ + add_layer(Cell self, real lowerboundary, RetentionCurve r_curve, real saturateddepth=10) -> cmf::upslope::SoilLayer::ptr + add_layer(Cell self, real lowerboundary) -> cmf::upslope::SoilLayer::ptr + + cmf::upslope::SoilLayer::ptr add_layer(real lowerboundary) + + Adds a rather conceptual layer to the cell. Use this version for + conceptual models. The retention curve resambles an empty bucket. + """ + return _cmf_core.Cell_add_layer(self, *args) + + + def remove_last_layer(self, *args, **kwargs): + """ + remove_last_layer(Cell self) + + void + remove_last_layer() + + Remove the lowest layer from this cell. + """ + return _cmf_core.Cell_remove_last_layer(self, *args, **kwargs) + + + def remove_layers(self, *args, **kwargs): + """ + remove_layers(Cell self) + + void + remove_layers() + + Removes all layers from this cell. + """ + return _cmf_core.Cell_remove_layers(self, *args, **kwargs) + + __swig_destroy__ = _cmf_core.delete_Cell + + def __init__(self, *args, **kwargs): + """ + __init__(cmf::upslope::Cell self, double x, double y, double z, double area, project _project) -> Cell + + Cell(double x, + double y, double z, double area, cmf::project &_project) + """ + _cmf_core.Cell_swiginit(self, _cmf_core.new_Cell(*args, **kwargs)) + + def to_string(self, *args, **kwargs): + """ + to_string(Cell self) -> std::string + + std::string + to_string() const + """ + return _cmf_core.Cell_to_string(self, *args, **kwargs) + + topology = _swig_property(_cmf_core.Cell_topology_get) + + evaporation = _swig_property(_cmf_core.Cell___get_evaporation) + + + transpiration = _swig_property(_cmf_core.Cell___get_transpiration) + + meteorology = _swig_property(_cmf_core.Cell_meteorology_get, _cmf_core.Cell_meteorology_set) + + rain_source = _swig_property(_cmf_core.Cell___get_rain_source, + _cmf_core.Cell___set_rain_source) + + layers = _swig_property(_cmf_core.Cell_layers_get) + project = _swig_property(_cmf_core.Cell_project_get) + saturated_depth = _swig_property(_cmf_core.Cell_saturated_depth_get, _cmf_core.Cell_saturated_depth_set) + area = _swig_property(_cmf_core.Cell_area_get) + soildepth = _swig_property(_cmf_core.Cell_soildepth_get) + + @property + def surface_storages(self): + "Provides access to all surface storages of the cell, like canopy, snow, surface water etc" + return [self.get_storage(i) for i in range(self.storage_count())] + @property + def storages(self): + "Provides access to all storages of the cell (surface storages and layers)" + return self.surface_storages + list(self.layers) + + @property + def neighbors(self): + c_iter=neighbor_iterator(self) + while c_iter.valid(): + yield (c_iter.cell(),c_iter.flowwidth()) + c_iter.next() + + surfacewater=property(get_surfacewater,None,"Gives access to the surface water, which is either a distributing flux node, or the storage for all surface water") + canopy=property(get_canopy,None,"The canopy water storage of the cell, if it exists") + snow=property(get_snow,None,"The snow pack of the cell, if a storage for the snow exists") + + contributing_area=property(lambda self:self.topology.ContributingArea(),None,"Contributing area of this cell m2") + main_outlet=property(lambda self:self.topology.MainOutlet(),None,"The main outlet of the surface water of this cell") + + def connect_soil_with_node(self,node,ctype,flowwidth,distance,upper_boundary=0,lower_boundary=None): + """Connects all layers between the boundaries with a node using a flux connection + node: Target node (flux_node) + type: Type of the connection (e.g. cmf.Richards_lateral) + flowwidth: Width of the connection + distance: distance of the connection + upper_boundary: Connect only layers, whose lower depth is greater then this value + lower_boundary: Connect only layers, whose upper depth is smaller then this value + """ + if lower_boundary is None: + lower_boundary=self.soildepth + connections=[ctype(l,node,flowwidth,distance) + for l in self.layers + if l.boundary[0]upper_boundary + ] + + def install_connection(self,connection_type): + """Calls the static use_for_cell method of the connection_type, if present. + The use_for_cell method might do quite a lot of stuff, please consult the docs for the connection. + Eg. >>>help(Richards.use_for_cell) + """ + if hasattr(connection_type,"use_for_cell"): + connection_type.use_for_cell(self) + else: + raise TypeError("Only connection types implementing a static use_for_cell function can be used") + def __hash__(self): + return hash((self.x,self.y,self.Id)) + def __eq__(self,cmp): + return hash(self)==hash(cmp) + def __repr__(self): + return "cell #%i(%g,%g,%g)" % (self.Id,self.x,self.y,self.z) + +Cell.get_position = new_instancemethod(_cmf_core.Cell_get_position, None, Cell) +Cell.m3_to_mm = new_instancemethod(_cmf_core.Cell_m3_to_mm, None, Cell) +Cell.mm_to_m3 = new_instancemethod(_cmf_core.Cell_mm_to_m3, None, Cell) +Cell.InvalidateSatDepth = new_instancemethod(_cmf_core.Cell_InvalidateSatDepth, None, Cell) +Cell.set_aerodynamic_resistance = new_instancemethod(_cmf_core.Cell_set_aerodynamic_resistance, None, Cell) +Cell.set_weather = new_instancemethod(_cmf_core.Cell_set_weather, None, Cell) +Cell.set_rainfall = new_instancemethod(_cmf_core.Cell_set_rainfall, None, Cell) +Cell.get_rainfall = new_instancemethod(_cmf_core.Cell_get_rainfall, None, Cell) +Cell.__set_rain_source = new_instancemethod(_cmf_core.Cell___set_rain_source, None, Cell) +Cell.__get_rain_source = new_instancemethod(_cmf_core.Cell___get_rain_source, None, Cell) +Cell.set_uptakestress = new_instancemethod(_cmf_core.Cell_set_uptakestress, None, Cell) +Cell.__get_evaporation = new_instancemethod(_cmf_core.Cell___get_evaporation, None, Cell) +Cell.__get_transpiration = new_instancemethod(_cmf_core.Cell___get_transpiration, None, Cell) +Cell.get_surfacewater = new_instancemethod(_cmf_core.Cell_get_surfacewater, None, Cell) +Cell.surfacewater_as_storage = new_instancemethod(_cmf_core.Cell_surfacewater_as_storage, None, Cell) +Cell.add_storage = new_instancemethod(_cmf_core.Cell_add_storage, None, Cell) +Cell.remove_storage = new_instancemethod(_cmf_core.Cell_remove_storage, None, Cell) +Cell.storage_count = new_instancemethod(_cmf_core.Cell_storage_count, None, Cell) +Cell.get_storage = new_instancemethod(_cmf_core.Cell_get_storage, None, Cell) +Cell.get_canopy = new_instancemethod(_cmf_core.Cell_get_canopy, None, Cell) +Cell.get_snow = new_instancemethod(_cmf_core.Cell_get_snow, None, Cell) +Cell.snow_coverage = new_instancemethod(_cmf_core.Cell_snow_coverage, None, Cell) +Cell.albedo = new_instancemethod(_cmf_core.Cell_albedo, None, Cell) +Cell.surface_water_coverage = new_instancemethod(_cmf_core.Cell_surface_water_coverage, None, Cell) +Cell.heat_flux = new_instancemethod(_cmf_core.Cell_heat_flux, None, Cell) +Cell.leave_wetness = new_instancemethod(_cmf_core.Cell_leave_wetness, None, Cell) +Cell.get_WKB = new_instancemethod(_cmf_core.Cell_get_WKB, None, Cell) +Cell.set_WKB = new_instancemethod(_cmf_core.Cell_set_WKB, None, Cell) +Cell.get_weather = new_instancemethod(_cmf_core.Cell_get_weather, None, Cell) +Cell.layer_count = new_instancemethod(_cmf_core.Cell_layer_count, None, Cell) +Cell.get_layer = new_instancemethod(_cmf_core.Cell_get_layer, None, Cell) +Cell.add_layer = new_instancemethod(_cmf_core.Cell_add_layer, None, Cell) +Cell.remove_last_layer = new_instancemethod(_cmf_core.Cell_remove_last_layer, None, Cell) +Cell.remove_layers = new_instancemethod(_cmf_core.Cell_remove_layers, None, Cell) +Cell.to_string = new_instancemethod(_cmf_core.Cell_to_string, None, Cell) +Cell_swigregister = _cmf_core.Cell_swigregister +Cell_swigregister(Cell) + +class Topology(object): + """ + + + represents the connectivity of cells to each other + + C++ includes: Topology.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined") + __repr__ = _swig_repr + cell = _swig_property(_cmf_core.Topology_cell_get) + x = _swig_property(_cmf_core.Topology_x_get, _cmf_core.Topology_x_set) + y = _swig_property(_cmf_core.Topology_y_get, _cmf_core.Topology_y_set) + z = _swig_property(_cmf_core.Topology_z_get, _cmf_core.Topology_z_set) + + def get_position(self, *args, **kwargs): + """ + get_position(Topology self) -> point + + cmf::geometry::point get_position() const + + Returns the center of the cell. + """ + return _cmf_core.Topology_get_position(self, *args, **kwargs) + + + def flowwidth(self, *args): + """ + flowwidth(Topology self, Cell target) -> double + flowwidth(Topology self, Topology target) -> double + + double + flowwidth(Topology &target) + """ + return _cmf_core.Topology_flowwidth(self, *args) + + + def AddNeighbor(self, *args): + """ + AddNeighbor(Topology self, Cell target, double flowwidth) + AddNeighbor(Topology self, Topology target, double flowwidth) + + void + AddNeighbor(Topology &target, double flowwidth) + """ + return _cmf_core.Topology_AddNeighbor(self, *args) + + + def RemoveNeighbor(self, *args, **kwargs): + """ + RemoveNeighbor(Topology self, Topology target) + + void + RemoveNeighbor(Topology &target) + + Removes the topological relation to the given cell. + """ + return _cmf_core.Topology_RemoveNeighbor(self, *args, **kwargs) + + + def neighbor_count(self, *args, **kwargs): + """ + neighbor_count(Topology self) -> size_t + + size_t + neighbor_count() const + + Returns the number of neighbors. + """ + return _cmf_core.Topology_neighbor_count(self, *args, **kwargs) + + + def MainOutlet(self, *args, **kwargs): + """ + MainOutlet(Topology self, bool forceRecalc=False) -> Cell + + Cell* + MainOutlet(bool forceRecalc=false) + + Returns the mainoutlet (steepest lower neighbor) + """ + return _cmf_core.Topology_MainOutlet(self, *args, **kwargs) + + + def ContributingArea(self, *args, **kwargs): + """ + ContributingArea(Topology self) -> double + + double ContributingArea() const + + Get the contributing area (steepest path upwards) + """ + return _cmf_core.Topology_ContributingArea(self, *args, **kwargs) + + + def calculate_contributing_area(*args, **kwargs): + """calculate_contributing_area(cell_vector arg1)""" + return _cmf_core.Topology_calculate_contributing_area(*args, **kwargs) + + calculate_contributing_area = staticmethod(calculate_contributing_area) + + def __eq__(self, *args, **kwargs): + """__eq__(Topology self, Topology cmp) -> bool""" + return _cmf_core.Topology___eq__(self, *args, **kwargs) + + __swig_destroy__ = _cmf_core.delete_Topology +Topology.get_position = new_instancemethod(_cmf_core.Topology_get_position, None, Topology) +Topology.flowwidth = new_instancemethod(_cmf_core.Topology_flowwidth, None, Topology) +Topology.AddNeighbor = new_instancemethod(_cmf_core.Topology_AddNeighbor, None, Topology) +Topology.RemoveNeighbor = new_instancemethod(_cmf_core.Topology_RemoveNeighbor, None, Topology) +Topology.neighbor_count = new_instancemethod(_cmf_core.Topology_neighbor_count, None, Topology) +Topology.MainOutlet = new_instancemethod(_cmf_core.Topology_MainOutlet, None, Topology) +Topology.ContributingArea = new_instancemethod(_cmf_core.Topology_ContributingArea, None, Topology) +Topology.__eq__ = new_instancemethod(_cmf_core.Topology___eq__, None, Topology) +Topology_swigregister = _cmf_core.Topology_swigregister +Topology_swigregister(Topology) + +def Topology_calculate_contributing_area(*args, **kwargs): + """Topology_calculate_contributing_area(cell_vector arg2)""" + return _cmf_core.Topology_calculate_contributing_area(*args, **kwargs) + +class neighbor_iterator(object): + """ + + + A class to iterate through the neighbors of a cell (const). Not needed + from the Python side, use the generator cell.neighbors instead. + + C++ includes: Topology.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + + def __init__(self, *args, **kwargs): + """ + __init__(cmf::upslope::neighbor_iterator self, Cell cell) -> neighbor_iterator + + neighbor_iterator(cmf::upslope::Cell *cell) + """ + _cmf_core.neighbor_iterator_swiginit(self, _cmf_core.new_neighbor_iterator(*args, **kwargs)) + + def cell(self, *args, **kwargs): + """ + cell(neighbor_iterator self) -> Cell + + Cell& + cell() + """ + return _cmf_core.neighbor_iterator_cell(self, *args, **kwargs) + + + def flowwidth(self, *args, **kwargs): + """ + flowwidth(neighbor_iterator self) -> double + + double flowwidth() + """ + return _cmf_core.neighbor_iterator_flowwidth(self, *args, **kwargs) + + + def valid(self, *args, **kwargs): + """ + valid(neighbor_iterator self) -> bool + + bool + valid() const + """ + return _cmf_core.neighbor_iterator_valid(self, *args, **kwargs) + + + def next(self, *args, **kwargs): + """ + next(neighbor_iterator self) -> neighbor_iterator + + neighbor_iterator& next() + + Points the iterator to the next neighbor. + """ + return _cmf_core.neighbor_iterator_next(self, *args, **kwargs) + + + def __eq__(self, *args, **kwargs): + """__eq__(neighbor_iterator self, neighbor_iterator cmp) -> bool""" + return _cmf_core.neighbor_iterator___eq__(self, *args, **kwargs) + + + def __neq__(self, *args, **kwargs): + """__neq__(neighbor_iterator self, neighbor_iterator cmp) -> bool""" + return _cmf_core.neighbor_iterator___neq__(self, *args, **kwargs) + + __swig_destroy__ = _cmf_core.delete_neighbor_iterator +neighbor_iterator.cell = new_instancemethod(_cmf_core.neighbor_iterator_cell, None, neighbor_iterator) +neighbor_iterator.flowwidth = new_instancemethod(_cmf_core.neighbor_iterator_flowwidth, None, neighbor_iterator) +neighbor_iterator.valid = new_instancemethod(_cmf_core.neighbor_iterator_valid, None, neighbor_iterator) +neighbor_iterator.next = new_instancemethod(_cmf_core.neighbor_iterator_next, None, neighbor_iterator) +neighbor_iterator.__eq__ = new_instancemethod(_cmf_core.neighbor_iterator___eq__, None, neighbor_iterator) +neighbor_iterator.__neq__ = new_instancemethod(_cmf_core.neighbor_iterator___neq__, None, neighbor_iterator) +neighbor_iterator_swigregister = _cmf_core.neighbor_iterator_swigregister +neighbor_iterator_swigregister(neighbor_iterator) + +class cell_vector(StateVariableOwner): + """ + + + A cell vector holds a bunch of cells. + + C++ includes: cell_vector.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + + def __init__(self, *args): + """ + __init__(cmf::upslope::cell_vector self) -> cell_vector + __init__(cmf::upslope::cell_vector self, cell_vector copy) -> cell_vector + + cell_vector(cell_const_iterator first, cell_const_iterator last) + """ + _cmf_core.cell_vector_swiginit(self, _cmf_core.new_cell_vector(*args)) + + def __getitem__(self, *args): + """ + __getitem__(cell_vector self, ptrdiff_t index) -> Cell + __getitem__(cell_vector self, ptrdiff_t index) -> Cell + """ + return _cmf_core.cell_vector___getitem__(self, *args) + + + def append(self, *args, **kwargs): + """ + append(cell_vector self, Cell cell) + + void + append(cmf::upslope::Cell &cell) + """ + return _cmf_core.cell_vector_append(self, *args, **kwargs) + + + def remove(self, *args): + """ + remove(cell_vector self, ptrdiff_t index) + remove(cell_vector self, Cell cell) + + void + remove(const cmf::upslope::Cell &cell) + """ + return _cmf_core.cell_vector_remove(self, *args) + + + def pop(self, *args, **kwargs): + """ + pop(cell_vector self) -> Cell + + Cell& pop() + + Returns and removes the last cell. + """ + return _cmf_core.cell_vector_pop(self, *args, **kwargs) + + + def __len__(self, *args, **kwargs): + """ + __len__(cell_vector self) -> size_t + + size_t size() + const + """ + return _cmf_core.cell_vector___len__(self, *args, **kwargs) + + + def __getslice__(self, *args, **kwargs): + """ + __getslice__(cell_vector self, ptrdiff_t start, ptrdiff_t end, ptrdiff_t step=1) -> cell_vector + + cell_vector get_slice(ptrdiff_t start, ptrdiff_t end, ptrdiff_t + step=1) + """ + return _cmf_core.cell_vector___getslice__(self, *args, **kwargs) + + + def get_area(self, *args, **kwargs): + """ + get_area(cell_vector self) -> double + + double + get_area() const + + Returns sum of the area of the cells. + """ + return _cmf_core.cell_vector_get_area(self, *args, **kwargs) + + + def __contains__(self, *args, **kwargs): + """ + __contains__(cell_vector self, Cell cell) -> bool + + bool + contains(const cmf::upslope::Cell &cell) const + """ + return _cmf_core.cell_vector___contains__(self, *args, **kwargs) + + __swig_destroy__ = _cmf_core.delete_cell_vector + lowest = _swig_property(_cmf_core.cell_vector_lowest_get) + highest = _swig_property(_cmf_core.cell_vector_highest_get) + + def __iter__(self): + for i in range(len(self)): + yield self[i] + def __repr__(self): + if len(self): + return "[%i cells, %0.0fm2, %0.0f - %0.0f m asl.]" % (len(self),self.get_area(),self.lowest.z,self.highest.z) + else: + return "" + +cell_vector.__getitem__ = new_instancemethod(_cmf_core.cell_vector___getitem__, None, cell_vector) +cell_vector.append = new_instancemethod(_cmf_core.cell_vector_append, None, cell_vector) +cell_vector.remove = new_instancemethod(_cmf_core.cell_vector_remove, None, cell_vector) +cell_vector.pop = new_instancemethod(_cmf_core.cell_vector_pop, None, cell_vector) +cell_vector.__len__ = new_instancemethod(_cmf_core.cell_vector___len__, None, cell_vector) +cell_vector.__getslice__ = new_instancemethod(_cmf_core.cell_vector___getslice__, None, cell_vector) +cell_vector.get_area = new_instancemethod(_cmf_core.cell_vector_get_area, None, cell_vector) +cell_vector.__contains__ = new_instancemethod(_cmf_core.cell_vector___contains__, None, cell_vector) +cell_vector_swigregister = _cmf_core.cell_vector_swigregister +cell_vector_swigregister(cell_vector) + + +def find_cell(*args, **kwargs): + """find_cell(cell_vector arg1, point p, double max_dist=1e20) -> Cell""" + return _cmf_core.find_cell(*args, **kwargs) + +def get_boundary_cells(*args, **kwargs): + """get_boundary_cells(cell_vector cells) -> cell_vector""" + return _cmf_core.get_boundary_cells(*args, **kwargs) + +def get_connections(*args, **kwargs): + """get_connections(cell_vector cells) -> connection_list""" + return _cmf_core.get_connections(*args, **kwargs) + +def connect_cells_with_flux(*args, **kwargs): + """connect_cells_with_flux(cell_vector cells, CellConnector connect, int start_at_layer=0)""" + return _cmf_core.connect_cells_with_flux(*args, **kwargs) + +def fill_sinks(*args, **kwargs): + """fill_sinks(cell_vector cells, double min_difference=0.001) -> int""" + return _cmf_core.fill_sinks(*args, **kwargs) + +def get_area(*args, **kwargs): + """get_area(cell_vector cells) -> double""" + return _cmf_core.get_area(*args, **kwargs) + +def get_center(*args, **kwargs): + """get_center(cell_vector cells) -> point""" + return _cmf_core.get_center(*args, **kwargs) + +def cell_positions(*args, **kwargs): + """cell_positions(cell_vector cells) -> point_vector""" + return _cmf_core.cell_positions(*args, **kwargs) + +def cell_flux_directions(*args, **kwargs): + """cell_flux_directions(cell_vector cells, Time arg2) -> point_vector""" + return _cmf_core.cell_flux_directions(*args, **kwargs) + +def cell2cellflux(*args, **kwargs): + """cell2cellflux(Cell source, Cell target, Time t, bool subsurface_only=False) -> cmf::math::num_array""" + return _cmf_core.cell2cellflux(*args, **kwargs) + +def cell_distance(*args, **kwargs): + """cell_distance(Cell c1, Cell c2) -> double""" + return _cmf_core.cell_distance(*args, **kwargs) +class subcatchment(object): + """ + + + A class to structure cells in a project using their main outlets. + + C++ includes: algorithm.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + pourpoint = _swig_property(_cmf_core.subcatchment_pourpoint_get) + inflowcells = _swig_property(_cmf_core.subcatchment_inflowcells_get, _cmf_core.subcatchment_inflowcells_set) + cells = _swig_property(_cmf_core.subcatchment_cells_get, _cmf_core.subcatchment_cells_set) + + def __init__(self, *args, **kwargs): + """ + __init__(cmf::upslope::subcatchment self, Cell pourpoint, double area_threshold=1e308) -> subcatchment + + subcatchment(cmf::upslope::Cell &pourpoint, double + area_threshold=1e308) + + Creates a subcatchment from a pourpoint cell. + + Parameters: + ----------- + + pourpoint: The pourpoint (outlet of the subcatchment) + + area_threshold: Minimum contributing area size to form a + subcatchment. When area_threshold > area(cells), all upslope cells of + pourpoint are used. + """ + _cmf_core.subcatchment_swiginit(self, _cmf_core.new_subcatchment(*args, **kwargs)) + __swig_destroy__ = _cmf_core.delete_subcatchment +subcatchment_swigregister = _cmf_core.subcatchment_swigregister +subcatchment_swigregister(subcatchment) + + +def pressure_to_waterhead(*args, **kwargs): + """pressure_to_waterhead(double Pressure) -> double""" + return _cmf_core.pressure_to_waterhead(*args, **kwargs) + +def waterhead_to_pressure(*args, **kwargs): + """waterhead_to_pressure(double waterhead) -> double""" + return _cmf_core.waterhead_to_pressure(*args, **kwargs) + +def pF_to_waterhead(*args, **kwargs): + """pF_to_waterhead(double pF) -> double""" + return _cmf_core.pF_to_waterhead(*args, **kwargs) + +def waterhead_to_pF(*args, **kwargs): + """waterhead_to_pF(double waterhead) -> double""" + return _cmf_core.waterhead_to_pF(*args, **kwargs) +class RetentionCurve(object): + """ + + + Abstract base class for different types of retention curves. + + This class, and its children uses wetness instead of volumetric water + content. The wetness of a soil is defined as water content per void + volume + + C++ includes: RetentionCurve.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def K(self, *args): + """ + K(RetentionCurve self, real wetness) -> real + K(RetentionCurve self, cmf::math::num_array const & wetness) -> cmf::math::num_array + + cmf::math::num_array K(const cmf::math::num_array &wetness) const + """ + return _cmf_core.RetentionCurve_K(self, *args) + + + def Wetness_eff(self, *args, **kwargs): + """ + Wetness_eff(RetentionCurve self, real wetness, real pF_r=4.2) -> real + + virtual real Wetness_eff(real wetness, real pF_r=4.2) const + + Returns the effective wetness, using a residual pF value + + .. math:: + + w_{eff} + = + \\frac{w_{act}-w\\left(pF_r\\right)}{1-w\\left(pF_r\\right)} + + . + + """ + return _cmf_core.RetentionCurve_Wetness_eff(self, *args, **kwargs) + + + def Porosity(self, *args, **kwargs): + """ + Porosity(RetentionCurve self, real depth=0.0) -> real + + virtual real Porosity(real depth=0.0) const =0 + + Returns the porosity at a certain depth. + """ + return _cmf_core.RetentionCurve_Porosity(self, *args, **kwargs) + + + def VoidVolume(self, *args, **kwargs): + """ + VoidVolume(RetentionCurve self, real upperDepth, real lowerDepth, real Area) -> real + + virtual real VoidVolume(real upperDepth, real lowerDepth, real Area) + const + + Returns the void volume of a soil column. + """ + return _cmf_core.RetentionCurve_VoidVolume(self, *args, **kwargs) + + + def FillHeight(self, *args, **kwargs): + """ + FillHeight(RetentionCurve self, real lowerDepth, real Area, real Volume) -> real + + virtual real FillHeight(real lowerDepth, real Area, real Volume) const + + Returns the thickness of a soil column with a certain pore volume. + """ + return _cmf_core.RetentionCurve_FillHeight(self, *args, **kwargs) + + + def Diffusivity(self, *args): + """ + Diffusivity(RetentionCurve self, real wetness) -> real + Diffusivity(RetentionCurve self, cmf::math::num_array & wetness) -> cmf::math::num_array + + cmf::math::num_array Diffusivity(cmf::math::num_array &wetness) + """ + return _cmf_core.RetentionCurve_Diffusivity(self, *args) + + + def Wetness(self, *args): + """ + Wetness(RetentionCurve self, real suction) -> real + Wetness(RetentionCurve self, cmf::math::num_array const & suction) -> cmf::math::num_array + + cmf::math::num_array Wetness(const cmf::math::num_array &suction) + const + """ + return _cmf_core.RetentionCurve_Wetness(self, *args) + + + def theta(self, *args): + """ + theta(RetentionCurve self, real wetness) -> real + theta(RetentionCurve self, cmf::math::num_array const & wetness) -> cmf::math::num_array + + cmf::math::num_array theta(const cmf::math::num_array &wetness) const + + """ + return _cmf_core.RetentionCurve_theta(self, *args) + + + def dPsiM_dW(self, *args): + """ + dPsiM_dW(RetentionCurve self, real wetness) -> real + dPsiM_dW(RetentionCurve self, cmf::math::num_array const & wetness) -> cmf::math::num_array + + cmf::math::num_array dPsiM_dW(const cmf::math::num_array &wetness) + const + """ + return _cmf_core.RetentionCurve_dPsiM_dW(self, *args) + + + def Wetness_pF(self, *args): + """ + Wetness_pF(RetentionCurve self, real pF) -> real + Wetness_pF(RetentionCurve self, cmf::math::num_array const & pF) -> cmf::math::num_array + + cmf::math::num_array Wetness_pF(const cmf::math::num_array &pF) const + + """ + return _cmf_core.RetentionCurve_Wetness_pF(self, *args) + + + def MatricPotential(self, *args): + """ + MatricPotential(RetentionCurve self, real wetness) -> real + MatricPotential(RetentionCurve self, cmf::math::num_array const & wetness) -> cmf::math::num_array + + cmf::math::num_array MatricPotential(const cmf::math::num_array + &wetness) const + """ + return _cmf_core.RetentionCurve_MatricPotential(self, *args) + + + def copy(self, *args, **kwargs): + """ + copy(RetentionCurve self) -> RetentionCurve + + virtual + RetentionCurve* copy() const =0 + """ + return _cmf_core.RetentionCurve_copy(self, *args, **kwargs) + + __swig_destroy__ = _cmf_core.delete_RetentionCurve +RetentionCurve.K = new_instancemethod(_cmf_core.RetentionCurve_K, None, RetentionCurve) +RetentionCurve.Wetness_eff = new_instancemethod(_cmf_core.RetentionCurve_Wetness_eff, None, RetentionCurve) +RetentionCurve.Porosity = new_instancemethod(_cmf_core.RetentionCurve_Porosity, None, RetentionCurve) +RetentionCurve.VoidVolume = new_instancemethod(_cmf_core.RetentionCurve_VoidVolume, None, RetentionCurve) +RetentionCurve.FillHeight = new_instancemethod(_cmf_core.RetentionCurve_FillHeight, None, RetentionCurve) +RetentionCurve.Diffusivity = new_instancemethod(_cmf_core.RetentionCurve_Diffusivity, None, RetentionCurve) +RetentionCurve.Wetness = new_instancemethod(_cmf_core.RetentionCurve_Wetness, None, RetentionCurve) +RetentionCurve.theta = new_instancemethod(_cmf_core.RetentionCurve_theta, None, RetentionCurve) +RetentionCurve.dPsiM_dW = new_instancemethod(_cmf_core.RetentionCurve_dPsiM_dW, None, RetentionCurve) +RetentionCurve.Wetness_pF = new_instancemethod(_cmf_core.RetentionCurve_Wetness_pF, None, RetentionCurve) +RetentionCurve.MatricPotential = new_instancemethod(_cmf_core.RetentionCurve_MatricPotential, None, RetentionCurve) +RetentionCurve.copy = new_instancemethod(_cmf_core.RetentionCurve_copy, None, RetentionCurve) +RetentionCurve_swigregister = _cmf_core.RetentionCurve_swigregister +RetentionCurve_swigregister(RetentionCurve) +rho_wg = cvar.rho_wg + +class BrooksCoreyRetentionCurve(RetentionCurve): + """ + + + Provides the use of the Brooks-Corey retention curve. + + + + .. math:: + + W(\\theta) &=& \\frac{\\theta - + \\theta_r}{\\theta_s - \\theta_r} \\\\ K(W) &=& K_{sat} + W^{2b+3} \\\\ \\Psi(W) &=& \\Psi_X + \\left(\\frac{W}{W_X}\\right)^{-b} \\\\ W(\\Psi) &=& + {\\left( \\frac{\\Psi_X}{\\Psi}\\right) + }^{\\frac{1}{b}}\\ W_X + + where: :math:`K` is the + conductivity in :math:`\\frac m{day}` + + :math:`W` is the wetness (Volume of soil water per volume of pores) + + :math:`b` is the shape of the retention curve (usually between 4 (sand) and + 14 (clay)) + + :math:`\\Psi(W)` is the matric potential in :math:`m H_2O` at wetness W + + :math:`\\Psi_X` is a matric potential at a known wetness in :math:`m H_2O` + + :math:`W_X` is the wetness with a known matric potential for dynamic changes + with depth, exponential decays of porosity and saturated conductivity + are used The decay function is: :math:`v(d)=v(0) (1+a)^{-d}`, where v is + the value ( :math:`K_{sat},\\Phi`), d is the depth in m and a is the + fractional decay per m. E.g. 0.1 means the value has in 1 m depth 90% + of the value at the surface + + C++ includes: RetentionCurve.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + Ksat = _swig_property(_cmf_core.BrooksCoreyRetentionCurve_Ksat_get, _cmf_core.BrooksCoreyRetentionCurve_Ksat_set) + + def SetPorosity(self, *args, **kwargs): + """ + SetPorosity(BrooksCoreyRetentionCurve self, real porosity, real porosity_decay=0) + + void + SetPorosity(real porosity, real porosity_decay=0) + + Sets the porosity (Volume of pores per volume of soil) and the + exponential porosity decline with depth. + """ + return _cmf_core.BrooksCoreyRetentionCurve_SetPorosity(self, *args, **kwargs) + + + def Transmissivity(self, *args, **kwargs): + """ + Transmissivity(BrooksCoreyRetentionCurve self, real upperDepth, real lowerDepth, real theta) -> real + + real + Transmissivity(real upperDepth, real lowerDepth, real theta) const + """ + return _cmf_core.BrooksCoreyRetentionCurve_Transmissivity(self, *args, **kwargs) + + wetness_X = _swig_property(_cmf_core.BrooksCoreyRetentionCurve_wetness_X_get, _cmf_core.BrooksCoreyRetentionCurve_wetness_X_set) + Psi_X = _swig_property(_cmf_core.BrooksCoreyRetentionCurve_Psi_X_get, _cmf_core.BrooksCoreyRetentionCurve_Psi_X_set) + residual_theta = _swig_property(_cmf_core.BrooksCoreyRetentionCurve_residual_theta_get, _cmf_core.BrooksCoreyRetentionCurve_residual_theta_set) + + def __init__(self, *args, **kwargs): + """ + __init__(cmf::upslope::BrooksCoreyRetentionCurve self, real ksat=15, real porosity=0.5, real _b=5, real theta_x=0.2, real psi_x, real porosity_decay=0) -> BrooksCoreyRetentionCurve + + BrooksCoreyRetentionCurve(real ksat=15, real porosity=0.5, real _b=5, + real theta_x=0.2, real psi_x=pF_to_waterhead(2.5), real + porosity_decay=0) + + Creates a brooks corey retention curve. + + Parameters: + ----------- + + ksat: Saturated conductivity :math:`\\frac{m}{day}` + + porosity: :math:`\\frac{m^3 Pores}{m^3 Soil}` + + _b: Shape of the retention curve (if you do not know how to + parameterize this, take a look at the other constructor) + + theta_x: :math:`\\theta_X` Water content at a specific suction pressure + + psi_x: Suction pressure for :math:`\\theta_X` in m water column, use the + conversion functions pF_to_waterhead, pressure_to_waterhead to convert + pressure in to waterhead height (default pF=2.5) + + porosity_decay: Relative decay of porosity with depth, e.g. 0.1 means + conductivity gets 10% smaller per meter + """ + _cmf_core.BrooksCoreyRetentionCurve_swiginit(self, _cmf_core.new_BrooksCoreyRetentionCurve(*args, **kwargs)) + + def CreateFrom2Points(*args, **kwargs): + """CreateFrom2Points(real ksat, real porosity, real theta1, real theta2, real psi_1, real psi_2) -> BrooksCoreyRetentionCurve""" + return _cmf_core.BrooksCoreyRetentionCurve_CreateFrom2Points(*args, **kwargs) + + CreateFrom2Points = staticmethod(CreateFrom2Points) + + def copy(self, *args, **kwargs): + """ + copy(BrooksCoreyRetentionCurve self) -> BrooksCoreyRetentionCurve + + virtual BrooksCoreyRetentionCurve* copy() const + """ + return _cmf_core.BrooksCoreyRetentionCurve_copy(self, *args, **kwargs) + + __swig_destroy__ = _cmf_core.delete_BrooksCoreyRetentionCurve + b = _swig_property(_cmf_core.BrooksCoreyRetentionCurve_b_get, _cmf_core.BrooksCoreyRetentionCurve_b_set) + + def __repr__(self): + return "cmf.BrooksCoreyRetentionCurve(Ksat=%g,phi=%g,b=%g,wfp0=%0.1f,pF0=%0.2f)" % (self.Ksat,self.Porosity(0.0),self.b,self.wetness_X,waterhead_to_pF(self.Psi_X)) + def __str__(self): + return "Brooks-Corey retention curve: Ksat=%0.3g m/day,por.=%0.0f%%,b=%g,%0.1f%% water content at pF%0.2f)" % (self.Ksat,self.Porosity(0.0)*100,self.b,self.wetness_X * self.Porosity(0.0) * 100,waterhead_to_pF(self.Psi_X)) + +BrooksCoreyRetentionCurve.SetPorosity = new_instancemethod(_cmf_core.BrooksCoreyRetentionCurve_SetPorosity, None, BrooksCoreyRetentionCurve) +BrooksCoreyRetentionCurve.Transmissivity = new_instancemethod(_cmf_core.BrooksCoreyRetentionCurve_Transmissivity, None, BrooksCoreyRetentionCurve) +BrooksCoreyRetentionCurve.copy = new_instancemethod(_cmf_core.BrooksCoreyRetentionCurve_copy, None, BrooksCoreyRetentionCurve) +BrooksCoreyRetentionCurve_swigregister = _cmf_core.BrooksCoreyRetentionCurve_swigregister +BrooksCoreyRetentionCurve_swigregister(BrooksCoreyRetentionCurve) + +def BrooksCoreyRetentionCurve_CreateFrom2Points(*args, **kwargs): + """BrooksCoreyRetentionCurve_CreateFrom2Points(real ksat, real porosity, real theta1, real theta2, real psi_1, real psi_2) -> BrooksCoreyRetentionCurve""" + return _cmf_core.BrooksCoreyRetentionCurve_CreateFrom2Points(*args, **kwargs) + +class VanGenuchtenMualem(RetentionCurve): + """ + + + Provides the use of the Van Genuchten - Mualem retention curve (Van + Genuchten 1980) + + Head - moisture relationship: + + .. math:: + + W(\\theta) &=& + \\frac{\\theta - \\theta_r}{\\theta_s - \\theta_r} \\\\ + K(W) &=& K_{sat} \\sqrt{W} + \\left(1-\\left(1-W^{1/m}\\right)^m\\right)^2 \\\\ m &=& + 1-\\frac 1 n \\\\ \\Psi(W) &=& 0.01 \\frac{m}{cm} + \\frac{{\\left(1-{W}^{\\frac{1}{m}}\\right) + }^{\\frac{1}{n}}}{\\alpha\\,{W}^{\\frac{1}{m\\,n}}} \\\\ + W(\\Psi) &=& + \\left(1+\\left(\\alpha\\,100\\frac{cm}{m}\\Psi\\right)^n\\right)^{-m} + + + where: :math:`K` is the conductivity in :math:`\\frac m{day}` + + :math:`W` is the wetness (Volume of soil water per volume of pores) + + :math:`n` is a shape parameter of the retention curve + + :math:`\\alpha` is inverse of the air entry potential in :math:`cm^{-1}` + + :math:`\\Psi(W)` is the matric potential in :math:`m H_2O` at wetness W + + C++ includes: RetentionCurve.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + alpha = _swig_property(_cmf_core.VanGenuchtenMualem_alpha_get, _cmf_core.VanGenuchtenMualem_alpha_set) + n = _swig_property(_cmf_core.VanGenuchtenMualem_n_get, _cmf_core.VanGenuchtenMualem_n_set) + Ksat = _swig_property(_cmf_core.VanGenuchtenMualem_Ksat_get, _cmf_core.VanGenuchtenMualem_Ksat_set) + Phi = _swig_property(_cmf_core.VanGenuchtenMualem_Phi_get, _cmf_core.VanGenuchtenMualem_Phi_set) + m = _swig_property(_cmf_core.VanGenuchtenMualem_m_get, _cmf_core.VanGenuchtenMualem_m_set) + l = _swig_property(_cmf_core.VanGenuchtenMualem_l_get, _cmf_core.VanGenuchtenMualem_l_set) + theta_r = _swig_property(_cmf_core.VanGenuchtenMualem_theta_r_get, _cmf_core.VanGenuchtenMualem_theta_r_set) + w0 = _swig_property(_cmf_core.VanGenuchtenMualem_w0_get, _cmf_core.VanGenuchtenMualem_w0_set) + + def Transmissivity(self, *args, **kwargs): + """ + Transmissivity(VanGenuchtenMualem self, real upperDepth, real lowerDepth, real wetness) -> real + + virtual real + Transmissivity(real upperDepth, real lowerDepth, real wetness) const + + """ + return _cmf_core.VanGenuchtenMualem_Transmissivity(self, *args, **kwargs) + + + def fit_w0(self, *args, **kwargs): + """ + fit_w0(VanGenuchtenMualem self, real w1=1.01, real Psi_p=1.0, real tolerance=0.05) -> real + + real + fit_w0(real w1=1.01, real Psi_p=1.0, real tolerance=0.05) + + Fits the break point wetness w0, to ensure a specific oversaturation + at a given hydrostatic potential. + + Parameters: + ----------- + + w1: The oversaturation wetness to archieve (>1), default = 1.01 + + Psi_p: the hydrostatic potential for w1, default = +1.0 m + + tolerance: + """ + return _cmf_core.VanGenuchtenMualem_fit_w0(self, *args, **kwargs) + + + def copy(self, *args, **kwargs): + """ + copy(VanGenuchtenMualem self) -> VanGenuchtenMualem + + VanGenuchtenMualem* copy() const + """ + return _cmf_core.VanGenuchtenMualem_copy(self, *args, **kwargs) + + + def __init__(self, *args, **kwargs): + """ + __init__(cmf::upslope::VanGenuchtenMualem self, real Ksat=15, real phi=0.5, real alpha=0.2178, real n=1.211, real m=-1) -> VanGenuchtenMualem + + VanGenuchtenMualem(real Ksat=15, real phi=0.5, real alpha=0.2178, real + n=1.211, real m=-1) + + Creates a van Genuchten-Mualem retention curve. + + Parameters: + ----------- + + Ksat: Saturated conductivity in :math:`\\frac m{day}` + + phi: Porosity in :math:`\\frac{m^3 Pores}{m^3 Soil}` + + alpha: Van Genuchten :math:`\\alpha` in :math:`\\frac 1{cm}` + + n: Van Genuchten n + + m: Van Genuchten m parameter, if negative m is calculated as :math:`1-\\frac 1 n` + """ + _cmf_core.VanGenuchtenMualem_swiginit(self, _cmf_core.new_VanGenuchtenMualem(*args, **kwargs)) + __swig_destroy__ = _cmf_core.delete_VanGenuchtenMualem + + def __repr__(self): + return "cmf.VanGenuchtenMualem(Ksat=%0.3g,Phi=%0.3g,alpha=%0.3g,n=%0.3g,m=%0.3g)" % (self.Ksat,self.Phi,self.alpha,self.n,self.m) + def __str__(self): + return "VanGenuchten / Mualem retention curve: Ksat=%0.3g m/day, %0.3g%% Pores, alpha=%0.3g 1/cm, n=%0.3g" % (self.Ksat,self.Phi*100,self.alpha,self.n) + +VanGenuchtenMualem.Transmissivity = new_instancemethod(_cmf_core.VanGenuchtenMualem_Transmissivity, None, VanGenuchtenMualem) +VanGenuchtenMualem.fit_w0 = new_instancemethod(_cmf_core.VanGenuchtenMualem_fit_w0, None, VanGenuchtenMualem) +VanGenuchtenMualem.copy = new_instancemethod(_cmf_core.VanGenuchtenMualem_copy, None, VanGenuchtenMualem) +VanGenuchtenMualem_swigregister = _cmf_core.VanGenuchtenMualem_swigregister +VanGenuchtenMualem_swigregister(VanGenuchtenMualem) + +class LinearRetention(RetentionCurve): + """ + + + The linear retention curve provides a simple linear relationship + between storage and head. + + Head function (head in m, calculated from upper side control volume) + + + .. math:: + + h(\\theta) = -\\Delta z \\left( 1 - \\frac{\\theta - + \\theta_r}{\\theta_s - \\theta_r} \\right) + + Conductivity + function + + .. math:: + + K(\\theta) = K_{sat} \\left(\\frac{\\theta - + \\theta_r}{\\theta_s - \\theta_r}\\right)^\\beta + + C++ includes: RetentionCurve.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + Ksat = _swig_property(_cmf_core.LinearRetention_Ksat_get, _cmf_core.LinearRetention_Ksat_set) + porosity = _swig_property(_cmf_core.LinearRetention_porosity_get, _cmf_core.LinearRetention_porosity_set) + thickness = _swig_property(_cmf_core.LinearRetention_thickness_get, _cmf_core.LinearRetention_thickness_set) + residual_wetness = _swig_property(_cmf_core.LinearRetention_residual_wetness_get, _cmf_core.LinearRetention_residual_wetness_set) + porosity_decay = _swig_property(_cmf_core.LinearRetention_porosity_decay_get, _cmf_core.LinearRetention_porosity_decay_set) + beta = _swig_property(_cmf_core.LinearRetention_beta_get, _cmf_core.LinearRetention_beta_set) + + def Transmissivity(self, *args, **kwargs): + """ + Transmissivity(LinearRetention self, real upperDepth, real lowerDepth, real wetness) -> real + + virtual real Transmissivity(real upperDepth, real lowerDepth, real + wetness) const + """ + return _cmf_core.LinearRetention_Transmissivity(self, *args, **kwargs) + + + def copy(self, *args, **kwargs): + """ + copy(LinearRetention self) -> LinearRetention + + LinearRetention* copy() const + """ + return _cmf_core.LinearRetention_copy(self, *args, **kwargs) + + + def __init__(self, *args, **kwargs): + """ + __init__(cmf::upslope::LinearRetention self, real ksat, real phi, real thickness, real residual_wetness=0.1) -> LinearRetention + + LinearRetention(real ksat, real phi, real thickness, real + residual_wetness=0.1) + """ + _cmf_core.LinearRetention_swiginit(self, _cmf_core.new_LinearRetention(*args, **kwargs)) + __swig_destroy__ = _cmf_core.delete_LinearRetention +LinearRetention.Transmissivity = new_instancemethod(_cmf_core.LinearRetention_Transmissivity, None, LinearRetention) +LinearRetention.copy = new_instancemethod(_cmf_core.LinearRetention_copy, None, LinearRetention) +LinearRetention_swigregister = _cmf_core.LinearRetention_swigregister +LinearRetention_swigregister(LinearRetention) + +class SoilLayer(WaterStorage): + """ + + + A representation of a SoilLayer. + + C++ includes: SoilLayer.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined") + __repr__ = _swig_repr + Position = _swig_property(_cmf_core.SoilLayer_Position_get) + cell = _swig_property(_cmf_core.SoilLayer_cell_get) + + def __get_upper(self, *args, **kwargs): + """ + __get_upper(SoilLayer self) -> cmf::upslope::SoilLayer::ptr + + ptr + get_upper() const + """ + return _cmf_core.SoilLayer___get_upper(self, *args, **kwargs) + + + def __get_lower(self, *args, **kwargs): + """ + __get_lower(SoilLayer self) -> cmf::upslope::SoilLayer::ptr + + ptr + get_lower() const + """ + return _cmf_core.SoilLayer___get_lower(self, *args, **kwargs) + + + def get_soil(self, *args, **kwargs): + """ + get_soil(SoilLayer self) -> RetentionCurve + + virtual + cmf::upslope::RetentionCurve& get_soil() const + + Returns the soil properties of the water storage. + """ + return _cmf_core.SoilLayer_get_soil(self, *args, **kwargs) + + + def set_soil(self, *args, **kwargs): + """ + set_soil(SoilLayer self, RetentionCurve r_curve) + + virtual + void set_soil(const cmf::upslope::RetentionCurve &r_curve) + """ + return _cmf_core.SoilLayer_set_soil(self, *args, **kwargs) + + + def get_K(self, *args, **kwargs): + """ + get_K(SoilLayer self, point direction) -> real + + virtual real + get_K(cmf::geometry::point direction) const + + Returns the actual anisotropic conductivity along a direction :math:`K = (k_f \\cdot d) K`. + """ + return _cmf_core.SoilLayer_get_K(self, *args, **kwargs) + + anisotropic_kf = _swig_property(_cmf_core.SoilLayer_anisotropic_kf_get, _cmf_core.SoilLayer_anisotropic_kf_set) + + def get_capacity(self, *args, **kwargs): + """ + get_capacity(SoilLayer self) -> real + + virtual + real get_capacity() const + + Returns the capacity of the water storage in m3. + """ + return _cmf_core.SoilLayer_get_capacity(self, *args, **kwargs) + + + def get_saturated_depth(self, *args, **kwargs): + """ + get_saturated_depth(SoilLayer self) -> real + + virtual real get_saturated_depth() const + + Returns the depth for saturation + + .. math:: + + z_{sat,this} = + \\left\\{z_{cell}-\\Psi_{tot} \\mbox{ if } W<1 \\\\ + z_{sat,upper layer} \\right. + + . + """ + return _cmf_core.SoilLayer_get_saturated_depth(self, *args, **kwargs) + + + def get_flow_crosssection(self, *args, **kwargs): + """ + get_flow_crosssection(SoilLayer self, SoilLayer target, bool HorizontalLayers=False) -> real + + real get_flow_crosssection(const cmf::upslope::SoilLayer &target, + bool HorizontalLayers=false) const + + Calculates the shared crosssectional area of this and another soil + water storage. + + If both layers belong to the same cell, the area of the cell is + returned, if they belong to different cells the area of the vertical + shared boundary is returned get_area in m2 + + Parameters: + ----------- + + target: The other soil water storage + + HorizontalLayers: If true, the layers are assumed to be parallel to + the gravitational potential, otherwise they are assumed to be parallel + to the ground topography + """ + return _cmf_core.SoilLayer_get_flow_crosssection(self, *args, **kwargs) + + + def cast(*args, **kwargs): + """cast(cmf::water::flux_node::ptr node) -> cmf::upslope::SoilLayer::ptr""" + return _cmf_core.SoilLayer_cast(*args, **kwargs) + + cast = staticmethod(cast) + gravitational_potential = _swig_property(_cmf_core.SoilLayer_gravitational_potential_get) + matrix_potential = _swig_property(_cmf_core.SoilLayer_matrix_potential_get) + wetness = _swig_property(_cmf_core.SoilLayer_wetness_get, _cmf_core.SoilLayer_wetness_set) + theta = _swig_property(_cmf_core.SoilLayer_theta_get, _cmf_core.SoilLayer_theta_set) + K = _swig_property(_cmf_core.SoilLayer_K_get) + Ksat = _swig_property(_cmf_core.SoilLayer_Ksat_get) + thickness = _swig_property(_cmf_core.SoilLayer_thickness_get) + lower_boundary = _swig_property(_cmf_core.SoilLayer_lower_boundary_get) + upper_boundary = _swig_property(_cmf_core.SoilLayer_upper_boundary_get) + porosity = _swig_property(_cmf_core.SoilLayer_porosity_get) + ice_fraction = _swig_property(_cmf_core.SoilLayer_ice_fraction_get, _cmf_core.SoilLayer_ice_fraction_set) + rootfraction = _swig_property(_cmf_core.SoilLayer_rootfraction_get, _cmf_core.SoilLayer_rootfraction_set) + + upper = _swig_property(_cmf_core.SoilLayer___get_upper) + + + lower = _swig_property(_cmf_core.SoilLayer___get_lower) + + + boundary=property(lambda self:(self.upper_boundary,self.lower_boundary),None,"Returns the upper and lower boundary of the layer") + pF=property(lambda self : waterhead_to_pF(self.matrix_potential),None,"The actual pF value") + soil=property(get_soil,set_soil,"The retention curve of the layer") + + + def __repr__(self): + return self.to_string() + + __swig_destroy__ = _cmf_core.delete_SoilLayer +SoilLayer.__get_upper = new_instancemethod(_cmf_core.SoilLayer___get_upper, None, SoilLayer) +SoilLayer.__get_lower = new_instancemethod(_cmf_core.SoilLayer___get_lower, None, SoilLayer) +SoilLayer.get_soil = new_instancemethod(_cmf_core.SoilLayer_get_soil, None, SoilLayer) +SoilLayer.set_soil = new_instancemethod(_cmf_core.SoilLayer_set_soil, None, SoilLayer) +SoilLayer.get_K = new_instancemethod(_cmf_core.SoilLayer_get_K, None, SoilLayer) +SoilLayer.get_capacity = new_instancemethod(_cmf_core.SoilLayer_get_capacity, None, SoilLayer) +SoilLayer.get_saturated_depth = new_instancemethod(_cmf_core.SoilLayer_get_saturated_depth, None, SoilLayer) +SoilLayer.get_flow_crosssection = new_instancemethod(_cmf_core.SoilLayer_get_flow_crosssection, None, SoilLayer) +SoilLayer_swigregister = _cmf_core.SoilLayer_swigregister +SoilLayer_swigregister(SoilLayer) + +def SoilLayer_cast(*args, **kwargs): + """SoilLayer_cast(cmf::water::flux_node::ptr node) -> cmf::upslope::SoilLayer::ptr""" + return _cmf_core.SoilLayer_cast(*args, **kwargs) + +class layer_list(object): + """ + + + A vector of layers, with array access to the properties of the layers, + for fast data exchange. + + C++ includes: layer_list.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + + def __init__(self, *args): + """ + __init__(cmf::upslope::layer_list self, layer_list for_copy) -> layer_list + __init__(cmf::upslope::layer_list self) -> layer_list + __init__(cmf::upslope::layer_list self, node_list for_copy) -> layer_list + + layer_list(const cmf::water::node_list &for_copy) + + Creates a list of all soil layers from a node_list. + """ + _cmf_core.layer_list_swiginit(self, _cmf_core.new_layer_list(*args)) + + def pop(self, *args, **kwargs): + """ + pop(layer_list self) -> cmf::upslope::SoilLayer::ptr + + SoilLayer::ptr + pop() + + Deletes the last layer from the list and returns it. + """ + return _cmf_core.layer_list_pop(self, *args, **kwargs) + + + def append(self, *args, **kwargs): + """ + append(layer_list self, cmf::upslope::SoilLayer::ptr l) -> layer_list + + layer_list& + append(SoilLayer::ptr l) + + Appends a soil layer to the list. + """ + return _cmf_core.layer_list_append(self, *args, **kwargs) + + + def extend(self, *args): + """ + extend(layer_list self, layer_list ll) -> layer_list + extend(layer_list self, node_list nl) -> layer_list + + layer_list& + extend(const cmf::water::node_list &nl) + + Appends all soil layers from a node_list to this. + """ + return _cmf_core.layer_list_extend(self, *args) + + + def get_slice(self, *args, **kwargs): + """ + get_slice(layer_list self, size_t first=0, size_t last=1000000, size_t step=1) -> layer_list + + layer_list get_slice(size_t first=0, size_t last=1000000, size_t + step=1) + """ + return _cmf_core.layer_list_get_slice(self, *args, **kwargs) + + + def clear(self, *args, **kwargs): + """ + clear(layer_list self) + + void clear() + + Clears the list. + """ + return _cmf_core.layer_list_clear(self, *args, **kwargs) + + + def size(self, *args, **kwargs): + """ + size(layer_list self) -> size_t + + size_t size() + const + + Number of layers in the list. + """ + return _cmf_core.layer_list_size(self, *args, **kwargs) + + + def set_wetness(self, *args, **kwargs): + """ + set_wetness(layer_list self, cmf::math::num_array const & Value, size_t offset=0) + + void + set_wetness(const cmf::math::num_array &Value, size_t offset=0) + + Sets the wetness in m3/m3 of layers [offset : arraysize]. + """ + return _cmf_core.layer_list_set_wetness(self, *args, **kwargs) + + + def set_potential(self, *args, **kwargs): + """ + set_potential(layer_list self, cmf::math::num_array const & Value, size_t offset=0) + + void + set_potential(const cmf::math::num_array &Value, size_t offset=0) + + Sets the potential (head) in m of layers [offset : arraysize]. + """ + return _cmf_core.layer_list_set_potential(self, *args, **kwargs) + + + def set_volume(self, *args, **kwargs): + """ + set_volume(layer_list self, cmf::math::num_array const & Value, size_t offset=0) + + void + set_volume(const cmf::math::num_array &Value, size_t offset=0) + + Sets the Volume in m3 of layers [offset : arraysize]. + """ + return _cmf_core.layer_list_set_volume(self, *args, **kwargs) + + + def get_percolation(self, *args, **kwargs): + """ + get_percolation(layer_list self, Time t) -> cmf::math::num_array + + cmf::math::num_array get_percolation(cmf::math::Time t) const + + Returns the flux to each layer from the upper layer, or, in case of + the first layer from the surface water. + """ + return _cmf_core.layer_list_get_percolation(self, *args, **kwargs) + + + def set_theta(self, *args, **kwargs): + """ + set_theta(layer_list self, cmf::math::num_array const & Value, size_t offset=0) + + void + set_theta(const cmf::math::num_array &Value, size_t offset=0) + + Sets the volumetric water content of the soil. + """ + return _cmf_core.layer_list_set_theta(self, *args, **kwargs) + + + def set_ice_fraction(self, *args, **kwargs): + """ + set_ice_fraction(layer_list self, cmf::math::num_array const & Value, size_t offset=0) + + void set_ice_fraction(const cmf::math::num_array &Value, size_t + offset=0) + + Sets the fraction of the ice content of the soil water. + """ + return _cmf_core.layer_list_set_ice_fraction(self, *args, **kwargs) + + + def set_rootfraction(self, *args, **kwargs): + """ + set_rootfraction(layer_list self, cmf::math::num_array const & Value, size_t offset=0) + + void set_rootfraction(const cmf::math::num_array &Value, size_t + offset=0) + + Sets the fraction of roots in each layer. + """ + return _cmf_core.layer_list_set_rootfraction(self, *args, **kwargs) + + gravitational_potential = _swig_property(_cmf_core.layer_list_gravitational_potential_get) + matrix_potential = _swig_property(_cmf_core.layer_list_matrix_potential_get) + wetness = _swig_property(_cmf_core.layer_list_wetness_get) + volume = _swig_property(_cmf_core.layer_list_volume_get) + potential = _swig_property(_cmf_core.layer_list_potential_get) + K = _swig_property(_cmf_core.layer_list_K_get) + Ksat = _swig_property(_cmf_core.layer_list_Ksat_get) + thickness = _swig_property(_cmf_core.layer_list_thickness_get) + lower_boundary = _swig_property(_cmf_core.layer_list_lower_boundary_get) + upper_boundary = _swig_property(_cmf_core.layer_list_upper_boundary_get) + porosity = _swig_property(_cmf_core.layer_list_porosity_get) + ice_fraction = _swig_property(_cmf_core.layer_list_ice_fraction_get) + theta = _swig_property(_cmf_core.layer_list_theta_get) + root = _swig_property(_cmf_core.layer_list_root_get) + + def __get(self, *args, **kwargs): + """__get(layer_list self, int index) -> cmf::upslope::SoilLayer::ptr""" + return _cmf_core.layer_list___get(self, *args, **kwargs) + + + __repr__=lambda self: repr(list(self)) + __str__ =lambda self: str(list(self)) + __len__=lambda self: self.size() + def __iadd__(self,other): + self.append(other) + return self + def __add__(self,other): + res = layer_list(self) + res.append(other) + return res + def __iter__(self): + for i in range(len(self)): + yield self[i] + def __getitem__(self,index): + if (type(index)==slice): + return self.get_slice(*index.indices(len(self))) + try: + gen=iter(index) + return [self.__get(it) for it in gen] + except TypeError: + return self.__get(index) + + __swig_destroy__ = _cmf_core.delete_layer_list +layer_list.pop = new_instancemethod(_cmf_core.layer_list_pop, None, layer_list) +layer_list.append = new_instancemethod(_cmf_core.layer_list_append, None, layer_list) +layer_list.extend = new_instancemethod(_cmf_core.layer_list_extend, None, layer_list) +layer_list.get_slice = new_instancemethod(_cmf_core.layer_list_get_slice, None, layer_list) +layer_list.clear = new_instancemethod(_cmf_core.layer_list_clear, None, layer_list) +layer_list.size = new_instancemethod(_cmf_core.layer_list_size, None, layer_list) +layer_list.set_wetness = new_instancemethod(_cmf_core.layer_list_set_wetness, None, layer_list) +layer_list.set_potential = new_instancemethod(_cmf_core.layer_list_set_potential, None, layer_list) +layer_list.set_volume = new_instancemethod(_cmf_core.layer_list_set_volume, None, layer_list) +layer_list.get_percolation = new_instancemethod(_cmf_core.layer_list_get_percolation, None, layer_list) +layer_list.set_theta = new_instancemethod(_cmf_core.layer_list_set_theta, None, layer_list) +layer_list.set_ice_fraction = new_instancemethod(_cmf_core.layer_list_set_ice_fraction, None, layer_list) +layer_list.set_rootfraction = new_instancemethod(_cmf_core.layer_list_set_rootfraction, None, layer_list) +layer_list.__get = new_instancemethod(_cmf_core.layer_list___get, None, layer_list) +layer_list_swigregister = _cmf_core.layer_list_swigregister +layer_list_swigregister(layer_list) + +class MacroPore(WaterStorage): + """ + + + An additional water storage for a soil layer to model matrix water and + macro pore water seperately. + + Deprecated The MacroPore model is still very experimental and not + stable. Only for tryouts! + + If present, the soil layer water storage holds the matrix water and + the MacroPore holds the water in the macro pore. Use + cmf::upslope::Macropore::create to create a macropore storage. + + Use cmf::upslope::connections::GradientMacroFlow or + cmf::upslope::connections::KinematicMacroFlow to model water flow + between macro pores and a lateral connection ( lateral subsurface + fluxes) like cmf::upslope::connections::Richards_lateral to connect + the macro pore with the matrix. + + C++ includes: macropore.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined") + __repr__ = _swig_repr + porefraction_min = _swig_property(_cmf_core.MacroPore_porefraction_min_get, _cmf_core.MacroPore_porefraction_min_set) + porefraction_max = _swig_property(_cmf_core.MacroPore_porefraction_max_get, _cmf_core.MacroPore_porefraction_max_set) + + def __get_layer(self, *args, **kwargs): + """ + __get_layer(MacroPore self) -> cmf::upslope::SoilLayer::ptr + + SoilLayer::ptr get_layer() const + + Gets the soil layer (matrix water storage) for this macropore storage. + + """ + return _cmf_core.MacroPore___get_layer(self, *args, **kwargs) + + + def get_porefraction(self, *args, **kwargs): + """ + get_porefraction(MacroPore self) -> real + + real get_porefraction() const + + The fraction of the macro pores in m3/m3. This adds to the porosity of + the layer. + """ + return _cmf_core.MacroPore_get_porefraction(self, *args, **kwargs) + + density = _swig_property(_cmf_core.MacroPore_density_get, _cmf_core.MacroPore_density_set) + Ksat = _swig_property(_cmf_core.MacroPore_Ksat_get, _cmf_core.MacroPore_Ksat_set) + crack_wetness = _swig_property(_cmf_core.MacroPore_crack_wetness_get, _cmf_core.MacroPore_crack_wetness_set) + + def get_K(self, *args, **kwargs): + """ + get_K(MacroPore self, point direction) -> real + + virtual real + get_K(cmf::geometry::point direction) const + + Returns the actual anisotropic conductivity along a direction :math:`K = (k_f \\cdot d) K`. + """ + return _cmf_core.MacroPore_get_K(self, *args, **kwargs) + + + def get_crackwidth(self, *args, **kwargs): + """ + get_crackwidth(MacroPore self) -> real + + virtual real get_crackwidth() const + + Returns the crack width for a prismatic crackstructure. + + For a prismatic crack structure, the porefraction in m3/m3 equals the + vertical crack area in m2/m2. The length of equally spaced cracks is + in one direction the inverse of the density and twice the length for + two directions. + + .. math:: + + l_{crack} [m/m^2]= 2 \\frac {1}{d[m]} + + If + we again ignore the fact that the spacing of the cracking crossings is + counted double, the crack width is: + + .. math:: + + w_{crack}[m] = + \\frac{A_{crack}[m^2/m^2]}{l_{crack}[m/m^2]} + + Combining both + eq. above: + + .. math:: + + w_{crack}[m] = A_{crack}[m^2/m^2]\\frac{d[m]}{2} + + + + """ + return _cmf_core.MacroPore_get_crackwidth(self, *args, **kwargs) + + + def get_flowwidth(self, *args, **kwargs): + """ + get_flowwidth(MacroPore self) -> real + + real + get_flowwidth() const + + The approximate length of the aggregate boundaries. + + + + .. math:: + + l = \\frac{2}{d_{macro}} A + + where: :math:`l` is the length of + the aggregate boundaries (in m) + + :math:`2` is the number of directions + + :math:`d_{macro}` is the mean distance between macropores (density) in m + + :math:`A` is the area of the cell + """ + return _cmf_core.MacroPore_get_flowwidth(self, *args, **kwargs) + + K_shape = _swig_property(_cmf_core.MacroPore_K_shape_get, _cmf_core.MacroPore_K_shape_set) + + def create(*args, **kwargs): + """create(cmf::upslope::SoilLayer::ptr layer, real porefraction=0.05, real Ksat=10, real density=0.05, real porefraction_wilt=-1., real K_shape=0.0) -> cmf::upslope::MacroPore::ptr""" + return _cmf_core.MacroPore_create(*args, **kwargs) + + create = staticmethod(create) + + def cast(*args, **kwargs): + """cast(cmf::water::flux_node::ptr node) -> cmf::upslope::MacroPore::ptr""" + return _cmf_core.MacroPore_cast(*args, **kwargs) + + cast = staticmethod(cast) + + def __repr__(self): + return self.to_string() + + + layer = _swig_property(_cmf_core.MacroPore___get_layer) + + filled_fraction = _swig_property(_cmf_core.MacroPore_filled_fraction_get) + K = _swig_property(_cmf_core.MacroPore_K_get) + capacity = _swig_property(_cmf_core.MacroPore_capacity_get) + cell = _swig_property(_cmf_core.MacroPore_cell_get) + __swig_destroy__ = _cmf_core.delete_MacroPore +MacroPore.__get_layer = new_instancemethod(_cmf_core.MacroPore___get_layer, None, MacroPore) +MacroPore.get_porefraction = new_instancemethod(_cmf_core.MacroPore_get_porefraction, None, MacroPore) +MacroPore.get_K = new_instancemethod(_cmf_core.MacroPore_get_K, None, MacroPore) +MacroPore.get_crackwidth = new_instancemethod(_cmf_core.MacroPore_get_crackwidth, None, MacroPore) +MacroPore.get_flowwidth = new_instancemethod(_cmf_core.MacroPore_get_flowwidth, None, MacroPore) +MacroPore_swigregister = _cmf_core.MacroPore_swigregister +MacroPore_swigregister(MacroPore) + +def MacroPore_create(*args, **kwargs): + """MacroPore_create(cmf::upslope::SoilLayer::ptr layer, real porefraction=0.05, real Ksat=10, real density=0.05, real porefraction_wilt=-1., real K_shape=0.0) -> cmf::upslope::MacroPore::ptr""" + return _cmf_core.MacroPore_create(*args, **kwargs) + +def MacroPore_cast(*args, **kwargs): + """MacroPore_cast(cmf::water::flux_node::ptr node) -> cmf::upslope::MacroPore::ptr""" + return _cmf_core.MacroPore_cast(*args, **kwargs) + +class BaseMacroFlow(flux_connection): + """Proxy of C++ cmf::upslope::connections::BaseMacroFlow class.""" + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + __swig_destroy__ = _cmf_core.delete_BaseMacroFlow +BaseMacroFlow_swigregister = _cmf_core.BaseMacroFlow_swigregister +BaseMacroFlow_swigregister(BaseMacroFlow) + +class GradientMacroFlow(BaseMacroFlow): + """ + + + Gradient based flux from macro pore to macro pore. + + Deprecated The MacroPore model is still very experimental and not + stable. Only for tryouts! + + + + .. math:: + + q = K(\\theta) \\frac{\\Delta \\Psi}{\\Delta z} + + C++ includes: macropore.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + + def __init__(self, *args, **kwargs): + """ + __init__(cmf::upslope::connections::GradientMacroFlow self, cmf::upslope::MacroPore::ptr left, cmf::water::flux_node::ptr right) -> GradientMacroFlow + + GradientMacroFlow(cmf::upslope::MacroPore::ptr left, + cmf::water::flux_node::ptr right) + """ + _cmf_core.GradientMacroFlow_swiginit(self, _cmf_core.new_GradientMacroFlow(*args, **kwargs)) + __swig_destroy__ = _cmf_core.delete_GradientMacroFlow +GradientMacroFlow_swigregister = _cmf_core.GradientMacroFlow_swigregister +GradientMacroFlow_swigregister(GradientMacroFlow) + +class KinematicMacroFlow(BaseMacroFlow): + """ + + + Linear storage based flux from macro pore to macro pore. + + Deprecated The MacroPore model is still very experimental and not + stable. Only for tryouts! + + + + .. math:: + + q = A_{cell} K_{macro} + \\left(\\frac{V_{upper}}{C_{upper}}\\right)^\\beta + \\left(1-\\frac{V_{lower}}{C_{lower}}\\right) + + where: + :math:`A_{cell}` is the area of the owning cell in m2 + + :math:`K_{macro}` is the conductivity of the macro pore storage + + :math:`V` is the actual stored water volume in the upper resp. lower macro + pore storage + + :math:`C` is the capacity of the upper resp. lower macro pore storage + + C++ includes: macropore.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + + def __init__(self, *args, **kwargs): + """ + __init__(cmf::upslope::connections::KinematicMacroFlow self, cmf::water::WaterStorage::ptr left, cmf::water::flux_node::ptr right, real beta=1.) -> KinematicMacroFlow + + KinematicMacroFlow(cmf::water::WaterStorage::ptr left, + cmf::water::flux_node::ptr right, real beta=1.) + + Creates the connection. + + Parameters: + ----------- + + left: right: the nodes between the connection should be created. + + beta: a conceptional curve shape parameter for the relation between + storage and outflow + + Either left or right needs to be a MacroPore, left needs to be a water + storage + """ + _cmf_core.KinematicMacroFlow_swiginit(self, _cmf_core.new_KinematicMacroFlow(*args, **kwargs)) + __swig_destroy__ = _cmf_core.delete_KinematicMacroFlow +KinematicMacroFlow_swigregister = _cmf_core.KinematicMacroFlow_swigregister +KinematicMacroFlow_swigregister(KinematicMacroFlow) + +class JarvisMacroFlow(BaseMacroFlow): + """ + + + A physically based macropore to macropore connection according to + Jarvis & Leeds-Harrison 1987, JSS. + + + + .. math:: + + q_{i->j} [m/s]= \\rho \\frac G {12\\eta} w^2 \\frac{e_v- + e_r}{1-e_r} S_{c,i}^\\beta\\ (1-S_{c,j}) + + where: :math:`q_{i->j}` + the flow from macro pore layer i to macropore layer j + + :math:`\\rho=10^{-3} kg/m^3` - the density of water + + :math:`G=9.81 m/s^2` the earth acceleration + + :math:`\\eta=1.0 kg/(m s)` the viscosity of water (at 20 degC) + + :math:`w [m]` the crack width, a function of water content and crack + distance + + :math:`e_v [-]` the crack porosity + + :math:`e_r [-]` crack por + + :math:`S_c [-]` the crack saturation of layer i resp. j + + :math:`\\beta [-]` a conceptional exponent to shape the flow reaction + + C++ includes: macropore.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + beta = _swig_property(_cmf_core.JarvisMacroFlow_beta_get, _cmf_core.JarvisMacroFlow_beta_set) + porefraction_r = _swig_property(_cmf_core.JarvisMacroFlow_porefraction_r_get, _cmf_core.JarvisMacroFlow_porefraction_r_set) + + def __init__(self, *args, **kwargs): + """ + __init__(cmf::upslope::connections::JarvisMacroFlow self, cmf::water::WaterStorage::ptr left, cmf::water::flux_node::ptr right, real beta=1., real porefraction_r=0.0) -> JarvisMacroFlow + + JarvisMacroFlow(cmf::water::WaterStorage::ptr left, + cmf::water::flux_node::ptr right, real beta=1., real + porefraction_r=0.0) + + Constructs the connection. + + Parameters: + ----------- + + left: right: the connected macropores + + beta: User defined parameter for the swelling reaction + + porefraction_r: Porefraction at which flow starts. For swelling soils + that are closing completely th + """ + _cmf_core.JarvisMacroFlow_swiginit(self, _cmf_core.new_JarvisMacroFlow(*args, **kwargs)) + __swig_destroy__ = _cmf_core.delete_JarvisMacroFlow +JarvisMacroFlow_swigregister = _cmf_core.JarvisMacroFlow_swigregister +JarvisMacroFlow_swigregister(JarvisMacroFlow) + +class GradientMacroMicroExchange(flux_connection): + """ + + + A gradient based exchange term between macropores and micropores, + using a fixed (air-) potential for macropores. + + + + .. math:: + + q = K \\frac{\\Delta\\Psi}{d/2} A + + where: :math:`K` The + conductivity of the aggregate boundary + + :math:`\\Delta\\Psi` The potential difference. Using the air potential + as the constant potential for the macro pores, you get: + :math:`\\Delta\\Psi = \\Psi_M(\\theta_{micro})` + + :math:`d` the mean aggregate size in m + + :math:`A` the crosssection area, given as the flow width ( + cmf::upslope::MacroPore::get_flowwidth) times layer thickness + + C++ includes: macropore.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + + def __init__(self, *args, **kwargs): + """ + __init__(cmf::upslope::connections::GradientMacroMicroExchange self, cmf::upslope::SoilLayer::ptr left, cmf::upslope::MacroPore::ptr right) -> GradientMacroMicroExchange + + GradientMacroMicroExchange(cmf::upslope::SoilLayer::ptr left, + cmf::upslope::MacroPore::ptr right) + """ + _cmf_core.GradientMacroMicroExchange_swiginit(self, _cmf_core.new_GradientMacroMicroExchange(*args, **kwargs)) + __swig_destroy__ = _cmf_core.delete_GradientMacroMicroExchange +GradientMacroMicroExchange_swigregister = _cmf_core.GradientMacroMicroExchange_swigregister +GradientMacroMicroExchange_swigregister(GradientMacroMicroExchange) + +class DiffusiveMacroMicroExchange(flux_connection): + """ + + + A simple first order diffusive water exchange between MacroPore and + matrix ( SoilLayer) + + + + .. math:: + + q = \\omega (W_{ma} - W_{mi,eff}) V_{soil} + + where: + :math:`\\omega` is the exchange rate in :math:`day^{-1}` + + :math:`W_{ma}` is the filled fraction of the macropore system [-] + + :math:`W_{mi,eff}` is the water filled pore space of the micropores above + the residual pF value [-], default 4.2 + + :math:`V_{soil} = A_{cell} d_{layer}` is the total volume of the soil layer + [ :math:`m^3`] + + The residual micropore pF is used to determine a residual water + content of the micropores. Residual in this case means, that above + this pF value, water is not draining to the macro pores, even if they + are empty. Although the default value is at wilting point, lower pF + values are much more sensible, and should be rather lower than field + capacity (pF=1.8 - 2.5). However, since this equation is rather + conceptual than physical, this value can only be estimated or + calibrated. + + cf. Simunek et al J. of Hydr. 2003 + + C++ includes: macropore.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + omega = _swig_property(_cmf_core.DiffusiveMacroMicroExchange_omega_get, _cmf_core.DiffusiveMacroMicroExchange_omega_set) + pFrmi = _swig_property(_cmf_core.DiffusiveMacroMicroExchange_pFrmi_get, _cmf_core.DiffusiveMacroMicroExchange_pFrmi_set) + + def __init__(self, *args, **kwargs): + """ + __init__(cmf::upslope::connections::DiffusiveMacroMicroExchange self, cmf::upslope::MacroPore::ptr left, cmf::upslope::SoilLayer::ptr right, real omega, real pFrmi=4.2) -> DiffusiveMacroMicroExchange + + DiffusiveMacroMicroExchange(cmf::upslope::MacroPore::ptr left, + cmf::upslope::SoilLayer::ptr right, real omega, real pFrmi=4.2) + """ + _cmf_core.DiffusiveMacroMicroExchange_swiginit(self, _cmf_core.new_DiffusiveMacroMicroExchange(*args, **kwargs)) + __swig_destroy__ = _cmf_core.delete_DiffusiveMacroMicroExchange +DiffusiveMacroMicroExchange_swigregister = _cmf_core.DiffusiveMacroMicroExchange_swigregister +DiffusiveMacroMicroExchange_swigregister(DiffusiveMacroMicroExchange) + +class MACROlikeMacroMicroExchange(flux_connection): + """ + + + This connection models the water exchange between macropores and + micropores as in the MACRO Model (Larsbo & Jarvis, 2003), which + follows Gerke & van Genuchten 1996. + + WARNING: Deprecated This connection uses the diffusivity of a soil + given by its retention curve. Since no retention curve provides a + valid value for Diffusivity in case of saturation this connection will + blow up the numerical solution for sure. + + The exchange between Macropore and matrix is defined as follows: + (MACRO 5 Tech report, Larsbo & Jarvis 2003) + + + + .. math:: + + q = \\frac{G_f D_w \\gamma_w}{d^2}(\\theta_b - + \\theta_{mi}) V_{layer} + + where: :math:`G_f` is the geometry factor. + Use 3 for a rectangular slab geometry + + :math:`gamma_w` A scaling factor to fit analytical and numerical solution + (0.4) + + :math:`d` is an effective diffusive path length related to aggregate size + and the influence of coatings on the aggregate surfaces in m + + :math:`\\theta_b` the saturated water content of the matrix + + :math:`\\theta_{mi}` the actual water content of the matrix + + :math:`D_w = \\frac12(D(\\theta_b)+D(\\theta_{mi})W_{ma})` is the + effective water diffusivity in m2/day, as defined below :math:`W_{ma}` is + the saturation of the macropores + + C++ includes: macropore.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + Gf = _swig_property(_cmf_core.MACROlikeMacroMicroExchange_Gf_get, _cmf_core.MACROlikeMacroMicroExchange_Gf_set) + gamma_w = _swig_property(_cmf_core.MACROlikeMacroMicroExchange_gamma_w_get, _cmf_core.MACROlikeMacroMicroExchange_gamma_w_set) + + def __init__(self, *args, **kwargs): + """ + __init__(cmf::upslope::connections::MACROlikeMacroMicroExchange self, cmf::upslope::SoilLayer::ptr left, cmf::upslope::MacroPore::ptr right, real _gamma_w=0.4, real _Gf=3) -> MACROlikeMacroMicroExchange + + MACROlikeMacroMicroExchange(cmf::upslope::SoilLayer::ptr left, + cmf::upslope::MacroPore::ptr right, real _gamma_w=0.4, real _Gf=3) + """ + _cmf_core.MACROlikeMacroMicroExchange_swiginit(self, _cmf_core.new_MACROlikeMacroMicroExchange(*args, **kwargs)) + __swig_destroy__ = _cmf_core.delete_MACROlikeMacroMicroExchange +MACROlikeMacroMicroExchange_swigregister = _cmf_core.MACROlikeMacroMicroExchange_swigregister +MACROlikeMacroMicroExchange_swigregister(MACROlikeMacroMicroExchange) + +class IVolumeHeightFunction(object): + """ + + + Volume height relations are functional objects, which return a height + and a crosssectional area of a volume for different geometric bodies. + + This is the abstract base class, where the geometries derive from + + C++ includes: ReachType.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def h(self, *args, **kwargs): + """ + h(IVolumeHeightFunction self, double V) -> double + + virtual + double h(double V) const =0 + + Returns the depth of a given volume. + """ + return _cmf_core.IVolumeHeightFunction_h(self, *args, **kwargs) + + + def A(self, *args, **kwargs): + """ + A(IVolumeHeightFunction self, double V) -> double + + virtual + double A(double V) const =0 + + Returns the area of the surface for a given volume. + """ + return _cmf_core.IVolumeHeightFunction_A(self, *args, **kwargs) + + + def V(self, *args, **kwargs): + """ + V(IVolumeHeightFunction self, double h) -> double + + virtual + double V(double h) const =0 + """ + return _cmf_core.IVolumeHeightFunction_V(self, *args, **kwargs) + + + def copy(self, *args, **kwargs): + """ + copy(IVolumeHeightFunction self) -> IVolumeHeightFunction + + virtual IVolumeHeightFunction* copy() const =0 + """ + return _cmf_core.IVolumeHeightFunction_copy(self, *args, **kwargs) + + + def q(self, *args, **kwargs): + """ + q(IVolumeHeightFunction self, double h, double slope) -> double + + virtual + double q(double h, double slope) const + """ + return _cmf_core.IVolumeHeightFunction_q(self, *args, **kwargs) + + __swig_destroy__ = _cmf_core.delete_IVolumeHeightFunction +IVolumeHeightFunction.h = new_instancemethod(_cmf_core.IVolumeHeightFunction_h, None, IVolumeHeightFunction) +IVolumeHeightFunction.A = new_instancemethod(_cmf_core.IVolumeHeightFunction_A, None, IVolumeHeightFunction) +IVolumeHeightFunction.V = new_instancemethod(_cmf_core.IVolumeHeightFunction_V, None, IVolumeHeightFunction) +IVolumeHeightFunction.copy = new_instancemethod(_cmf_core.IVolumeHeightFunction_copy, None, IVolumeHeightFunction) +IVolumeHeightFunction.q = new_instancemethod(_cmf_core.IVolumeHeightFunction_q, None, IVolumeHeightFunction) +IVolumeHeightFunction_swigregister = _cmf_core.IVolumeHeightFunction_swigregister +IVolumeHeightFunction_swigregister(IVolumeHeightFunction) + +class Prism(IVolumeHeightFunction): + """ + + + the height of a volume in a Prism with a defined base area + + C++ includes: ReachType.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + Area = _swig_property(_cmf_core.Prism_Area_get, _cmf_core.Prism_Area_set) + RoughThickness = _swig_property(_cmf_core.Prism_RoughThickness_get, _cmf_core.Prism_RoughThickness_set) + + def __init__(self, *args, **kwargs): + """ + __init__(cmf::river::Prism self, double base_area, double thickness_of_rough_ground=0.01) -> Prism + + Prism(double + base_area, double thickness_of_rough_ground=0.01) + """ + _cmf_core.Prism_swiginit(self, _cmf_core.new_Prism(*args, **kwargs)) + + def copy(self, *args, **kwargs): + """ + copy(Prism self) -> Prism + + Prism* copy() const + + """ + return _cmf_core.Prism_copy(self, *args, **kwargs) + + __swig_destroy__ = _cmf_core.delete_Prism +Prism.copy = new_instancemethod(_cmf_core.Prism_copy, None, Prism) +Prism_swigregister = _cmf_core.Prism_swigregister +Prism_swigregister(Prism) + +class volume_height_function(IVolumeHeightFunction): + """ + + + A wrapper class for volume / height functional relations. + + C++ includes: ReachType.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + + def __init__(self, *args): + """ + __init__(cmf::river::volume_height_function self, volume_height_function for_copy) -> volume_height_function + __init__(cmf::river::volume_height_function self, IVolumeHeightFunction for_copy) -> volume_height_function + + volume_height_function(const IVolumeHeightFunction &for_copy) + + Wrapper for any IVolumeHeightFunction. + """ + _cmf_core.volume_height_function_swiginit(self, _cmf_core.new_volume_height_function(*args)) + + def copy(self, *args, **kwargs): + """ + copy(volume_height_function self) -> volume_height_function + + volume_height_function* copy() const + """ + return _cmf_core.volume_height_function_copy(self, *args, **kwargs) + + __swig_destroy__ = _cmf_core.delete_volume_height_function +volume_height_function.copy = new_instancemethod(_cmf_core.volume_height_function_copy, None, volume_height_function) +volume_height_function_swigregister = _cmf_core.volume_height_function_swigregister +volume_height_function_swigregister(volume_height_function) + +class IChannel(IVolumeHeightFunction): + """ + + + Structure for the description of structural parameters of a reach + Abstract base class for different IChannel geometries. + + C++ includes: ReachType.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def get_nManning(self, *args, **kwargs): + """ + get_nManning(IChannel self) -> double + + virtual + double get_nManning() const =0 + """ + return _cmf_core.IChannel_get_nManning(self, *args, **kwargs) + + + def set_nManning(self, *args, **kwargs): + """ + set_nManning(IChannel self, double val) + + virtual + void set_nManning(double val)=0 + """ + return _cmf_core.IChannel_set_nManning(self, *args, **kwargs) + + + def get_length(self, *args, **kwargs): + """ + get_length(IChannel self) -> double + + virtual + double get_length() const =0 + + Length of the reach. + """ + return _cmf_core.IChannel_get_length(self, *args, **kwargs) + + + def typecode(self, *args, **kwargs): + """ + typecode(IChannel self) -> char + + virtual char + typecode() const =0 + """ + return _cmf_core.IChannel_typecode(self, *args, **kwargs) + + + def get_channel_width(self, *args, **kwargs): + """ + get_channel_width(IChannel self, double depth) -> double + + virtual double get_channel_width(double depth) const =0 + + Calculates the flow width from a given actual depth [m] using the + actual IChannel geometry. + """ + return _cmf_core.IChannel_get_channel_width(self, *args, **kwargs) + + + def get_wetted_perimeter(self, *args, **kwargs): + """ + get_wetted_perimeter(IChannel self, double depth) -> double + + virtual double get_wetted_perimeter(double depth) const =0 + + Calculates the wetted perimeter from a given actual depth [m] using + the actual IChannel geometry. + """ + return _cmf_core.IChannel_get_wetted_perimeter(self, *args, **kwargs) + + + def get_depth(self, *args, **kwargs): + """ + get_depth(IChannel self, double area) -> double + + virtual + double get_depth(double area) const =0 + + Calculates the actual depth of the reach using the IChannel geometry. + + get_depth of the reach [m] + + Parameters: + ----------- + + area: Wetted area of a river cross section [m2], can be obtained by + V/l, where V is the stored volume and l is the reach length + """ + return _cmf_core.IChannel_get_depth(self, *args, **kwargs) + + + def get_flux_crossection(self, *args, **kwargs): + """ + get_flux_crossection(IChannel self, double depth) -> double + + virtual double get_flux_crossection(double depth) const =0 + + Calculates the wetted area from a given depth using the IChannel + geometry. + + In most cases use get_flux_crossection=V/l, where V is the stored + volume and l is the reach length Wetted area of a river cross section + [m2] + + Parameters: + ----------- + + depth: depth of the reach [m] + """ + return _cmf_core.IChannel_get_flux_crossection(self, *args, **kwargs) + + + def copy(self, *args, **kwargs): + """ + copy(IChannel self) -> IChannel + + virtual IChannel* + copy() const =0 + """ + return _cmf_core.IChannel_copy(self, *args, **kwargs) + + + def qManning(self, *args, **kwargs): + """ + qManning(IChannel self, double A, double slope) -> double + + virtual double + qManning(double A, double slope) const + + Calculates the flow rate from a given water volume in the reach + + + .. math:: + + q_{Manning}&=& A R^{\\frac 2 3} + \\sqrt{\\frac {\\Delta_z} n} \\\\ A &=& \\frac V l + \\mbox{, (Crosssectional area of the wetted crossection, Volume per + length)} \\\\ R &=& \\frac A {P(d)} \\\\ P(d) &=& \\mbox{ + the perimeter of the wetted crosssection, a function of reach depth} + \\\\ d(V) &=& \\mbox{ the depth of the reach a function of the + volume} \\\\ \\Delta_z &=& \\frac{z_{max} - z_{min}}{l} + \\mbox{ Slope of the reach} + + . + + Flow rate [m3/s] + + Parameters: + ----------- + + A: The area of the cross section [m2] + + slope: The slope of the reach [m/m] + """ + return _cmf_core.IChannel_qManning(self, *args, **kwargs) + + __swig_destroy__ = _cmf_core.delete_IChannel +IChannel.get_nManning = new_instancemethod(_cmf_core.IChannel_get_nManning, None, IChannel) +IChannel.set_nManning = new_instancemethod(_cmf_core.IChannel_set_nManning, None, IChannel) +IChannel.get_length = new_instancemethod(_cmf_core.IChannel_get_length, None, IChannel) +IChannel.typecode = new_instancemethod(_cmf_core.IChannel_typecode, None, IChannel) +IChannel.get_channel_width = new_instancemethod(_cmf_core.IChannel_get_channel_width, None, IChannel) +IChannel.get_wetted_perimeter = new_instancemethod(_cmf_core.IChannel_get_wetted_perimeter, None, IChannel) +IChannel.get_depth = new_instancemethod(_cmf_core.IChannel_get_depth, None, IChannel) +IChannel.get_flux_crossection = new_instancemethod(_cmf_core.IChannel_get_flux_crossection, None, IChannel) +IChannel.copy = new_instancemethod(_cmf_core.IChannel_copy, None, IChannel) +IChannel.qManning = new_instancemethod(_cmf_core.IChannel_qManning, None, IChannel) +IChannel_swigregister = _cmf_core.IChannel_swigregister +IChannel_swigregister(IChannel) + +class SWATReachType(IChannel): + """ + + + Structure for the description of structural parameters of a reach. + + Uses the SWAT IChannel geometry (see SWAT Theoretical Documentation, + Version 2005 (ch. 7:1.1), Neitsch et al. 2005), in this class + referenced as SWATtheoDoc. Differences to the SWAT geometry: The flood + plain is not plain, but has a small slope=0.5%, but has an infinite + width + + C++ includes: ReachType.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + BottomWidth = _swig_property(_cmf_core.SWATReachType_BottomWidth_get, _cmf_core.SWATReachType_BottomWidth_set) + ChannelDepth = _swig_property(_cmf_core.SWATReachType_ChannelDepth_get, _cmf_core.SWATReachType_ChannelDepth_set) + BankSlope = _swig_property(_cmf_core.SWATReachType_BankSlope_get, _cmf_core.SWATReachType_BankSlope_set) + FloodPlainSlope = _swig_property(_cmf_core.SWATReachType_FloodPlainSlope_get, _cmf_core.SWATReachType_FloodPlainSlope_set) + + def __init__(self, *args): + """ + __init__(cmf::river::SWATReachType self, SWATReachType copy) -> SWATReachType + __init__(cmf::river::SWATReachType self, double l) -> SWATReachType + __init__(cmf::river::SWATReachType self, double l, double BankWidth, double Depth) -> SWATReachType + + SWATReachType(double l, double BankWidth, double Depth) + + Creates a new reach structure from a give width and depth. + + Parameters: + ----------- + + l: length of the channel [m] + + BankWidth: get_channel_width of the reach from bank to bank [m] + + Depth: Depth of the reach [m] + """ + _cmf_core.SWATReachType_swiginit(self, _cmf_core.new_SWATReachType(*args)) + + def copy(self, *args, **kwargs): + """ + copy(SWATReachType self) -> SWATReachType + + SWATReachType* copy() const + """ + return _cmf_core.SWATReachType_copy(self, *args, **kwargs) + + __swig_destroy__ = _cmf_core.delete_SWATReachType +SWATReachType.copy = new_instancemethod(_cmf_core.SWATReachType_copy, None, SWATReachType) +SWATReachType_swigregister = _cmf_core.SWATReachType_swigregister +SWATReachType_swigregister(SWATReachType) + +class TriangularReach(IChannel): + """ + + + Structure for the description of reaches with a triangular cross + section. + + Although double triangular cross section reach are rarely met, a + triangular reach does scale with its water load, and is therefore + preferable in case where nothing about IChannel geometry is known + + C++ includes: ReachType.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + BankSlope = _swig_property(_cmf_core.TriangularReach_BankSlope_get, _cmf_core.TriangularReach_BankSlope_set) + + def __init__(self, *args): + """ + __init__(cmf::river::TriangularReach self, double l, double bankSlope=2) -> TriangularReach + __init__(cmf::river::TriangularReach self, TriangularReach copy) -> TriangularReach + + TriangularReach(const TriangularReach ©) + """ + _cmf_core.TriangularReach_swiginit(self, _cmf_core.new_TriangularReach(*args)) + + def copy(self, *args, **kwargs): + """ + copy(TriangularReach self) -> TriangularReach + + TriangularReach* copy() const + """ + return _cmf_core.TriangularReach_copy(self, *args, **kwargs) + + __swig_destroy__ = _cmf_core.delete_TriangularReach +TriangularReach.copy = new_instancemethod(_cmf_core.TriangularReach_copy, None, TriangularReach) +TriangularReach_swigregister = _cmf_core.TriangularReach_swigregister +TriangularReach_swigregister(TriangularReach) + +class RectangularReach(IChannel): + """ + + + Describes a IChannel with a rectangular crosssection. + + C++ includes: ReachType.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + + def __init__(self, *args): + """ + __init__(cmf::river::RectangularReach self, double l, double width) -> RectangularReach + __init__(cmf::river::RectangularReach self, RectangularReach copy) -> RectangularReach + + RectangularReach(const RectangularReach ©) + """ + _cmf_core.RectangularReach_swiginit(self, _cmf_core.new_RectangularReach(*args)) + + def copy(self, *args, **kwargs): + """ + copy(RectangularReach self) -> RectangularReach + + RectangularReach* copy() const + """ + return _cmf_core.RectangularReach_copy(self, *args, **kwargs) + + __swig_destroy__ = _cmf_core.delete_RectangularReach +RectangularReach.copy = new_instancemethod(_cmf_core.RectangularReach_copy, None, RectangularReach) +RectangularReach_swigregister = _cmf_core.RectangularReach_swigregister +RectangularReach_swigregister(RectangularReach) + +class PipeReach(IChannel): + """ + + + Describes the geometry of a closed pipe. + + C++ includes: ReachType.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + radius = _swig_property(_cmf_core.PipeReach_radius_get, _cmf_core.PipeReach_radius_set) + + def __init__(self, *args): + """ + __init__(cmf::river::PipeReach self, double l, double diameter) -> PipeReach + __init__(cmf::river::PipeReach self, PipeReach copy) -> PipeReach + + PipeReach(const PipeReach ©) + """ + _cmf_core.PipeReach_swiginit(self, _cmf_core.new_PipeReach(*args)) + + def copy(self, *args, **kwargs): + """ + copy(PipeReach self) -> PipeReach + + PipeReach* copy() + const + """ + return _cmf_core.PipeReach_copy(self, *args, **kwargs) + + __swig_destroy__ = _cmf_core.delete_PipeReach +PipeReach.copy = new_instancemethod(_cmf_core.PipeReach_copy, None, PipeReach) +PipeReach_swigregister = _cmf_core.PipeReach_swigregister +PipeReach_swigregister(PipeReach) + +class Channel(IChannel): + """ + + + A wrapper for channel geometries. + + C++ includes: ReachType.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + + def __init__(self, *args): + """ + __init__(cmf::river::Channel self) -> Channel + __init__(cmf::river::Channel self, double length) -> Channel + __init__(cmf::river::Channel self, IChannel for_wrapping) -> Channel + __init__(cmf::river::Channel self, IVolumeHeightFunction for_casting) -> Channel + __init__(cmf::river::Channel self, Channel for_copy) -> Channel + __init__(cmf::river::Channel self, char typecode, double length, double width=1., double depth=0.25) -> Channel + + Channel(char + typecode, double length, double width=1., double depth=0.25) + + Creates a reachtype using a short cut character. + + Acceptes one of the following characters: 'T' TriangularReach, width + and depth are ignored. + + 'R' RectangularReach, depth is ignored + + 'P' PipeReach, depth is ignored, width is the diameter of the pipe + + 'S' SWATReachType, a trapezoid flow cross section, as used in the SWAT + model, width (bank width) and depth are used the reach type + + Parameters: + ----------- + + typecode: Describes the geometry of the reach cross section. + + length: The length of the channel in m + + width: width of the reach cross section in m (ignored for typecode + 'T') + + depth: depth of the reach (ignored for typecode 'T','R','P','S') + """ + _cmf_core.Channel_swiginit(self, _cmf_core.new_Channel(*args)) + + def copy(self, *args, **kwargs): + """ + copy(Channel self) -> Channel + + Channel* copy() + const + """ + return _cmf_core.Channel_copy(self, *args, **kwargs) + + __swig_destroy__ = _cmf_core.delete_Channel +Channel.copy = new_instancemethod(_cmf_core.Channel_copy, None, Channel) +Channel_swigregister = _cmf_core.Channel_swigregister +Channel_swigregister(Channel) + +class MeanChannel(IChannel): + """ + + + A combination of two channel geometries. + + C++ includes: ReachType.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + + def __init__(self, *args): + """ + __init__(cmf::river::MeanChannel self, IChannel channel1, IChannel channel2) -> MeanChannel + __init__(cmf::river::MeanChannel self, MeanChannel meanChannel) -> MeanChannel + + MeanChannel(const MeanChannel &meanChannel) + """ + _cmf_core.MeanChannel_swiginit(self, _cmf_core.new_MeanChannel(*args)) + + def copy(self, *args, **kwargs): + """ + copy(MeanChannel self) -> MeanChannel + + MeanChannel* + copy() const + """ + return _cmf_core.MeanChannel_copy(self, *args, **kwargs) + + __swig_destroy__ = _cmf_core.delete_MeanChannel +MeanChannel.copy = new_instancemethod(_cmf_core.MeanChannel_copy, None, MeanChannel) +MeanChannel_swigregister = _cmf_core.MeanChannel_swigregister +MeanChannel_swigregister(MeanChannel) + +class OpenWaterStorage(WaterStorage): + """ + + + An open water body. + + The potential is calculated from the stored water using a water table + function + + C++ includes: OpenWaterStorage.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined") + __repr__ = _swig_repr + + def get_height_function(self, *args, **kwargs): + """ + get_height_function(OpenWaterStorage self) -> IVolumeHeightFunction + + virtual const + IVolumeHeightFunction& get_height_function() const + + The functional relation between volume, depth and exposed area. + """ + return _cmf_core.OpenWaterStorage_get_height_function(self, *args, **kwargs) + + + def set_height_function(self, *args, **kwargs): + """ + set_height_function(OpenWaterStorage self, IVolumeHeightFunction val) + + virtual void + set_height_function(const IVolumeHeightFunction &val) + """ + return _cmf_core.OpenWaterStorage_set_height_function(self, *args, **kwargs) + + + def wet_area(self, *args, **kwargs): + """ + wet_area(OpenWaterStorage self) -> real + + real + wet_area() const + + Returns the exposed surface area in m2. + """ + return _cmf_core.OpenWaterStorage_wet_area(self, *args, **kwargs) + + + def create(*args): + """ + create(project _project, real Area) -> cmf::river::OpenWaterStorage::ptr + create(project _project, IVolumeHeightFunction base_geo) -> cmf::river::OpenWaterStorage::ptr + """ + return _cmf_core.OpenWaterStorage_create(*args) + + create = staticmethod(create) + + def cast(*args, **kwargs): + """cast(cmf::water::flux_node::ptr node) -> cmf::river::OpenWaterStorage::ptr""" + return _cmf_core.OpenWaterStorage_cast(*args, **kwargs) + + cast = staticmethod(cast) + depth = _swig_property(_cmf_core.OpenWaterStorage_depth_get, _cmf_core.OpenWaterStorage_depth_set) + + def __repr__(self): + return self.to_string() + + __swig_destroy__ = _cmf_core.delete_OpenWaterStorage +OpenWaterStorage.get_height_function = new_instancemethod(_cmf_core.OpenWaterStorage_get_height_function, None, OpenWaterStorage) +OpenWaterStorage.set_height_function = new_instancemethod(_cmf_core.OpenWaterStorage_set_height_function, None, OpenWaterStorage) +OpenWaterStorage.wet_area = new_instancemethod(_cmf_core.OpenWaterStorage_wet_area, None, OpenWaterStorage) +OpenWaterStorage_swigregister = _cmf_core.OpenWaterStorage_swigregister +OpenWaterStorage_swigregister(OpenWaterStorage) + +def OpenWaterStorage_create(*args): + """ + create(project _project, real Area) -> cmf::river::OpenWaterStorage::ptr + OpenWaterStorage_create(project _project, IVolumeHeightFunction base_geo) -> cmf::river::OpenWaterStorage::ptr + """ + return _cmf_core.OpenWaterStorage_create(*args) + +def OpenWaterStorage_cast(*args, **kwargs): + """OpenWaterStorage_cast(cmf::water::flux_node::ptr node) -> cmf::river::OpenWaterStorage::ptr""" + return _cmf_core.OpenWaterStorage_cast(*args, **kwargs) + +class Reach(OpenWaterStorage): + """ + + + A reach represents the section of a riover and is a specialization of + an open water storage. + + The OpenWaterStorage attributes and methods are extended by + topological features, for the creation of a network of reaches. + + C++ includes: Reach.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined") + __repr__ = _swig_repr + + def get_reachtype(self, *args, **kwargs): + """ + get_reachtype(Reach self) -> Channel + + Channel + get_reachtype() const + + Returns the channel shape. + """ + return _cmf_core.Reach_get_reachtype(self, *args, **kwargs) + + + def set_height_function(self, *args, **kwargs): + """ + set_height_function(Reach self, IChannel val) + + void + set_height_function(const IChannel &val) + + Sets the channel shape. + """ + return _cmf_core.Reach_set_height_function(self, *args, **kwargs) + + + def set_outlet(self, *args, **kwargs): + """ + set_outlet(Reach self, cmf::water::flux_node::ptr outlet) + + void + set_outlet(cmf::water::flux_node::ptr outlet) + + Connects the reach to an outlet, e.g. a boundary condition. + """ + return _cmf_core.Reach_set_outlet(self, *args, **kwargs) + + + def set_dead_end(self, *args, **kwargs): + """ + set_dead_end(Reach self) + + void + set_dead_end() + + Deletes any downstream connection. + """ + return _cmf_core.Reach_set_dead_end(self, *args, **kwargs) + + + def set_downstream(self, *args, **kwargs): + """ + set_downstream(Reach self, cmf::river::Reach::ptr new_downstream, bool use_meanchannel=False) + + void + set_downstream(ptr new_downstream, bool use_meanchannel=false) + + Connects the reach to another one downstream. + """ + return _cmf_core.Reach_set_downstream(self, *args, **kwargs) + + + def __get_downstream(self, *args, **kwargs): + """ + __get_downstream(Reach self) -> cmf::water::flux_node::ptr + + cmf::water::flux_node::ptr get_downstream() const + + Returns the reach downstream of this (or null if there is no reach + downstream) + """ + return _cmf_core.Reach___get_downstream(self, *args, **kwargs) + + + def get_upstream(self, *args, **kwargs): + """ + get_upstream(Reach self, int index) -> cmf::river::Reach::ptr + + ptr + get_upstream(int index) const + + Returns a reach upstream of this. + """ + return _cmf_core.Reach_get_upstream(self, *args, **kwargs) + + + def connect_to_surfacewater(self, *args, **kwargs): + """ + connect_to_surfacewater(Reach self, Cell cell, real width, bool diffusive) + + void connect_to_surfacewater(cmf::upslope::Cell *cell, real width, + bool diffusive) + + Connects the surfacewater of a cell with this reach. + + Parameters: + ----------- + + cell: The cell with the surface water to be connected with this reach + + width: The flow width from cell to this reach + + diffusive: If diffusive is false, a ManningKinematic connection is + used, else a ManningDiffusive connection + """ + return _cmf_core.Reach_connect_to_surfacewater(self, *args, **kwargs) + + + def distance_to_cell(self, *args, **kwargs): + """ + distance_to_cell(Reach self, Cell cell) -> double + + double + distance_to_cell(cmf::upslope::Cell *cell) const + + Returns the distance (d) for connections between this reach and a + cell. + + If the effective inner cell distance (defined as :math:`R_{Cell} = 0.5\\frac{\\sqrt{A}}{\\pi}`) is smaller than the distance + between the center points, the cell radius is returned + """ + return _cmf_core.Reach_distance_to_cell(self, *args, **kwargs) + + + def __get_root(self, *args, **kwargs): + """ + __get_root(Reach self) -> cmf::river::Reach::ptr + + ptr get_root() + + Returns the reach most downstream from this reach. + """ + return _cmf_core.Reach___get_root(self, *args, **kwargs) + + __swig_destroy__ = _cmf_core.delete_Reach + + def create(*args, **kwargs): + """create(project project, IChannel shape, bool diffusive=False) -> cmf::river::Reach::ptr""" + return _cmf_core.Reach_create(*args, **kwargs) + + create = staticmethod(create) + length = _swig_property(_cmf_core.Reach_length_get) + width = _swig_property(_cmf_core.Reach_width_get) + channel = _swig_property(_cmf_core.Reach_channel_get) + + downstream = _swig_property(_cmf_core.Reach___get_downstream) + + + root = _swig_property(_cmf_core.Reach___get_root) + + upstream_count = _swig_property(_cmf_core.Reach_upstream_count_get) + diffusive = _swig_property(_cmf_core.Reach_diffusive_get, _cmf_core.Reach_diffusive_set) + + @property + def upstream(self): + """Returns a list containing all reaches flowing into self""" + return [self.get_upstream(i) for i in range(self.upstream_count)] + def __hash__(self): + return hash(self.water.node_id) + def connect_to_cell(self,cell,width,subsurface_connection_type=None,subsurface_connection_depth=None,diffusive=None): + """ Connects a cell with this reach using Manning's equation for surface runoff and + a given connection for subsurface interflow + - width : Boundary width in m + - subsurface_connection_type : Any lateral flow connection type + - subsurface_connection_depth : The depth below ground of the deepest layer to be connected by subsurface_connection_type, + default (None) = cell.z - reach.position.z + - diffusive: Determines if a kinematic or diffusive wave is to be used for surface runoff + """ + assert(subsurface_connection_type is None or issubclass(subsurface_connection_type, lateral_sub_surface_flux)) + if diffusive is None: + diffusive = self.diffusive + if subsurface_connection_depth is None: + subsurface_connection_depth = cell.z - self.position.z + self.connect_to_surfacewater(cell,width,diffusive) + r_depth = cell.z - self.position.z + distance = self.distance_to_cell(cell) + connections=[self.connection_to(cell.surfacewater)] + if subsurface_connection_type: + cell.connect_soil_with_node(self,subsurface_connection_type,width,distance,0,subsurface_connection_depth) + connections.extend(self.connection_to(l) for l in cell.layers) + return connections + + + def __repr__(self): + return self.to_string() + +Reach.get_reachtype = new_instancemethod(_cmf_core.Reach_get_reachtype, None, Reach) +Reach.set_height_function = new_instancemethod(_cmf_core.Reach_set_height_function, None, Reach) +Reach.set_outlet = new_instancemethod(_cmf_core.Reach_set_outlet, None, Reach) +Reach.set_dead_end = new_instancemethod(_cmf_core.Reach_set_dead_end, None, Reach) +Reach.set_downstream = new_instancemethod(_cmf_core.Reach_set_downstream, None, Reach) +Reach.__get_downstream = new_instancemethod(_cmf_core.Reach___get_downstream, None, Reach) +Reach.get_upstream = new_instancemethod(_cmf_core.Reach_get_upstream, None, Reach) +Reach.connect_to_surfacewater = new_instancemethod(_cmf_core.Reach_connect_to_surfacewater, None, Reach) +Reach.distance_to_cell = new_instancemethod(_cmf_core.Reach_distance_to_cell, None, Reach) +Reach.__get_root = new_instancemethod(_cmf_core.Reach___get_root, None, Reach) +Reach_swigregister = _cmf_core.Reach_swigregister +Reach_swigregister(Reach) + +def Reach_create(*args, **kwargs): + """Reach_create(project project, IChannel shape, bool diffusive=False) -> cmf::river::Reach::ptr""" + return _cmf_core.Reach_create(*args, **kwargs) + +class ReachIterator(object): + """ + + + An iterator over every upstream reach from a start reach. + + Implements both the Python and the C++ iterator interface Usage C++: + Usage Python: + + C++ includes: Reach.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + + def next(self, *args, **kwargs): + """ + next(ReachIterator self) -> cmf::river::Reach::ptr + + Reach::ptr + next() + + Returns the next reach in the upstream queue. + """ + return _cmf_core.ReachIterator_next(self, *args, **kwargs) + + + def valid(self, *args, **kwargs): + """ + valid(ReachIterator self) -> bool + + bool valid() + const + + Returns true, if reaches are left to iterate over. + """ + return _cmf_core.ReachIterator_valid(self, *args, **kwargs) + + + def __init__(self, *args, **kwargs): + """ + __init__(cmf::river::ReachIterator self, cmf::river::Reach::ptr first) -> ReachIterator + + ReachIterator(Reach::ptr first) + + Creates a ReachIterator from a first reach. + """ + _cmf_core.ReachIterator_swiginit(self, _cmf_core.new_ReachIterator(*args, **kwargs)) + + def __reach(self, *args, **kwargs): + """ + __reach(ReachIterator self) -> cmf::river::Reach::ptr + + Reach::ptr + reach() const + + Returns the current reach. + """ + return _cmf_core.ReachIterator___reach(self, *args, **kwargs) + + position = _swig_property(_cmf_core.ReachIterator_position_get) + + reach = _swig_property(_cmf_core.ReachIterator___reach) + + + def __iter__(self): + while self.valid(): + self.next() + yield (self.reach,self.position) + + __swig_destroy__ = _cmf_core.delete_ReachIterator +ReachIterator.next = new_instancemethod(_cmf_core.ReachIterator_next, None, ReachIterator) +ReachIterator.valid = new_instancemethod(_cmf_core.ReachIterator_valid, None, ReachIterator) +ReachIterator.__reach = new_instancemethod(_cmf_core.ReachIterator___reach, None, ReachIterator) +ReachIterator_swigregister = _cmf_core.ReachIterator_swigregister +ReachIterator_swigregister(ReachIterator) + + +def make_river_gap(*args, **kwargs): + """ + make_river_gap(cmf::river::Reach::ptr root_reach) -> double + + double + cmf::river::make_river_gap(Reach::ptr root_reach) + + Ensures that rivers have a monotone downward flow direction. + + Reaches with a bottom higher than any upstream reach are lowered to + the minimum height of any (possibly distant) upstream reach. + """ + return _cmf_core.make_river_gap(*args, **kwargs) +class SurfaceWater(OpenWaterStorage): + """ + + + A child class of OpenWaterStorage to model surface water on a cell. + + Specially created to connect a SurfaceWater with other nodes, is the + flux connection cmf::upslope::connections::KinematicSurfaceRunoff + + C++ includes: surfacewater.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined") + __repr__ = _swig_repr + + def get_height_function(self, *args, **kwargs): + """ + get_height_function(SurfaceWater self) -> Prism + + virtual const cmf::river::Prism& get_height_function() const + + Gets the height function (a cmf::river::Prism) for further reference. + + """ + return _cmf_core.SurfaceWater_get_height_function(self, *args, **kwargs) + + + def get_cell(self, *args, **kwargs): + """ + get_cell(SurfaceWater self) -> Cell + + Cell& + get_cell() const + + Get the cell of the surface. + """ + return _cmf_core.SurfaceWater_get_cell(self, *args, **kwargs) + + + def cast(*args, **kwargs): + """cast(cmf::water::flux_node::ptr node) -> cmf::upslope::SurfaceWater::ptr""" + return _cmf_core.SurfaceWater_cast(*args, **kwargs) + + cast = staticmethod(cast) + puddledepth = _swig_property(_cmf_core.SurfaceWater_puddledepth_get, _cmf_core.SurfaceWater_puddledepth_set) + nManning = _swig_property(_cmf_core.SurfaceWater_nManning_get, _cmf_core.SurfaceWater_nManning_set) + + def __repr__(self): + return self.to_string() + + __swig_destroy__ = _cmf_core.delete_SurfaceWater +SurfaceWater.get_height_function = new_instancemethod(_cmf_core.SurfaceWater_get_height_function, None, SurfaceWater) +SurfaceWater.get_cell = new_instancemethod(_cmf_core.SurfaceWater_get_cell, None, SurfaceWater) +SurfaceWater_swigregister = _cmf_core.SurfaceWater_swigregister +SurfaceWater_swigregister(SurfaceWater) + +def SurfaceWater_cast(*args, **kwargs): + """SurfaceWater_cast(cmf::water::flux_node::ptr node) -> cmf::upslope::SurfaceWater::ptr""" + return _cmf_core.SurfaceWater_cast(*args, **kwargs) + +class KinematicSurfaceRunoff(flux_connection): + """ + + + A connection to route water from a SurfaceWater storage to another + node following a topographic gradient. + + + + .. math:: + + q_{runoff} = A_{cross} d_{eff}^{2/3} + \\frac{\\sqrt{S}}{n} + + where: :math:`q_{runoff}` is the surface + runoff + + :math:`A_{cross}` is the wetted crossectional flux area, given as :math:`d_{eff} \\cdot w` + + :math:`w` is the width of the shared boundary between the surface water + storage and the target node + + :math:`d_{eff}` is the effective flow depth of the surface water.The + effective flow depth is defined as + + .. math:: + + d_{eff} = \\begin{cases} + V/A-d_{puddle}\\ & V/A>d_{puddle} \\\\ 0.0 & V/A<=d_{puddle} + \\end{cases} + + :math:`V` the volume of stored water in the surface in :math:`m^3` + + :math:`A` the area of the cell in :math:`m^2` + + :math:`d_{puddle}=V_{puddle}/A` the average depth of water in the surface + water needed to start run off + + :math:`S = \\|\\frac{\\Delta z\\|}{d}` the slope between + surfacewater center and the target node + + :math:`n` the manning roughness + + The KinematicSurfaceRunoff can be used as a cell connecting flux as + in: This results in a connection of the surfacewater storage of each + cell with the surface water storages of its neighborssee + + C++ includes: surfacewater.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + + def __init__(self, *args, **kwargs): + """ + __init__(cmf::upslope::connections::KinematicSurfaceRunoff self, cmf::upslope::SurfaceWater::ptr left, cmf::water::flux_node::ptr right, real flowwidth, real distance=-1) -> KinematicSurfaceRunoff + + KinematicSurfaceRunoff(cmf::upslope::SurfaceWater::ptr left, + cmf::water::flux_node::ptr right, real flowwidth, real distance=-1) + + Creates a KinematicSurfaceRunoff between a SurfaceWater (left) with + another (right) node. + + Parameters: + ----------- + + left: A surfacewater storage + + right: The target node + + flowwidth: the length of the shared boundary between left and right + in m + + distance: the distance between left and right in m. If d<=0m, the + distance is calculated according to the position of left and right + """ + _cmf_core.KinematicSurfaceRunoff_swiginit(self, _cmf_core.new_KinematicSurfaceRunoff(*args, **kwargs)) + __swig_destroy__ = _cmf_core.delete_KinematicSurfaceRunoff +KinematicSurfaceRunoff_swigregister = _cmf_core.KinematicSurfaceRunoff_swigregister +KinematicSurfaceRunoff_swigregister(KinematicSurfaceRunoff) +KinematicSurfaceRunoff.cell_connector = _cmf_core.cvar.KinematicSurfaceRunoff_cell_connector + +class DiffusiveSurfaceRunoff(flux_connection): + """ + + + A connection to route water from a SurfaceWater storage to another + node following the gradient of the water level. + + + + .. math:: + + q_{runoff} = A_{cross} d_{eff}^{2/3} + \\frac{\\sqrt{S}}{n} + + where: :math:`q_{runoff}` is the surface + runoff + + :math:`A_{cross}` is the wetted crossectional flux area, given as :math:`d_{eff} \\cdot w` + + :math:`w` is the width of the shared boundary between the surface water + storage and the target node + + :math:`d_{eff}` is the effective flow depth of the surface water.The + effective flow depth is defined as either the mean of the effective + depth of the left and the right node (when use_depthmax=false) or the + maximum of the efficitve depth. The effective depth for a surfacewater + is always defined as: + + .. math:: + + d_{eff} = \\begin{cases} + V/A-d_{puddle}\\ & V/A>d_{puddle} \\\\ 0.0 & V/A<=d_{puddle} + \\end{cases} + + The right node might be not a surfacewater. If the + right node is an OpenWaterStorage, then the effective depth is the + depth of the OWS above the cell height of the left surfacewater, given + by: + + .. math:: + + d_{eff,ows} = \\Psi_{ows} - z_{cell} + + In case of + another node, the right node depth equals the effective depth of the + left node. + + :math:`V` the volume of stored water in the surface in :math:`m^3` + + :math:`A` the area of the cell in :math:`m^2` + + :math:`d_{puddle}=V_{puddle}/A` the average depth of water in the surface + water needed to start run off + + :math:`S = \\|\\frac{\\Delta h\\|}{d}` the slope between + surfacewater center potential and the target node potential + + :math:`n` the manning roughness + + The DiffusiveSurfaceRunoff can be used as a cell connecting flux as + in: This results in a connection of the surfacewater storage of each + cell with the surface water storages of its neighborssee + + C++ includes: surfacewater.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + + def set_linear_slope(*args, **kwargs): + """set_linear_slope(real width)""" + return _cmf_core.DiffusiveSurfaceRunoff_set_linear_slope(*args, **kwargs) + + set_linear_slope = staticmethod(set_linear_slope) + + def get_linear_slope(*args, **kwargs): + """get_linear_slope() -> real""" + return _cmf_core.DiffusiveSurfaceRunoff_get_linear_slope(*args, **kwargs) + + get_linear_slope = staticmethod(get_linear_slope) + + def __init__(self, *args, **kwargs): + """ + __init__(cmf::upslope::connections::DiffusiveSurfaceRunoff self, cmf::upslope::SurfaceWater::ptr left, cmf::water::flux_node::ptr right, real flowwidth, real distance=-1) -> DiffusiveSurfaceRunoff + + DiffusiveSurfaceRunoff(cmf::upslope::SurfaceWater::ptr left, + cmf::water::flux_node::ptr right, real flowwidth, real distance=-1) + """ + _cmf_core.DiffusiveSurfaceRunoff_swiginit(self, _cmf_core.new_DiffusiveSurfaceRunoff(*args, **kwargs)) + __swig_destroy__ = _cmf_core.delete_DiffusiveSurfaceRunoff +DiffusiveSurfaceRunoff_swigregister = _cmf_core.DiffusiveSurfaceRunoff_swigregister +DiffusiveSurfaceRunoff_swigregister(DiffusiveSurfaceRunoff) + +def DiffusiveSurfaceRunoff_set_linear_slope(*args, **kwargs): + """DiffusiveSurfaceRunoff_set_linear_slope(real width)""" + return _cmf_core.DiffusiveSurfaceRunoff_set_linear_slope(*args, **kwargs) + +def DiffusiveSurfaceRunoff_get_linear_slope(*args): + """DiffusiveSurfaceRunoff_get_linear_slope() -> real""" + return _cmf_core.DiffusiveSurfaceRunoff_get_linear_slope(*args) +DiffusiveSurfaceRunoff.cell_connector = _cmf_core.cvar.DiffusiveSurfaceRunoff_cell_connector + +class aquifer(WaterStorage): + """ + + + A class to represent large groundwater storages, not bounded to the + usual horizontal discretization scheme, the Cell. + + Naturally aquifers are connected with aquifer_Darcy or kinematic_wave + connections. As a boundary condition for a cell based soil water + system, aquifers are used as a right hand side node of percolation + connections. + + Basic head ( :math:`\\Psi`) / volume ( :math:`V`) relation: + + .. math:: + + \\Psi = + z_{base} + \\frac {V}{A \\Phi} + + :math:`\\Psi` water head in m + + :math:`z_{base}` base height of the aquifer + + :math:`V` volume of stored water in m3 + + :math:`A` Base area of the aquifer in m2 + + :math:`\\Phi` Porosity, or more general, :math:`\\frac{dV_{bulk}}{dV_{H_2O}}` + + C++ includes: groundwater.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + area = _swig_property(_cmf_core.aquifer_area_get, _cmf_core.aquifer_area_set) + thickness = _swig_property(_cmf_core.aquifer_thickness_get, _cmf_core.aquifer_thickness_set) + porosity = _swig_property(_cmf_core.aquifer_porosity_get, _cmf_core.aquifer_porosity_set) + K = _swig_property(_cmf_core.aquifer_K_get, _cmf_core.aquifer_K_set) + + def get_K(self, *args, **kwargs): + """ + get_K(aquifer self, point direction) -> real + + virtual real + get_K(cmf::geometry::point direction) const + + Returns the conductivity in m/day for a specific direction. + + Takes account for anisotropy + + .. math:: + + \\|K\\|(d) = + \\frac{d}{\\|d\\|} \\bullet K + + + """ + return _cmf_core.aquifer_get_K(self, *args, **kwargs) + + + def get_abs_errtol(self, *args, **kwargs): + """ + get_abs_errtol(aquifer self, real rel_errtol) -> real + + virtual + real get_abs_errtol(real rel_errtol) const + """ + return _cmf_core.aquifer_get_abs_errtol(self, *args, **kwargs) + + + def __init__(self, *args): + """ + __init__(cmf::upslope::aquifer self, project p, point position, real area, real thickness, real porosity, real K=1e-4) -> aquifer + __init__(cmf::upslope::aquifer self, cell_vector cells, real thickness, real porosity, real K=1e-4) -> aquifer + + aquifer(cmf::upslope::cell_vector &cells, real thickness, real + porosity, real K=1e-4) + + Creates an aquifer below a collection of cells. + + Parameters: + ----------- + + cells: The cells above the aquifer. The area of the aquifer equals + the area of the cells, and the upper boundary equals the soildepth of + the lowest cell + + thickness: The thickness of the aquifer in m + + porosity: Porosity of the aquifer + + K: Conductivity of the aquifer in m/day. If the conductivity should + be anisotropic, change the x,y and z values of the member K + """ + _cmf_core.aquifer_swiginit(self, _cmf_core.new_aquifer(*args)) + + def cast(*args, **kwargs): + """cast(cmf::water::flux_node::ptr for_cast) -> cmf::upslope::aquifer::ptr""" + return _cmf_core.aquifer_cast(*args, **kwargs) + + cast = staticmethod(cast) + base_height = _swig_property(_cmf_core.aquifer_base_height_get) + top_height = _swig_property(_cmf_core.aquifer_top_height_get) + + def __repr__(self): + return self.to_string() + + __swig_destroy__ = _cmf_core.delete_aquifer +aquifer.get_K = new_instancemethod(_cmf_core.aquifer_get_K, None, aquifer) +aquifer.get_abs_errtol = new_instancemethod(_cmf_core.aquifer_get_abs_errtol, None, aquifer) +aquifer_swigregister = _cmf_core.aquifer_swigregister +aquifer_swigregister(aquifer) + +def aquifer_cast(*args, **kwargs): + """aquifer_cast(cmf::water::flux_node::ptr for_cast) -> cmf::upslope::aquifer::ptr""" + return _cmf_core.aquifer_cast(*args, **kwargs) + +class aquifer_Darcy(flux_connection): + """ + + + Lateral darcy flow between aquifer objects. + + + + .. math:: + + v_{Darcy}=K_{1,2}\\nabla\\Psi + + + + .. math:: + + q = v_{Darcy} w + \\Delta z + + C++ includes: groundwater.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + flux_width = _swig_property(_cmf_core.aquifer_Darcy_flux_width_get, _cmf_core.aquifer_Darcy_flux_width_set) + + def __init__(self, *args, **kwargs): + """ + __init__(cmf::upslope::aquifer_Darcy self, cmf::upslope::aquifer::ptr left, cmf::water::flux_node::ptr right, real width) -> aquifer_Darcy + + aquifer_Darcy(aquifer::ptr left, cmf::water::flux_node::ptr right, + real width) + + Creates a new Darcy flow connection between two aquifers, or an + aquifer and another node acting as Dirichlet boundary condition. + + Parameters: + ----------- + + left: One aquifer + + right: Another aquifer, or a flux node that can be interpreted as an + Dirichlet boundary + + width: Width of the connection + """ + _cmf_core.aquifer_Darcy_swiginit(self, _cmf_core.new_aquifer_Darcy(*args, **kwargs)) + __swig_destroy__ = _cmf_core.delete_aquifer_Darcy +aquifer_Darcy_swigregister = _cmf_core.aquifer_Darcy_swigregister +aquifer_Darcy_swigregister(aquifer_Darcy) + +class lateral_sub_surface_flux(flux_connection): + """ + + + An abstract base class for lateral subsurface fluxes. + + C++ includes: subsurfacefluxes.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + __swig_destroy__ = _cmf_core.delete_lateral_sub_surface_flux +lateral_sub_surface_flux_swigregister = _cmf_core.lateral_sub_surface_flux_swigregister +lateral_sub_surface_flux_swigregister(lateral_sub_surface_flux) + +class Darcy(lateral_sub_surface_flux): + """ + + + Calculates the lateral flow using the gravitational potential gradient + only. + + + + .. math:: + + q_{lat} = \\frac{\\Delta \\Psi_G}{\\|C_1-C_2\\|} + \\frac 12 (T(C_1)+T(C_2)) w + + where :math:`\\Delta \\Psi_G` is + the gravitational potential difference + + :math:`\\|C_1-C_2\\|` is the distance from Cell 1 to Cell 2 + + :math:`T(C)` is the transmissivity of cell C, calculated by + SoilType::Transmissivity + + :math:`w` is the width of the connection of the cells + + C++ includes: subsurfacefluxes.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + + def __init__(self, *args, **kwargs): + """ + __init__(cmf::upslope::connections::Darcy self, cmf::upslope::SoilLayer::ptr left, cmf::water::flux_node::ptr right, real FlowWidth, real Distance=0) -> Darcy + + Darcy(cmf::upslope::SoilLayer::ptr left, cmf::water::flux_node::ptr + right, real FlowWidth, real Distance=0) + """ + _cmf_core.Darcy_swiginit(self, _cmf_core.new_Darcy(*args, **kwargs)) + __swig_destroy__ = _cmf_core.delete_Darcy +Darcy_swigregister = _cmf_core.Darcy_swigregister +Darcy_swigregister(Darcy) +Darcy.cell_connector = _cmf_core.cvar.Darcy_cell_connector + +class TopographicGradientDarcy(lateral_sub_surface_flux): + """ + + + Calculates the lateral flow using the topographic gradient. + + + + .. math:: + + q_{lat} = \\frac{z_1 - z_2}{\\|C_1-C_2\\|} \\frac 12 + (T(C_1)+T(C_2)) w + + where :math:`z_1 - z_2` is the topographic height + difference + + :math:`\\|C_1-C_2\\|` is the distance from Cell 1 to Cell 2 + + :math:`T(C)` is the transmissivity of cell C, calculated by + SoilType::Transmissivity + + :math:`w` is the width of the connection of the cells + + C++ includes: subsurfacefluxes.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + + def __init__(self, *args, **kwargs): + """ + __init__(cmf::upslope::connections::TopographicGradientDarcy self, cmf::upslope::SoilLayer::ptr left, cmf::water::flux_node::ptr right, real FlowWidth, real Distance=0) -> TopographicGradientDarcy + + TopographicGradientDarcy(cmf::upslope::SoilLayer::ptr left, + cmf::water::flux_node::ptr right, real FlowWidth, real Distance=0) + + Creates the connection. + + Parameters: + ----------- + + left: Left node of the connection (needs to be soil water storage) + + right: Right node of the connection (can be any node) + + FlowWidth: the width of the connection - is multiplied by layer + thickness to get the interface area + + Distance: the length of the connection. If 0, the distance is + calculated from the position of the nodes + """ + _cmf_core.TopographicGradientDarcy_swiginit(self, _cmf_core.new_TopographicGradientDarcy(*args, **kwargs)) + __swig_destroy__ = _cmf_core.delete_TopographicGradientDarcy +TopographicGradientDarcy_swigregister = _cmf_core.TopographicGradientDarcy_swigregister +TopographicGradientDarcy_swigregister(TopographicGradientDarcy) +TopographicGradientDarcy.cell_connector = _cmf_core.cvar.TopographicGradientDarcy_cell_connector + +class DarcyKinematic(lateral_sub_surface_flux): + """ + + + A simple kinemtic wave model for subsurface flux. + + + + .. math:: + + q = \\frac{\\Delta z_{surface}}{d} K(\\theta)_{source} + A_{cross} + + C++ includes: subsurfacefluxes.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + + def __init__(self, *args, **kwargs): + """ + __init__(cmf::upslope::connections::DarcyKinematic self, cmf::upslope::SoilLayer::ptr left, cmf::water::flux_node::ptr right, real FlowWidth, real Distance=0) -> DarcyKinematic + + DarcyKinematic(cmf::upslope::SoilLayer::ptr left, + cmf::water::flux_node::ptr right, real FlowWidth, real Distance=0) + + Creates the connection. + + Parameters: + ----------- + + left: Left node of the connection (needs to be soil water storage) + + right: Right node of the connection (can be any node) + + FlowWidth: the width of the connection - is multiplied by layer + thickness to get the interface area + + Distance: the length of the connection. If 0, the distance is + calculated from the position of the nodes + """ + _cmf_core.DarcyKinematic_swiginit(self, _cmf_core.new_DarcyKinematic(*args, **kwargs)) + __swig_destroy__ = _cmf_core.delete_DarcyKinematic +DarcyKinematic_swigregister = _cmf_core.DarcyKinematic_swigregister +DarcyKinematic_swigregister(DarcyKinematic) +DarcyKinematic.cell_connector = _cmf_core.cvar.DarcyKinematic_cell_connector + +class Richards_lateral(lateral_sub_surface_flux): + """ + + + Calculates the flux using Richard's equation for adjacent layers + + .. math:: + + + q_{lat} = \\frac{\\Psi_1 - \\Psi_2}{\\|C_1-C_2\\|} + K(\\theta) A + + where: + + :math:`q_{lat}` the lateral flow in :math:`m^3/day` + + :math:`\\Psi_i` the head of node i + + :math:`\\|C_1-C_2\\|` is the distance from Cell 1 to Cell 2 + + :math:`K(\\theta_{1,2}) = \\sqrt{K(\\theta_1) K(\\theta_2)}` + + :math:`A` the crosssectional area of the interface between storages 1 and 2 + + C++ includes: subsurfacefluxes.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + flow_thickness = _swig_property(_cmf_core.Richards_lateral_flow_thickness_get, _cmf_core.Richards_lateral_flow_thickness_set) + wet_right_node = _swig_property(_cmf_core.Richards_lateral_wet_right_node_get, _cmf_core.Richards_lateral_wet_right_node_set) + + def __init__(self, *args, **kwargs): + """ + __init__(cmf::upslope::connections::Richards_lateral self, cmf::upslope::SoilLayer::ptr left, cmf::water::flux_node::ptr right, real FlowWidth=0, real Distance=0) -> Richards_lateral + + Richards_lateral(cmf::upslope::SoilLayer::ptr left, + cmf::water::flux_node::ptr right, real FlowWidth=0, real Distance=0) + + Creates the connection. + + Parameters: + ----------- + + left: Left node of the connection (needs to be soil water storage) + + right: Right node of the connection (can be any node) + + FlowWidth: the width of the connection - is multiplied by layer + thickness to get the interface area + + Distance: the length of the connection. If 0, the distance is + calculated from the position of the nodes + """ + _cmf_core.Richards_lateral_swiginit(self, _cmf_core.new_Richards_lateral(*args, **kwargs)) + + def usebaseflow(*args, **kwargs): + """usebaseflow(bool use)""" + return _cmf_core.Richards_lateral_usebaseflow(*args, **kwargs) + + usebaseflow = staticmethod(usebaseflow) + __swig_destroy__ = _cmf_core.delete_Richards_lateral +Richards_lateral_swigregister = _cmf_core.Richards_lateral_swigregister +Richards_lateral_swigregister(Richards_lateral) + +def Richards_lateral_usebaseflow(*args, **kwargs): + """Richards_lateral_usebaseflow(bool use)""" + return _cmf_core.Richards_lateral_usebaseflow(*args, **kwargs) +Richards_lateral.cell_connector = _cmf_core.cvar.Richards_lateral_cell_connector + +class TOPModelFlow(flux_connection): + """ + + + Calculates a flux from a soil layer using TOPMODELs (Beven & Kirkby + 1979) exponential transmissivity concept. + + + + .. math:: + + T = T_0 \\exp(-D_i/m) + + where: :math:`T` is the actual + transmissivity of the profile in :math:`m^2/day` + + :math:`T0` is the transmissivity of the profile at saturation + + :math:`D_i` is the drained depth in m, calculated as :math:`(C-V)/A`, the capacity + of the layer - volume per area + + :math:`m` a scaling factor in m + + By using the transmissivity in Darcy's law and assuming the GW + gradient to be parallel to the topographic slope we get for the flow: + + + .. math:: + + q = T_0 \\exp(-D_i/m) w s + + where: :math:`q` is the flux in + :math:`m^3/day` + + :math:`w` is the flow width (unit contour length) + + :math:`s` is the topographic slope between layer and outlet + + TOPMODEL is based on the concept of drained depth, not, as cmf on the + concept of stored volume. Hence, negative volumes can occur if + + C++ includes: subsurfacefluxes.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + flow_width = _swig_property(_cmf_core.TOPModelFlow_flow_width_get, _cmf_core.TOPModelFlow_flow_width_set) + distance = _swig_property(_cmf_core.TOPModelFlow_distance_get, _cmf_core.TOPModelFlow_distance_set) + T0 = _swig_property(_cmf_core.TOPModelFlow_T0_get, _cmf_core.TOPModelFlow_T0_set) + m = _swig_property(_cmf_core.TOPModelFlow_m_get, _cmf_core.TOPModelFlow_m_set) + + def __init__(self, *args, **kwargs): + """ + __init__(cmf::upslope::connections::TOPModelFlow self, cmf::upslope::SoilLayer::ptr left, cmf::water::flux_node::ptr right, real T0, real m, real flowwidth, real distance=0) -> TOPModelFlow + + TOPModelFlow(cmf::upslope::SoilLayer::ptr left, + cmf::water::flux_node::ptr right, real T0, real m, real flowwidth, + real distance=0) + """ + _cmf_core.TOPModelFlow_swiginit(self, _cmf_core.new_TOPModelFlow(*args, **kwargs)) + __swig_destroy__ = _cmf_core.delete_TOPModelFlow +TOPModelFlow_swigregister = _cmf_core.TOPModelFlow_swigregister +TOPModelFlow_swigregister(TOPModelFlow) + +class Manning(flux_connection): + """ + + + Calculates the flux between two open water bodies, using Manning's + equation. + + This is the base class for a kinematic wave approach (topography + driven) and a diffusive wave approach (water table driven). The only + difference between both approaches is the calculation of the flux + driving slope. For the model, one of ManningKinematic or + ManningDiffusive connection is selected + + .. math:: + + + q_{Manning}&=& A R^{\\frac 2 3} \\sqrt{\\frac {\\Delta_z} n} + \\\\ A &=& \\frac V l \\mbox{, (Crosssectional area of the + wetted crossection, Volume per length)} \\\\ R &=& \\frac A + {P(d)} \\\\ P(d) &=& \\mbox{ the perimeter of the wetted + crosssection, a function of reach depth} \\\\ d(V) &=& \\mbox{ + the depth of the reach, a function of the volume} \\\\ \\Delta_z + &=& \\frac{\\|z_1 - z_2\\|}{l} \\mbox{ Slope of the reach} + \\\\ n&=&\\mbox{Manning friction number} + + For + the kinematic wave the slope of the river bed is used as slope + :math:`\\Delta_z = \\frac{|z_1 - z_2\\|}{l}`, + + while for the diffusive wave the slope is calculated from the actual + water head. :math:`\\Delta_z = \\|\\frac{h_1 - h_2}{l}` + + C++ includes: ManningConnection.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + is_diffusive_wave = _swig_property(_cmf_core.Manning_is_diffusive_wave_get, _cmf_core.Manning_is_diffusive_wave_set) + flux_geometry = _swig_property(_cmf_core.Manning_flux_geometry_get, _cmf_core.Manning_flux_geometry_set) + __swig_destroy__ = _cmf_core.delete_Manning +Manning_swigregister = _cmf_core.Manning_swigregister +Manning_swigregister(Manning) + +class Manning_Diffusive(Manning): + """ + + + Connecting surface water bodies using a diffusive wave. + + This approach might not be numerical stable for deep water with small + gradient cmf for experimental reasons + + .. math:: + + + q_{Manning}&=& A R^{\\frac 2 3} \\sqrt{\\frac {\\Delta_z} n} + \\\\ A &=& \\frac V l \\mbox{, (Crosssectional area of the + wetted crossection, Volume per length)} \\\\ R &=& \\frac A + {P(d)} \\\\ P(d) &=& \\mbox{ the perimeter of the wetted + crosssection, a function of reach depth} \\\\ d(V) &=& \\mbox{ + the depth of the reach a function of the volume} \\\\ \\Delta_z + = \\|\\frac{h_1 - h_2}{l} \\mbox{ Slope of the reach + waterlevels} \\\\ n&=&\\mbox{Manning friction number} + + + + + C++ includes: ManningConnection.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + linear_slope_width = _swig_property(_cmf_core.Manning_Diffusive_linear_slope_width_get, _cmf_core.Manning_Diffusive_linear_slope_width_set) + + def __init__(self, *args, **kwargs): + """ + __init__(cmf::river::Manning_Diffusive self, cmf::river::OpenWaterStorage::ptr left, cmf::water::flux_node::ptr right, IChannel reachtype) -> Manning_Diffusive + + Manning_Diffusive(cmf::river::OpenWaterStorage::ptr left, + cmf::water::flux_node::ptr right, const cmf::river::IChannel + &reachtype) + + Creates a diffusive wave connection between to open water storages. + + Parameters: + ----------- + + left: right: The nodes to be connected by the diffusive wave. Left + needs to be an open water storage + + reachtype: The channel geometry + """ + _cmf_core.Manning_Diffusive_swiginit(self, _cmf_core.new_Manning_Diffusive(*args, **kwargs)) + __swig_destroy__ = _cmf_core.delete_Manning_Diffusive +Manning_Diffusive_swigregister = _cmf_core.Manning_Diffusive_swigregister +Manning_Diffusive_swigregister(Manning_Diffusive) +Manning_Diffusive.cell_connector = _cmf_core.cvar.Manning_Diffusive_cell_connector + +class Manning_Kinematic(Manning): + """ + + + Connecting surface water bodies using a kinematic wave. + + Note the fixed gradient :math:`\\Delta_z` + + .. math:: + + + q_{Manning}&=& A R^{\\frac 2 3} \\sqrt{\\frac {\\Delta_z} n} + \\\\ A &=& \\frac V l \\mbox{, (Crosssectional area of the + wetted crossection, Volume per length)} \\\\ R &=& \\frac A + {P(d)} \\\\ P(d) &=& \\mbox{ the perimeter of the wetted + crosssection, a function of reach depth} \\\\ d(V) &=& \\mbox{ + the depth of the reach a function of the volume} \\\\ \\Delta_z + &=& \\frac{\\|z_1 - z_2\\|}{l} \\mbox{ Slope of the reach} + \\\\ n&=&\\mbox{Manning friction number} + + + + C++ includes: ManningConnection.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + + def __init__(self, *args, **kwargs): + """ + __init__(cmf::river::Manning_Kinematic self, cmf::river::OpenWaterStorage::ptr left, cmf::water::flux_node::ptr right, IChannel reachtype) -> Manning_Kinematic + + Manning_Kinematic(cmf::river::OpenWaterStorage::ptr left, + cmf::water::flux_node::ptr right, const cmf::river::IChannel + &reachtype) + + Creates a kinematic wave connection between to open water storages. + + Parameters: + ----------- + + left: right: The nodes to be connected by the kinematic wave. Left + needs to be an open water storage + + reachtype: The channel geometry + """ + _cmf_core.Manning_Kinematic_swiginit(self, _cmf_core.new_Manning_Kinematic(*args, **kwargs)) + __swig_destroy__ = _cmf_core.delete_Manning_Kinematic +Manning_Kinematic_swigregister = _cmf_core.Manning_Kinematic_swigregister +Manning_Kinematic_swigregister(Manning_Kinematic) +Manning_Kinematic.cell_connector = _cmf_core.cvar.Manning_Kinematic_cell_connector + +class CanopyOverflow(flux_connection): + """ + + + Calculates the overflow of a canopy storage using a kinematic wave + approach. + + This model routes only water that exceeds the canopy capacity to the + ground with an ad hoc estimated function: + + .. math:: + + q_{CO} = + \\left(\\frac{V_{act}-V_{max}}{V_{max}}\\right) ^2 \\cdot 2400 + \\frac{A_{cell}}{1000} + + With: :math:`q_{CO}(t)[\\frac{m^3}{day}]`: + The flux from canopy to the ground + + :math:`V_{act}[mm]=1000 [mm/m] \\frac{V_{canopy}[m^3]}{A_{cell} [m^2]}` + The stored water of the canopy in mm + + :math:`V_{max}[mm]=c_{LAI}[mm] LAI` The capacity of the canopy in mm, + defined by the factor CanopyCapacityPerLAI [mm/LAI], and the leaf area + index LAI. (see: cmf::upslope::Vegetation) + + C++ includes: surfacefluxes.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + + def __init__(self, *args, **kwargs): + """ + __init__(cmf::upslope::connections::CanopyOverflow self, cmf::water::WaterStorage::ptr Canopy, cmf::water::flux_node::ptr target, Cell cell) -> CanopyOverflow + + CanopyOverflow(cmf::water::WaterStorage::ptr Canopy, + cmf::water::flux_node::ptr target, cmf::upslope::Cell &cell) + """ + _cmf_core.CanopyOverflow_swiginit(self, _cmf_core.new_CanopyOverflow(*args, **kwargs)) + + def use_for_cell(*args, **kwargs): + """use_for_cell(Cell cell) -> CanopyOverflow""" + return _cmf_core.CanopyOverflow_use_for_cell(*args, **kwargs) + + use_for_cell = staticmethod(use_for_cell) + __swig_destroy__ = _cmf_core.delete_CanopyOverflow +CanopyOverflow_swigregister = _cmf_core.CanopyOverflow_swigregister +CanopyOverflow_swigregister(CanopyOverflow) + +def CanopyOverflow_use_for_cell(*args, **kwargs): + """CanopyOverflow_use_for_cell(Cell cell) -> CanopyOverflow""" + return _cmf_core.CanopyOverflow_use_for_cell(*args, **kwargs) + +class RutterInterception(flux_connection): + """ + + + Interception storage overflow according to the Rutter and Morton + (1977) model. + + Calculates the interception overflow as a storage depending fraction + of incoming rainfall The Rutter model of interception reads as follows + after Meuser, A., 1990. Effects of afforestation on run-off + characteristics. Agric. For. Meteorol. 50: 125-138.: + + + .. math:: + + \\frac{dI_C(t)}{dt}=P(t)(1-p_F-p_S)-P(t)(1-p_F- + p_S)\\frac{I_C(t)}{I_CMAX}-f_I(E-e)(t) + + With :math:`I_C` the current + canopy storage and :math:`P(t)` the current rainfall. + + The second term of the equation denotes the flux from the canopy to + the ground. The implemented formula for canopy storage overflow reads + then as: + + .. math:: + + q_{CO}(t) = + P_{net}(t)\\frac{V_{act}[mm]}{V_{max}[mm]} + + With: + :math:`q_{CO}(t)[\\frac{m^3}{day}]`: The flux from canopy to the ground + + :math:`P_{net}(t)[\\frac{m^3}{day}]`: The flux from the rain to the canopy + + :math:`V_{act}[mm]=1000 [mm/m] \\frac{V_{canopy}[m^3]}{A_{cell} [m^2]}` + The stored water of the canopy in mm + + :math:`V_{max}[mm]=c_{LAI}[mm]\\cdot LAI` The capacity of the canopy in + mm, defined by the factor CanopyCapacityPerLAI [mm/LAI], and the leaf + area index LAI. (see: cmf::upslope::vegetation::Vegetation) + + C++ includes: surfacefluxes.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + + def __init__(self, *args, **kwargs): + """ + __init__(cmf::upslope::connections::RutterInterception self, cmf::water::WaterStorage::ptr Canopy, cmf::water::flux_node::ptr target, Cell cell) -> RutterInterception + + RutterInterception(cmf::water::WaterStorage::ptr Canopy, + cmf::water::flux_node::ptr target, cmf::upslope::Cell &cell) + """ + _cmf_core.RutterInterception_swiginit(self, _cmf_core.new_RutterInterception(*args, **kwargs)) + + def use_for_cell(*args, **kwargs): + """use_for_cell(Cell cell) -> RutterInterception""" + return _cmf_core.RutterInterception_use_for_cell(*args, **kwargs) + + use_for_cell = staticmethod(use_for_cell) + __swig_destroy__ = _cmf_core.delete_RutterInterception +RutterInterception_swigregister = _cmf_core.RutterInterception_swigregister +RutterInterception_swigregister(RutterInterception) + +def RutterInterception_use_for_cell(*args, **kwargs): + """RutterInterception_use_for_cell(Cell cell) -> RutterInterception""" + return _cmf_core.RutterInterception_use_for_cell(*args, **kwargs) + +class SimpleTindexSnowMelt(flux_connection): + """ + + + Calculates snow melt using a simple degree day method. + + + + .. math:: + + q_{melt} [mm/day] = (T-T_{thres}) * r + + Usage: + + C++ includes: surfacefluxes.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + SnowMeltRate = _swig_property(_cmf_core.SimpleTindexSnowMelt_SnowMeltRate_get, _cmf_core.SimpleTindexSnowMelt_SnowMeltRate_set) + + def __init__(self, *args, **kwargs): + """ + __init__(cmf::upslope::connections::SimpleTindexSnowMelt self, cmf::water::WaterStorage::ptr snow, cmf::water::flux_node::ptr surface_water, Cell cell, real rate=7.0) -> SimpleTindexSnowMelt + + SimpleTindexSnowMelt(cmf::water::WaterStorage::ptr snow, + cmf::water::flux_node::ptr surface_water, cmf::upslope::Cell &cell, + real rate=7.0) + + Creates a new snow melt connection. + + Parameters: + ----------- + + snow: Snow storage, usually cel.snow + + surface_water: target of the melted water (usually cell.surfacewater) + + cell: The cell, needed to get weather and area + + rate: The rate of snow melt, given in mm/(degC day), default = 7.0 + """ + _cmf_core.SimpleTindexSnowMelt_swiginit(self, _cmf_core.new_SimpleTindexSnowMelt(*args, **kwargs)) + + def use_for_cell(*args, **kwargs): + """use_for_cell(Cell cell)""" + return _cmf_core.SimpleTindexSnowMelt_use_for_cell(*args, **kwargs) + + use_for_cell = staticmethod(use_for_cell) + __swig_destroy__ = _cmf_core.delete_SimpleTindexSnowMelt +SimpleTindexSnowMelt_swigregister = _cmf_core.SimpleTindexSnowMelt_swigregister +SimpleTindexSnowMelt_swigregister(SimpleTindexSnowMelt) + +def SimpleTindexSnowMelt_use_for_cell(*args, **kwargs): + """SimpleTindexSnowMelt_use_for_cell(Cell cell)""" + return _cmf_core.SimpleTindexSnowMelt_use_for_cell(*args, **kwargs) + +class EnergyBudgetSnowMelt(flux_connection): + """ + + + Calculates snow melt using the surface energy budget method. + + C++ includes: surfacefluxes.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + + def __init__(self, *args, **kwargs): + """ + __init__(cmf::upslope::connections::EnergyBudgetSnowMelt self, cmf::water::WaterStorage::ptr snow, cmf::water::flux_node::ptr surface_water, Cell cell) -> EnergyBudgetSnowMelt + + EnergyBudgetSnowMelt(cmf::water::WaterStorage::ptr snow, + cmf::water::flux_node::ptr surface_water, cmf::upslope::Cell &cell) + """ + _cmf_core.EnergyBudgetSnowMelt_swiginit(self, _cmf_core.new_EnergyBudgetSnowMelt(*args, **kwargs)) + + def use_for_cell(*args, **kwargs): + """use_for_cell(Cell cell)""" + return _cmf_core.EnergyBudgetSnowMelt_use_for_cell(*args, **kwargs) + + use_for_cell = staticmethod(use_for_cell) + __swig_destroy__ = _cmf_core.delete_EnergyBudgetSnowMelt +EnergyBudgetSnowMelt_swigregister = _cmf_core.EnergyBudgetSnowMelt_swigregister +EnergyBudgetSnowMelt_swigregister(EnergyBudgetSnowMelt) + +def EnergyBudgetSnowMelt_use_for_cell(*args, **kwargs): + """EnergyBudgetSnowMelt_use_for_cell(Cell cell)""" + return _cmf_core.EnergyBudgetSnowMelt_use_for_cell(*args, **kwargs) + + +def snowfraction(*args, **kwargs): + """ + snowfraction(real T) -> real + + real + cmf::upslope::connections::snowfraction(real T) + + A function to calculate the snow fraction of the precipitation + according to the air temperature. + + Returns 0.0 for T>+1 degC, 1.0 for T<-1degC and interpolates linear + between. Values between 0 and 1 can be interpreted as sleet + """ + return _cmf_core.snowfraction(*args, **kwargs) +class Rainfall(flux_connection): + """ + + + A connection routing rainfall to surface water and to an eventually + existing canopy storage. + + C++ includes: AtmosphericFluxes.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + Throughfall = _swig_property(_cmf_core.Rainfall_Throughfall_get, _cmf_core.Rainfall_Throughfall_set) + InterceptedRainfall = _swig_property(_cmf_core.Rainfall_InterceptedRainfall_get, _cmf_core.Rainfall_InterceptedRainfall_set) + + def __init__(self, *args, **kwargs): + """ + __init__(cmf::upslope::connections::Rainfall self, cmf::water::flux_node::ptr target, Cell cell, bool getthroughfall=True, bool getintercepted=True) -> Rainfall + + Rainfall(cmf::water::flux_node::ptr target, cmf::upslope::Cell &cell, + bool getthroughfall=true, bool getintercepted=true) + + Creates a new Rainfall connection. + """ + _cmf_core.Rainfall_swiginit(self, _cmf_core.new_Rainfall(*args, **kwargs)) + __swig_destroy__ = _cmf_core.delete_Rainfall +Rainfall_swigregister = _cmf_core.Rainfall_swigregister +Rainfall_swigregister(Rainfall) + +class Snowfall(flux_connection): + """ + + + A connection routing snowfall (precipitation below freezing Temp) to + the snow pack. + + C++ includes: AtmosphericFluxes.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + + def __init__(self, *args, **kwargs): + """ + __init__(cmf::upslope::connections::Snowfall self, cmf::water::flux_node::ptr target, Cell cell) -> Snowfall + + Snowfall(cmf::water::flux_node::ptr target, cmf::upslope::Cell &cell) + + """ + _cmf_core.Snowfall_swiginit(self, _cmf_core.new_Snowfall(*args, **kwargs)) + __swig_destroy__ = _cmf_core.delete_Snowfall +Snowfall_swigregister = _cmf_core.Snowfall_swigregister +Snowfall_swigregister(Snowfall) + +class MatrixInfiltration(flux_connection): + """ + + + Connects the surfacewater and the most upper layer using a Richards + equation like infiltration model. + + The potential infiltration is calculated according to the Richards + equation. The gradient is from the cell surface to the center of the + first layer and the conductivity is the geometric mean of the wetted + surface ( :math:`K_{sat}`) and the conductivity of the layer center ( + :math:`K(\\theta_{layer})` + + .. math:: + + q_{max} &=& + \\frac{\\Psi_{surface} - \\Psi_{soil}}{\\Delta z} K A_{cell} + \\\\ K &=& \\sqrt{K\\left(\\theta_{layer}\\right)K_{sat}} + \\\\ \\Delta z &=& z_{cell} - z_{layer center} + + + + + If the surface water is modeled by a distinct water storage, the + actual infiltration is given as the product of the potential + infiltration with the coverage of the surface water + cmf::upslope::Cell::surface_water_coverage + + .. math:: + + q_{act} = q_{max} + \\frac{A_{water}}{A_{cell}} + + If the surface water is no storage on its own, but just a water + distribution node, the actual infiltration is the minimum of the + potential infiltration and the current inflow (rain, snow melt) to the + surface + + .. math:: + + q_{act} = \\min\\left(q_{max}, + \\sum{q_{in,surfacewater}}\\right) + + C++ includes: infiltration.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + + def __init__(self, *args, **kwargs): + """ + __init__(cmf::upslope::connections::MatrixInfiltration self, cmf::upslope::SoilLayer::ptr soilwater, cmf::water::flux_node::ptr surfacewater) -> MatrixInfiltration + + MatrixInfiltration(cmf::upslope::SoilLayer::ptr soilwater, + cmf::water::flux_node::ptr surfacewater) + """ + _cmf_core.MatrixInfiltration_swiginit(self, _cmf_core.new_MatrixInfiltration(*args, **kwargs)) + + def use_for_cell(*args, **kwargs): + """use_for_cell(Cell c)""" + return _cmf_core.MatrixInfiltration_use_for_cell(*args, **kwargs) + + use_for_cell = staticmethod(use_for_cell) + __swig_destroy__ = _cmf_core.delete_MatrixInfiltration +MatrixInfiltration_swigregister = _cmf_core.MatrixInfiltration_swigregister +MatrixInfiltration_swigregister(MatrixInfiltration) + +def MatrixInfiltration_use_for_cell(*args, **kwargs): + """MatrixInfiltration_use_for_cell(Cell c)""" + return _cmf_core.MatrixInfiltration_use_for_cell(*args, **kwargs) + +class GreenAmptInfiltration(flux_connection): + """ + + + Connects the surfacewater and the most upper layer using a Green-Ampt + equation like infiltration. + + The Green-Ampt formula is given as: + + .. math:: + + q(t) = -K_s \\frac{dh}{dz} + A + + where: :math:`q(t)` is the infiltration rate in m3/day + + :math:`K_s` is the saturated conductivity in m/day + + :math:`\\frac{dh}{dz}` is the hydraulic gradient in the wetting front + + :math:`A` is the surface area of the cell + + The gradient in the wetting front is calculated as: + + + .. math:: + + \\frac{dh}{dz} = \\frac{h_f - h_0}{Z_f} = + \\frac{|\\Psi_f| + Z_f}{Z_f} + + where: :math:`h_f` is the hydraulic + head at the bottom of the wetting front in m + + :math:`h_0` is the hydraulic head at the surface in m + + :math:`Z_f` is the length of the wetting front in m + + Since :math:`Z_f` is unknown, the depth of the wetting front can be + approximated by: + + .. math:: + + Z_f = \\frac{F}{\\theta_s - + \\theta_i} + + with: :math:`F` the accumulated volume per area of + infiltrated water + + :math:`\\theta_s, \\theta_i` the volumetric water content at saturation + resp. at start of the infiltration + + If the surface water is modeled by a distinct water storage, the + actual infiltration is given as the product of the potential + infiltration with the coverage of the surface water + cmf::upslope::Cell::surface_water_coverage + + .. math:: + + q_{act} = q_{max} + \\frac{A_{water}}{A_{cell}} + + If the surface water is no storage on its own, but just a water + distribution node, the actual infiltration is the minimum of the + potential infiltration and the current inflow (rain, snow melt) to the + surface + + .. math:: + + q_{act} = \\min\\left(q_{max}, + \\sum{q_{in,surfacewater}}\\right) + + C++ includes: infiltration.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + + def __init__(self, *args, **kwargs): + """ + __init__(cmf::upslope::connections::GreenAmptInfiltration self, cmf::upslope::SoilLayer::ptr soilwater, cmf::water::flux_node::ptr surfacewater) -> GreenAmptInfiltration + + GreenAmptInfiltration(cmf::upslope::SoilLayer::ptr soilwater, + cmf::water::flux_node::ptr surfacewater) + """ + _cmf_core.GreenAmptInfiltration_swiginit(self, _cmf_core.new_GreenAmptInfiltration(*args, **kwargs)) + + def use_for_cell(*args, **kwargs): + """use_for_cell(Cell c)""" + return _cmf_core.GreenAmptInfiltration_use_for_cell(*args, **kwargs) + + use_for_cell = staticmethod(use_for_cell) + __swig_destroy__ = _cmf_core.delete_GreenAmptInfiltration +GreenAmptInfiltration_swigregister = _cmf_core.GreenAmptInfiltration_swigregister +GreenAmptInfiltration_swigregister(GreenAmptInfiltration) + +def GreenAmptInfiltration_use_for_cell(*args, **kwargs): + """GreenAmptInfiltration_use_for_cell(Cell c)""" + return _cmf_core.GreenAmptInfiltration_use_for_cell(*args, **kwargs) + +class SimpleInfiltration(flux_connection): + """ + + + Connects the surfacewater and the most upper layer using a simplified + infiltration model suitable for conceptional models. + + + + .. math:: + + q_{inf} = \\left(1-e_{sat}\\left(W, W_0\\right)\\right) + q_{inf,pot} + + where: :math:`q_{inf}` Effective infiltration from + surface to first layer (soil) + + :math:`e_{sat}(W, W_0)` Saturation excess, ranging from 0 (nowhere saturated + soil layer) to 1 (fully saturated). :math:`W` is the average wetness + calculated from the soil layer, :math:`W_0` is a parameter denoting the + wetness, where 50% of the layer is saturated using a sigmoidal + function: :math:`e_{sat}(W_{soil}, W_0) = \\left(1+e^{-(W-W_0)0.2(1-W_0)}\\right)^{-1}` + + :math:`q_{inf,pot}` is the potential infiltration, given by the incoming + fluxes limited by the saturated conductivity: :math:`q_{inf,pot} = \\min(q_{in}, K_{sat} A)` :math:`q_{in}` Sum of incoming fluxes to the + surfacewater in :math:`m^3/day` + + :math:`K_{sat}` Saturated conductivity in :math:`m/day` + + :math:`A` Cell area in :math:`m^2` + + C++ includes: infiltration.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + W0 = _swig_property(_cmf_core.SimpleInfiltration_W0_get, _cmf_core.SimpleInfiltration_W0_set) + + def __init__(self, *args, **kwargs): + """ + __init__(cmf::upslope::connections::SimpleInfiltration self, cmf::upslope::SoilLayer::ptr soilwater, cmf::water::flux_node::ptr surfacewater, real W0=0.9) -> SimpleInfiltration + + SimpleInfiltration(cmf::upslope::SoilLayer::ptr soilwater, + cmf::water::flux_node::ptr surfacewater, real W0=0.9) + + Creates the connection between surfacewater and first soil layer. + + Parameters: + ----------- + + soilwater: the infiltration target + + surfacewater: the infiltration source + + W0: the 50% saturation value + """ + _cmf_core.SimpleInfiltration_swiginit(self, _cmf_core.new_SimpleInfiltration(*args, **kwargs)) + + def use_for_cell(*args, **kwargs): + """use_for_cell(Cell c)""" + return _cmf_core.SimpleInfiltration_use_for_cell(*args, **kwargs) + + use_for_cell = staticmethod(use_for_cell) + __swig_destroy__ = _cmf_core.delete_SimpleInfiltration +SimpleInfiltration_swigregister = _cmf_core.SimpleInfiltration_swigregister +SimpleInfiltration_swigregister(SimpleInfiltration) + +def SimpleInfiltration_use_for_cell(*args, **kwargs): + """SimpleInfiltration_use_for_cell(Cell c)""" + return _cmf_core.SimpleInfiltration_use_for_cell(*args, **kwargs) + +class SWATPercolation(flux_connection): + """ + + + A tipping bucket percolation approach similar to the approach in SWAT. + + + + .. math:: + + q_{perc} &=& + V_{H_2O,drain}\\left(1-e^{-\\frac 1{-TT_{perc}}}\\right) + \\\\ TT_{perc} &=& \\frac{V_{pores,drain} - V_{field + cap.}}{K_{sat}} \\\\ V_{x,drain} &=& V_{x,drain} - V_{field cap.} + + + + + C++ includes: Percolation.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + + def use_for_cell(*args, **kwargs): + """use_for_cell(Cell cell, bool no_override=True)""" + return _cmf_core.SWATPercolation_use_for_cell(*args, **kwargs) + + use_for_cell = staticmethod(use_for_cell) + + def __init__(self, *args, **kwargs): + """ + __init__(cmf::upslope::connections::SWATPercolation self, cmf::upslope::SoilLayer::ptr upperLayer, cmf::upslope::SoilLayer::ptr lowerLayer) -> SWATPercolation + + SWATPercolation(cmf::upslope::SoilLayer::ptr upperLayer, + cmf::upslope::SoilLayer::ptr lowerLayer) + """ + _cmf_core.SWATPercolation_swiginit(self, _cmf_core.new_SWATPercolation(*args, **kwargs)) + __swig_destroy__ = _cmf_core.delete_SWATPercolation +SWATPercolation_swigregister = _cmf_core.SWATPercolation_swigregister +SWATPercolation_swigregister(SWATPercolation) + +def SWATPercolation_use_for_cell(*args, **kwargs): + """SWATPercolation_use_for_cell(Cell cell, bool no_override=True)""" + return _cmf_core.SWATPercolation_use_for_cell(*args, **kwargs) + +class Richards(flux_connection): + """ + + + Calculates flow according to the Richards equation. + + + + .. math:: + + q_{Richards} &=& + \\frac{\\Delta\\Psi_{tot}}{d} K(\\theta) A \\\\ + \\Psi_{tot} &= &\\Psi_{M}(\\theta) + h + + where + :math:`\\Delta\\Psi_{tot} [m]` is the difference of the total water + potentials of the two soil layers + + :math:`d [m]` is the distance between the two soil layers + + :math:`K(\\theta)\\left[\\frac m{day}\\right]` is the geometric + mean conductivity (see SoilType::Kunsat) + + :math:`A [m^2]` is the crosssectional area of the flux + + :math:`\\Psi_M(\\theta) [m]` is the matrix potential (see + SoilType::MatrixPotential) + + :math:`h [m]` is the height of a soil layer above sea level + + C++ includes: Percolation.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + + def __init__(self, *args, **kwargs): + """ + __init__(cmf::upslope::connections::Richards self, cmf::upslope::SoilLayer::ptr left, cmf::water::flux_node::ptr right) -> Richards + + Richards(cmf::upslope::SoilLayer::ptr left, cmf::water::flux_node::ptr + right) + + Creates a Richards equation connection between two soil layers (left + and right, rather top and bottom) of the same cell. + """ + _cmf_core.Richards_swiginit(self, _cmf_core.new_Richards(*args, **kwargs)) + + def use_for_cell(*args, **kwargs): + """use_for_cell(Cell cell, bool no_override=True)""" + return _cmf_core.Richards_use_for_cell(*args, **kwargs) + + use_for_cell = staticmethod(use_for_cell) + __swig_destroy__ = _cmf_core.delete_Richards +Richards_swigregister = _cmf_core.Richards_swigregister +Richards_swigregister(Richards) + +def Richards_use_for_cell(*args, **kwargs): + """Richards_use_for_cell(Cell cell, bool no_override=True)""" + return _cmf_core.Richards_use_for_cell(*args, **kwargs) + +class SimplRichards(flux_connection): + """ + + + Calculates flow according to a simplified Richards equation. + + + + .. math:: + + q_{Richards} &=& (K(\\theta) - K(\\theta_r)) + A \\\\ + + where :math:`d [m]` is the distance between + the two soil layers + + :math:`K(\\theta)\\left[\\frac m{day}\\right]` is the geometric + mean conductivity (see SoilType::Kunsat) + + :math:`A [m^2]` is the crosssectional area of the flux + + C++ includes: Percolation.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + + def __init__(self, *args, **kwargs): + """ + __init__(cmf::upslope::connections::SimplRichards self, cmf::upslope::SoilLayer::ptr left, cmf::water::flux_node::ptr right) -> SimplRichards + + SimplRichards(cmf::upslope::SoilLayer::ptr left, + cmf::water::flux_node::ptr right) + """ + _cmf_core.SimplRichards_swiginit(self, _cmf_core.new_SimplRichards(*args, **kwargs)) + + def use_for_cell(*args, **kwargs): + """use_for_cell(Cell cell, bool no_override=True)""" + return _cmf_core.SimplRichards_use_for_cell(*args, **kwargs) + + use_for_cell = staticmethod(use_for_cell) + __swig_destroy__ = _cmf_core.delete_SimplRichards +SimplRichards_swigregister = _cmf_core.SimplRichards_swigregister +SimplRichards_swigregister(SimplRichards) + +def SimplRichards_use_for_cell(*args, **kwargs): + """SimplRichards_use_for_cell(Cell cell, bool no_override=True)""" + return _cmf_core.SimplRichards_use_for_cell(*args, **kwargs) + +class FreeDrainagePercolation(flux_connection): + """ + + + Calculates a free drainage (unit gradient) from a layer to somewhere + else. + + + + .. math:: + + q = K(\\theta) A + + where: :math:`q` Flux from the layer to the + other side of the connection in :math:`m^3/day` + + :math:`K(\\theta)` Actual conductivity in :math:`m/day` depending on the water + content of the layer :math:`\\theta` + + :math:`A` Cell area in :math:`m^2` + + C++ includes: Percolation.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + + def __init__(self, *args, **kwargs): + """ + __init__(cmf::upslope::connections::FreeDrainagePercolation self, cmf::upslope::SoilLayer::ptr left, cmf::water::flux_node::ptr right) -> FreeDrainagePercolation + + FreeDrainagePercolation(cmf::upslope::SoilLayer::ptr left, + cmf::water::flux_node::ptr right) + """ + _cmf_core.FreeDrainagePercolation_swiginit(self, _cmf_core.new_FreeDrainagePercolation(*args, **kwargs)) + __swig_destroy__ = _cmf_core.delete_FreeDrainagePercolation +FreeDrainagePercolation_swigregister = _cmf_core.FreeDrainagePercolation_swigregister +FreeDrainagePercolation_swigregister(FreeDrainagePercolation) + +class LayerBypass(flux_connection): + """ + + + A simplification of macro pore flux for swelling soils. + + Connects the surfacewater of the cell with deeper layers, assuming the + presence of cracks. At saturation level of the target layer, the + cracks are closed + + .. math:: + + q_{crack} = K_{max,crack} + \\left(1-\\left(\\frac{w-w_0}{1-w_0}\\right)^\\beta\\right) + A + + where: :math:`q_{crack}` is the flux from the surface water to the + target layer in m3/day + + :math:`K_{max,crack}` is the maximum conductivity of the cracks in m/day + + :math:`w` is the actual wetness of the target layer + + :math:`w_0` is saturation, where the shrinkage of the cracks starts + + :math:`\\beta` is an empirical shape parameter of the crack size/wetness + relation + + :math:`A` is the area of the cell + + C++ includes: Percolation.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + Kmax = _swig_property(_cmf_core.LayerBypass_Kmax_get, _cmf_core.LayerBypass_Kmax_set) + w0 = _swig_property(_cmf_core.LayerBypass_w0_get, _cmf_core.LayerBypass_w0_set) + beta = _swig_property(_cmf_core.LayerBypass_beta_get, _cmf_core.LayerBypass_beta_set) + + def K(self, *args, **kwargs): + """ + K(LayerBypass self, real w) -> real + + real K(real w) + + the actual crack conductivity + + Parameters: + ----------- + + w: the wetness of the target layer + """ + return _cmf_core.LayerBypass_K(self, *args, **kwargs) + + + def __init__(self, *args, **kwargs): + """ + __init__(cmf::upslope::connections::LayerBypass self, cmf::water::flux_node::ptr left, cmf::upslope::SoilLayer::ptr right, real Kmax=100., real w0=0.0, real beta=1.0) -> LayerBypass + + LayerBypass(cmf::water::flux_node::ptr left, + cmf::upslope::SoilLayer::ptr right, real Kmax=100., real w0=0.0, real + beta=1.0) + + Creates a layer bypass connection. + + Parameters: + ----------- + + left: The source of the flux, usually the surfacewater of the cell + + right: The target soil layer + + Kmax: maximum conductivity of the cracks in m/day + + w0: is the actual wetness of the target layer + + beta: is an empirical shape parameter of the crack size/wetness + relation + """ + _cmf_core.LayerBypass_swiginit(self, _cmf_core.new_LayerBypass(*args, **kwargs)) + __swig_destroy__ = _cmf_core.delete_LayerBypass +LayerBypass.K = new_instancemethod(_cmf_core.LayerBypass_K, None, LayerBypass) +LayerBypass_swigregister = _cmf_core.LayerBypass_swigregister +LayerBypass_swigregister(LayerBypass) + +class RootUptakeStessFunction(object): + """ + + + An abstract class to calculate the actual transpiration from potential + transpiration. + + Implementations of WaterStressFunction are used by ET connections + derived from cmf::upslope::ET::stressedET + + C++ includes: waterstress.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def Tact(self, *args, **kwargs): + """ + Tact(RootUptakeStessFunction self, stressedET connection, real Tpot) -> real + + virtual real Tact(const stressedET *connection, real Tpot) const =0 + + Calculates the water stress for a layer. + + Parameters: + ----------- + + connection: The stressedET connection this stress function belongs to + + Tpot: Potential Transpiration in mm/day (for the full profile) + + Actual flux from layer in m3/day + """ + return _cmf_core.RootUptakeStessFunction_Tact(self, *args, **kwargs) + + + def copy(self, *args, **kwargs): + """ + copy(RootUptakeStessFunction self) -> RootUptakeStessFunction + + virtual cmf::upslope::ET::RootUptakeStessFunction* copy() const =0 + + Creates a new copy of this wetness. + """ + return _cmf_core.RootUptakeStessFunction_copy(self, *args, **kwargs) + + + def to_string(self, *args, **kwargs): + """ + to_string(RootUptakeStessFunction self) -> std::string + + virtual + std::string to_string() const =0 + """ + return _cmf_core.RootUptakeStessFunction_to_string(self, *args, **kwargs) + + __swig_destroy__ = _cmf_core.delete_RootUptakeStessFunction +RootUptakeStessFunction.Tact = new_instancemethod(_cmf_core.RootUptakeStessFunction_Tact, None, RootUptakeStessFunction) +RootUptakeStessFunction.copy = new_instancemethod(_cmf_core.RootUptakeStessFunction_copy, None, RootUptakeStessFunction) +RootUptakeStessFunction.to_string = new_instancemethod(_cmf_core.RootUptakeStessFunction_to_string, None, RootUptakeStessFunction) +RootUptakeStessFunction_swigregister = _cmf_core.RootUptakeStessFunction_swigregister +RootUptakeStessFunction_swigregister(RootUptakeStessFunction) + +class SuctionStress(RootUptakeStessFunction): + """ + + + The classical suction depending transpiration Stress curve after + Feddes. + + The ability of roots to take water from the soil up is limited by the + suction pressure (matrix potential) of the soil. The stress is defined + using a trapezoid function, with P0 being the pressure, where water + uptake is prohibited by saturation. Between P0 and P1 the saturation + stress gets lower. Between P1 and P2, no stress occurs ( ET=ETpot) and + with a pressure below P2, water uptake is limited by drought. P3 + indicates the highest suction (lowest pressure) to which plants can + extract water (wilting point). + + Default values: :math:`P_0 = \\infty, P_1=\\infty, P_2=-5m, P_3=-160m`, + resulting in no saturation stress and draught stress starting at -5m + and a wilting point of -160m. + + If one would like to include saturation stress, typical values for P0 + and P1 are 0.0m and 0.1m. By changing P2 and P3, you can account for + different drought sensibility for different plant types. + + C++ includes: waterstress.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + P0 = _swig_property(_cmf_core.SuctionStress_P0_get, _cmf_core.SuctionStress_P0_set) + P1 = _swig_property(_cmf_core.SuctionStress_P1_get, _cmf_core.SuctionStress_P1_set) + P2 = _swig_property(_cmf_core.SuctionStress_P2_get, _cmf_core.SuctionStress_P2_set) + P3 = _swig_property(_cmf_core.SuctionStress_P3_get, _cmf_core.SuctionStress_P3_set) + + def __init__(self, *args): + """ + __init__(cmf::upslope::ET::SuctionStress self, real P0=1e308, real P1=1e307, real P2=-5, real P3=-160) -> SuctionStress + __init__(cmf::upslope::ET::SuctionStress self, SuctionStress other) -> SuctionStress + + SuctionStress(const SuctionStress &other) + """ + _cmf_core.SuctionStress_swiginit(self, _cmf_core.new_SuctionStress(*args)) + + def copy(self, *args, **kwargs): + """ + copy(SuctionStress self) -> SuctionStress + + cmf::upslope::ET::SuctionStress* copy() const + + Creates a new copy of this wetness. + """ + return _cmf_core.SuctionStress_copy(self, *args, **kwargs) + + __swig_destroy__ = _cmf_core.delete_SuctionStress +SuctionStress.copy = new_instancemethod(_cmf_core.SuctionStress_copy, None, SuctionStress) +SuctionStress_swigregister = _cmf_core.SuctionStress_swigregister +SuctionStress_swigregister(SuctionStress) + +class ContentStress(RootUptakeStessFunction): + """ + + + A simple water content based stress model based on Feddes (1978) + + stress a is piecewise linear function based on water content + + if :math:`\\theta>\\theta_d \\rightarrow ET = ET_{pot}` + + if :math:`\\theta_d>\\theta > \\theta_{wilt} \\rightarrow ET = \\frac{\\theta_d - \\theta}{\\theta_d - \\theta_{wilt}} ET_{pot}` + + if :math:`\\theta_{wilt}>\\theta \\rightarrow ET = 0.0` + + The parameters :math:`\\theta_{d,w}` can be omitted (or set to a negative + value) to use default values derived from the layer properties. The + critical water content (where stress starts) is then defined (conf. + Feddes 1978) as the center between field capacity ( :math:`\\theta_{fc}`) + and the wilting point ( :math:`\\theta_{wp}`). :math:`\\theta_w = \\theta(pF=4.2)`: Water content at pF=4.2 + + :math:`\\theta_d = 1/2 (\\theta(pF=1.8) + \\theta(pF=4.2))` + + C++ includes: waterstress.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + theta_d = _swig_property(_cmf_core.ContentStress_theta_d_get, _cmf_core.ContentStress_theta_d_set) + theta_w = _swig_property(_cmf_core.ContentStress_theta_w_get, _cmf_core.ContentStress_theta_w_set) + + def copy(self, *args, **kwargs): + """ + copy(ContentStress self) -> ContentStress + + cmf::upslope::ET::ContentStress* copy() const + + Creates a new copy of this wetness. + """ + return _cmf_core.ContentStress_copy(self, *args, **kwargs) + + + def __init__(self, *args, **kwargs): + """ + __init__(cmf::upslope::ET::ContentStress self, real theta_d=-1, real theta_w=-1) -> ContentStress + + ContentStress(real theta_d=-1, real theta_w=-1) + + Creates a new ContentStress for critical water content theta_d in vol + Water/vol Soil and wilting point theta_w. + """ + _cmf_core.ContentStress_swiginit(self, _cmf_core.new_ContentStress(*args, **kwargs)) + __swig_destroy__ = _cmf_core.delete_ContentStress +ContentStress.copy = new_instancemethod(_cmf_core.ContentStress_copy, None, ContentStress) +ContentStress_swigregister = _cmf_core.ContentStress_swigregister +ContentStress_swigregister(ContentStress) + +class VolumeStress(RootUptakeStessFunction): + """ + + + A WaterStressFunction based on the stored water volume of a layer. + + If the layer contains more water than V1, ET is not limited ( + ET=ETpot). Below V1 ET goes linear to 0.0 at V0 + + C++ includes: waterstress.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + V1 = _swig_property(_cmf_core.VolumeStress_V1_get, _cmf_core.VolumeStress_V1_set) + V0 = _swig_property(_cmf_core.VolumeStress_V0_get, _cmf_core.VolumeStress_V0_set) + + def __init__(self, *args): + """ + __init__(cmf::upslope::ET::VolumeStress self, real V1, real V0) -> VolumeStress + __init__(cmf::upslope::ET::VolumeStress self, VolumeStress other) -> VolumeStress + + VolumeStress(const VolumeStress &other) + """ + _cmf_core.VolumeStress_swiginit(self, _cmf_core.new_VolumeStress(*args)) + + def copy(self, *args, **kwargs): + """ + copy(VolumeStress self) -> VolumeStress + + cmf::upslope::ET::VolumeStress* copy() const + + Creates a new copy of this wetness. + """ + return _cmf_core.VolumeStress_copy(self, *args, **kwargs) + + __swig_destroy__ = _cmf_core.delete_VolumeStress +VolumeStress.copy = new_instancemethod(_cmf_core.VolumeStress_copy, None, VolumeStress) +VolumeStress_swigregister = _cmf_core.VolumeStress_swigregister +VolumeStress_swigregister(VolumeStress) + +class log_wind_profile(aerodynamic_resistance): + """ + + + , A logarithmic wind profile + + Todo Cite literature for this windprofile and insert equation + + C++ includes: ET.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + + def __init__(self, *args, **kwargs): + """ + __init__(cmf::atmosphere::log_wind_profile self, Cell _cell) -> log_wind_profile + + log_wind_profile(cmf::upslope::Cell &_cell) + """ + _cmf_core.log_wind_profile_swiginit(self, _cmf_core.new_log_wind_profile(*args, **kwargs)) + __swig_destroy__ = _cmf_core.delete_log_wind_profile +log_wind_profile_swigregister = _cmf_core.log_wind_profile_swigregister +log_wind_profile_swigregister(log_wind_profile) + +class transpiration_method(object): + """ + + + Abstract class. Child classes are defining a method for transpiration + calculation. + + C++ includes: ET.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def transp_from_layer(self, *args, **kwargs): + """ + transp_from_layer(transpiration_method self, cmf::upslope::SoilLayer::ptr arg2, Time t) -> double + + virtual + double transp_from_layer(cmf::upslope::SoilLayer::ptr, cmf::math::Time + t)=0 + + returns the transpiration rate from one layer in m3/day + """ + return _cmf_core.transpiration_method_transp_from_layer(self, *args, **kwargs) + + __swig_destroy__ = _cmf_core.delete_transpiration_method +transpiration_method.transp_from_layer = new_instancemethod(_cmf_core.transpiration_method_transp_from_layer, None, transpiration_method) +transpiration_method_swigregister = _cmf_core.transpiration_method_swigregister +transpiration_method_swigregister(transpiration_method) + +class soil_evaporation_method(object): + """ + + + Abstract class. Child classes are defining a method for soil + evaporation calculation. + + C++ includes: ET.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def evap_from_layer(self, *args, **kwargs): + """ + evap_from_layer(soil_evaporation_method self, cmf::upslope::SoilLayer::ptr arg2, Time t) -> double + + virtual + double evap_from_layer(cmf::upslope::SoilLayer::ptr, cmf::math::Time + t)=0 + + returns the soil evaporation rate from one layer in m3/day + """ + return _cmf_core.soil_evaporation_method_evap_from_layer(self, *args, **kwargs) + + __swig_destroy__ = _cmf_core.delete_soil_evaporation_method +soil_evaporation_method.evap_from_layer = new_instancemethod(_cmf_core.soil_evaporation_method_evap_from_layer, None, soil_evaporation_method) +soil_evaporation_method_swigregister = _cmf_core.soil_evaporation_method_swigregister +soil_evaporation_method_swigregister(soil_evaporation_method) + +class surface_water_evaporation_method(object): + """ + + + Abstract class. Child classes are defining a method for surface water + evaporation calculation. + + C++ includes: ET.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def evap_from_openwater(self, *args, **kwargs): + """ + evap_from_openwater(surface_water_evaporation_method self, cmf::river::OpenWaterStorage::ptr arg2, Time arg3) -> double + + virtual double + evap_from_openwater(cmf::river::OpenWaterStorage::ptr, + cmf::math::Time)=0 + """ + return _cmf_core.surface_water_evaporation_method_evap_from_openwater(self, *args, **kwargs) + + __swig_destroy__ = _cmf_core.delete_surface_water_evaporation_method +surface_water_evaporation_method.evap_from_openwater = new_instancemethod(_cmf_core.surface_water_evaporation_method_evap_from_openwater, None, surface_water_evaporation_method) +surface_water_evaporation_method_swigregister = _cmf_core.surface_water_evaporation_method_swigregister +surface_water_evaporation_method_swigregister(surface_water_evaporation_method) + +class canopy_evaporation_method(object): + """ + + + Abstract class. Child classes are defining a method for intercepted + canopy water evaporation calculation. + + C++ includes: ET.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def evap_from_canopy(self, *args, **kwargs): + """ + evap_from_canopy(canopy_evaporation_method self, cmf::water::WaterStorage::ptr arg2, Time arg3) -> double + + virtual double evap_from_canopy(cmf::water::WaterStorage::ptr, + cmf::math::Time)=0 + """ + return _cmf_core.canopy_evaporation_method_evap_from_canopy(self, *args, **kwargs) + + __swig_destroy__ = _cmf_core.delete_canopy_evaporation_method +canopy_evaporation_method.evap_from_canopy = new_instancemethod(_cmf_core.canopy_evaporation_method_evap_from_canopy, None, canopy_evaporation_method) +canopy_evaporation_method_swigregister = _cmf_core.canopy_evaporation_method_swigregister +canopy_evaporation_method_swigregister(canopy_evaporation_method) + +class snow_evaporation_method(object): + """ + + + Abstract class. Child classes are defining a method for snow + evaporation calculation. + + C++ includes: ET.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def evap_from_snow(self, *args, **kwargs): + """ + evap_from_snow(snow_evaporation_method self, cmf::water::WaterStorage::ptr snow, Time t) -> double + + virtual + double evap_from_snow(cmf::water::WaterStorage::ptr snow, + cmf::math::Time t)=0 + """ + return _cmf_core.snow_evaporation_method_evap_from_snow(self, *args, **kwargs) + + __swig_destroy__ = _cmf_core.delete_snow_evaporation_method +snow_evaporation_method.evap_from_snow = new_instancemethod(_cmf_core.snow_evaporation_method_evap_from_snow, None, snow_evaporation_method) +snow_evaporation_method_swigregister = _cmf_core.snow_evaporation_method_swigregister +snow_evaporation_method_swigregister(snow_evaporation_method) + +class transpiration(flux_connection): + """ + + + Flux connection using a transpiration_method. + + C++ includes: ET.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + + def __init__(self, *args, **kwargs): + """ + __init__(cmf::upslope::ET::transpiration self, cmf::upslope::SoilLayer::ptr source, cmf::water::flux_node::ptr ET_target, std::shared_ptr< cmf::upslope::ET::transpiration_method > _method, std::string method_name) -> transpiration + + transpiration(cmf::upslope::SoilLayer::ptr source, + cmf::water::flux_node::ptr ET_target, std::shared_ptr< + transpiration_method > _method, std::string method_name) + """ + _cmf_core.transpiration_swiginit(self, _cmf_core.new_transpiration(*args, **kwargs)) + __swig_destroy__ = _cmf_core.delete_transpiration +transpiration_swigregister = _cmf_core.transpiration_swigregister +transpiration_swigregister(transpiration) + +class soil_evaporation(flux_connection): + """ + + + Flux_connection using a soil_evaporation_method. + + C++ includes: ET.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + + def __init__(self, *args, **kwargs): + """ + __init__(cmf::upslope::ET::soil_evaporation self, cmf::upslope::SoilLayer::ptr source, cmf::water::flux_node::ptr ET_target, std::shared_ptr< cmf::upslope::ET::soil_evaporation_method > _method, std::string method_name) -> soil_evaporation + + soil_evaporation(cmf::upslope::SoilLayer::ptr source, + cmf::water::flux_node::ptr ET_target, std::shared_ptr< + soil_evaporation_method > _method, std::string method_name) + """ + _cmf_core.soil_evaporation_swiginit(self, _cmf_core.new_soil_evaporation(*args, **kwargs)) + __swig_destroy__ = _cmf_core.delete_soil_evaporation +soil_evaporation_swigregister = _cmf_core.soil_evaporation_swigregister +soil_evaporation_swigregister(soil_evaporation) + +class canopy_evaporation(flux_connection): + """ + + + Flux connection using a canopy_evaporation_method. + + C++ includes: ET.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + + def __init__(self, *args, **kwargs): + """ + __init__(cmf::upslope::ET::canopy_evaporation self, cmf::water::WaterStorage::ptr source, cmf::water::flux_node::ptr ET_target, std::shared_ptr< cmf::upslope::ET::canopy_evaporation_method > _method, std::string method_name) -> canopy_evaporation + + canopy_evaporation(cmf::water::WaterStorage::ptr source, + cmf::water::flux_node::ptr ET_target, std::shared_ptr< + canopy_evaporation_method > _method, std::string method_name) + """ + _cmf_core.canopy_evaporation_swiginit(self, _cmf_core.new_canopy_evaporation(*args, **kwargs)) + __swig_destroy__ = _cmf_core.delete_canopy_evaporation +canopy_evaporation_swigregister = _cmf_core.canopy_evaporation_swigregister +canopy_evaporation_swigregister(canopy_evaporation) + +class snow_evaporation(flux_connection): + """ + + + Flux connection using a snow_evaporation_method. + + C++ includes: ET.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + + def __init__(self, *args, **kwargs): + """ + __init__(cmf::upslope::ET::snow_evaporation self, cmf::water::WaterStorage::ptr source, cmf::water::flux_node::ptr ET_target, std::shared_ptr< cmf::upslope::ET::snow_evaporation_method > _method, std::string method_name) -> snow_evaporation + + snow_evaporation(cmf::water::WaterStorage::ptr source, + cmf::water::flux_node::ptr ET_target, std::shared_ptr< + snow_evaporation_method > _method, std::string method_name) + """ + _cmf_core.snow_evaporation_swiginit(self, _cmf_core.new_snow_evaporation(*args, **kwargs)) + __swig_destroy__ = _cmf_core.delete_snow_evaporation +snow_evaporation_swigregister = _cmf_core.snow_evaporation_swigregister +snow_evaporation_swigregister(snow_evaporation) + +class surface_water_evaporation(flux_connection): + """ + + + Flux connection using an surface_water_evaporation_method. + + C++ includes: ET.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + + def __init__(self, *args, **kwargs): + """ + __init__(cmf::upslope::ET::surface_water_evaporation self, cmf::river::OpenWaterStorage::ptr source, cmf::water::flux_node::ptr ET_target, std::shared_ptr< cmf::upslope::ET::surface_water_evaporation_method > _method, std::string method_name) -> surface_water_evaporation + + surface_water_evaporation(cmf::river::OpenWaterStorage::ptr source, + cmf::water::flux_node::ptr ET_target, std::shared_ptr< + surface_water_evaporation_method > _method, std::string method_name) + + """ + _cmf_core.surface_water_evaporation_swiginit(self, _cmf_core.new_surface_water_evaporation(*args, **kwargs)) + __swig_destroy__ = _cmf_core.delete_surface_water_evaporation +surface_water_evaporation_swigregister = _cmf_core.surface_water_evaporation_swigregister +surface_water_evaporation_swigregister(surface_water_evaporation) + + +def PenmanMonteith(*args): + """ + PenmanMonteith(real Rn, real ra, real rs, real T, real vap_press_deficit) -> real + PenmanMonteith(Weather A, Vegetation veg, double h) -> real + + real + cmf::upslope::ET::PenmanMonteith(cmf::atmosphere::Weather A, const + cmf::upslope::vegetation::Vegetation &veg, double h) + + Returns the potential ET after Penman-Monteith using some + simplifications for a weather and a vegetation object. + + aerodynamic and surface resistances, and a vapor pressure deficit + + Parameters: + ----------- + + A: Current weather + + veg: Vegetation data + + h: Height above sea level in m (for air pressure estimation) + """ + return _cmf_core.PenmanMonteith(*args) +class stressedET(flux_connection): + """ + + + An abstract base class for ET Methods with a WaterStressFunction. + + C++ includes: ET.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def set_stressfunction(self, *args, **kwargs): + """ + set_stressfunction(stressedET self, RootUptakeStessFunction stressfunction) + + void + set_stressfunction(const RootUptakeStessFunction &stressfunction) + + Sets the stress function to limit water uptake. + """ + return _cmf_core.stressedET_set_stressfunction(self, *args, **kwargs) + + + def get_layer(self, *args, **kwargs): + """ + get_layer(stressedET self) -> cmf::upslope::SoilLayer::ptr + + SoilLayer::ptr get_layer() const + """ + return _cmf_core.stressedET_get_layer(self, *args, **kwargs) + + + def ETpot(self, *args, **kwargs): + """ + ETpot(stressedET self, Time t) -> real + + virtual + real ETpot(cmf::math::Time t) const + """ + return _cmf_core.stressedET_ETpot(self, *args, **kwargs) + + __swig_destroy__ = _cmf_core.delete_stressedET +stressedET.set_stressfunction = new_instancemethod(_cmf_core.stressedET_set_stressfunction, None, stressedET) +stressedET.get_layer = new_instancemethod(_cmf_core.stressedET_get_layer, None, stressedET) +stressedET.ETpot = new_instancemethod(_cmf_core.stressedET_ETpot, None, stressedET) +stressedET_swigregister = _cmf_core.stressedET_swigregister +stressedET_swigregister(stressedET) + +class constantETpot(stressedET): + """ + + + A constant evapotranspiration. + + Uses a constant measured or elsewhere modelled ETpot. Actual + Evapotranspiration is calculated from rootdepth and actual matrix + potential in the layers using Tact. The value of ETpot can be changed + during runtime + + C++ includes: ET.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + ETpot_value = _swig_property(_cmf_core.constantETpot_ETpot_value_get, _cmf_core.constantETpot_ETpot_value_set) + + def GetETpot(self, *args, **kwargs): + """ + GetETpot(constantETpot self, Time t) -> real + + real GetETpot(cmf::math::Time t) const + """ + return _cmf_core.constantETpot_GetETpot(self, *args, **kwargs) + + + def __init__(self, *args, **kwargs): + """ + __init__(cmf::upslope::ET::constantETpot self, cmf::upslope::SoilLayer::ptr source, cmf::water::flux_node::ptr ET_target, double constantETpot_value) -> constantETpot + + constantETpot(cmf::upslope::SoilLayer::ptr source, + cmf::water::flux_node::ptr ET_target, double constantETpot_value) + """ + _cmf_core.constantETpot_swiginit(self, _cmf_core.new_constantETpot(*args, **kwargs)) + __swig_destroy__ = _cmf_core.delete_constantETpot +constantETpot.GetETpot = new_instancemethod(_cmf_core.constantETpot_GetETpot, None, constantETpot) +constantETpot_swigregister = _cmf_core.constantETpot_swigregister +constantETpot_swigregister(constantETpot) + +class timeseriesETpot(stressedET): + """ + + + A timeseries driven evapotranspiration. + + Uses a timeseries of measured or elsewhere modelled ETpot. Actual + Evapotranspiration is calculated from rootdepth and actual matrix + potential in the layers using Tact. The value of ETpot can be changed + during runtime + + C++ includes: ET.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + ETpot_data = _swig_property(_cmf_core.timeseriesETpot_ETpot_data_get, _cmf_core.timeseriesETpot_ETpot_data_set) + + def __init__(self, *args, **kwargs): + """ + __init__(cmf::upslope::ET::timeseriesETpot self, cmf::upslope::SoilLayer::ptr source, cmf::water::flux_node::ptr ET_target, timeseries ETpot_values) -> timeseriesETpot + + timeseriesETpot(cmf::upslope::SoilLayer::ptr source, + cmf::water::flux_node::ptr ET_target, cmf::math::timeseries + ETpot_values) + """ + _cmf_core.timeseriesETpot_swiginit(self, _cmf_core.new_timeseriesETpot(*args, **kwargs)) + __swig_destroy__ = _cmf_core.delete_timeseriesETpot +timeseriesETpot_swigregister = _cmf_core.timeseriesETpot_swigregister +timeseriesETpot_swigregister(timeseriesETpot) + +class PenmanMonteithET(stressedET): + """ + + + Calculates the potential evapotranspiration according to FAO(1998) + + Governing equations: + + .. math:: + + \\lambda ET &=& + \\frac{\\Delta\\left(R_n - G\\right)+\\rho_a c_p + \\frac{e_s - e_a}{r_a}}{\\Delta + + \\gamma\\left(1+\\frac{r_s}{r_a}\\right)} \\mbox{ FAO 1998, + Eq. 3} \\\\ \\mbox{With:} \\\\ \\Delta &=& 4098 + \\frac{0.6108 e^{17.27 T}}{(T+237.3)^2} \\frac{kPa}{^\\circ C} + \\mbox{ (FAO 1998, Eq. 13)} \\\\ T &=& \\mbox{Actual + Temperature in } ^\\circ C \\\\ R_n &=& \\mbox{net Radiation + (see Atmosphere) in } \\frac{MJ}{m^2day} \\\\ G &=& 0 \\ + \\frac{MJ}{m^2day} \\mbox{ if daily average (FAO 1998, Eq. 42)} + \\\\ && 0.1 R_n \\ \\mbox{ if day time (FAO 1998, Eq. 45)} + \\\\ && 0.5 R_n \\ \\mbox{ if night time (FAO 1998, Eq. 46)} + \\\\ \\gamma &=& \\frac{c_p P}{\\epsilon \\lambda} + \\mbox{ (FAO 1998,Eq. 8): Psychrometric constant } + \\frac{kPa}{^\\circ C} \\\\ c_p &=& 0.001013 + \\frac{MJ}{kg\\ ^\\circ C}\\mbox{ specific heat at constant + pressure } \\\\ P &=& 101.3 + \\left(\\frac{293-0.0065z}{293}\\right)^{5.26} \\mbox{ (FAO + 1998,Eq. 7)} \\\\ \\epsilon &=& 0.622 \\frac{mol/g \\mbox{ + vapor}}{mol/g \\mbox{ liquid water}} \\\\ \\lambda &=& 2.45 + \\frac{MJ}{kg} \\mbox{ (FAO 1998,Eq. 8)} \\\\ R &=& 0.287 + \\frac{kJ}{kg\\ k}\\mbox{ Spec. gas const.} \\\\ \\rho_a + &=& \\frac{P}{1.01(T+273)R} \\mbox{ (FAO 1998,Box. 6)} \\\\ + e_s &=& \\mbox{ Sat. vapor press. } [kPa] \\\\ e_a &=& \\mbox{ + Act. vapor press. } [kPa] \\\\ r_a &=& + \\frac{\\ln\\left(\\frac{2-d}{z_{om}}\\right)\\ln\\left(\\frac{2-d}{z_{oh}}\\right)}{k^2 + u_2} \\mbox{ (FAO 1998, Eq. 4/Box 4} \\frac s m \\\\ && + d=\\frac 2 3 h,z_{om}=0.123 h,z_{oh}=0.1 z_{om}, k=0.41 \\\\ h + &=& \\mbox{ Vegetation height in }m \\\\ u_2 &=& \\mbox{ + Windspeed in 2m above canopy } \\frac m s \\\\ r_s &=& + \\frac{r_l}{LAI_{Active}} \\mbox{ (FAO 1998, Eq. 5/Box 5)} + \\frac s m \\\\ && r_l=100 \\frac s m, LAI_{Active}=0.5 LAI + + + + + C++ includes: ET.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + daily = _swig_property(_cmf_core.PenmanMonteithET_daily_get, _cmf_core.PenmanMonteithET_daily_set) + + def __init__(self, *args, **kwargs): + """ + __init__(cmf::upslope::ET::PenmanMonteithET self, cmf::upslope::SoilLayer::ptr source, cmf::water::flux_node::ptr ET_target) -> PenmanMonteithET + + PenmanMonteithET(cmf::upslope::SoilLayer::ptr source, + cmf::water::flux_node::ptr ET_target) + """ + _cmf_core.PenmanMonteithET_swiginit(self, _cmf_core.new_PenmanMonteithET(*args, **kwargs)) + + def r_s(*args, **kwargs): + """r_s(Vegetation veg) -> real""" + return _cmf_core.PenmanMonteithET_r_s(*args, **kwargs) + + r_s = staticmethod(r_s) + + def r_a(*args, **kwargs): + """r_a(Weather A, real veg_height) -> real""" + return _cmf_core.PenmanMonteithET_r_a(*args, **kwargs) + + r_a = staticmethod(r_a) + + def use_for_cell(*args, **kwargs): + """use_for_cell(Cell cell)""" + return _cmf_core.PenmanMonteithET_use_for_cell(*args, **kwargs) + + use_for_cell = staticmethod(use_for_cell) + __swig_destroy__ = _cmf_core.delete_PenmanMonteithET +PenmanMonteithET_swigregister = _cmf_core.PenmanMonteithET_swigregister +PenmanMonteithET_swigregister(PenmanMonteithET) + +def PenmanMonteithET_r_s(*args, **kwargs): + """PenmanMonteithET_r_s(Vegetation veg) -> real""" + return _cmf_core.PenmanMonteithET_r_s(*args, **kwargs) + +def PenmanMonteithET_r_a(*args, **kwargs): + """PenmanMonteithET_r_a(Weather A, real veg_height) -> real""" + return _cmf_core.PenmanMonteithET_r_a(*args, **kwargs) + +def PenmanMonteithET_use_for_cell(*args, **kwargs): + """PenmanMonteithET_use_for_cell(Cell cell)""" + return _cmf_core.PenmanMonteithET_use_for_cell(*args, **kwargs) + +class PriestleyTaylorET(stressedET): + """ + + + Calculates the Evapotranspiration using Priestley-Taylor equation. + + + + .. math:: + + lambda ET &=& \\alpha \\frac{\\Delta}{\\Delta + + \\gamma} \\left(R_n - G\\right) + + where: :math:`\\Delta = 4098 \\frac{0.6108 e^{17.27 T}}{(T+237.3)^2} \\frac{kPa}{^\\circ C}`, + the slope of the vapor pressure/ temperature curve + + :math:`\\gamma = \\frac{c_p P}{\\epsilon \\lambda} \\frac{kPa}{^\\circ C}` Psychrometric constant + + :math:`\\lambda = 2.45 \\frac{MJ}{kg}` the latent heat of vaporization + + :math:`R_n \\frac{MJ}{m^2day}` net Radiation (see Atmosphere) + + :math:`G` Ground heat flux + + :math:`\\alpha` the Priestley-Taylor constant (default 1.26 for humid + climates) + + C++ includes: ET.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + daily = _swig_property(_cmf_core.PriestleyTaylorET_daily_get, _cmf_core.PriestleyTaylorET_daily_set) + alpha = _swig_property(_cmf_core.PriestleyTaylorET_alpha_get, _cmf_core.PriestleyTaylorET_alpha_set) + + def __init__(self, *args, **kwargs): + """ + __init__(cmf::upslope::ET::PriestleyTaylorET self, cmf::upslope::SoilLayer::ptr source, cmf::water::flux_node::ptr ET_target, real alpha=1.26) -> PriestleyTaylorET + + PriestleyTaylorET(cmf::upslope::SoilLayer::ptr source, + cmf::water::flux_node::ptr ET_target, real alpha=1.26) + """ + _cmf_core.PriestleyTaylorET_swiginit(self, _cmf_core.new_PriestleyTaylorET(*args, **kwargs)) + + def use_for_cell(*args, **kwargs): + """use_for_cell(Cell cell)""" + return _cmf_core.PriestleyTaylorET_use_for_cell(*args, **kwargs) + + use_for_cell = staticmethod(use_for_cell) + __swig_destroy__ = _cmf_core.delete_PriestleyTaylorET +PriestleyTaylorET_swigregister = _cmf_core.PriestleyTaylorET_swigregister +PriestleyTaylorET_swigregister(PriestleyTaylorET) + +def PriestleyTaylorET_use_for_cell(*args, **kwargs): + """PriestleyTaylorET_use_for_cell(Cell cell)""" + return _cmf_core.PriestleyTaylorET_use_for_cell(*args, **kwargs) + +class HargreaveET(stressedET): + """ + + + Calculates the Evapotranspiration using Hargreave's equation. + + + + .. math:: + + ET_{rc} = 0.0135 K_T\\ s_0 \\sqrt{\\Delta T} (T + + 17.8) + + where: :math:`ET_{rc}` the reference crop evapotranspiration + in mm/day + + :math:`K_T = 0.00185{\\Delta T}^2 - 0.0433 \\Delta T + 0.4023` + Continentality factor as given in the reference + + :math:`\\Delta T = |T_{max} - T_{min}|[K]` Daily temperature range + + :math:`T [^\\circ C]` daily mean temperature + + :math:`s_0 = 15.392 d_r \\left(\\omega_s\\sin(\\Phi) \\sin{\\gamma} + \\cos{\\Phi}\\cos{\\gamma} * \\sin(\\omega_s)\\right)` the extraterrestrial solar radiation + in mm/day + + :math:`d_r = 1 + 0.0033 \\cos(DOY\\frac{2 \\pi}{365})` relative + distance between earth and sun + + :math:`\\omega_s = \\arccos(-\\tan{\\Phi} \\tan{\\gamma})` + sunset hour angle (radians) + + :math:`\\gamma = 0.4039 \\sin(DOY\\frac{2 \\pi}{365} - 1.405)` + solar declination (radians) + + :math:`\\Phi` geographic latitude (radians) + + See: SAMANI, Zohrab.Estimating solar radiation and evapotranspiration + using minimum climatological data. Journal of Irrigation and Drainage + Engineering, 2000, 126. Jg., Nr. 4, S. 265-267. Crop specific + potential evapotranspiration is scaled by LAI: :math:`ET_{pot} = ET_{rc} \\frac{LAI}{2.88}`. + + C++ includes: ET.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + + def __init__(self, *args, **kwargs): + """ + __init__(cmf::upslope::ET::HargreaveET self, cmf::upslope::SoilLayer::ptr source, cmf::water::flux_node::ptr ET_target, real latitude=51.0) -> HargreaveET + + HargreaveET(cmf::upslope::SoilLayer::ptr source, + cmf::water::flux_node::ptr ET_target, real latitude=51.0) + """ + _cmf_core.HargreaveET_swiginit(self, _cmf_core.new_HargreaveET(*args, **kwargs)) + lat = _swig_property(_cmf_core.HargreaveET_lat_get, _cmf_core.HargreaveET_lat_set) + + def use_for_cell(*args, **kwargs): + """use_for_cell(Cell cell)""" + return _cmf_core.HargreaveET_use_for_cell(*args, **kwargs) + + use_for_cell = staticmethod(use_for_cell) + __swig_destroy__ = _cmf_core.delete_HargreaveET +HargreaveET_swigregister = _cmf_core.HargreaveET_swigregister +HargreaveET_swigregister(HargreaveET) + +def HargreaveET_use_for_cell(*args, **kwargs): + """HargreaveET_use_for_cell(Cell cell)""" + return _cmf_core.HargreaveET_use_for_cell(*args, **kwargs) + +class TurcET(stressedET): + """ + + + Calculates ETpot after Turc (DVWK). + + ETact is calculated using a WaterStressFunction + + :math:`ET_{pot,Turc} = 0.0031 C (R_G + 209) \\frac{T}{T + 15}` + + C++ includes: ET.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + + def __init__(self, *args, **kwargs): + """ + __init__(cmf::upslope::ET::TurcET self, cmf::upslope::SoilLayer::ptr source, cmf::water::flux_node::ptr ET_target) -> TurcET + + TurcET(cmf::upslope::SoilLayer::ptr source, cmf::water::flux_node::ptr + ET_target) + """ + _cmf_core.TurcET_swiginit(self, _cmf_core.new_TurcET(*args, **kwargs)) + + def use_for_cell(*args, **kwargs): + """use_for_cell(Cell cell)""" + return _cmf_core.TurcET_use_for_cell(*args, **kwargs) + + use_for_cell = staticmethod(use_for_cell) + __swig_destroy__ = _cmf_core.delete_TurcET +TurcET_swigregister = _cmf_core.TurcET_swigregister +TurcET_swigregister(TurcET) + +def TurcET_use_for_cell(*args, **kwargs): + """TurcET_use_for_cell(Cell cell)""" + return _cmf_core.TurcET_use_for_cell(*args, **kwargs) + +class CanopyStorageEvaporation(flux_connection): + """ + + + Calculates the evaporation from a canopy storage. + + C++ includes: ET.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + + def __init__(self, *args, **kwargs): + """ + __init__(cmf::upslope::ET::CanopyStorageEvaporation self, cmf::water::WaterStorage::ptr CanopyStorage, cmf::water::flux_node::ptr ET_target, Cell cell) -> CanopyStorageEvaporation + + CanopyStorageEvaporation(cmf::water::WaterStorage::ptr CanopyStorage, + cmf::water::flux_node::ptr ET_target, cmf::upslope::Cell &cell) + """ + _cmf_core.CanopyStorageEvaporation_swiginit(self, _cmf_core.new_CanopyStorageEvaporation(*args, **kwargs)) + __swig_destroy__ = _cmf_core.delete_CanopyStorageEvaporation +CanopyStorageEvaporation_swigregister = _cmf_core.CanopyStorageEvaporation_swigregister +CanopyStorageEvaporation_swigregister(CanopyStorageEvaporation) + +class PenmanEvaporation(flux_connection): + """ + + + Calculates evaporation from an open water body. + + C++ includes: ET.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + + def __init__(self, *args, **kwargs): + """ + __init__(cmf::upslope::ET::PenmanEvaporation self, cmf::river::OpenWaterStorage::ptr source, cmf::water::flux_node::ptr Evap_target, Meteorology meteo) -> PenmanEvaporation + + PenmanEvaporation(cmf::river::OpenWaterStorage::ptr source, + cmf::water::flux_node::ptr Evap_target, const + cmf::atmosphere::Meteorology &meteo) + """ + _cmf_core.PenmanEvaporation_swiginit(self, _cmf_core.new_PenmanEvaporation(*args, **kwargs)) + __swig_destroy__ = _cmf_core.delete_PenmanEvaporation +PenmanEvaporation_swigregister = _cmf_core.PenmanEvaporation_swigregister +PenmanEvaporation_swigregister(PenmanEvaporation) + +class ShuttleworthWallace(transpiration_method, soil_evaporation_method, surface_water_evaporation_method, canopy_evaporation_method, snow_evaporation_method, aerodynamic_resistance): + """ + + + Calculates the sum of soil evaporation and transpiration according to + Shuttleworth & Wallace 1985, as implemented in BROOK 90 (Federer 1990) + + The difference to BROOK90 is, that the actual transpiration is not + calculated by plant resitance and potential gradient between plant and + soil, but by an piecewise linear function of the pF value :math:`pF = \\log_{10}\\left(-\\Psi [hPa]\\right)`: + + .. math:: + + + \\frac{T_{act}}{T_{pot}} = \\begin{cases}1 & pF \\le 3.35 + \\\\ \\frac{pF - 4.2}{3.35 - 4.2} & pF \\in [3.35 .. 4.2] + \\\\ 0 & pF \\ge 4.2\\end{cases} + + Calculation procedure, as in BROOK 90: + + Evapotranspiration from the canopy: :math:`\\lambda ET_{canopy} = \\frac{r_{ac} \\Delta\\ R_{n,canopy} + c_p\\rho D_0}{\\Delta \\gamma r_{ac} + \\gamma r_{sc}}` + + Evaporation from the ground: :math:`\\lambda E_{ground} = \\frac{r_{as} \\Delta\\ R_{n,ground} + c_p\\rho D_0}{\\Delta \\gamma r_{as} + \\gamma r_{ss}}` + + with :math:`\\Delta = \\frac{de_s}{dT} = 4098\\ 0.6108 \\exp\\left(\\frac{17.27 T}{T+237.3}\\right)(T+237.3)^{-2}`, + the slope of the sat. vap. press. T function + + :math:`R_{n,ground} = R_n \\exp(-C_R LAI)`, the net radiation flux in + the ground + + :math:`R_{n_canopy} = R_n - R_{n,ground}`, the net radiation flux in the + canopy + + :math:`\\lambda,c_p\\rho,\\gamma,C_R` constants lambda, c_p_rho, + gamma, C_R + + :math:`D_0` vapor pressure deficit at effective source height, see + function D0 + + :math:`r_{ac}, r_{sc}, r_{as}, r_{ss}` Resistances for the vapor pressure + (see below) + + C++ includes: ShuttleworthWallace.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + RAA = _swig_property(_cmf_core.ShuttleworthWallace_RAA_get, _cmf_core.ShuttleworthWallace_RAA_set) + RAC = _swig_property(_cmf_core.ShuttleworthWallace_RAC_get, _cmf_core.ShuttleworthWallace_RAC_set) + RAS = _swig_property(_cmf_core.ShuttleworthWallace_RAS_get, _cmf_core.ShuttleworthWallace_RAS_set) + RSS = _swig_property(_cmf_core.ShuttleworthWallace_RSS_get, _cmf_core.ShuttleworthWallace_RSS_set) + RSC = _swig_property(_cmf_core.ShuttleworthWallace_RSC_get, _cmf_core.ShuttleworthWallace_RSC_set) + refresh_counter = _swig_property(_cmf_core.ShuttleworthWallace_refresh_counter_get, _cmf_core.ShuttleworthWallace_refresh_counter_set) + + def refresh(self, *args): + """ + refresh(ShuttleworthWallace self, Time t) + refresh(ShuttleworthWallace self) + + void refresh() + """ + return _cmf_core.ShuttleworthWallace_refresh(self, *args) + + PTR = _swig_property(_cmf_core.ShuttleworthWallace_PTR_get, _cmf_core.ShuttleworthWallace_PTR_set) + PSNVP = _swig_property(_cmf_core.ShuttleworthWallace_PSNVP_get, _cmf_core.ShuttleworthWallace_PSNVP_set) + ASNVP = _swig_property(_cmf_core.ShuttleworthWallace_ASNVP_get, _cmf_core.ShuttleworthWallace_ASNVP_set) + GER = _swig_property(_cmf_core.ShuttleworthWallace_GER_get, _cmf_core.ShuttleworthWallace_GER_set) + PIR = _swig_property(_cmf_core.ShuttleworthWallace_PIR_get, _cmf_core.ShuttleworthWallace_PIR_set) + AIR = _swig_property(_cmf_core.ShuttleworthWallace_AIR_get, _cmf_core.ShuttleworthWallace_AIR_set) + GIR = _swig_property(_cmf_core.ShuttleworthWallace_GIR_get, _cmf_core.ShuttleworthWallace_GIR_set) + ATR_sum = _swig_property(_cmf_core.ShuttleworthWallace_ATR_sum_get, _cmf_core.ShuttleworthWallace_ATR_sum_set) + ATR = _swig_property(_cmf_core.ShuttleworthWallace_ATR_get, _cmf_core.ShuttleworthWallace_ATR_set) + KSNVP = _swig_property(_cmf_core.ShuttleworthWallace_KSNVP_get, _cmf_core.ShuttleworthWallace_KSNVP_set) + allow_dew = _swig_property(_cmf_core.ShuttleworthWallace_allow_dew_get, _cmf_core.ShuttleworthWallace_allow_dew_set) + + def set_RSS_parameters(*args, **kwargs): + """set_RSS_parameters(double _RSSa=500., double _RSSb=1.0, double _RSSa_pot=-3.22)""" + return _cmf_core.ShuttleworthWallace_set_RSS_parameters(*args, **kwargs) + + set_RSS_parameters = staticmethod(set_RSS_parameters) + + def __init__(self, *args, **kwargs): + """ + __init__(cmf::upslope::ET::ShuttleworthWallace self, Cell cell, bool allow_dew=True) -> ShuttleworthWallace + + ShuttleworthWallace(cmf::upslope::Cell &cell, bool allow_dew=true) + + Calculates the transpiration and the soil evaporation from dry + surfaces. + """ + _cmf_core.ShuttleworthWallace_swiginit(self, _cmf_core.new_ShuttleworthWallace(*args, **kwargs)) + + def use_for_cell(*args, **kwargs): + """use_for_cell(Cell cell) -> ShuttleworthWallace""" + return _cmf_core.ShuttleworthWallace_use_for_cell(*args, **kwargs) + + use_for_cell = staticmethod(use_for_cell) + __swig_destroy__ = _cmf_core.delete_ShuttleworthWallace +ShuttleworthWallace.refresh = new_instancemethod(_cmf_core.ShuttleworthWallace_refresh, None, ShuttleworthWallace) +ShuttleworthWallace_swigregister = _cmf_core.ShuttleworthWallace_swigregister +ShuttleworthWallace_swigregister(ShuttleworthWallace) + +def ShuttleworthWallace_set_RSS_parameters(*args, **kwargs): + """ShuttleworthWallace_set_RSS_parameters(double _RSSa=500., double _RSSb=1.0, double _RSSa_pot=-3.22)""" + return _cmf_core.ShuttleworthWallace_set_RSS_parameters(*args, **kwargs) + +def ShuttleworthWallace_use_for_cell(*args, **kwargs): + """ShuttleworthWallace_use_for_cell(Cell cell) -> ShuttleworthWallace""" + return _cmf_core.ShuttleworthWallace_use_for_cell(*args, **kwargs) + + +class project_list_wrapper: + def __init__(self,getitem,getlen,name): + self.__get = getitem + self.__len = getlen + self.name = name + def __len__(self): + return int(self.__len()) + def __getitem__(self,index): + if (type(index)==slice): + return [self.__get(i) for i in range(*index.indices(len(self)))] + try: + gen=iter(index) + return [self.__get(it) for it in gen] + except TypeError: + return self.__get(index) + def __iter__(self): + for i in range(len(self)): + yield self.__get(i) + def __repr__(self): + return '[%i %s of project]' % (len(self),self.name) + + +class project(StateVariableOwner): + """ + + + The study area, holding all cells, outlets and streams. + + Todo Describe tracers + + C++ includes: project.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + + def remove_node(self, *args, **kwargs): + """ + remove_node(project self, cmf::water::flux_node::ptr node) -> size_t + + size_t + remove_node(cmf::water::flux_node::ptr node) + + Removes a node from the repository. + + Removes a node (boundary condition or water storage) from the node + repository of the project. NOTE: If you have other references to this + node, the node is not deleted. If you are creating a new solver, the + node will not be part of the solver. + """ + return _cmf_core.project_remove_node(self, *args, **kwargs) + + solutes = _swig_property(_cmf_core.project_solutes_get) + meteo_stations = _swig_property(_cmf_core.project_meteo_stations_get, _cmf_core.project_meteo_stations_set) + rainfall_stations = _swig_property(_cmf_core.project_rainfall_stations_get, _cmf_core.project_rainfall_stations_set) + + def use_IDW_meteo(self, *args, **kwargs): + """ + use_IDW_meteo(project self, double z_weight=0, double power=2) + + void + use_IDW_meteo(double z_weight=0, double power=2) + + Uses IDW interpolation to generate meterological data for each cell of + project. + + Creates a meteo-data source for each cell, using spatial interpolated + data from all meteorological stations of the project using Inverse + Distance Weighted (IDW) interpolation. The meteorolgical value f is + calculated with IDW for position x,y,z and time t as follows: + + + .. math:: + + f(x,y,z,t) &=& \\sum^N_{i=1}{f_i(t) w_i(x,y,z)} + \\\\ w_i(x,y,z) &=& + \\frac{d_i(x,y,z)^{-p}}{\\sum^N_{j=0}{d_j(x,y,z)^{-p}}} \\\\ + d_i(x,y,z) &=& w_z \\left|z-z_i\\right| + + \\sqrt{\\left(x-x_i\\right)^2 + \\left(y-y_i\\right)^2} + + + :math:`N` is the number of stations + + :math:`f_i(t)` the meteorological value at time t, eg. Temperature, Humidity + + :math:`w_i` is the weight of station i + + :math:`d_i` is the distance from x,y,z to station i + + :math:`p` the power of the weighting function, usually 2. + + :math:`x_i,y_i,z_i` is the position of station i in space + + :math:`w_z` is a factor to weight the vertical distance between stations and + the cell. 0 results in a pure horizontal interpolation (normal IDW). + If :math:`w_z=1`, height difference is as important as horizontal distance, + and with :math:`w_z>1` the height difference is weighted more important than + horizontal distance See: IDW_Meteorology + + Parameters: + ----------- + + z_weight: :math:`w_z` the weight of height difference between cell and + station + + power: the power of the distance weight + """ + return _cmf_core.project_use_IDW_meteo(self, *args, **kwargs) + + + def use_nearest_meteo(self, *args, **kwargs): + """ + use_nearest_meteo(project self, double z_weight=0) + + void + use_nearest_meteo(double z_weight=0) + + Connects all cells of the project with its nearest meteorological + station. + + Distance is calculated as follows: + + .. math:: + + d_i(x,y,z) = w_z + \\left|z-z_i\\right| + \\sqrt{\\left(x-x_i\\right)^2 + + \\left(y-y_i\\right)^2} + + :math:`d_i` is the distance from x,y,z to + station i + + :math:`p` the power of the weighting function, usually 2. + + :math:`x_i,y_i,z_i` is the position of station i in space + + :math:`w_z` is a factor to weight the vertical distance between stations and + the cell. 0 results in a pure horizontal interpolation (normal IDW). + If :math:`w_z=1`, height difference is as important as horizontal distance, + and with :math:`w_z>1` the height difference is weighted more important than + horizontal distance + + Parameters: + ----------- + + z_weight: :math:`w_z` the weight of height difference between cell and + station + """ + return _cmf_core.project_use_nearest_meteo(self, *args, **kwargs) + + + def use_IDW_rainfall(self, *args, **kwargs): + """ + use_IDW_rainfall(project self, double z_weight=0, double power=2) + + void + use_IDW_rainfall(double z_weight=0, double power=2) + + Uses IDW interpolation to generate rainfall data for each cell of + project. + + Creates a rainfall-data source for each cell, using spatial + interpolated data from all meteorological stations of the project + using Inverse Distance Weighted (IDW) interpolation. The rainfall + intensity P is calculated with IDW for position x,y,z and time t as + follows: + + .. math:: + + P(x,y,z,t) &=& \\sum^N_{i=1}{P_i(t) + w_i(x,y,z)} \\\\ w_i(x,y,z) &=& + \\frac{d_i(x,y,z)^{-p}}{\\sum^N_{j=0}{d_j(x,y,z)^{-p}}} \\\\ + d_i(x,y,z) &=& w_z \\left|z-z_i\\right| + + \\sqrt{\\left(x-x_i\\right)^2 + \\left(y-y_i\\right)^2} + + + :math:`N` is the number of stations + + :math:`P_i(t)` the meteorological value at time t, eg. Temperature, Humidity + + :math:`w_i` is the weight of station i + + :math:`d_i` is the distance from x,y,z to station i + + :math:`p` the power of the weighting function, usually 2. + + :math:`x_i,y_i,z_i` is the position of station i in space + + :math:`w_z` is a factor to weight the vertical distance between stations and + the cell. 0 results in a pure horizontal interpolation (normal IDW). + If :math:`w_z=1`, height difference is as important as horizontal distance, + and with :math:`w_z>1` the height difference is weighted more important than + horizontal distance See: IDW_Meteorology + + Parameters: + ----------- + + z_weight: :math:`w_z` the weight of height difference between cell and + station + + power: the power of the distance weight + """ + return _cmf_core.project_use_IDW_rainfall(self, *args, **kwargs) + + + def use_nearest_rainfall(self, *args, **kwargs): + """ + use_nearest_rainfall(project self, double z_weight=0) + + void + use_nearest_rainfall(double z_weight=0) + + Connects all cells of the project with its nearest rainfall station. + + Distance is calculated as follows: + + .. math:: + + d_i(x,y,z) = w_z + \\left|z-z_i\\right| + \\sqrt{\\left(x-x_i\\right)^2 + + \\left(y-y_i\\right)^2} + + :math:`d_i` is the distance from x,y,z to + station i + + :math:`p` the power of the weighting function, usually 2. + + :math:`x_i,y_i,z_i` is the position of station i in space + + :math:`w_z` is a factor to weight the vertical distance between stations and + the cell. 0 results in a pure horizontal interpolation (normal IDW). + If :math:`w_z=1`, height difference is as important as horizontal distance, + and with :math:`w_z>1` the height difference is weighted more important than + horizontal distance + + Parameters: + ----------- + + z_weight: :math:`w_z` the weight of height difference between cell and + station + """ + return _cmf_core.project_use_nearest_rainfall(self, *args, **kwargs) + + + def get_cell(self, *args, **kwargs): + """ + get_cell(project self, ptrdiff_t index) -> Cell + + upslope::Cell& + get_cell(ptrdiff_t index) + + Returns the reference to the cell at index in the project. + """ + return _cmf_core.project_get_cell(self, *args, **kwargs) + + + def size(self, *args, **kwargs): + """ + size(project self) -> size_t + + size_t size() const + + The number of cells in the project. + """ + return _cmf_core.project_size(self, *args, **kwargs) + + + def __init__(self, *args, **kwargs): + """ + __init__(cmf::project self, std::string solute_names) -> project + + project(std::string + solute_names="") + + Creates a new project. + + Parameters: + ----------- + + solute_names: A string representing the names of the solutes to be + used in the project. Sepereate solute names with space. + """ + _cmf_core.project_swiginit(self, _cmf_core.new_project(*args, **kwargs)) + __swig_destroy__ = _cmf_core.delete_project + + def NewCell(self, *args, **kwargs): + """ + NewCell(project self, double x, double y, double z, double area, bool with_surfacewater=False) -> Cell + + cmf::upslope::Cell* + NewCell(double x, double y, double z, double area, bool + with_surfacewater=false) + + Creates a new cell. + + A new cell, owned by the project + + Parameters: + ----------- + + x: y: z: Position of the cell center in project coordinates (m) + + area: Area of the cell in m^2 + + with_surfacewater: If true, the cell will own a surfacewater storage + upon creation + """ + return _cmf_core.project_NewCell(self, *args, **kwargs) + + + def NewOutlet(self, *args, **kwargs): + """ + NewOutlet(project self, std::string name, double x=0, double y=0, double z=0) -> cmf::water::DirichletBoundary::ptr + + cmf::water::DirichletBoundary::ptr NewOutlet(std::string name, double + x=0, double y=0, double z=0) + + Creates a new Dirichlet boundary condition and adds it to the list of + outlets The potential of the Dirichlet boundary equals z, but can be + changed. + + Parameters: + ----------- + + name: Name of the boundary condition for output + + x: y: z: Position of the boundary condition in project coordinates + + """ + return _cmf_core.project_NewOutlet(self, *args, **kwargs) + + + def NewStorage(self, *args, **kwargs): + """ + NewStorage(project self, std::string name, double x=0, double y=0, double z=0) -> cmf::water::WaterStorage::ptr + + cmf::water::WaterStorage::ptr NewStorage(std::string name, double x=0, + double y=0, double z=0) + + Creates a new generic water storage at position x,y,z. + + The storage is added to the project nodes A new water storage, owned + by the project + + Parameters: + ----------- + + name: Name of the generic water storage for output + + x: y: z: Position of the generic water storage condition in project + coordinates + """ + return _cmf_core.project_NewStorage(self, *args, **kwargs) + + + def NewOpenStorage(self, *args, **kwargs): + """ + NewOpenStorage(project self, std::string name, double x, double y, double z, double area) -> cmf::river::OpenWaterStorage::ptr + + cmf::river::OpenWaterStorage::ptr NewOpenStorage(std::string name, + double x, double y, double z, double area) + + Creates a new open water storage with a prism geometry. + + The open water storage is added to the project nodes A new open water + storage, owned by the project + + Parameters: + ----------- + + name: Name of the open water storage for output + + x: y: z: Position of the open water storage in project coordinates + + area: Surface area of the open water storage + """ + return _cmf_core.project_NewOpenStorage(self, *args, **kwargs) + + + def NewNeumannBoundary(self, *args, **kwargs): + """ + NewNeumannBoundary(project self, std::string name, cmf::water::WaterStorage::ptr target) -> cmf::water::NeumannBoundary::ptr + + cmf::water::NeumannBoundary::ptr NewNeumannBoundary(std::string name, + cmf::water::WaterStorage::ptr target) + + Creates a new Neumann boundary for a target water storage. + + The boundary is stored with the project A new Neumann boundary + + Parameters: + ----------- + + name: The name of the boundary condition + + target: The water storage to which the Neumann boundary is bound + """ + return _cmf_core.project_NewNeumannBoundary(self, *args, **kwargs) + + + def NewReach(self, *args, **kwargs): + """ + NewReach(project self, double x, double y, double z, IChannel shape, bool diffusive=False) -> cmf::river::Reach::ptr + + cmf::river::Reach::ptr + NewReach(double x, double y, double z, cmf::river::IChannel &shape, + bool diffusive=false) + + Creates a new reach. + + A new reach, owned by the project + + Parameters: + ----------- + + x: y: z: Position of the reach in project coordinates + + shape: Crossectional geometry of the river. Any class inheriting from + cmf::water::IChannel + + diffusive: If true, this reach uses by default a diffusive wave + connection + """ + return _cmf_core.project_NewReach(self, *args, **kwargs) + + + def get_reach(self, *args, **kwargs): + """ + get_reach(project self, ptrdiff_t index) -> cmf::river::Reach::ptr + + cmf::river::Reach::ptr get_reach(ptrdiff_t index) + + Returns the reach at index. + """ + return _cmf_core.project_get_reach(self, *args, **kwargs) + + + def reach_count(self, *args, **kwargs): + """ + reach_count(project self) -> size_t + + size_t + reach_count() const + + Returns the number of reaches in this project. + """ + return _cmf_core.project_reach_count(self, *args, **kwargs) + + + def get_node(self, *args, **kwargs): + """ + get_node(project self, ptrdiff_t index) -> cmf::water::flux_node::ptr + + cmf::water::flux_node::ptr get_node(ptrdiff_t index) + + Returns the node from the project nodes at index. + """ + return _cmf_core.project_get_node(self, *args, **kwargs) + + + def node_count(self, *args, **kwargs): + """ + node_count(project self) -> size_t + + size_t node_count() + const + + Returns the number of nodes saved with this project. + """ + return _cmf_core.project_node_count(self, *args, **kwargs) + + + def get_storages(self, *args, **kwargs): + """ + get_storages(project self) -> node_list + + cmf::water::node_list get_storages() + + Returns a list of all storages of this project. + """ + return _cmf_core.project_get_storages(self, *args, **kwargs) + + cells = _swig_property(_cmf_core.project_cells_get) + + def __repr__(self): + return "cmf.project(%i cells, %i meteo stations, %i project nodes)" % (len(self.cells),len(self.meteo_stations),len(self.nodes)) + def __len__(self): + return self.size() + def __getitem__(self,index): + if isinstance(index,slice): + return [self[i] for i in range(*index.indices(len(self)))] + else: + return self.get_cell(index) + def __iter__(self): + for i in range(self.size()): + yield self.get_cell(i) + @property + def reaches(self): + "Returns the reaches of the project" + return project_list_wrapper(self.get_reach,self.reach_count,'reaches') + @property + def nodes(self): + "Returns the nodes of the project" + return project_list_wrapper(self.get_node,self.node_count,'nodes') + +project.remove_node = new_instancemethod(_cmf_core.project_remove_node, None, project) +project.use_IDW_meteo = new_instancemethod(_cmf_core.project_use_IDW_meteo, None, project) +project.use_nearest_meteo = new_instancemethod(_cmf_core.project_use_nearest_meteo, None, project) +project.use_IDW_rainfall = new_instancemethod(_cmf_core.project_use_IDW_rainfall, None, project) +project.use_nearest_rainfall = new_instancemethod(_cmf_core.project_use_nearest_rainfall, None, project) +project.get_cell = new_instancemethod(_cmf_core.project_get_cell, None, project) +project.size = new_instancemethod(_cmf_core.project_size, None, project) +project.NewCell = new_instancemethod(_cmf_core.project_NewCell, None, project) +project.NewOutlet = new_instancemethod(_cmf_core.project_NewOutlet, None, project) +project.NewStorage = new_instancemethod(_cmf_core.project_NewStorage, None, project) +project.NewOpenStorage = new_instancemethod(_cmf_core.project_NewOpenStorage, None, project) +project.NewNeumannBoundary = new_instancemethod(_cmf_core.project_NewNeumannBoundary, None, project) +project.NewReach = new_instancemethod(_cmf_core.project_NewReach, None, project) +project.get_reach = new_instancemethod(_cmf_core.project_get_reach, None, project) +project.reach_count = new_instancemethod(_cmf_core.project_reach_count, None, project) +project.get_node = new_instancemethod(_cmf_core.project_get_node, None, project) +project.node_count = new_instancemethod(_cmf_core.project_node_count, None, project) +project.get_storages = new_instancemethod(_cmf_core.project_get_storages, None, project) +project_swigregister = _cmf_core.project_swigregister +project_swigregister(project) + +class SoluteWaterIntegrator(Integrator): + """ + + + A SoluteWaterIntegrator implements the cmf::math::Integrator + interface, but consists of two independent ODE-solvers. + + Added statevariables are sorted by waterstorages and solute storages + and assigned to the correct solver. + + C++ includes: WaterSoluteIntegrator.h + """ + + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + + def copy(self, *args, **kwargs): + """ + copy(SoluteWaterIntegrator self) -> SoluteWaterIntegrator + + virtual cmf::math::SoluteWaterIntegrator* copy() const + + Polymorphic copy constructor. + """ + return _cmf_core.SoluteWaterIntegrator_copy(self, *args, **kwargs) + + + def __init__(self, *args): + """ + __init__(cmf::math::SoluteWaterIntegrator self, solute_vector solutes, Integrator water_integrator, Integrator solute_integrator) -> SoluteWaterIntegrator + __init__(cmf::math::SoluteWaterIntegrator self, solute_vector solutes, Integrator water_integrator, Integrator solute_integrator, StateVariableOwner states) -> SoluteWaterIntegrator + + SoluteWaterIntegrator(cmf::water::solute_vector solutes, const + cmf::math::Integrator &water_integrator, const cmf::math::Integrator + &solute_integrator, cmf::math::StateVariableOwner &states) + + Creates a new SoluteWaterIntegrator. + + Parameters: + ----------- + + solutes: Solutes of the project + + water_integrator: Template for the integrator of WaterStorage state + variables + + solute_integrator: Template for the integrator of soluteStorage state + variables + + states: States to be added to the integrators + """ + _cmf_core.SoluteWaterIntegrator_swiginit(self, _cmf_core.new_SoluteWaterIntegrator(*args)) + __swig_destroy__ = _cmf_core.delete_SoluteWaterIntegrator + + def to_string(self, *args, **kwargs): + """ + to_string(SoluteWaterIntegrator self) -> std::string + + std::string to_string() const + """ + return _cmf_core.SoluteWaterIntegrator_to_string(self, *args, **kwargs) + +SoluteWaterIntegrator.copy = new_instancemethod(_cmf_core.SoluteWaterIntegrator_copy, None, SoluteWaterIntegrator) +SoluteWaterIntegrator.to_string = new_instancemethod(_cmf_core.SoluteWaterIntegrator_to_string, None, SoluteWaterIntegrator) +SoluteWaterIntegrator_swigregister = _cmf_core.SoluteWaterIntegrator_swigregister +SoluteWaterIntegrator_swigregister(SoluteWaterIntegrator) + + + diff --git a/cmf/cmf_core_src/cmf_wrap.cpp b/cmf/cmf_core_src/cmf_wrap.cpp index b995e42f..4f41887e 100644 --- a/cmf/cmf_core_src/cmf_wrap.cpp +++ b/cmf/cmf_core_src/cmf_wrap.cpp @@ -1,84130 +1,84115 @@ -/* ---------------------------------------------------------------------------- - * This file was automatically generated by SWIG (http://www.swig.org). - * Version 3.0.12 - * - * This file is not intended to be easily readable and contains a number of - * coding conventions designed to improve portability and efficiency. Do not make - * changes to this file unless you know what you are doing--modify the SWIG - * interface file instead. - * ----------------------------------------------------------------------------- */ - - -#ifndef SWIGPYTHON -#define SWIGPYTHON -#endif - -#define SWIG_PYTHON_NO_BUILD_NONE -#define SWIG_PYTHON_DIRECTOR_NO_VTABLE -#define SWIG_CASTRANK_MODE -#define SWIG_PYTHON_CAST_MODE - - -#ifdef __cplusplus -/* SwigValueWrapper is described in swig.swg */ -template class SwigValueWrapper { - struct SwigMovePointer { - T *ptr; - SwigMovePointer(T *p) : ptr(p) { } - ~SwigMovePointer() { delete ptr; } - SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; } - } pointer; - SwigValueWrapper& operator=(const SwigValueWrapper& rhs); - SwigValueWrapper(const SwigValueWrapper& rhs); -public: - SwigValueWrapper() : pointer(0) { } - SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; } - operator T&() const { return *pointer.ptr; } - T *operator&() { return pointer.ptr; } -}; - -template T SwigValueInit() { - return T(); -} -#endif - -/* ----------------------------------------------------------------------------- - * This section contains generic SWIG labels for method/variable - * declarations/attributes, and other compiler dependent labels. - * ----------------------------------------------------------------------------- */ - -/* template workaround for compilers that cannot correctly implement the C++ standard */ -#ifndef SWIGTEMPLATEDISAMBIGUATOR -# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560) -# define SWIGTEMPLATEDISAMBIGUATOR template -# elif defined(__HP_aCC) -/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */ -/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */ -# define SWIGTEMPLATEDISAMBIGUATOR template -# else -# define SWIGTEMPLATEDISAMBIGUATOR -# endif -#endif - -/* inline attribute */ -#ifndef SWIGINLINE -# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__)) -# define SWIGINLINE inline -# else -# define SWIGINLINE -# endif -#endif - -/* attribute recognised by some compilers to avoid 'unused' warnings */ -#ifndef SWIGUNUSED -# if defined(__GNUC__) -# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) -# define SWIGUNUSED __attribute__ ((__unused__)) -# else -# define SWIGUNUSED -# endif -# elif defined(__ICC) -# define SWIGUNUSED __attribute__ ((__unused__)) -# else -# define SWIGUNUSED -# endif -#endif - -#ifndef SWIG_MSC_UNSUPPRESS_4505 -# if defined(_MSC_VER) -# pragma warning(disable : 4505) /* unreferenced local function has been removed */ -# endif -#endif - -#ifndef SWIGUNUSEDPARM -# ifdef __cplusplus -# define SWIGUNUSEDPARM(p) -# else -# define SWIGUNUSEDPARM(p) p SWIGUNUSED -# endif -#endif - -/* internal SWIG method */ -#ifndef SWIGINTERN -# define SWIGINTERN static SWIGUNUSED -#endif - -/* internal inline SWIG method */ -#ifndef SWIGINTERNINLINE -# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE -#endif - -/* exporting methods */ -#if defined(__GNUC__) -# if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) -# ifndef GCC_HASCLASSVISIBILITY -# define GCC_HASCLASSVISIBILITY -# endif -# endif -#endif - -#ifndef SWIGEXPORT -# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) -# if defined(STATIC_LINKED) -# define SWIGEXPORT -# else -# define SWIGEXPORT __declspec(dllexport) -# endif -# else -# if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY) -# define SWIGEXPORT __attribute__ ((visibility("default"))) -# else -# define SWIGEXPORT -# endif -# endif -#endif - -/* calling conventions for Windows */ -#ifndef SWIGSTDCALL -# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) -# define SWIGSTDCALL __stdcall -# else -# define SWIGSTDCALL -# endif -#endif - -/* Deal with Microsoft's attempt at deprecating C standard runtime functions */ -#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) -# define _CRT_SECURE_NO_DEPRECATE -#endif - -/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */ -#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE) -# define _SCL_SECURE_NO_DEPRECATE -#endif - -/* Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework */ -#if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES) -# define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0 -#endif - -/* Intel's compiler complains if a variable which was never initialised is - * cast to void, which is a common idiom which we use to indicate that we - * are aware a variable isn't used. So we just silence that warning. - * See: https://github.com/swig/swig/issues/192 for more discussion. - */ -#ifdef __INTEL_COMPILER -# pragma warning disable 592 -#endif - - -#if defined(_DEBUG) && defined(SWIG_PYTHON_INTERPRETER_NO_DEBUG) -/* Use debug wrappers with the Python release dll */ -# undef _DEBUG -# include -# define _DEBUG -#else -# include -#endif - -/* ----------------------------------------------------------------------------- - * swigrun.swg - * - * This file contains generic C API SWIG runtime support for pointer - * type checking. - * ----------------------------------------------------------------------------- */ - -/* This should only be incremented when either the layout of swig_type_info changes, - or for whatever reason, the runtime changes incompatibly */ -#define SWIG_RUNTIME_VERSION "4" - -/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */ -#ifdef SWIG_TYPE_TABLE -# define SWIG_QUOTE_STRING(x) #x -# define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x) -# define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE) -#else -# define SWIG_TYPE_TABLE_NAME -#endif - -/* - You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for - creating a static or dynamic library from the SWIG runtime code. - In 99.9% of the cases, SWIG just needs to declare them as 'static'. - - But only do this if strictly necessary, ie, if you have problems - with your compiler or suchlike. -*/ - -#ifndef SWIGRUNTIME -# define SWIGRUNTIME SWIGINTERN -#endif - -#ifndef SWIGRUNTIMEINLINE -# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE -#endif - -/* Generic buffer size */ -#ifndef SWIG_BUFFER_SIZE -# define SWIG_BUFFER_SIZE 1024 -#endif - -/* Flags for pointer conversions */ -#define SWIG_POINTER_DISOWN 0x1 -#define SWIG_CAST_NEW_MEMORY 0x2 - -/* Flags for new pointer objects */ -#define SWIG_POINTER_OWN 0x1 - - -/* - Flags/methods for returning states. - - The SWIG conversion methods, as ConvertPtr, return an integer - that tells if the conversion was successful or not. And if not, - an error code can be returned (see swigerrors.swg for the codes). - - Use the following macros/flags to set or process the returning - states. - - In old versions of SWIG, code such as the following was usually written: - - if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) { - // success code - } else { - //fail code - } - - Now you can be more explicit: - - int res = SWIG_ConvertPtr(obj,vptr,ty.flags); - if (SWIG_IsOK(res)) { - // success code - } else { - // fail code - } - - which is the same really, but now you can also do - - Type *ptr; - int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags); - if (SWIG_IsOK(res)) { - // success code - if (SWIG_IsNewObj(res) { - ... - delete *ptr; - } else { - ... - } - } else { - // fail code - } - - I.e., now SWIG_ConvertPtr can return new objects and you can - identify the case and take care of the deallocation. Of course that - also requires SWIG_ConvertPtr to return new result values, such as - - int SWIG_ConvertPtr(obj, ptr,...) { - if () { - if () { - *ptr = ; - return SWIG_NEWOBJ; - } else { - *ptr = ; - return SWIG_OLDOBJ; - } - } else { - return SWIG_BADOBJ; - } - } - - Of course, returning the plain '0(success)/-1(fail)' still works, but you can be - more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the - SWIG errors code. - - Finally, if the SWIG_CASTRANK_MODE is enabled, the result code - allows to return the 'cast rank', for example, if you have this - - int food(double) - int fooi(int); - - and you call - - food(1) // cast rank '1' (1 -> 1.0) - fooi(1) // cast rank '0' - - just use the SWIG_AddCast()/SWIG_CheckState() -*/ - -#define SWIG_OK (0) -#define SWIG_ERROR (-1) -#define SWIG_IsOK(r) (r >= 0) -#define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError) - -/* The CastRankLimit says how many bits are used for the cast rank */ -#define SWIG_CASTRANKLIMIT (1 << 8) -/* The NewMask denotes the object was created (using new/malloc) */ -#define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1) -/* The TmpMask is for in/out typemaps that use temporal objects */ -#define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1) -/* Simple returning values */ -#define SWIG_BADOBJ (SWIG_ERROR) -#define SWIG_OLDOBJ (SWIG_OK) -#define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK) -#define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK) -/* Check, add and del mask methods */ -#define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r) -#define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r) -#define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK)) -#define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r) -#define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r) -#define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK)) - -/* Cast-Rank Mode */ -#if defined(SWIG_CASTRANK_MODE) -# ifndef SWIG_TypeRank -# define SWIG_TypeRank unsigned long -# endif -# ifndef SWIG_MAXCASTRANK /* Default cast allowed */ -# define SWIG_MAXCASTRANK (2) -# endif -# define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1) -# define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK) -SWIGINTERNINLINE int SWIG_AddCast(int r) { - return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r; -} -SWIGINTERNINLINE int SWIG_CheckState(int r) { - return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; -} -#else /* no cast-rank mode */ -# define SWIG_AddCast(r) (r) -# define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0) -#endif - - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -typedef void *(*swig_converter_func)(void *, int *); -typedef struct swig_type_info *(*swig_dycast_func)(void **); - -/* Structure to store information on one type */ -typedef struct swig_type_info { - const char *name; /* mangled name of this type */ - const char *str; /* human readable name of this type */ - swig_dycast_func dcast; /* dynamic cast function down a hierarchy */ - struct swig_cast_info *cast; /* linked list of types that can cast into this type */ - void *clientdata; /* language specific type data */ - int owndata; /* flag if the structure owns the clientdata */ -} swig_type_info; - -/* Structure to store a type and conversion function used for casting */ -typedef struct swig_cast_info { - swig_type_info *type; /* pointer to type that is equivalent to this type */ - swig_converter_func converter; /* function to cast the void pointers */ - struct swig_cast_info *next; /* pointer to next cast in linked list */ - struct swig_cast_info *prev; /* pointer to the previous cast */ -} swig_cast_info; - -/* Structure used to store module information - * Each module generates one structure like this, and the runtime collects - * all of these structures and stores them in a circularly linked list.*/ -typedef struct swig_module_info { - swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */ - size_t size; /* Number of types in this module */ - struct swig_module_info *next; /* Pointer to next element in circularly linked list */ - swig_type_info **type_initial; /* Array of initially generated type structures */ - swig_cast_info **cast_initial; /* Array of initially generated casting structures */ - void *clientdata; /* Language specific module data */ -} swig_module_info; - -/* - Compare two type names skipping the space characters, therefore - "char*" == "char *" and "Class" == "Class", etc. - - Return 0 when the two name types are equivalent, as in - strncmp, but skipping ' '. -*/ -SWIGRUNTIME int -SWIG_TypeNameComp(const char *f1, const char *l1, - const char *f2, const char *l2) { - for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) { - while ((*f1 == ' ') && (f1 != l1)) ++f1; - while ((*f2 == ' ') && (f2 != l2)) ++f2; - if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1; - } - return (int)((l1 - f1) - (l2 - f2)); -} - -/* - Check type equivalence in a name list like ||... - Return 0 if equal, -1 if nb < tb, 1 if nb > tb -*/ -SWIGRUNTIME int -SWIG_TypeCmp(const char *nb, const char *tb) { - int equiv = 1; - const char* te = tb + strlen(tb); - const char* ne = nb; - while (equiv != 0 && *ne) { - for (nb = ne; *ne; ++ne) { - if (*ne == '|') break; - } - equiv = SWIG_TypeNameComp(nb, ne, tb, te); - if (*ne) ++ne; - } - return equiv; -} - -/* - Check type equivalence in a name list like ||... - Return 0 if not equal, 1 if equal -*/ -SWIGRUNTIME int -SWIG_TypeEquiv(const char *nb, const char *tb) { - return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0; -} - -/* - Check the typename -*/ -SWIGRUNTIME swig_cast_info * -SWIG_TypeCheck(const char *c, swig_type_info *ty) { - if (ty) { - swig_cast_info *iter = ty->cast; - while (iter) { - if (strcmp(iter->type->name, c) == 0) { - if (iter == ty->cast) - return iter; - /* Move iter to the top of the linked list */ - iter->prev->next = iter->next; - if (iter->next) - iter->next->prev = iter->prev; - iter->next = ty->cast; - iter->prev = 0; - if (ty->cast) ty->cast->prev = iter; - ty->cast = iter; - return iter; - } - iter = iter->next; - } - } - return 0; -} - -/* - Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison -*/ -SWIGRUNTIME swig_cast_info * -SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) { - if (ty) { - swig_cast_info *iter = ty->cast; - while (iter) { - if (iter->type == from) { - if (iter == ty->cast) - return iter; - /* Move iter to the top of the linked list */ - iter->prev->next = iter->next; - if (iter->next) - iter->next->prev = iter->prev; - iter->next = ty->cast; - iter->prev = 0; - if (ty->cast) ty->cast->prev = iter; - ty->cast = iter; - return iter; - } - iter = iter->next; - } - } - return 0; -} - -/* - Cast a pointer up an inheritance hierarchy -*/ -SWIGRUNTIMEINLINE void * -SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) { - return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory); -} - -/* - Dynamic pointer casting. Down an inheritance hierarchy -*/ -SWIGRUNTIME swig_type_info * -SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) { - swig_type_info *lastty = ty; - if (!ty || !ty->dcast) return ty; - while (ty && (ty->dcast)) { - ty = (*ty->dcast)(ptr); - if (ty) lastty = ty; - } - return lastty; -} - -/* - Return the name associated with this type -*/ -SWIGRUNTIMEINLINE const char * -SWIG_TypeName(const swig_type_info *ty) { - return ty->name; -} - -/* - Return the pretty name associated with this type, - that is an unmangled type name in a form presentable to the user. -*/ -SWIGRUNTIME const char * -SWIG_TypePrettyName(const swig_type_info *type) { - /* The "str" field contains the equivalent pretty names of the - type, separated by vertical-bar characters. We choose - to print the last name, as it is often (?) the most - specific. */ - if (!type) return NULL; - if (type->str != NULL) { - const char *last_name = type->str; - const char *s; - for (s = type->str; *s; s++) - if (*s == '|') last_name = s+1; - return last_name; - } - else - return type->name; -} - -/* - Set the clientdata field for a type -*/ -SWIGRUNTIME void -SWIG_TypeClientData(swig_type_info *ti, void *clientdata) { - swig_cast_info *cast = ti->cast; - /* if (ti->clientdata == clientdata) return; */ - ti->clientdata = clientdata; - - while (cast) { - if (!cast->converter) { - swig_type_info *tc = cast->type; - if (!tc->clientdata) { - SWIG_TypeClientData(tc, clientdata); - } - } - cast = cast->next; - } -} -SWIGRUNTIME void -SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) { - SWIG_TypeClientData(ti, clientdata); - ti->owndata = 1; -} - -/* - Search for a swig_type_info structure only by mangled name - Search is a O(log #types) - - We start searching at module start, and finish searching when start == end. - Note: if start == end at the beginning of the function, we go all the way around - the circular list. -*/ -SWIGRUNTIME swig_type_info * -SWIG_MangledTypeQueryModule(swig_module_info *start, - swig_module_info *end, - const char *name) { - swig_module_info *iter = start; - do { - if (iter->size) { - size_t l = 0; - size_t r = iter->size - 1; - do { - /* since l+r >= 0, we can (>> 1) instead (/ 2) */ - size_t i = (l + r) >> 1; - const char *iname = iter->types[i]->name; - if (iname) { - int compare = strcmp(name, iname); - if (compare == 0) { - return iter->types[i]; - } else if (compare < 0) { - if (i) { - r = i - 1; - } else { - break; - } - } else if (compare > 0) { - l = i + 1; - } - } else { - break; /* should never happen */ - } - } while (l <= r); - } - iter = iter->next; - } while (iter != end); - return 0; -} - -/* - Search for a swig_type_info structure for either a mangled name or a human readable name. - It first searches the mangled names of the types, which is a O(log #types) - If a type is not found it then searches the human readable names, which is O(#types). - - We start searching at module start, and finish searching when start == end. - Note: if start == end at the beginning of the function, we go all the way around - the circular list. -*/ -SWIGRUNTIME swig_type_info * -SWIG_TypeQueryModule(swig_module_info *start, - swig_module_info *end, - const char *name) { - /* STEP 1: Search the name field using binary search */ - swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name); - if (ret) { - return ret; - } else { - /* STEP 2: If the type hasn't been found, do a complete search - of the str field (the human readable name) */ - swig_module_info *iter = start; - do { - size_t i = 0; - for (; i < iter->size; ++i) { - if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name))) - return iter->types[i]; - } - iter = iter->next; - } while (iter != end); - } - - /* neither found a match */ - return 0; -} - -/* - Pack binary data into a string -*/ -SWIGRUNTIME char * -SWIG_PackData(char *c, void *ptr, size_t sz) { - static const char hex[17] = "0123456789abcdef"; - const unsigned char *u = (unsigned char *) ptr; - const unsigned char *eu = u + sz; - for (; u != eu; ++u) { - unsigned char uu = *u; - *(c++) = hex[(uu & 0xf0) >> 4]; - *(c++) = hex[uu & 0xf]; - } - return c; -} - -/* - Unpack binary data from a string -*/ -SWIGRUNTIME const char * -SWIG_UnpackData(const char *c, void *ptr, size_t sz) { - unsigned char *u = (unsigned char *) ptr; - const unsigned char *eu = u + sz; - for (; u != eu; ++u) { - char d = *(c++); - unsigned char uu; - if ((d >= '0') && (d <= '9')) - uu = (unsigned char)((d - '0') << 4); - else if ((d >= 'a') && (d <= 'f')) - uu = (unsigned char)((d - ('a'-10)) << 4); - else - return (char *) 0; - d = *(c++); - if ((d >= '0') && (d <= '9')) - uu |= (unsigned char)(d - '0'); - else if ((d >= 'a') && (d <= 'f')) - uu |= (unsigned char)(d - ('a'-10)); - else - return (char *) 0; - *u = uu; - } - return c; -} - -/* - Pack 'void *' into a string buffer. -*/ -SWIGRUNTIME char * -SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) { - char *r = buff; - if ((2*sizeof(void *) + 2) > bsz) return 0; - *(r++) = '_'; - r = SWIG_PackData(r,&ptr,sizeof(void *)); - if (strlen(name) + 1 > (bsz - (r - buff))) return 0; - strcpy(r,name); - return buff; -} - -SWIGRUNTIME const char * -SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) { - if (*c != '_') { - if (strcmp(c,"NULL") == 0) { - *ptr = (void *) 0; - return name; - } else { - return 0; - } - } - return SWIG_UnpackData(++c,ptr,sizeof(void *)); -} - -SWIGRUNTIME char * -SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) { - char *r = buff; - size_t lname = (name ? strlen(name) : 0); - if ((2*sz + 2 + lname) > bsz) return 0; - *(r++) = '_'; - r = SWIG_PackData(r,ptr,sz); - if (lname) { - strncpy(r,name,lname+1); - } else { - *r = 0; - } - return buff; -} - -SWIGRUNTIME const char * -SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { - if (*c != '_') { - if (strcmp(c,"NULL") == 0) { - memset(ptr,0,sz); - return name; - } else { - return 0; - } - } - return SWIG_UnpackData(++c,ptr,sz); -} - -#ifdef __cplusplus -} -#endif - -/* Errors in SWIG */ -#define SWIG_UnknownError -1 -#define SWIG_IOError -2 -#define SWIG_RuntimeError -3 -#define SWIG_IndexError -4 -#define SWIG_TypeError -5 -#define SWIG_DivisionByZero -6 -#define SWIG_OverflowError -7 -#define SWIG_SyntaxError -8 -#define SWIG_ValueError -9 -#define SWIG_SystemError -10 -#define SWIG_AttributeError -11 -#define SWIG_MemoryError -12 -#define SWIG_NullReferenceError -13 - - - -/* Compatibility macros for Python 3 */ -#if PY_VERSION_HEX >= 0x03000000 - -#define PyClass_Check(obj) PyObject_IsInstance(obj, (PyObject *)&PyType_Type) -#define PyInt_Check(x) PyLong_Check(x) -#define PyInt_AsLong(x) PyLong_AsLong(x) -#define PyInt_FromLong(x) PyLong_FromLong(x) -#define PyInt_FromSize_t(x) PyLong_FromSize_t(x) -#define PyString_Check(name) PyBytes_Check(name) -#define PyString_FromString(x) PyUnicode_FromString(x) -#define PyString_Format(fmt, args) PyUnicode_Format(fmt, args) -#define PyString_AsString(str) PyBytes_AsString(str) -#define PyString_Size(str) PyBytes_Size(str) -#define PyString_InternFromString(key) PyUnicode_InternFromString(key) -#define Py_TPFLAGS_HAVE_CLASS Py_TPFLAGS_BASETYPE -#define PyString_AS_STRING(x) PyUnicode_AS_STRING(x) -#define _PyLong_FromSsize_t(x) PyLong_FromSsize_t(x) - -#endif - -#ifndef Py_TYPE -# define Py_TYPE(op) ((op)->ob_type) -#endif - -/* SWIG APIs for compatibility of both Python 2 & 3 */ - -#if PY_VERSION_HEX >= 0x03000000 -# define SWIG_Python_str_FromFormat PyUnicode_FromFormat -#else -# define SWIG_Python_str_FromFormat PyString_FromFormat -#endif - - -/* Warning: This function will allocate a new string in Python 3, - * so please call SWIG_Python_str_DelForPy3(x) to free the space. - */ -SWIGINTERN char* -SWIG_Python_str_AsChar(PyObject *str) -{ -#if PY_VERSION_HEX >= 0x03000000 - char *cstr; - char *newstr; - Py_ssize_t len; - str = PyUnicode_AsUTF8String(str); - PyBytes_AsStringAndSize(str, &cstr, &len); - newstr = (char *) malloc(len+1); - memcpy(newstr, cstr, len+1); - Py_XDECREF(str); - return newstr; -#else - return PyString_AsString(str); -#endif -} - -#if PY_VERSION_HEX >= 0x03000000 -# define SWIG_Python_str_DelForPy3(x) free( (void*) (x) ) -#else -# define SWIG_Python_str_DelForPy3(x) -#endif - - -SWIGINTERN PyObject* -SWIG_Python_str_FromChar(const char *c) -{ -#if PY_VERSION_HEX >= 0x03000000 - return PyUnicode_FromString(c); -#else - return PyString_FromString(c); -#endif -} - -/* Add PyOS_snprintf for old Pythons */ -#if PY_VERSION_HEX < 0x02020000 -# if defined(_MSC_VER) || defined(__BORLANDC__) || defined(_WATCOM) -# define PyOS_snprintf _snprintf -# else -# define PyOS_snprintf snprintf -# endif -#endif - -/* A crude PyString_FromFormat implementation for old Pythons */ -#if PY_VERSION_HEX < 0x02020000 - -#ifndef SWIG_PYBUFFER_SIZE -# define SWIG_PYBUFFER_SIZE 1024 -#endif - -static PyObject * -PyString_FromFormat(const char *fmt, ...) { - va_list ap; - char buf[SWIG_PYBUFFER_SIZE * 2]; - int res; - va_start(ap, fmt); - res = vsnprintf(buf, sizeof(buf), fmt, ap); - va_end(ap); - return (res < 0 || res >= (int)sizeof(buf)) ? 0 : PyString_FromString(buf); -} -#endif - -#ifndef PyObject_DEL -# define PyObject_DEL PyObject_Del -#endif - -/* A crude PyExc_StopIteration exception for old Pythons */ -#if PY_VERSION_HEX < 0x02020000 -# ifndef PyExc_StopIteration -# define PyExc_StopIteration PyExc_RuntimeError -# endif -# ifndef PyObject_GenericGetAttr -# define PyObject_GenericGetAttr 0 -# endif -#endif - -/* Py_NotImplemented is defined in 2.1 and up. */ -#if PY_VERSION_HEX < 0x02010000 -# ifndef Py_NotImplemented -# define Py_NotImplemented PyExc_RuntimeError -# endif -#endif - -/* A crude PyString_AsStringAndSize implementation for old Pythons */ -#if PY_VERSION_HEX < 0x02010000 -# ifndef PyString_AsStringAndSize -# define PyString_AsStringAndSize(obj, s, len) {*s = PyString_AsString(obj); *len = *s ? strlen(*s) : 0;} -# endif -#endif - -/* PySequence_Size for old Pythons */ -#if PY_VERSION_HEX < 0x02000000 -# ifndef PySequence_Size -# define PySequence_Size PySequence_Length -# endif -#endif - -/* PyBool_FromLong for old Pythons */ -#if PY_VERSION_HEX < 0x02030000 -static -PyObject *PyBool_FromLong(long ok) -{ - PyObject *result = ok ? Py_True : Py_False; - Py_INCREF(result); - return result; -} -#endif - -/* Py_ssize_t for old Pythons */ -/* This code is as recommended by: */ -/* http://www.python.org/dev/peps/pep-0353/#conversion-guidelines */ -#if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN) -typedef int Py_ssize_t; -# define PY_SSIZE_T_MAX INT_MAX -# define PY_SSIZE_T_MIN INT_MIN -typedef inquiry lenfunc; -typedef intargfunc ssizeargfunc; -typedef intintargfunc ssizessizeargfunc; -typedef intobjargproc ssizeobjargproc; -typedef intintobjargproc ssizessizeobjargproc; -typedef getreadbufferproc readbufferproc; -typedef getwritebufferproc writebufferproc; -typedef getsegcountproc segcountproc; -typedef getcharbufferproc charbufferproc; -static long PyNumber_AsSsize_t (PyObject *x, void *SWIGUNUSEDPARM(exc)) -{ - long result = 0; - PyObject *i = PyNumber_Int(x); - if (i) { - result = PyInt_AsLong(i); - Py_DECREF(i); - } - return result; -} -#endif - -#if PY_VERSION_HEX < 0x02050000 -#define PyInt_FromSize_t(x) PyInt_FromLong((long)x) -#endif - -#if PY_VERSION_HEX < 0x02040000 -#define Py_VISIT(op) \ - do { \ - if (op) { \ - int vret = visit((op), arg); \ - if (vret) \ - return vret; \ - } \ - } while (0) -#endif - -#if PY_VERSION_HEX < 0x02030000 -typedef struct { - PyTypeObject type; - PyNumberMethods as_number; - PyMappingMethods as_mapping; - PySequenceMethods as_sequence; - PyBufferProcs as_buffer; - PyObject *name, *slots; -} PyHeapTypeObject; -#endif - -#if PY_VERSION_HEX < 0x02030000 -typedef destructor freefunc; -#endif - -#if ((PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION > 6) || \ - (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION > 0) || \ - (PY_MAJOR_VERSION > 3)) -# define SWIGPY_USE_CAPSULE -# define SWIGPY_CAPSULE_NAME ((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer_capsule" SWIG_TYPE_TABLE_NAME) -#endif - -#if PY_VERSION_HEX < 0x03020000 -#define PyDescr_TYPE(x) (((PyDescrObject *)(x))->d_type) -#define PyDescr_NAME(x) (((PyDescrObject *)(x))->d_name) -#define Py_hash_t long -#endif - -/* ----------------------------------------------------------------------------- - * error manipulation - * ----------------------------------------------------------------------------- */ - -SWIGRUNTIME PyObject* -SWIG_Python_ErrorType(int code) { - PyObject* type = 0; - switch(code) { - case SWIG_MemoryError: - type = PyExc_MemoryError; - break; - case SWIG_IOError: - type = PyExc_IOError; - break; - case SWIG_RuntimeError: - type = PyExc_RuntimeError; - break; - case SWIG_IndexError: - type = PyExc_IndexError; - break; - case SWIG_TypeError: - type = PyExc_TypeError; - break; - case SWIG_DivisionByZero: - type = PyExc_ZeroDivisionError; - break; - case SWIG_OverflowError: - type = PyExc_OverflowError; - break; - case SWIG_SyntaxError: - type = PyExc_SyntaxError; - break; - case SWIG_ValueError: - type = PyExc_ValueError; - break; - case SWIG_SystemError: - type = PyExc_SystemError; - break; - case SWIG_AttributeError: - type = PyExc_AttributeError; - break; - default: - type = PyExc_RuntimeError; - } - return type; -} - - -SWIGRUNTIME void -SWIG_Python_AddErrorMsg(const char* mesg) -{ - PyObject *type = 0; - PyObject *value = 0; - PyObject *traceback = 0; - - if (PyErr_Occurred()) PyErr_Fetch(&type, &value, &traceback); - if (value) { - char *tmp; - PyObject *old_str = PyObject_Str(value); - PyErr_Clear(); - Py_XINCREF(type); - - PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg); - SWIG_Python_str_DelForPy3(tmp); - Py_DECREF(old_str); - Py_DECREF(value); - } else { - PyErr_SetString(PyExc_RuntimeError, mesg); - } -} - -#if defined(SWIG_PYTHON_NO_THREADS) -# if defined(SWIG_PYTHON_THREADS) -# undef SWIG_PYTHON_THREADS -# endif -#endif -#if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */ -# if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL) -# if (PY_VERSION_HEX >= 0x02030000) /* For 2.3 or later, use the PyGILState calls */ -# define SWIG_PYTHON_USE_GIL -# endif -# endif -# if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */ -# ifndef SWIG_PYTHON_INITIALIZE_THREADS -# define SWIG_PYTHON_INITIALIZE_THREADS PyEval_InitThreads() -# endif -# ifdef __cplusplus /* C++ code */ - class SWIG_Python_Thread_Block { - bool status; - PyGILState_STATE state; - public: - void end() { if (status) { PyGILState_Release(state); status = false;} } - SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {} - ~SWIG_Python_Thread_Block() { end(); } - }; - class SWIG_Python_Thread_Allow { - bool status; - PyThreadState *save; - public: - void end() { if (status) { PyEval_RestoreThread(save); status = false; }} - SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {} - ~SWIG_Python_Thread_Allow() { end(); } - }; -# define SWIG_PYTHON_THREAD_BEGIN_BLOCK SWIG_Python_Thread_Block _swig_thread_block -# define SWIG_PYTHON_THREAD_END_BLOCK _swig_thread_block.end() -# define SWIG_PYTHON_THREAD_BEGIN_ALLOW SWIG_Python_Thread_Allow _swig_thread_allow -# define SWIG_PYTHON_THREAD_END_ALLOW _swig_thread_allow.end() -# else /* C code */ -# define SWIG_PYTHON_THREAD_BEGIN_BLOCK PyGILState_STATE _swig_thread_block = PyGILState_Ensure() -# define SWIG_PYTHON_THREAD_END_BLOCK PyGILState_Release(_swig_thread_block) -# define SWIG_PYTHON_THREAD_BEGIN_ALLOW PyThreadState *_swig_thread_allow = PyEval_SaveThread() -# define SWIG_PYTHON_THREAD_END_ALLOW PyEval_RestoreThread(_swig_thread_allow) -# endif -# else /* Old thread way, not implemented, user must provide it */ -# if !defined(SWIG_PYTHON_INITIALIZE_THREADS) -# define SWIG_PYTHON_INITIALIZE_THREADS -# endif -# if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK) -# define SWIG_PYTHON_THREAD_BEGIN_BLOCK -# endif -# if !defined(SWIG_PYTHON_THREAD_END_BLOCK) -# define SWIG_PYTHON_THREAD_END_BLOCK -# endif -# if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW) -# define SWIG_PYTHON_THREAD_BEGIN_ALLOW -# endif -# if !defined(SWIG_PYTHON_THREAD_END_ALLOW) -# define SWIG_PYTHON_THREAD_END_ALLOW -# endif -# endif -#else /* No thread support */ -# define SWIG_PYTHON_INITIALIZE_THREADS -# define SWIG_PYTHON_THREAD_BEGIN_BLOCK -# define SWIG_PYTHON_THREAD_END_BLOCK -# define SWIG_PYTHON_THREAD_BEGIN_ALLOW -# define SWIG_PYTHON_THREAD_END_ALLOW -#endif - -/* ----------------------------------------------------------------------------- - * Python API portion that goes into the runtime - * ----------------------------------------------------------------------------- */ - -#ifdef __cplusplus -extern "C" { -#endif - -/* ----------------------------------------------------------------------------- - * Constant declarations - * ----------------------------------------------------------------------------- */ - -/* Constant Types */ -#define SWIG_PY_POINTER 4 -#define SWIG_PY_BINARY 5 - -/* Constant information structure */ -typedef struct swig_const_info { - int type; - char *name; - long lvalue; - double dvalue; - void *pvalue; - swig_type_info **ptype; -} swig_const_info; - - -/* ----------------------------------------------------------------------------- - * Wrapper of PyInstanceMethod_New() used in Python 3 - * It is exported to the generated module, used for -fastproxy - * ----------------------------------------------------------------------------- */ -#if PY_VERSION_HEX >= 0x03000000 -SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func) -{ - return PyInstanceMethod_New(func); -} -#else -SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *SWIGUNUSEDPARM(func)) -{ - return NULL; -} -#endif - -#ifdef __cplusplus -} -#endif - - -/* ----------------------------------------------------------------------------- - * pyrun.swg - * - * This file contains the runtime support for Python modules - * and includes code for managing global variables and pointer - * type checking. - * - * ----------------------------------------------------------------------------- */ - -/* Common SWIG API */ - -/* for raw pointers */ -#define SWIG_Python_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0) -#define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtr(obj, pptr, type, flags) -#define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own) - -#ifdef SWIGPYTHON_BUILTIN -#define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(self, ptr, type, flags) -#else -#define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags) -#endif - -#define SWIG_InternalNewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags) - -#define SWIG_CheckImplicit(ty) SWIG_Python_CheckImplicit(ty) -#define SWIG_AcquirePtr(ptr, src) SWIG_Python_AcquirePtr(ptr, src) -#define swig_owntype int - -/* for raw packed data */ -#define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty) -#define SWIG_NewPackedObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type) - -/* for class or struct pointers */ -#define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags) -#define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags) - -/* for C or C++ function pointers */ -#define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_Python_ConvertFunctionPtr(obj, pptr, type) -#define SWIG_NewFunctionPtrObj(ptr, type) SWIG_Python_NewPointerObj(NULL, ptr, type, 0) - -/* for C++ member pointers, ie, member methods */ -#define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty) -#define SWIG_NewMemberObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type) - - -/* Runtime API */ - -#define SWIG_GetModule(clientdata) SWIG_Python_GetModule(clientdata) -#define SWIG_SetModule(clientdata, pointer) SWIG_Python_SetModule(pointer) -#define SWIG_NewClientData(obj) SwigPyClientData_New(obj) - -#define SWIG_SetErrorObj SWIG_Python_SetErrorObj -#define SWIG_SetErrorMsg SWIG_Python_SetErrorMsg -#define SWIG_ErrorType(code) SWIG_Python_ErrorType(code) -#define SWIG_Error(code, msg) SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg) -#define SWIG_fail goto fail - - -/* Runtime API implementation */ - -/* Error manipulation */ - -SWIGINTERN void -SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) { - SWIG_PYTHON_THREAD_BEGIN_BLOCK; - PyErr_SetObject(errtype, obj); - Py_DECREF(obj); - SWIG_PYTHON_THREAD_END_BLOCK; -} - -SWIGINTERN void -SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) { - SWIG_PYTHON_THREAD_BEGIN_BLOCK; - PyErr_SetString(errtype, msg); - SWIG_PYTHON_THREAD_END_BLOCK; -} - -#define SWIG_Python_Raise(obj, type, desc) SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj) - -/* Set a constant value */ - -#if defined(SWIGPYTHON_BUILTIN) - -SWIGINTERN void -SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) { - PyObject *s = PyString_InternFromString(key); - PyList_Append(seq, s); - Py_DECREF(s); -} - -SWIGINTERN void -SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) { -#if PY_VERSION_HEX < 0x02030000 - PyDict_SetItemString(d, (char *)name, obj); -#else - PyDict_SetItemString(d, name, obj); -#endif - Py_DECREF(obj); - if (public_interface) - SwigPyBuiltin_AddPublicSymbol(public_interface, name); -} - -#else - -SWIGINTERN void -SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { -#if PY_VERSION_HEX < 0x02030000 - PyDict_SetItemString(d, (char *)name, obj); -#else - PyDict_SetItemString(d, name, obj); -#endif - Py_DECREF(obj); -} - -#endif - -/* Append a value to the result obj */ - -SWIGINTERN PyObject* -SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { -#if !defined(SWIG_PYTHON_OUTPUT_TUPLE) - if (!result) { - result = obj; - } else if (result == Py_None) { - Py_DECREF(result); - result = obj; - } else { - if (!PyList_Check(result)) { - PyObject *o2 = result; - result = PyList_New(1); - PyList_SetItem(result, 0, o2); - } - PyList_Append(result,obj); - Py_DECREF(obj); - } - return result; -#else - PyObject* o2; - PyObject* o3; - if (!result) { - result = obj; - } else if (result == Py_None) { - Py_DECREF(result); - result = obj; - } else { - if (!PyTuple_Check(result)) { - o2 = result; - result = PyTuple_New(1); - PyTuple_SET_ITEM(result, 0, o2); - } - o3 = PyTuple_New(1); - PyTuple_SET_ITEM(o3, 0, obj); - o2 = result; - result = PySequence_Concat(o2, o3); - Py_DECREF(o2); - Py_DECREF(o3); - } - return result; -#endif -} - -/* Unpack the argument tuple */ - -SWIGINTERN Py_ssize_t -SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs) -{ - if (!args) { - if (!min && !max) { - return 1; - } else { - PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none", - name, (min == max ? "" : "at least "), (int)min); - return 0; - } - } - if (!PyTuple_Check(args)) { - if (min <= 1 && max >= 1) { - Py_ssize_t i; - objs[0] = args; - for (i = 1; i < max; ++i) { - objs[i] = 0; - } - return 2; - } - PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple"); - return 0; - } else { - Py_ssize_t l = PyTuple_GET_SIZE(args); - if (l < min) { - PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", - name, (min == max ? "" : "at least "), (int)min, (int)l); - return 0; - } else if (l > max) { - PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", - name, (min == max ? "" : "at most "), (int)max, (int)l); - return 0; - } else { - Py_ssize_t i; - for (i = 0; i < l; ++i) { - objs[i] = PyTuple_GET_ITEM(args, i); - } - for (; l < max; ++l) { - objs[l] = 0; - } - return i + 1; - } - } -} - -/* A functor is a function object with one single object argument */ -#if PY_VERSION_HEX >= 0x02020000 -#define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunctionObjArgs(functor, obj, NULL); -#else -#define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunction(functor, "O", obj); -#endif - -/* - Helper for static pointer initialization for both C and C++ code, for example - static PyObject *SWIG_STATIC_POINTER(MyVar) = NewSomething(...); -*/ -#ifdef __cplusplus -#define SWIG_STATIC_POINTER(var) var -#else -#define SWIG_STATIC_POINTER(var) var = 0; if (!var) var -#endif - -/* ----------------------------------------------------------------------------- - * Pointer declarations - * ----------------------------------------------------------------------------- */ - -/* Flags for new pointer objects */ -#define SWIG_POINTER_NOSHADOW (SWIG_POINTER_OWN << 1) -#define SWIG_POINTER_NEW (SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN) - -#define SWIG_POINTER_IMPLICIT_CONV (SWIG_POINTER_DISOWN << 1) - -#define SWIG_BUILTIN_TP_INIT (SWIG_POINTER_OWN << 2) -#define SWIG_BUILTIN_INIT (SWIG_BUILTIN_TP_INIT | SWIG_POINTER_OWN) - -#ifdef __cplusplus -extern "C" { -#endif - -/* How to access Py_None */ -#if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) -# ifndef SWIG_PYTHON_NO_BUILD_NONE -# ifndef SWIG_PYTHON_BUILD_NONE -# define SWIG_PYTHON_BUILD_NONE -# endif -# endif -#endif - -#ifdef SWIG_PYTHON_BUILD_NONE -# ifdef Py_None -# undef Py_None -# define Py_None SWIG_Py_None() -# endif -SWIGRUNTIMEINLINE PyObject * -_SWIG_Py_None(void) -{ - PyObject *none = Py_BuildValue((char*)""); - Py_DECREF(none); - return none; -} -SWIGRUNTIME PyObject * -SWIG_Py_None(void) -{ - static PyObject *SWIG_STATIC_POINTER(none) = _SWIG_Py_None(); - return none; -} -#endif - -/* The python void return value */ - -SWIGRUNTIMEINLINE PyObject * -SWIG_Py_Void(void) -{ - PyObject *none = Py_None; - Py_INCREF(none); - return none; -} - -/* SwigPyClientData */ - -typedef struct { - PyObject *klass; - PyObject *newraw; - PyObject *newargs; - PyObject *destroy; - int delargs; - int implicitconv; - PyTypeObject *pytype; -} SwigPyClientData; - -SWIGRUNTIMEINLINE int -SWIG_Python_CheckImplicit(swig_type_info *ty) -{ - SwigPyClientData *data = (SwigPyClientData *)ty->clientdata; - return data ? data->implicitconv : 0; -} - -SWIGRUNTIMEINLINE PyObject * -SWIG_Python_ExceptionType(swig_type_info *desc) { - SwigPyClientData *data = desc ? (SwigPyClientData *) desc->clientdata : 0; - PyObject *klass = data ? data->klass : 0; - return (klass ? klass : PyExc_RuntimeError); -} - - -SWIGRUNTIME SwigPyClientData * -SwigPyClientData_New(PyObject* obj) -{ - if (!obj) { - return 0; - } else { - SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData)); - /* the klass element */ - data->klass = obj; - Py_INCREF(data->klass); - /* the newraw method and newargs arguments used to create a new raw instance */ - if (PyClass_Check(obj)) { - data->newraw = 0; - data->newargs = obj; - Py_INCREF(obj); - } else { -#if (PY_VERSION_HEX < 0x02020000) - data->newraw = 0; -#else - data->newraw = PyObject_GetAttrString(data->klass, (char *)"__new__"); -#endif - if (data->newraw) { - Py_INCREF(data->newraw); - data->newargs = PyTuple_New(1); - PyTuple_SetItem(data->newargs, 0, obj); - } else { - data->newargs = obj; - } - Py_INCREF(data->newargs); - } - /* the destroy method, aka as the C++ delete method */ - data->destroy = PyObject_GetAttrString(data->klass, (char *)"__swig_destroy__"); - if (PyErr_Occurred()) { - PyErr_Clear(); - data->destroy = 0; - } - if (data->destroy) { - int flags; - Py_INCREF(data->destroy); - flags = PyCFunction_GET_FLAGS(data->destroy); -#ifdef METH_O - data->delargs = !(flags & (METH_O)); -#else - data->delargs = 0; -#endif - } else { - data->delargs = 0; - } - data->implicitconv = 0; - data->pytype = 0; - return data; - } -} - -SWIGRUNTIME void -SwigPyClientData_Del(SwigPyClientData *data) { - Py_XDECREF(data->newraw); - Py_XDECREF(data->newargs); - Py_XDECREF(data->destroy); -} - -/* =============== SwigPyObject =====================*/ - -typedef struct { - PyObject_HEAD - void *ptr; - swig_type_info *ty; - int own; - PyObject *next; -#ifdef SWIGPYTHON_BUILTIN - PyObject *dict; -#endif -} SwigPyObject; - - -#ifdef SWIGPYTHON_BUILTIN - -SWIGRUNTIME PyObject * -SwigPyObject_get___dict__(PyObject *v, PyObject *SWIGUNUSEDPARM(args)) -{ - SwigPyObject *sobj = (SwigPyObject *)v; - - if (!sobj->dict) - sobj->dict = PyDict_New(); - - Py_INCREF(sobj->dict); - return sobj->dict; -} - -#endif - -SWIGRUNTIME PyObject * -SwigPyObject_long(SwigPyObject *v) -{ - return PyLong_FromVoidPtr(v->ptr); -} - -SWIGRUNTIME PyObject * -SwigPyObject_format(const char* fmt, SwigPyObject *v) -{ - PyObject *res = NULL; - PyObject *args = PyTuple_New(1); - if (args) { - if (PyTuple_SetItem(args, 0, SwigPyObject_long(v)) == 0) { - PyObject *ofmt = SWIG_Python_str_FromChar(fmt); - if (ofmt) { -#if PY_VERSION_HEX >= 0x03000000 - res = PyUnicode_Format(ofmt,args); -#else - res = PyString_Format(ofmt,args); -#endif - Py_DECREF(ofmt); - } - Py_DECREF(args); - } - } - return res; -} - -SWIGRUNTIME PyObject * -SwigPyObject_oct(SwigPyObject *v) -{ - return SwigPyObject_format("%o",v); -} - -SWIGRUNTIME PyObject * -SwigPyObject_hex(SwigPyObject *v) -{ - return SwigPyObject_format("%x",v); -} - -SWIGRUNTIME PyObject * -#ifdef METH_NOARGS -SwigPyObject_repr(SwigPyObject *v) -#else -SwigPyObject_repr(SwigPyObject *v, PyObject *args) -#endif -{ - const char *name = SWIG_TypePrettyName(v->ty); - PyObject *repr = SWIG_Python_str_FromFormat("", (name ? name : "unknown"), (void *)v); - if (v->next) { -# ifdef METH_NOARGS - PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next); -# else - PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next, args); -# endif -# if PY_VERSION_HEX >= 0x03000000 - PyObject *joined = PyUnicode_Concat(repr, nrep); - Py_DecRef(repr); - Py_DecRef(nrep); - repr = joined; -# else - PyString_ConcatAndDel(&repr,nrep); -# endif - } - return repr; -} - -SWIGRUNTIME int -SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w) -{ - void *i = v->ptr; - void *j = w->ptr; - return (i < j) ? -1 : ((i > j) ? 1 : 0); -} - -/* Added for Python 3.x, would it also be useful for Python 2.x? */ -SWIGRUNTIME PyObject* -SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op) -{ - PyObject* res; - if( op != Py_EQ && op != Py_NE ) { - Py_INCREF(Py_NotImplemented); - return Py_NotImplemented; - } - res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0); - return res; -} - - -SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void); - -#ifdef SWIGPYTHON_BUILTIN -static swig_type_info *SwigPyObject_stype = 0; -SWIGRUNTIME PyTypeObject* -SwigPyObject_type(void) { - SwigPyClientData *cd; - assert(SwigPyObject_stype); - cd = (SwigPyClientData*) SwigPyObject_stype->clientdata; - assert(cd); - assert(cd->pytype); - return cd->pytype; -} -#else -SWIGRUNTIME PyTypeObject* -SwigPyObject_type(void) { - static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyObject_TypeOnce(); - return type; -} -#endif - -SWIGRUNTIMEINLINE int -SwigPyObject_Check(PyObject *op) { -#ifdef SWIGPYTHON_BUILTIN - PyTypeObject *target_tp = SwigPyObject_type(); - if (PyType_IsSubtype(op->ob_type, target_tp)) - return 1; - return (strcmp(op->ob_type->tp_name, "SwigPyObject") == 0); -#else - return (Py_TYPE(op) == SwigPyObject_type()) - || (strcmp(Py_TYPE(op)->tp_name,"SwigPyObject") == 0); -#endif -} - -SWIGRUNTIME PyObject * -SwigPyObject_New(void *ptr, swig_type_info *ty, int own); - -SWIGRUNTIME void -SwigPyObject_dealloc(PyObject *v) -{ - SwigPyObject *sobj = (SwigPyObject *) v; - PyObject *next = sobj->next; - if (sobj->own == SWIG_POINTER_OWN) { - swig_type_info *ty = sobj->ty; - SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0; - PyObject *destroy = data ? data->destroy : 0; - if (destroy) { - /* destroy is always a VARARGS method */ - PyObject *res; - - /* PyObject_CallFunction() has the potential to silently drop - the active active exception. In cases of unnamed temporary - variable or where we just finished iterating over a generator - StopIteration will be active right now, and this needs to - remain true upon return from SwigPyObject_dealloc. So save - and restore. */ - - PyObject *val = NULL, *type = NULL, *tb = NULL; - PyErr_Fetch(&val, &type, &tb); - - if (data->delargs) { - /* we need to create a temporary object to carry the destroy operation */ - PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0); - res = SWIG_Python_CallFunctor(destroy, tmp); - Py_DECREF(tmp); - } else { - PyCFunction meth = PyCFunction_GET_FUNCTION(destroy); - PyObject *mself = PyCFunction_GET_SELF(destroy); - res = ((*meth)(mself, v)); - } - if (!res) - PyErr_WriteUnraisable(destroy); - - PyErr_Restore(val, type, tb); - - Py_XDECREF(res); - } -#if !defined(SWIG_PYTHON_SILENT_MEMLEAK) - else { - const char *name = SWIG_TypePrettyName(ty); - printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown")); - } -#endif - } - Py_XDECREF(next); - PyObject_DEL(v); -} - -SWIGRUNTIME PyObject* -SwigPyObject_append(PyObject* v, PyObject* next) -{ - SwigPyObject *sobj = (SwigPyObject *) v; -#ifndef METH_O - PyObject *tmp = 0; - if (!PyArg_ParseTuple(next,(char *)"O:append", &tmp)) return NULL; - next = tmp; -#endif - if (!SwigPyObject_Check(next)) { - PyErr_SetString(PyExc_TypeError, "Attempt to append a non SwigPyObject"); - return NULL; - } - sobj->next = next; - Py_INCREF(next); - return SWIG_Py_Void(); -} - -SWIGRUNTIME PyObject* -#ifdef METH_NOARGS -SwigPyObject_next(PyObject* v) -#else -SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) -#endif -{ - SwigPyObject *sobj = (SwigPyObject *) v; - if (sobj->next) { - Py_INCREF(sobj->next); - return sobj->next; - } else { - return SWIG_Py_Void(); - } -} - -SWIGINTERN PyObject* -#ifdef METH_NOARGS -SwigPyObject_disown(PyObject *v) -#else -SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) -#endif -{ - SwigPyObject *sobj = (SwigPyObject *)v; - sobj->own = 0; - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject* -#ifdef METH_NOARGS -SwigPyObject_acquire(PyObject *v) -#else -SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) -#endif -{ - SwigPyObject *sobj = (SwigPyObject *)v; - sobj->own = SWIG_POINTER_OWN; - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject* -SwigPyObject_own(PyObject *v, PyObject *args) -{ - PyObject *val = 0; -#if (PY_VERSION_HEX < 0x02020000) - if (!PyArg_ParseTuple(args,(char *)"|O:own",&val)) -#elif (PY_VERSION_HEX < 0x02050000) - if (!PyArg_UnpackTuple(args, (char *)"own", 0, 1, &val)) -#else - if (!PyArg_UnpackTuple(args, "own", 0, 1, &val)) -#endif - { - return NULL; - } - else - { - SwigPyObject *sobj = (SwigPyObject *)v; - PyObject *obj = PyBool_FromLong(sobj->own); - if (val) { -#ifdef METH_NOARGS - if (PyObject_IsTrue(val)) { - SwigPyObject_acquire(v); - } else { - SwigPyObject_disown(v); - } -#else - if (PyObject_IsTrue(val)) { - SwigPyObject_acquire(v,args); - } else { - SwigPyObject_disown(v,args); - } -#endif - } - return obj; - } -} - -#ifdef METH_O -static PyMethodDef -swigobject_methods[] = { - {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_NOARGS, (char *)"releases ownership of the pointer"}, - {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_NOARGS, (char *)"acquires ownership of the pointer"}, - {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"}, - {(char *)"append", (PyCFunction)SwigPyObject_append, METH_O, (char *)"appends another 'this' object"}, - {(char *)"next", (PyCFunction)SwigPyObject_next, METH_NOARGS, (char *)"returns the next 'this' object"}, - {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_NOARGS, (char *)"returns object representation"}, - {0, 0, 0, 0} -}; -#else -static PyMethodDef -swigobject_methods[] = { - {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_VARARGS, (char *)"releases ownership of the pointer"}, - {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_VARARGS, (char *)"acquires ownership of the pointer"}, - {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"}, - {(char *)"append", (PyCFunction)SwigPyObject_append, METH_VARARGS, (char *)"appends another 'this' object"}, - {(char *)"next", (PyCFunction)SwigPyObject_next, METH_VARARGS, (char *)"returns the next 'this' object"}, - {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_VARARGS, (char *)"returns object representation"}, - {0, 0, 0, 0} -}; -#endif - -#if PY_VERSION_HEX < 0x02020000 -SWIGINTERN PyObject * -SwigPyObject_getattr(SwigPyObject *sobj,char *name) -{ - return Py_FindMethod(swigobject_methods, (PyObject *)sobj, name); -} -#endif - -SWIGRUNTIME PyTypeObject* -SwigPyObject_TypeOnce(void) { - static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer"; - - static PyNumberMethods SwigPyObject_as_number = { - (binaryfunc)0, /*nb_add*/ - (binaryfunc)0, /*nb_subtract*/ - (binaryfunc)0, /*nb_multiply*/ - /* nb_divide removed in Python 3 */ -#if PY_VERSION_HEX < 0x03000000 - (binaryfunc)0, /*nb_divide*/ -#endif - (binaryfunc)0, /*nb_remainder*/ - (binaryfunc)0, /*nb_divmod*/ - (ternaryfunc)0,/*nb_power*/ - (unaryfunc)0, /*nb_negative*/ - (unaryfunc)0, /*nb_positive*/ - (unaryfunc)0, /*nb_absolute*/ - (inquiry)0, /*nb_nonzero*/ - 0, /*nb_invert*/ - 0, /*nb_lshift*/ - 0, /*nb_rshift*/ - 0, /*nb_and*/ - 0, /*nb_xor*/ - 0, /*nb_or*/ -#if PY_VERSION_HEX < 0x03000000 - 0, /*nb_coerce*/ -#endif - (unaryfunc)SwigPyObject_long, /*nb_int*/ -#if PY_VERSION_HEX < 0x03000000 - (unaryfunc)SwigPyObject_long, /*nb_long*/ -#else - 0, /*nb_reserved*/ -#endif - (unaryfunc)0, /*nb_float*/ -#if PY_VERSION_HEX < 0x03000000 - (unaryfunc)SwigPyObject_oct, /*nb_oct*/ - (unaryfunc)SwigPyObject_hex, /*nb_hex*/ -#endif -#if PY_VERSION_HEX >= 0x03050000 /* 3.5 */ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_matrix_multiply */ -#elif PY_VERSION_HEX >= 0x03000000 /* 3.0 */ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */ -#elif PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */ -#elif PY_VERSION_HEX >= 0x02020000 /* 2.2.0 */ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */ -#elif PY_VERSION_HEX >= 0x02000000 /* 2.0.0 */ - 0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_or */ -#endif - }; - - static PyTypeObject swigpyobject_type; - static int type_init = 0; - if (!type_init) { - const PyTypeObject tmp = { -#if PY_VERSION_HEX >= 0x03000000 - PyVarObject_HEAD_INIT(NULL, 0) -#else - PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ -#endif - (char *)"SwigPyObject", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - (destructor)SwigPyObject_dealloc, /* tp_dealloc */ - 0, /* tp_print */ -#if PY_VERSION_HEX < 0x02020000 - (getattrfunc)SwigPyObject_getattr, /* tp_getattr */ -#else - (getattrfunc)0, /* tp_getattr */ -#endif - (setattrfunc)0, /* tp_setattr */ -#if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */ -#else - (cmpfunc)SwigPyObject_compare, /* tp_compare */ -#endif - (reprfunc)SwigPyObject_repr, /* tp_repr */ - &SwigPyObject_as_number, /* tp_as_number */ - 0, /* tp_as_sequence */ - 0, /* tp_as_mapping */ - (hashfunc)0, /* tp_hash */ - (ternaryfunc)0, /* tp_call */ - 0, /* tp_str */ - PyObject_GenericGetAttr, /* tp_getattro */ - 0, /* tp_setattro */ - 0, /* tp_as_buffer */ - Py_TPFLAGS_DEFAULT, /* tp_flags */ - swigobject_doc, /* tp_doc */ - 0, /* tp_traverse */ - 0, /* tp_clear */ - (richcmpfunc)SwigPyObject_richcompare,/* tp_richcompare */ - 0, /* tp_weaklistoffset */ -#if PY_VERSION_HEX >= 0x02020000 - 0, /* tp_iter */ - 0, /* tp_iternext */ - swigobject_methods, /* tp_methods */ - 0, /* tp_members */ - 0, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - 0, /* tp_descr_get */ - 0, /* tp_descr_set */ - 0, /* tp_dictoffset */ - 0, /* tp_init */ - 0, /* tp_alloc */ - 0, /* tp_new */ - 0, /* tp_free */ - 0, /* tp_is_gc */ - 0, /* tp_bases */ - 0, /* tp_mro */ - 0, /* tp_cache */ - 0, /* tp_subclasses */ - 0, /* tp_weaklist */ -#endif -#if PY_VERSION_HEX >= 0x02030000 - 0, /* tp_del */ -#endif -#if PY_VERSION_HEX >= 0x02060000 - 0, /* tp_version_tag */ -#endif -#if PY_VERSION_HEX >= 0x03040000 - 0, /* tp_finalize */ -#endif -#ifdef COUNT_ALLOCS - 0, /* tp_allocs */ - 0, /* tp_frees */ - 0, /* tp_maxalloc */ -#if PY_VERSION_HEX >= 0x02050000 - 0, /* tp_prev */ -#endif - 0 /* tp_next */ -#endif - }; - swigpyobject_type = tmp; - type_init = 1; -#if PY_VERSION_HEX < 0x02020000 - swigpyobject_type.ob_type = &PyType_Type; -#else - if (PyType_Ready(&swigpyobject_type) < 0) - return NULL; -#endif - } - return &swigpyobject_type; -} - -SWIGRUNTIME PyObject * -SwigPyObject_New(void *ptr, swig_type_info *ty, int own) -{ - SwigPyObject *sobj = PyObject_NEW(SwigPyObject, SwigPyObject_type()); - if (sobj) { - sobj->ptr = ptr; - sobj->ty = ty; - sobj->own = own; - sobj->next = 0; - } - return (PyObject *)sobj; -} - -/* ----------------------------------------------------------------------------- - * Implements a simple Swig Packed type, and use it instead of string - * ----------------------------------------------------------------------------- */ - -typedef struct { - PyObject_HEAD - void *pack; - swig_type_info *ty; - size_t size; -} SwigPyPacked; - -SWIGRUNTIME int -SwigPyPacked_print(SwigPyPacked *v, FILE *fp, int SWIGUNUSEDPARM(flags)) -{ - char result[SWIG_BUFFER_SIZE]; - fputs("pack, v->size, 0, sizeof(result))) { - fputs("at ", fp); - fputs(result, fp); - } - fputs(v->ty->name,fp); - fputs(">", fp); - return 0; -} - -SWIGRUNTIME PyObject * -SwigPyPacked_repr(SwigPyPacked *v) -{ - char result[SWIG_BUFFER_SIZE]; - if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) { - return SWIG_Python_str_FromFormat("", result, v->ty->name); - } else { - return SWIG_Python_str_FromFormat("", v->ty->name); - } -} - -SWIGRUNTIME PyObject * -SwigPyPacked_str(SwigPyPacked *v) -{ - char result[SWIG_BUFFER_SIZE]; - if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){ - return SWIG_Python_str_FromFormat("%s%s", result, v->ty->name); - } else { - return SWIG_Python_str_FromChar(v->ty->name); - } -} - -SWIGRUNTIME int -SwigPyPacked_compare(SwigPyPacked *v, SwigPyPacked *w) -{ - size_t i = v->size; - size_t j = w->size; - int s = (i < j) ? -1 : ((i > j) ? 1 : 0); - return s ? s : strncmp((char *)v->pack, (char *)w->pack, 2*v->size); -} - -SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void); - -SWIGRUNTIME PyTypeObject* -SwigPyPacked_type(void) { - static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyPacked_TypeOnce(); - return type; -} - -SWIGRUNTIMEINLINE int -SwigPyPacked_Check(PyObject *op) { - return ((op)->ob_type == SwigPyPacked_TypeOnce()) - || (strcmp((op)->ob_type->tp_name,"SwigPyPacked") == 0); -} - -SWIGRUNTIME void -SwigPyPacked_dealloc(PyObject *v) -{ - if (SwigPyPacked_Check(v)) { - SwigPyPacked *sobj = (SwigPyPacked *) v; - free(sobj->pack); - } - PyObject_DEL(v); -} - -SWIGRUNTIME PyTypeObject* -SwigPyPacked_TypeOnce(void) { - static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer"; - static PyTypeObject swigpypacked_type; - static int type_init = 0; - if (!type_init) { - const PyTypeObject tmp = { -#if PY_VERSION_HEX>=0x03000000 - PyVarObject_HEAD_INIT(NULL, 0) -#else - PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ -#endif - (char *)"SwigPyPacked", /* tp_name */ - sizeof(SwigPyPacked), /* tp_basicsize */ - 0, /* tp_itemsize */ - (destructor)SwigPyPacked_dealloc, /* tp_dealloc */ - (printfunc)SwigPyPacked_print, /* tp_print */ - (getattrfunc)0, /* tp_getattr */ - (setattrfunc)0, /* tp_setattr */ -#if PY_VERSION_HEX>=0x03000000 - 0, /* tp_reserved in 3.0.1 */ -#else - (cmpfunc)SwigPyPacked_compare, /* tp_compare */ -#endif - (reprfunc)SwigPyPacked_repr, /* tp_repr */ - 0, /* tp_as_number */ - 0, /* tp_as_sequence */ - 0, /* tp_as_mapping */ - (hashfunc)0, /* tp_hash */ - (ternaryfunc)0, /* tp_call */ - (reprfunc)SwigPyPacked_str, /* tp_str */ - PyObject_GenericGetAttr, /* tp_getattro */ - 0, /* tp_setattro */ - 0, /* tp_as_buffer */ - Py_TPFLAGS_DEFAULT, /* tp_flags */ - swigpacked_doc, /* tp_doc */ - 0, /* tp_traverse */ - 0, /* tp_clear */ - 0, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ -#if PY_VERSION_HEX >= 0x02020000 - 0, /* tp_iter */ - 0, /* tp_iternext */ - 0, /* tp_methods */ - 0, /* tp_members */ - 0, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - 0, /* tp_descr_get */ - 0, /* tp_descr_set */ - 0, /* tp_dictoffset */ - 0, /* tp_init */ - 0, /* tp_alloc */ - 0, /* tp_new */ - 0, /* tp_free */ - 0, /* tp_is_gc */ - 0, /* tp_bases */ - 0, /* tp_mro */ - 0, /* tp_cache */ - 0, /* tp_subclasses */ - 0, /* tp_weaklist */ -#endif -#if PY_VERSION_HEX >= 0x02030000 - 0, /* tp_del */ -#endif -#if PY_VERSION_HEX >= 0x02060000 - 0, /* tp_version_tag */ -#endif -#if PY_VERSION_HEX >= 0x03040000 - 0, /* tp_finalize */ -#endif -#ifdef COUNT_ALLOCS - 0, /* tp_allocs */ - 0, /* tp_frees */ - 0, /* tp_maxalloc */ -#if PY_VERSION_HEX >= 0x02050000 - 0, /* tp_prev */ -#endif - 0 /* tp_next */ -#endif - }; - swigpypacked_type = tmp; - type_init = 1; -#if PY_VERSION_HEX < 0x02020000 - swigpypacked_type.ob_type = &PyType_Type; -#else - if (PyType_Ready(&swigpypacked_type) < 0) - return NULL; -#endif - } - return &swigpypacked_type; -} - -SWIGRUNTIME PyObject * -SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty) -{ - SwigPyPacked *sobj = PyObject_NEW(SwigPyPacked, SwigPyPacked_type()); - if (sobj) { - void *pack = malloc(size); - if (pack) { - memcpy(pack, ptr, size); - sobj->pack = pack; - sobj->ty = ty; - sobj->size = size; - } else { - PyObject_DEL((PyObject *) sobj); - sobj = 0; - } - } - return (PyObject *) sobj; -} - -SWIGRUNTIME swig_type_info * -SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size) -{ - if (SwigPyPacked_Check(obj)) { - SwigPyPacked *sobj = (SwigPyPacked *)obj; - if (sobj->size != size) return 0; - memcpy(ptr, sobj->pack, size); - return sobj->ty; - } else { - return 0; - } -} - -/* ----------------------------------------------------------------------------- - * pointers/data manipulation - * ----------------------------------------------------------------------------- */ - -SWIGRUNTIMEINLINE PyObject * -_SWIG_This(void) -{ - return SWIG_Python_str_FromChar("this"); -} - -static PyObject *swig_this = NULL; - -SWIGRUNTIME PyObject * -SWIG_This(void) -{ - if (swig_this == NULL) - swig_this = _SWIG_This(); - return swig_this; -} - -/* #define SWIG_PYTHON_SLOW_GETSET_THIS */ - -/* TODO: I don't know how to implement the fast getset in Python 3 right now */ -#if PY_VERSION_HEX>=0x03000000 -#define SWIG_PYTHON_SLOW_GETSET_THIS -#endif - -SWIGRUNTIME SwigPyObject * -SWIG_Python_GetSwigThis(PyObject *pyobj) -{ - PyObject *obj; - - if (SwigPyObject_Check(pyobj)) - return (SwigPyObject *) pyobj; - -#ifdef SWIGPYTHON_BUILTIN - (void)obj; -# ifdef PyWeakref_CheckProxy - if (PyWeakref_CheckProxy(pyobj)) { - pyobj = PyWeakref_GET_OBJECT(pyobj); - if (pyobj && SwigPyObject_Check(pyobj)) - return (SwigPyObject*) pyobj; - } -# endif - return NULL; -#else - - obj = 0; - -#if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000)) - if (PyInstance_Check(pyobj)) { - obj = _PyInstance_Lookup(pyobj, SWIG_This()); - } else { - PyObject **dictptr = _PyObject_GetDictPtr(pyobj); - if (dictptr != NULL) { - PyObject *dict = *dictptr; - obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0; - } else { -#ifdef PyWeakref_CheckProxy - if (PyWeakref_CheckProxy(pyobj)) { - PyObject *wobj = PyWeakref_GET_OBJECT(pyobj); - return wobj ? SWIG_Python_GetSwigThis(wobj) : 0; - } -#endif - obj = PyObject_GetAttr(pyobj,SWIG_This()); - if (obj) { - Py_DECREF(obj); - } else { - if (PyErr_Occurred()) PyErr_Clear(); - return 0; - } - } - } -#else - obj = PyObject_GetAttr(pyobj,SWIG_This()); - if (obj) { - Py_DECREF(obj); - } else { - if (PyErr_Occurred()) PyErr_Clear(); - return 0; - } -#endif - if (obj && !SwigPyObject_Check(obj)) { - /* a PyObject is called 'this', try to get the 'real this' - SwigPyObject from it */ - return SWIG_Python_GetSwigThis(obj); - } - return (SwigPyObject *)obj; -#endif -} - -/* Acquire a pointer value */ - -SWIGRUNTIME int -SWIG_Python_AcquirePtr(PyObject *obj, int own) { - if (own == SWIG_POINTER_OWN) { - SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj); - if (sobj) { - int oldown = sobj->own; - sobj->own = own; - return oldown; - } - } - return 0; -} - -/* Convert a pointer value */ - -SWIGRUNTIME int -SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) { - int res; - SwigPyObject *sobj; - int implicit_conv = (flags & SWIG_POINTER_IMPLICIT_CONV) != 0; - - if (!obj) - return SWIG_ERROR; - if (obj == Py_None && !implicit_conv) { - if (ptr) - *ptr = 0; - return SWIG_OK; - } - - res = SWIG_ERROR; - - sobj = SWIG_Python_GetSwigThis(obj); - if (own) - *own = 0; - while (sobj) { - void *vptr = sobj->ptr; - if (ty) { - swig_type_info *to = sobj->ty; - if (to == ty) { - /* no type cast needed */ - if (ptr) *ptr = vptr; - break; - } else { - swig_cast_info *tc = SWIG_TypeCheck(to->name,ty); - if (!tc) { - sobj = (SwigPyObject *)sobj->next; - } else { - if (ptr) { - int newmemory = 0; - *ptr = SWIG_TypeCast(tc,vptr,&newmemory); - if (newmemory == SWIG_CAST_NEW_MEMORY) { - assert(own); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */ - if (own) - *own = *own | SWIG_CAST_NEW_MEMORY; - } - } - break; - } - } - } else { - if (ptr) *ptr = vptr; - break; - } - } - if (sobj) { - if (own) - *own = *own | sobj->own; - if (flags & SWIG_POINTER_DISOWN) { - sobj->own = 0; - } - res = SWIG_OK; - } else { - if (implicit_conv) { - SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0; - if (data && !data->implicitconv) { - PyObject *klass = data->klass; - if (klass) { - PyObject *impconv; - data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/ - impconv = SWIG_Python_CallFunctor(klass, obj); - data->implicitconv = 0; - if (PyErr_Occurred()) { - PyErr_Clear(); - impconv = 0; - } - if (impconv) { - SwigPyObject *iobj = SWIG_Python_GetSwigThis(impconv); - if (iobj) { - void *vptr; - res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0); - if (SWIG_IsOK(res)) { - if (ptr) { - *ptr = vptr; - /* transfer the ownership to 'ptr' */ - iobj->own = 0; - res = SWIG_AddCast(res); - res = SWIG_AddNewMask(res); - } else { - res = SWIG_AddCast(res); - } - } - } - Py_DECREF(impconv); - } - } - } - } - if (!SWIG_IsOK(res) && obj == Py_None) { - if (ptr) - *ptr = 0; - if (PyErr_Occurred()) - PyErr_Clear(); - res = SWIG_OK; - } - } - return res; -} - -/* Convert a function ptr value */ - -SWIGRUNTIME int -SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) { - if (!PyCFunction_Check(obj)) { - return SWIG_ConvertPtr(obj, ptr, ty, 0); - } else { - void *vptr = 0; - - /* here we get the method pointer for callbacks */ - const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc); - const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0; - if (desc) - desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0; - if (!desc) - return SWIG_ERROR; - if (ty) { - swig_cast_info *tc = SWIG_TypeCheck(desc,ty); - if (tc) { - int newmemory = 0; - *ptr = SWIG_TypeCast(tc,vptr,&newmemory); - assert(!newmemory); /* newmemory handling not yet implemented */ - } else { - return SWIG_ERROR; - } - } else { - *ptr = vptr; - } - return SWIG_OK; - } -} - -/* Convert a packed value value */ - -SWIGRUNTIME int -SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) { - swig_type_info *to = SwigPyPacked_UnpackData(obj, ptr, sz); - if (!to) return SWIG_ERROR; - if (ty) { - if (to != ty) { - /* check type cast? */ - swig_cast_info *tc = SWIG_TypeCheck(to->name,ty); - if (!tc) return SWIG_ERROR; - } - } - return SWIG_OK; -} - -/* ----------------------------------------------------------------------------- - * Create a new pointer object - * ----------------------------------------------------------------------------- */ - -/* - Create a new instance object, without calling __init__, and set the - 'this' attribute. -*/ - -SWIGRUNTIME PyObject* -SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) -{ -#if (PY_VERSION_HEX >= 0x02020000) - PyObject *inst = 0; - PyObject *newraw = data->newraw; - if (newraw) { - inst = PyObject_Call(newraw, data->newargs, NULL); - if (inst) { -#if !defined(SWIG_PYTHON_SLOW_GETSET_THIS) - PyObject **dictptr = _PyObject_GetDictPtr(inst); - if (dictptr != NULL) { - PyObject *dict = *dictptr; - if (dict == NULL) { - dict = PyDict_New(); - *dictptr = dict; - PyDict_SetItem(dict, SWIG_This(), swig_this); - } - } -#else - PyObject *key = SWIG_This(); - PyObject_SetAttr(inst, key, swig_this); -#endif - } - } else { -#if PY_VERSION_HEX >= 0x03000000 - inst = ((PyTypeObject*) data->newargs)->tp_new((PyTypeObject*) data->newargs, Py_None, Py_None); - if (inst) { - PyObject_SetAttr(inst, SWIG_This(), swig_this); - Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG; - } -#else - PyObject *dict = PyDict_New(); - if (dict) { - PyDict_SetItem(dict, SWIG_This(), swig_this); - inst = PyInstance_NewRaw(data->newargs, dict); - Py_DECREF(dict); - } -#endif - } - return inst; -#else -#if (PY_VERSION_HEX >= 0x02010000) - PyObject *inst = 0; - PyObject *dict = PyDict_New(); - if (dict) { - PyDict_SetItem(dict, SWIG_This(), swig_this); - inst = PyInstance_NewRaw(data->newargs, dict); - Py_DECREF(dict); - } - return (PyObject *) inst; -#else - PyInstanceObject *inst = PyObject_NEW(PyInstanceObject, &PyInstance_Type); - if (inst == NULL) { - return NULL; - } - inst->in_class = (PyClassObject *)data->newargs; - Py_INCREF(inst->in_class); - inst->in_dict = PyDict_New(); - if (inst->in_dict == NULL) { - Py_DECREF(inst); - return NULL; - } -#ifdef Py_TPFLAGS_HAVE_WEAKREFS - inst->in_weakreflist = NULL; -#endif -#ifdef Py_TPFLAGS_GC - PyObject_GC_Init(inst); -#endif - PyDict_SetItem(inst->in_dict, SWIG_This(), swig_this); - return (PyObject *) inst; -#endif -#endif -} - -SWIGRUNTIME void -SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this) -{ - PyObject *dict; -#if (PY_VERSION_HEX >= 0x02020000) && !defined(SWIG_PYTHON_SLOW_GETSET_THIS) - PyObject **dictptr = _PyObject_GetDictPtr(inst); - if (dictptr != NULL) { - dict = *dictptr; - if (dict == NULL) { - dict = PyDict_New(); - *dictptr = dict; - } - PyDict_SetItem(dict, SWIG_This(), swig_this); - return; - } -#endif - dict = PyObject_GetAttrString(inst, (char*)"__dict__"); - PyDict_SetItem(dict, SWIG_This(), swig_this); - Py_DECREF(dict); -} - - -SWIGINTERN PyObject * -SWIG_Python_InitShadowInstance(PyObject *args) { - PyObject *obj[2]; - if (!SWIG_Python_UnpackTuple(args, "swiginit", 2, 2, obj)) { - return NULL; - } else { - SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]); - if (sthis) { - SwigPyObject_append((PyObject*) sthis, obj[1]); - } else { - SWIG_Python_SetSwigThis(obj[0], obj[1]); - } - return SWIG_Py_Void(); - } -} - -/* Create a new pointer object */ - -SWIGRUNTIME PyObject * -SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int flags) { - SwigPyClientData *clientdata; - PyObject * robj; - int own; - - if (!ptr) - return SWIG_Py_Void(); - - clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0; - own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0; - if (clientdata && clientdata->pytype) { - SwigPyObject *newobj; - if (flags & SWIG_BUILTIN_TP_INIT) { - newobj = (SwigPyObject*) self; - if (newobj->ptr) { - PyObject *next_self = clientdata->pytype->tp_alloc(clientdata->pytype, 0); - while (newobj->next) - newobj = (SwigPyObject *) newobj->next; - newobj->next = next_self; - newobj = (SwigPyObject *)next_self; -#ifdef SWIGPYTHON_BUILTIN - newobj->dict = 0; -#endif - } - } else { - newobj = PyObject_New(SwigPyObject, clientdata->pytype); -#ifdef SWIGPYTHON_BUILTIN - newobj->dict = 0; -#endif - } - if (newobj) { - newobj->ptr = ptr; - newobj->ty = type; - newobj->own = own; - newobj->next = 0; - return (PyObject*) newobj; - } - return SWIG_Py_Void(); - } - - assert(!(flags & SWIG_BUILTIN_TP_INIT)); - - robj = SwigPyObject_New(ptr, type, own); - if (robj && clientdata && !(flags & SWIG_POINTER_NOSHADOW)) { - PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj); - Py_DECREF(robj); - robj = inst; - } - return robj; -} - -/* Create a new packed object */ - -SWIGRUNTIMEINLINE PyObject * -SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) { - return ptr ? SwigPyPacked_New((void *) ptr, sz, type) : SWIG_Py_Void(); -} - -/* -----------------------------------------------------------------------------* - * Get type list - * -----------------------------------------------------------------------------*/ - -#ifdef SWIG_LINK_RUNTIME -void *SWIG_ReturnGlobalTypeList(void *); -#endif - -SWIGRUNTIME swig_module_info * -SWIG_Python_GetModule(void *SWIGUNUSEDPARM(clientdata)) { - static void *type_pointer = (void *)0; - /* first check if module already created */ - if (!type_pointer) { -#ifdef SWIG_LINK_RUNTIME - type_pointer = SWIG_ReturnGlobalTypeList((void *)0); -#else -# ifdef SWIGPY_USE_CAPSULE - type_pointer = PyCapsule_Import(SWIGPY_CAPSULE_NAME, 0); -# else - type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, - (char*)"type_pointer" SWIG_TYPE_TABLE_NAME); -# endif - if (PyErr_Occurred()) { - PyErr_Clear(); - type_pointer = (void *)0; - } -#endif - } - return (swig_module_info *) type_pointer; -} - -#if PY_MAJOR_VERSION < 2 -/* PyModule_AddObject function was introduced in Python 2.0. The following function - is copied out of Python/modsupport.c in python version 2.3.4 */ -SWIGINTERN int -PyModule_AddObject(PyObject *m, char *name, PyObject *o) -{ - PyObject *dict; - if (!PyModule_Check(m)) { - PyErr_SetString(PyExc_TypeError, "PyModule_AddObject() needs module as first arg"); - return SWIG_ERROR; - } - if (!o) { - PyErr_SetString(PyExc_TypeError, "PyModule_AddObject() needs non-NULL value"); - return SWIG_ERROR; - } - - dict = PyModule_GetDict(m); - if (dict == NULL) { - /* Internal error -- modules must have a dict! */ - PyErr_Format(PyExc_SystemError, "module '%s' has no __dict__", - PyModule_GetName(m)); - return SWIG_ERROR; - } - if (PyDict_SetItemString(dict, name, o)) - return SWIG_ERROR; - Py_DECREF(o); - return SWIG_OK; -} -#endif - -SWIGRUNTIME void -#ifdef SWIGPY_USE_CAPSULE -SWIG_Python_DestroyModule(PyObject *obj) -#else -SWIG_Python_DestroyModule(void *vptr) -#endif -{ -#ifdef SWIGPY_USE_CAPSULE - swig_module_info *swig_module = (swig_module_info *) PyCapsule_GetPointer(obj, SWIGPY_CAPSULE_NAME); -#else - swig_module_info *swig_module = (swig_module_info *) vptr; -#endif - swig_type_info **types = swig_module->types; - size_t i; - for (i =0; i < swig_module->size; ++i) { - swig_type_info *ty = types[i]; - if (ty->owndata) { - SwigPyClientData *data = (SwigPyClientData *) ty->clientdata; - if (data) SwigPyClientData_Del(data); - } - } - Py_DECREF(SWIG_This()); - swig_this = NULL; -} - -SWIGRUNTIME void -SWIG_Python_SetModule(swig_module_info *swig_module) { -#if PY_VERSION_HEX >= 0x03000000 - /* Add a dummy module object into sys.modules */ - PyObject *module = PyImport_AddModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION); -#else - static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} }; /* Sentinel */ - PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table); -#endif -#ifdef SWIGPY_USE_CAPSULE - PyObject *pointer = PyCapsule_New((void *) swig_module, SWIGPY_CAPSULE_NAME, SWIG_Python_DestroyModule); - if (pointer && module) { - PyModule_AddObject(module, (char*)"type_pointer_capsule" SWIG_TYPE_TABLE_NAME, pointer); - } else { - Py_XDECREF(pointer); - } -#else - PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule); - if (pointer && module) { - PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer); - } else { - Py_XDECREF(pointer); - } -#endif -} - -/* The python cached type query */ -SWIGRUNTIME PyObject * -SWIG_Python_TypeCache(void) { - static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New(); - return cache; -} - -SWIGRUNTIME swig_type_info * -SWIG_Python_TypeQuery(const char *type) -{ - PyObject *cache = SWIG_Python_TypeCache(); - PyObject *key = SWIG_Python_str_FromChar(type); - PyObject *obj = PyDict_GetItem(cache, key); - swig_type_info *descriptor; - if (obj) { -#ifdef SWIGPY_USE_CAPSULE - descriptor = (swig_type_info *) PyCapsule_GetPointer(obj, NULL); -#else - descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj); -#endif - } else { - swig_module_info *swig_module = SWIG_GetModule(0); - descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type); - if (descriptor) { -#ifdef SWIGPY_USE_CAPSULE - obj = PyCapsule_New((void*) descriptor, NULL, NULL); -#else - obj = PyCObject_FromVoidPtr(descriptor, NULL); -#endif - PyDict_SetItem(cache, key, obj); - Py_DECREF(obj); - } - } - Py_DECREF(key); - return descriptor; -} - -/* - For backward compatibility only -*/ -#define SWIG_POINTER_EXCEPTION 0 -#define SWIG_arg_fail(arg) SWIG_Python_ArgFail(arg) -#define SWIG_MustGetPtr(p, type, argnum, flags) SWIG_Python_MustGetPtr(p, type, argnum, flags) - -SWIGRUNTIME int -SWIG_Python_AddErrMesg(const char* mesg, int infront) -{ - if (PyErr_Occurred()) { - PyObject *type = 0; - PyObject *value = 0; - PyObject *traceback = 0; - PyErr_Fetch(&type, &value, &traceback); - if (value) { - char *tmp; - PyObject *old_str = PyObject_Str(value); - Py_XINCREF(type); - PyErr_Clear(); - if (infront) { - PyErr_Format(type, "%s %s", mesg, tmp = SWIG_Python_str_AsChar(old_str)); - } else { - PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg); - } - SWIG_Python_str_DelForPy3(tmp); - Py_DECREF(old_str); - } - return 1; - } else { - return 0; - } -} - -SWIGRUNTIME int -SWIG_Python_ArgFail(int argnum) -{ - if (PyErr_Occurred()) { - /* add information about failing argument */ - char mesg[256]; - PyOS_snprintf(mesg, sizeof(mesg), "argument number %d:", argnum); - return SWIG_Python_AddErrMesg(mesg, 1); - } else { - return 0; - } -} - -SWIGRUNTIMEINLINE const char * -SwigPyObject_GetDesc(PyObject *self) -{ - SwigPyObject *v = (SwigPyObject *)self; - swig_type_info *ty = v ? v->ty : 0; - return ty ? ty->str : ""; -} - -SWIGRUNTIME void -SWIG_Python_TypeError(const char *type, PyObject *obj) -{ - if (type) { -#if defined(SWIG_COBJECT_TYPES) - if (obj && SwigPyObject_Check(obj)) { - const char *otype = (const char *) SwigPyObject_GetDesc(obj); - if (otype) { - PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'SwigPyObject(%s)' is received", - type, otype); - return; - } - } else -#endif - { - const char *otype = (obj ? obj->ob_type->tp_name : 0); - if (otype) { - PyObject *str = PyObject_Str(obj); - const char *cstr = str ? SWIG_Python_str_AsChar(str) : 0; - if (cstr) { - PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received", - type, otype, cstr); - SWIG_Python_str_DelForPy3(cstr); - } else { - PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received", - type, otype); - } - Py_XDECREF(str); - return; - } - } - PyErr_Format(PyExc_TypeError, "a '%s' is expected", type); - } else { - PyErr_Format(PyExc_TypeError, "unexpected type is received"); - } -} - - -/* Convert a pointer value, signal an exception on a type mismatch */ -SWIGRUNTIME void * -SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int SWIGUNUSEDPARM(argnum), int flags) { - void *result; - if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) { - PyErr_Clear(); -#if SWIG_POINTER_EXCEPTION - if (flags) { - SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj); - SWIG_Python_ArgFail(argnum); - } -#endif - } - return result; -} - -#ifdef SWIGPYTHON_BUILTIN -SWIGRUNTIME int -SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { - PyTypeObject *tp = obj->ob_type; - PyObject *descr; - PyObject *encoded_name; - descrsetfunc f; - int res = -1; - -# ifdef Py_USING_UNICODE - if (PyString_Check(name)) { - name = PyUnicode_Decode(PyString_AsString(name), PyString_Size(name), NULL, NULL); - if (!name) - return -1; - } else if (!PyUnicode_Check(name)) -# else - if (!PyString_Check(name)) -# endif - { - PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name); - return -1; - } else { - Py_INCREF(name); - } - - if (!tp->tp_dict) { - if (PyType_Ready(tp) < 0) - goto done; - } - - descr = _PyType_Lookup(tp, name); - f = NULL; - if (descr != NULL) - f = descr->ob_type->tp_descr_set; - if (!f) { - if (PyString_Check(name)) { - encoded_name = name; - Py_INCREF(name); - } else { - encoded_name = PyUnicode_AsUTF8String(name); - } - PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name)); - Py_DECREF(encoded_name); - } else { - res = f(descr, obj, value); - } - - done: - Py_DECREF(name); - return res; -} -#endif - - -#ifdef __cplusplus -} -#endif - - - -#define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0) - -#define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else - - - - #define SWIG_exception(code, msg) do { SWIG_Error(code, msg); SWIG_fail;; } while(0) - - -/* -------- TYPES TABLE (BEGIN) -------- */ - -#define SWIGTYPE_p_char swig_types[0] -#define SWIGTYPE_p_cmf__atmosphere__ConstantMeteorology swig_types[1] -#define SWIGTYPE_p_cmf__atmosphere__ConstantRainSource swig_types[2] -#define SWIGTYPE_p_cmf__atmosphere__IDWRainfall swig_types[3] -#define SWIGTYPE_p_cmf__atmosphere__IDW_Meteorology swig_types[4] -#define SWIGTYPE_p_cmf__atmosphere__MeteoStation swig_types[5] -#define SWIGTYPE_p_cmf__atmosphere__MeteoStationList swig_types[6] -#define SWIGTYPE_p_cmf__atmosphere__MeteoStationReference swig_types[7] -#define SWIGTYPE_p_cmf__atmosphere__Meteorology swig_types[8] -#define SWIGTYPE_p_cmf__atmosphere__RainSource swig_types[9] -#define SWIGTYPE_p_cmf__atmosphere__RainfallStation swig_types[10] -#define SWIGTYPE_p_cmf__atmosphere__RainfallStationList swig_types[11] -#define SWIGTYPE_p_cmf__atmosphere__RainfallStationReference swig_types[12] -#define SWIGTYPE_p_cmf__atmosphere__TimeseriesRainSource swig_types[13] -#define SWIGTYPE_p_cmf__atmosphere__Weather swig_types[14] -#define SWIGTYPE_p_cmf__atmosphere__aerodynamic_resistance swig_types[15] -#define SWIGTYPE_p_cmf__atmosphere__log_wind_profile swig_types[16] -#define SWIGTYPE_p_cmf__geometry__point swig_types[17] -#define SWIGTYPE_p_cmf__geometry__point_vector swig_types[18] -#define SWIGTYPE_p_cmf__math__BDF2 swig_types[19] -#define SWIGTYPE_p_cmf__math__CVodeIntegrator swig_types[20] -#define SWIGTYPE_p_cmf__math__Date swig_types[21] -#define SWIGTYPE_p_cmf__math__ExplicitEuler_fixed swig_types[22] -#define SWIGTYPE_p_cmf__math__HeunIntegrator swig_types[23] -#define SWIGTYPE_p_cmf__math__ImplicitEuler swig_types[24] -#define SWIGTYPE_p_cmf__math__Integrator swig_types[25] -#define SWIGTYPE_p_cmf__math__MultiIntegrator swig_types[26] -#define SWIGTYPE_p_cmf__math__RKFIntegrator swig_types[27] -#define SWIGTYPE_p_cmf__math__SoluteWaterIntegrator swig_types[28] -#define SWIGTYPE_p_cmf__math__StateVariable swig_types[29] -#define SWIGTYPE_p_cmf__math__StateVariableList swig_types[30] -#define SWIGTYPE_p_cmf__math__StateVariableOwner swig_types[31] -#define SWIGTYPE_p_cmf__math__Time swig_types[32] -#define SWIGTYPE_p_cmf__math__cubicspline swig_types[33] -#define SWIGTYPE_p_cmf__math__integratable swig_types[34] -#define SWIGTYPE_p_cmf__math__integratable_list swig_types[35] -#define SWIGTYPE_p_cmf__math__num_array swig_types[36] -#define SWIGTYPE_p_cmf__math__timeseries swig_types[37] -#define SWIGTYPE_p_cmf__project swig_types[38] -#define SWIGTYPE_p_cmf__river__Channel swig_types[39] -#define SWIGTYPE_p_cmf__river__IChannel swig_types[40] -#define SWIGTYPE_p_cmf__river__IVolumeHeightFunction swig_types[41] -#define SWIGTYPE_p_cmf__river__Manning swig_types[42] -#define SWIGTYPE_p_cmf__river__Manning_Diffusive swig_types[43] -#define SWIGTYPE_p_cmf__river__Manning_Kinematic swig_types[44] -#define SWIGTYPE_p_cmf__river__MeanChannel swig_types[45] -#define SWIGTYPE_p_cmf__river__OpenWaterStorage swig_types[46] -#define SWIGTYPE_p_cmf__river__PipeReach swig_types[47] -#define SWIGTYPE_p_cmf__river__Prism swig_types[48] -#define SWIGTYPE_p_cmf__river__Reach swig_types[49] -#define SWIGTYPE_p_cmf__river__ReachIterator swig_types[50] -#define SWIGTYPE_p_cmf__river__RectangularReach swig_types[51] -#define SWIGTYPE_p_cmf__river__SWATReachType swig_types[52] -#define SWIGTYPE_p_cmf__river__TriangularReach swig_types[53] -#define SWIGTYPE_p_cmf__river__volume_height_function swig_types[54] -#define SWIGTYPE_p_cmf__upslope__BrooksCoreyRetentionCurve swig_types[55] -#define SWIGTYPE_p_cmf__upslope__Cell swig_types[56] -#define SWIGTYPE_p_cmf__upslope__CellConnector swig_types[57] -#define SWIGTYPE_p_cmf__upslope__ET__CanopyStorageEvaporation swig_types[58] -#define SWIGTYPE_p_cmf__upslope__ET__ContentStress swig_types[59] -#define SWIGTYPE_p_cmf__upslope__ET__HargreaveET swig_types[60] -#define SWIGTYPE_p_cmf__upslope__ET__PenmanEvaporation swig_types[61] -#define SWIGTYPE_p_cmf__upslope__ET__PenmanMonteithET swig_types[62] -#define SWIGTYPE_p_cmf__upslope__ET__PriestleyTaylorET swig_types[63] -#define SWIGTYPE_p_cmf__upslope__ET__RootUptakeStessFunction swig_types[64] -#define SWIGTYPE_p_cmf__upslope__ET__ShuttleworthWallace swig_types[65] -#define SWIGTYPE_p_cmf__upslope__ET__SuctionStress swig_types[66] -#define SWIGTYPE_p_cmf__upslope__ET__TurcET swig_types[67] -#define SWIGTYPE_p_cmf__upslope__ET__VolumeStress swig_types[68] -#define SWIGTYPE_p_cmf__upslope__ET__canopy_evaporation swig_types[69] -#define SWIGTYPE_p_cmf__upslope__ET__canopy_evaporation_method swig_types[70] -#define SWIGTYPE_p_cmf__upslope__ET__constantETpot swig_types[71] -#define SWIGTYPE_p_cmf__upslope__ET__snow_evaporation swig_types[72] -#define SWIGTYPE_p_cmf__upslope__ET__snow_evaporation_method swig_types[73] -#define SWIGTYPE_p_cmf__upslope__ET__soil_evaporation swig_types[74] -#define SWIGTYPE_p_cmf__upslope__ET__soil_evaporation_method swig_types[75] -#define SWIGTYPE_p_cmf__upslope__ET__stressedET swig_types[76] -#define SWIGTYPE_p_cmf__upslope__ET__surface_water_evaporation swig_types[77] -#define SWIGTYPE_p_cmf__upslope__ET__surface_water_evaporation_method swig_types[78] -#define SWIGTYPE_p_cmf__upslope__ET__timeseriesETpot swig_types[79] -#define SWIGTYPE_p_cmf__upslope__ET__transpiration swig_types[80] -#define SWIGTYPE_p_cmf__upslope__ET__transpiration_method swig_types[81] -#define SWIGTYPE_p_cmf__upslope__LinearRetention swig_types[82] -#define SWIGTYPE_p_cmf__upslope__MacroPore swig_types[83] -#define SWIGTYPE_p_cmf__upslope__RetentionCurve swig_types[84] -#define SWIGTYPE_p_cmf__upslope__SoilLayer swig_types[85] -#define SWIGTYPE_p_cmf__upslope__SurfaceWater swig_types[86] -#define SWIGTYPE_p_cmf__upslope__Topology swig_types[87] -#define SWIGTYPE_p_cmf__upslope__VanGenuchtenMualem swig_types[88] -#define SWIGTYPE_p_cmf__upslope__aquifer swig_types[89] -#define SWIGTYPE_p_cmf__upslope__aquifer_Darcy swig_types[90] -#define SWIGTYPE_p_cmf__upslope__cell_vector swig_types[91] -#define SWIGTYPE_p_cmf__upslope__connections__BaseMacroFlow swig_types[92] -#define SWIGTYPE_p_cmf__upslope__connections__CanopyOverflow swig_types[93] -#define SWIGTYPE_p_cmf__upslope__connections__Darcy swig_types[94] -#define SWIGTYPE_p_cmf__upslope__connections__DarcyKinematic swig_types[95] -#define SWIGTYPE_p_cmf__upslope__connections__DiffusiveMacroMicroExchange swig_types[96] -#define SWIGTYPE_p_cmf__upslope__connections__DiffusiveSurfaceRunoff swig_types[97] -#define SWIGTYPE_p_cmf__upslope__connections__EnergyBudgetSnowMelt swig_types[98] -#define SWIGTYPE_p_cmf__upslope__connections__FreeDrainagePercolation swig_types[99] -#define SWIGTYPE_p_cmf__upslope__connections__GradientMacroFlow swig_types[100] -#define SWIGTYPE_p_cmf__upslope__connections__GradientMacroMicroExchange swig_types[101] -#define SWIGTYPE_p_cmf__upslope__connections__GreenAmptInfiltration swig_types[102] -#define SWIGTYPE_p_cmf__upslope__connections__JarvisMacroFlow swig_types[103] -#define SWIGTYPE_p_cmf__upslope__connections__KinematicMacroFlow swig_types[104] -#define SWIGTYPE_p_cmf__upslope__connections__KinematicSurfaceRunoff swig_types[105] -#define SWIGTYPE_p_cmf__upslope__connections__LayerBypass swig_types[106] -#define SWIGTYPE_p_cmf__upslope__connections__MACROlikeMacroMicroExchange swig_types[107] -#define SWIGTYPE_p_cmf__upslope__connections__MatrixInfiltration swig_types[108] -#define SWIGTYPE_p_cmf__upslope__connections__Rainfall swig_types[109] -#define SWIGTYPE_p_cmf__upslope__connections__Richards swig_types[110] -#define SWIGTYPE_p_cmf__upslope__connections__Richards_lateral swig_types[111] -#define SWIGTYPE_p_cmf__upslope__connections__RutterInterception swig_types[112] -#define SWIGTYPE_p_cmf__upslope__connections__SWATPercolation swig_types[113] -#define SWIGTYPE_p_cmf__upslope__connections__SimplRichards swig_types[114] -#define SWIGTYPE_p_cmf__upslope__connections__SimpleInfiltration swig_types[115] -#define SWIGTYPE_p_cmf__upslope__connections__SimpleTindexSnowMelt swig_types[116] -#define SWIGTYPE_p_cmf__upslope__connections__Snowfall swig_types[117] -#define SWIGTYPE_p_cmf__upslope__connections__TOPModelFlow swig_types[118] -#define SWIGTYPE_p_cmf__upslope__connections__TopographicGradientDarcy swig_types[119] -#define SWIGTYPE_p_cmf__upslope__connections__lateral_sub_surface_flux swig_types[120] -#define SWIGTYPE_p_cmf__upslope__layer_list swig_types[121] -#define SWIGTYPE_p_cmf__upslope__neighbor_iterator swig_types[122] -#define SWIGTYPE_p_cmf__upslope__subcatchment swig_types[123] -#define SWIGTYPE_p_cmf__upslope__vegetation__Vegetation swig_types[124] -#define SWIGTYPE_p_cmf__water__Adsorption swig_types[125] -#define SWIGTYPE_p_cmf__water__ConstraintLinearStorageConnection swig_types[126] -#define SWIGTYPE_p_cmf__water__DirichletBoundary swig_types[127] -#define SWIGTYPE_p_cmf__water__ExponentialDeclineConnection swig_types[128] -#define SWIGTYPE_p_cmf__water__FreundlichAdsorbtion swig_types[129] -#define SWIGTYPE_p_cmf__water__LangmuirAdsorption swig_types[130] -#define SWIGTYPE_p_cmf__water__LinearAdsorption swig_types[131] -#define SWIGTYPE_p_cmf__water__LinearStorageConnection swig_types[132] -#define SWIGTYPE_p_cmf__water__NeumannBoundary swig_types[133] -#define SWIGTYPE_p_cmf__water__NeumannBoundary_list swig_types[134] -#define SWIGTYPE_p_cmf__water__NeumannFlux swig_types[135] -#define SWIGTYPE_p_cmf__water__NullAdsorption swig_types[136] -#define SWIGTYPE_p_cmf__water__PowerLawConnection swig_types[137] -#define SWIGTYPE_p_cmf__water__SoluteStorage swig_types[138] -#define SWIGTYPE_p_cmf__water__SoluteTimeseries swig_types[139] -#define SWIGTYPE_p_cmf__water__SystemBridge swig_types[140] -#define SWIGTYPE_p_cmf__water__SystemBridgeConnection swig_types[141] -#define SWIGTYPE_p_cmf__water__TechnicalFlux swig_types[142] -#define SWIGTYPE_p_cmf__water__WaterStorage swig_types[143] -#define SWIGTYPE_p_cmf__water__bidirectional_kinematic_exchange swig_types[144] -#define SWIGTYPE_p_cmf__water__connection_list swig_types[145] -#define SWIGTYPE_p_cmf__water__constraint_kinematic_wave swig_types[146] -#define SWIGTYPE_p_cmf__water__external_control_connection swig_types[147] -#define SWIGTYPE_p_cmf__water__flux_connection swig_types[148] -#define SWIGTYPE_p_cmf__water__flux_integrator swig_types[149] -#define SWIGTYPE_p_cmf__water__flux_node swig_types[150] -#define SWIGTYPE_p_cmf__water__generic_gradient_connection swig_types[151] -#define SWIGTYPE_p_cmf__water__kinematic_wave swig_types[152] -#define SWIGTYPE_p_cmf__water__linear_scale swig_types[153] -#define SWIGTYPE_p_cmf__water__node_list swig_types[154] -#define SWIGTYPE_p_cmf__water__solute swig_types[155] -#define SWIGTYPE_p_cmf__water__solute_vector swig_types[156] -#define SWIGTYPE_p_cmf__water__statecontrol_connection swig_types[157] -#define SWIGTYPE_p_cmf__water__waterbalance_connection swig_types[158] -#define SWIGTYPE_p_cmf__water__waterbalance_integrator swig_types[159] -#define SWIGTYPE_p_const_iterator swig_types[160] -#define SWIGTYPE_p_double swig_types[161] -#define SWIGTYPE_p_f_r_cmf__upslope__Cell_r_cmf__upslope__Cell_ptrdiff_t__void swig_types[162] -#define SWIGTYPE_p_iterator swig_types[163] -#define SWIGTYPE_p_ptr swig_types[164] -#define SWIGTYPE_p_std__shared_ptrT_SoilLayer_t swig_types[165] -#define SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__ConstantRainSource_t swig_types[166] -#define SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__IDWRainfall_t swig_types[167] -#define SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t swig_types[168] -#define SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__RainSource_t swig_types[169] -#define SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__RainfallStationReference_t swig_types[170] -#define SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__RainfallStation_t swig_types[171] -#define SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__TimeseriesRainSource_t swig_types[172] -#define SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__aerodynamic_resistance_t swig_types[173] -#define SWIGTYPE_p_std__shared_ptrT_cmf__math__StateVariable_t swig_types[174] -#define SWIGTYPE_p_std__shared_ptrT_cmf__math__integratable_t swig_types[175] -#define SWIGTYPE_p_std__shared_ptrT_cmf__river__OpenWaterStorage_t swig_types[176] -#define SWIGTYPE_p_std__shared_ptrT_cmf__river__Reach_t swig_types[177] -#define SWIGTYPE_p_std__shared_ptrT_cmf__upslope__ET__canopy_evaporation_method_t swig_types[178] -#define SWIGTYPE_p_std__shared_ptrT_cmf__upslope__ET__snow_evaporation_method_t swig_types[179] -#define SWIGTYPE_p_std__shared_ptrT_cmf__upslope__ET__soil_evaporation_method_t swig_types[180] -#define SWIGTYPE_p_std__shared_ptrT_cmf__upslope__ET__surface_water_evaporation_method_t swig_types[181] -#define SWIGTYPE_p_std__shared_ptrT_cmf__upslope__ET__transpiration_method_t swig_types[182] -#define SWIGTYPE_p_std__shared_ptrT_cmf__upslope__MacroPore_t swig_types[183] -#define SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t swig_types[184] -#define SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SurfaceWater_t swig_types[185] -#define SWIGTYPE_p_std__shared_ptrT_cmf__upslope__aquifer_t swig_types[186] -#define SWIGTYPE_p_std__shared_ptrT_cmf__water__DirichletBoundary_t swig_types[187] -#define SWIGTYPE_p_std__shared_ptrT_cmf__water__NeumannBoundary_t swig_types[188] -#define SWIGTYPE_p_std__shared_ptrT_cmf__water__SoluteStorage_t swig_types[189] -#define SWIGTYPE_p_std__shared_ptrT_cmf__water__SystemBridge_t swig_types[190] -#define SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t swig_types[191] -#define SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_connection_t swig_types[192] -#define SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_integrator_t swig_types[193] -#define SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t swig_types[194] -#define SWIGTYPE_p_std__shared_ptrT_cmf__water__waterbalance_integrator_t swig_types[195] -#define SWIGTYPE_p_std__shared_ptrT_std__shared_ptrT_cmf__atmosphere__ConstantRainSource_t_t swig_types[196] -#define SWIGTYPE_p_std__shared_ptrT_std__shared_ptrT_cmf__atmosphere__RainfallStationReference_t_t swig_types[197] -#define SWIGTYPE_p_std__string swig_types[198] -#define SWIGTYPE_p_std__vectorT_std__shared_ptrT_cmf__water__WaterStorage_t_t swig_types[199] -#define SWIGTYPE_p_std__vectorT_std__shared_ptrT_cmf__water__flux_connection_t_t__const_iterator swig_types[200] -#define SWIGTYPE_p_std__vectorT_std__shared_ptrT_cmf__water__flux_connection_t_t__iterator swig_types[201] -static swig_type_info *swig_types[203]; -static swig_module_info swig_module = {swig_types, 202, 0, 0, 0, 0}; -#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) -#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) - -/* -------- TYPES TABLE (END) -------- */ - -#if (PY_VERSION_HEX <= 0x02000000) -# if !defined(SWIG_PYTHON_CLASSIC) -# error "This python version requires swig to be run with the '-classic' option" -# endif -#endif -#if (PY_VERSION_HEX <= 0x02020000) -# error "This python version requires swig to be run with the '-nomodern' option" -#endif -#if (PY_VERSION_HEX <= 0x02020000) -# error "This python version requires swig to be run with the '-nomodernargs' option" -#endif -#ifndef METH_O -# error "This python version requires swig to be run with the '-nofastunpack' option" -#endif -#ifdef SWIG_TypeQuery -# undef SWIG_TypeQuery -#endif -#define SWIG_TypeQuery SWIG_Python_TypeQuery - -/*----------------------------------------------- - @(target):= _cmf_core.so - ------------------------------------------------*/ -#if PY_VERSION_HEX >= 0x03000000 -# define SWIG_init PyInit__cmf_core - -#else -# define SWIG_init init_cmf_core - -#endif -#define SWIG_name "_cmf_core" - -#define SWIGVERSION 0x030012 -#define SWIG_VERSION SWIGVERSION - - -#define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a)) -#define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a)) - - -#include - - -namespace swig { - class SwigPtr_PyObject { - protected: - PyObject *_obj; - - public: - SwigPtr_PyObject() :_obj(0) - { - } - - SwigPtr_PyObject(const SwigPtr_PyObject& item) : _obj(item._obj) - { - SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XINCREF(_obj); - SWIG_PYTHON_THREAD_END_BLOCK; - } - - SwigPtr_PyObject(PyObject *obj, bool initial_ref = true) :_obj(obj) - { - if (initial_ref) { - SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XINCREF(_obj); - SWIG_PYTHON_THREAD_END_BLOCK; - } - } - - SwigPtr_PyObject & operator=(const SwigPtr_PyObject& item) - { - SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XINCREF(item._obj); - Py_XDECREF(_obj); - _obj = item._obj; - SWIG_PYTHON_THREAD_END_BLOCK; - return *this; - } - - ~SwigPtr_PyObject() - { - SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XDECREF(_obj); - SWIG_PYTHON_THREAD_END_BLOCK; - } - - operator PyObject *() const - { - return _obj; - } - - PyObject *operator->() const - { - return _obj; - } - }; -} - - -namespace swig { - struct SwigVar_PyObject : SwigPtr_PyObject { - SwigVar_PyObject(PyObject* obj = 0) : SwigPtr_PyObject(obj, false) { } - - SwigVar_PyObject & operator = (PyObject* obj) - { - Py_XDECREF(_obj); - _obj = obj; - return *this; - } - }; -} - - -#include - - -SWIGINTERNINLINE PyObject* - SWIG_From_int (int value) -{ - return PyInt_FromLong((long) value); -} - - - #include "cmfmemory.h" - - -// ********************************************************************************************** -// %iterable_to_list(LISTTYPE,ITEMTYPE) typemap system. Puts a function template into the header for general usage -// Function to convert an iterable to a list type (class with append function). For use in typemaps - template - int iterable_to_list(PyObject* iterable,swig_type_info* _item_descriptor, _Ty& temp_list) { - PyObject* iter = PyObject_GetIter(iterable); - if (iter == 0) { - // no iterator - return SWIG_ERROR; - } - while (PyObject* py_item = PyIter_Next(iter)) { - _item_type* item=0; - // if the item is a node, append to node_list - int is_ok = SWIG_ConvertPtr(py_item, (void**)&item, _item_descriptor, SWIG_POINTER_EXCEPTION); - if (is_ok == 0 && item != 0 ) { - temp_list.append(*item); - } - Py_DECREF(py_item); - } - Py_DECREF(iter); - return SWIG_OK; - } - - int is_listtype_or_iterable(PyObject* input, swig_type_info* listtype_descriptor) { - // Checks if a type has the given descriptor or is iterable - void * pt; - int res=SWIG_ConvertPtr(input,&pt,listtype_descriptor,0); - if (SWIG_IsOK(res)) { - return 1; - } else { - PyObject* iter = PyObject_GetIter(input); - if (iter != 0) { - Py_DECREF(iter); - return 2; - } - else return 0; - } - } - - -std::string pyrepr(PyObject* o) { - PyObject* s = PyObject_Repr(o); - #if PY_MAJOR_VERSION < 3 - std::string res = PyString_AsString(s); - #else - std::string res = PyUnicode_AsUTF8(s); - #endif - Py_XDECREF(s); - return res; -} - - - -// numpy/arrayobject.h requires this Macro-constant. Some Compilers (e.g. gcc) defines it internally, others (e.g. VS2008) not -#ifndef SIZEOF_LONG_DOUBLE -#define SIZEOF_LONG_DOUBLE sizeof(long double) -#endif -#ifndef NPY_NO_DEPRECATED_API -#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION -#endif - -// including numpy array definition -#include -// including my array header -#include "math/num_array.h" - - -#ifndef NPY_ARRAY_CARRAY -#define NPY_ARRAY_CARRAY NPY_CARRAY -#endif - -#ifndef NPY_ARRAY_OWNDATA -#define NPY_ARRAY_OWNDATA NPY_OWNDATA -#endif - -bool test_npy_array(PyObject* op) { - PyObject* ao = PyArray_ContiguousFromAny(op,NPY_DOUBLE,1,1); - if (!ao) // If given object was not convertable into an array - return false; - else { - Py_DECREF(ao); - return true; - } -} -// This function creates a numpy array from an num_array. -// The data of the num_array is afterwards owned by the numpy array. -PyObject* as_npy_array(cmf::math::num_array& a) -{ - // Size of the 1d array - npy_intp dims[1] = {a.size()}; - // pointer to the data of the 1d array - cmf::math::num_array::iterator start = a.release(); - // Creates the numpy array using size, place and type information - int flags = NPY_ARRAY_CARRAY | NPY_ARRAY_OWNDATA; - return PyArray_New( - &PyArray_Type,1,dims,NPY_DOUBLE,0, - (void *)start,0,flags,0); -} -// This function creates a new array from any object providing the array interface or from a sequence. -// First a numpy array is created to ensure right ordering, secondly an array is created by copying the given data. -ptrdiff_t from_npy_array(PyObject* op,double ** data) { - // Create a contiguous and behaved numpy array from the given object - // May include a copy of the data - // Returns NULL if: - // - given object was not a sequence of numbers or an object exposing the array interface or - // - array had more dimensions - PyArrayObject* ao = (PyArrayObject*)PyArray_ContiguousFromAny(op,NPY_DOUBLE,1,1); - if (!ao) {// If given object was not convertable into an array (no sequence of numbers or implementation of the array interface) - return 0; - } else { - // Get pointer to data - double * p_array=(double*)PyArray_DATA(ao); - // Get size - ptrdiff_t size = (ptrdiff_t)PyArray_DIM(ao,0); - double * res=new double[size]; - for (ptrdiff_t i=0;i -#if !defined(SWIG_NO_LLONG_MAX) -# if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__) -# define LLONG_MAX __LONG_LONG_MAX__ -# define LLONG_MIN (-LLONG_MAX - 1LL) -# define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL) -# endif -#endif - - -SWIGINTERN int -SWIG_AsVal_double (PyObject *obj, double *val) -{ - int res = SWIG_TypeError; - if (PyFloat_Check(obj)) { - if (val) *val = PyFloat_AsDouble(obj); - return SWIG_OK; -#if PY_VERSION_HEX < 0x03000000 - } else if (PyInt_Check(obj)) { - if (val) *val = (double) PyInt_AsLong(obj); - return SWIG_OK; -#endif - } else if (PyLong_Check(obj)) { - double v = PyLong_AsDouble(obj); - if (!PyErr_Occurred()) { - if (val) *val = v; - return SWIG_OK; - } else { - PyErr_Clear(); - } - } -#ifdef SWIG_PYTHON_CAST_MODE - { - int dispatch = 0; - double d = PyFloat_AsDouble(obj); - if (!PyErr_Occurred()) { - if (val) *val = d; - return SWIG_AddCast(SWIG_OK); - } else { - PyErr_Clear(); - } - if (!dispatch) { - long v = PyLong_AsLong(obj); - if (!PyErr_Occurred()) { - if (val) *val = v; - return SWIG_AddCast(SWIG_AddCast(SWIG_OK)); - } else { - PyErr_Clear(); - } - } - } -#endif - return res; -} - - -#include - - -#include - - -SWIGINTERNINLINE int -SWIG_CanCastAsInteger(double *d, double min, double max) { - double x = *d; - if ((min <= x && x <= max)) { - double fx = floor(x); - double cx = ceil(x); - double rd = ((x - fx) < 0.5) ? fx : cx; /* simple rint */ - if ((errno == EDOM) || (errno == ERANGE)) { - errno = 0; - } else { - double summ, reps, diff; - if (rd < x) { - diff = x - rd; - } else if (rd > x) { - diff = rd - x; - } else { - return 1; - } - summ = rd + x; - reps = diff/summ; - if (reps < 8*DBL_EPSILON) { - *d = rd; - return 1; - } - } - } - return 0; -} - - -SWIGINTERN int -SWIG_AsVal_long (PyObject *obj, long* val) -{ -#if PY_VERSION_HEX < 0x03000000 - if (PyInt_Check(obj)) { - if (val) *val = PyInt_AsLong(obj); - return SWIG_OK; - } else -#endif - if (PyLong_Check(obj)) { - long v = PyLong_AsLong(obj); - if (!PyErr_Occurred()) { - if (val) *val = v; - return SWIG_OK; - } else { - PyErr_Clear(); - return SWIG_OverflowError; - } - } -#ifdef SWIG_PYTHON_CAST_MODE - { - int dispatch = 0; - long v = PyInt_AsLong(obj); - if (!PyErr_Occurred()) { - if (val) *val = v; - return SWIG_AddCast(SWIG_OK); - } else { - PyErr_Clear(); - } - if (!dispatch) { - double d; - int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d)); - if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) { - if (val) *val = (long)(d); - return res; - } - } - } -#endif - return SWIG_TypeError; -} - - -SWIGINTERN int -SWIG_AsVal_int (PyObject * obj, int *val) -{ - long v; - int res = SWIG_AsVal_long (obj, &v); - if (SWIG_IsOK(res)) { - if ((v < INT_MIN || v > INT_MAX)) { - return SWIG_OverflowError; - } else { - if (val) *val = static_cast< int >(v); - } - } - return res; -} - - -#include "math/spline.h" - - - #define SWIG_From_long PyInt_FromLong - - -SWIGINTERNINLINE PyObject* -SWIG_From_unsigned_SS_long (unsigned long value) -{ - return (value > LONG_MAX) ? - PyLong_FromUnsignedLong(value) : PyInt_FromLong(static_cast< long >(value)); -} - - -#if defined(LLONG_MAX) && !defined(SWIG_LONG_LONG_AVAILABLE) -# define SWIG_LONG_LONG_AVAILABLE -#endif - - -#ifdef SWIG_LONG_LONG_AVAILABLE -SWIGINTERNINLINE PyObject* -SWIG_From_unsigned_SS_long_SS_long (unsigned long long value) -{ - return (value > LONG_MAX) ? - PyLong_FromUnsignedLongLong(value) : PyInt_FromLong(static_cast< long >(value)); -} -#endif - - -SWIGINTERNINLINE PyObject * -SWIG_From_size_t (size_t value) -{ -#ifdef SWIG_LONG_LONG_AVAILABLE - if (sizeof(size_t) <= sizeof(unsigned long)) { -#endif - return SWIG_From_unsigned_SS_long (static_cast< unsigned long >(value)); -#ifdef SWIG_LONG_LONG_AVAILABLE - } else { - /* assume sizeof(size_t) <= sizeof(unsigned long long) */ - return SWIG_From_unsigned_SS_long_SS_long (static_cast< unsigned long long >(value)); - } -#endif -} - - - #define SWIG_From_double PyFloat_FromDouble - - -// Include geometry -#include "geometry/geometry.h" -static bool check_seq_point(PyObject* input) { - if (PySequence_Check(input)) { - Py_ssize_t len = PySequence_Length(input); - if (len==2 || len==3) - return true; - } - return false; -} -static std::string convert_seq_to_point(PyObject* input,cmf::geometry::point& p) -{ - double temp[3]; - ptrdiff_t len=PyObject_Length(input); - if (len<2) { - std::string res = "Sequence <"; - res += pyrepr(input); - res+="> has to few items to convert to cmf.point. At least two items are needed"; - return res; - } else if (len>3) { - std::string res = "Sequence <"; - res+=pyrepr(input); - res+="> has to many items (more than 3) to convert to cmf.point."; - return res; - } - - for (int i=0;i(v); -#ifdef SWIG_LONG_LONG_AVAILABLE - } else if (sizeof(ptrdiff_t) <= sizeof(long long)) { - long long v; - res = SWIG_AsVal_long_SS_long (obj, val ? &v : 0); - if (SWIG_IsOK(res) && val) *val = static_cast< ptrdiff_t >(v); - } -#endif - return res; -} - - -#include "datetime.h" -#include "math/real.h" -#include "math/time.h" -#include "math/timeseries.h" - - -static cmf::math::Time convert_datetime_to_cmftime(PyObject* dt) { - cmf::math::Time* swigtime=0; - int res=SWIG_ConvertPtr(dt,(void**)(&swigtime),SWIGTYPE_p_cmf__math__Time,0); - if (SWIG_IsOK(res) && swigtime!=0) { - return *swigtime; - } else if (PyDateTime_Check(dt)) { - return cmf::math::Time(PyDateTime_GET_DAY(dt), - PyDateTime_GET_MONTH(dt), - PyDateTime_GET_YEAR(dt), - PyDateTime_DATE_GET_HOUR(dt), - PyDateTime_DATE_GET_MINUTE(dt), - PyDateTime_DATE_GET_SECOND(dt), - PyDateTime_DATE_GET_MICROSECOND(dt)/1000); - } else if (PyDate_Check(dt)) { - return cmf::math::Time(PyDateTime_GET_DAY(dt), - PyDateTime_GET_MONTH(dt), - PyDateTime_GET_YEAR(dt)); - } else if (PyDelta_Check(dt)) { - PyDateTime_Delta* delta=(PyDateTime_Delta*)(dt); - long long ms=24 * 3600; - ms*=delta->days; - ms+=delta->seconds; - ms*=1000; - ms+=delta->microseconds/1000; - return cmf::math::timespan(ms); - } else { - return cmf::math::never; - } - -} -static bool check_time(PyObject* dt) { - void * pT = 0; - int res=SWIG_ConvertPtr(dt,&pT,SWIGTYPE_p_cmf__math__Time,0); - if (SWIG_IsOK(res) && pT!=0) return true; - else if (PyDateTime_Check(dt)) return true; - else if (PyDelta_Check(dt)) return true; - else if (PyDate_Check(dt)) return true; - else return false; -} - - - - -SWIGINTERN swig_type_info* -SWIG_pchar_descriptor(void) -{ - static int init = 0; - static swig_type_info* info = 0; - if (!init) { - info = SWIG_TypeQuery("_p_char"); - init = 1; - } - return info; -} - - -SWIGINTERNINLINE PyObject * -SWIG_FromCharPtrAndSize(const char* carray, size_t size) -{ - if (carray) { - if (size > INT_MAX) { - swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); - return pchar_descriptor ? - SWIG_InternalNewPointerObj(const_cast< char * >(carray), pchar_descriptor, 0) : SWIG_Py_Void(); - } else { -#if PY_VERSION_HEX >= 0x03000000 -#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR) - return PyBytes_FromStringAndSize(carray, static_cast< Py_ssize_t >(size)); -#else -#if PY_VERSION_HEX >= 0x03010000 - return PyUnicode_DecodeUTF8(carray, static_cast< Py_ssize_t >(size), "surrogateescape"); -#else - return PyUnicode_FromStringAndSize(carray, static_cast< Py_ssize_t >(size)); -#endif -#endif -#else - return PyString_FromStringAndSize(carray, static_cast< Py_ssize_t >(size)); -#endif - } - } else { - return SWIG_Py_Void(); - } -} - - -SWIGINTERNINLINE PyObject * -SWIG_From_std_string (const std::string& s) -{ - return SWIG_FromCharPtrAndSize(s.data(), s.size()); -} - - -#ifdef SWIG_LONG_LONG_AVAILABLE -SWIGINTERNINLINE PyObject* -SWIG_From_long_SS_long (long long value) -{ - return ((value < LONG_MIN) || (value > LONG_MAX)) ? - PyLong_FromLongLong(value) : PyInt_FromLong(static_cast< long >(value)); -} -#endif - - -SWIGINTERN int -SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc) -{ -#if PY_VERSION_HEX>=0x03000000 -#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR) - if (PyBytes_Check(obj)) -#else - if (PyUnicode_Check(obj)) -#endif -#else - if (PyString_Check(obj)) -#endif - { - char *cstr; Py_ssize_t len; -#if PY_VERSION_HEX>=0x03000000 -#if !defined(SWIG_PYTHON_STRICT_BYTE_CHAR) - if (!alloc && cptr) { - /* We can't allow converting without allocation, since the internal - representation of string in Python 3 is UCS-2/UCS-4 but we require - a UTF-8 representation. - TODO(bhy) More detailed explanation */ - return SWIG_RuntimeError; - } - obj = PyUnicode_AsUTF8String(obj); - if(alloc) *alloc = SWIG_NEWOBJ; -#endif - PyBytes_AsStringAndSize(obj, &cstr, &len); -#else - PyString_AsStringAndSize(obj, &cstr, &len); -#endif - if (cptr) { - if (alloc) { - /* - In python the user should not be able to modify the inner - string representation. To warranty that, if you define - SWIG_PYTHON_SAFE_CSTRINGS, a new/copy of the python string - buffer is always returned. - - The default behavior is just to return the pointer value, - so, be careful. - */ -#if defined(SWIG_PYTHON_SAFE_CSTRINGS) - if (*alloc != SWIG_OLDOBJ) -#else - if (*alloc == SWIG_NEWOBJ) -#endif - { - *cptr = reinterpret_cast< char* >(memcpy(new char[len + 1], cstr, sizeof(char)*(len + 1))); - *alloc = SWIG_NEWOBJ; - } else { - *cptr = cstr; - *alloc = SWIG_OLDOBJ; - } - } else { -#if PY_VERSION_HEX>=0x03000000 -#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR) - *cptr = PyBytes_AsString(obj); -#else - assert(0); /* Should never reach here with Unicode strings in Python 3 */ -#endif -#else - *cptr = SWIG_Python_str_AsChar(obj); -#endif - } - } - if (psize) *psize = len + 1; -#if PY_VERSION_HEX>=0x03000000 && !defined(SWIG_PYTHON_STRICT_BYTE_CHAR) - Py_XDECREF(obj); -#endif - return SWIG_OK; - } else { -#if defined(SWIG_PYTHON_2_UNICODE) -#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR) -#error "Cannot use both SWIG_PYTHON_2_UNICODE and SWIG_PYTHON_STRICT_BYTE_CHAR at once" -#endif -#if PY_VERSION_HEX<0x03000000 - if (PyUnicode_Check(obj)) { - char *cstr; Py_ssize_t len; - if (!alloc && cptr) { - return SWIG_RuntimeError; - } - obj = PyUnicode_AsUTF8String(obj); - if (PyString_AsStringAndSize(obj, &cstr, &len) != -1) { - if (cptr) { - if (alloc) *alloc = SWIG_NEWOBJ; - *cptr = reinterpret_cast< char* >(memcpy(new char[len + 1], cstr, sizeof(char)*(len + 1))); - } - if (psize) *psize = len + 1; - - Py_XDECREF(obj); - return SWIG_OK; - } else { - Py_XDECREF(obj); - } - } -#endif -#endif - - swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); - if (pchar_descriptor) { - void* vptr = 0; - if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) { - if (cptr) *cptr = (char *) vptr; - if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0; - if (alloc) *alloc = SWIG_OLDOBJ; - return SWIG_OK; - } - } - } - return SWIG_TypeError; -} - - -SWIGINTERN int -SWIG_AsCharArray(PyObject * obj, char *val, size_t size) -{ - char* cptr = 0; size_t csize = 0; int alloc = SWIG_OLDOBJ; - int res = SWIG_AsCharPtrAndSize(obj, &cptr, &csize, &alloc); - if (SWIG_IsOK(res)) { - /* special case of single char conversion when we don't need space for NUL */ - if (size == 1 && csize == 2 && cptr && !cptr[1]) --csize; - if (csize <= size) { - if (val) { - if (csize) memcpy(val, cptr, csize*sizeof(char)); - if (csize < size) memset(val + csize, 0, (size - csize)*sizeof(char)); - } - if (alloc == SWIG_NEWOBJ) { - delete[] cptr; - res = SWIG_DelNewMask(res); - } - return res; - } - if (alloc == SWIG_NEWOBJ) delete[] cptr; - } - return SWIG_TypeError; -} - - -SWIGINTERN int -SWIG_AsVal_char (PyObject * obj, char *val) -{ - int res = SWIG_AsCharArray(obj, val, 1); - if (!SWIG_IsOK(res)) { - long v; - res = SWIG_AddCast(SWIG_AsVal_long (obj, &v)); - if (SWIG_IsOK(res)) { - if ((CHAR_MIN <= v) && (v <= CHAR_MAX)) { - if (val) *val = static_cast< char >(v); - } else { - res = SWIG_OverflowError; - } - } - } - return res; -} - - -#define cmf_math_timeseries_begin_get(self_) new cmf::math::Time(self_->begin()) - - -#define cmf_math_timeseries_step_get(self_) new cmf::math::Time(self_->step()) - - -#define cmf_math_timeseries_end_get(self_) new cmf::math::Time(self_->end()) - - -SWIGINTERN int -SWIG_AsVal_unsigned_SS_long (PyObject *obj, unsigned long *val) -{ -#if PY_VERSION_HEX < 0x03000000 - if (PyInt_Check(obj)) { - long v = PyInt_AsLong(obj); - if (v >= 0) { - if (val) *val = v; - return SWIG_OK; - } else { - return SWIG_OverflowError; - } - } else -#endif - if (PyLong_Check(obj)) { - unsigned long v = PyLong_AsUnsignedLong(obj); - if (!PyErr_Occurred()) { - if (val) *val = v; - return SWIG_OK; - } else { - PyErr_Clear(); - return SWIG_OverflowError; - } - } -#ifdef SWIG_PYTHON_CAST_MODE - { - int dispatch = 0; - unsigned long v = PyLong_AsUnsignedLong(obj); - if (!PyErr_Occurred()) { - if (val) *val = v; - return SWIG_AddCast(SWIG_OK); - } else { - PyErr_Clear(); - } - if (!dispatch) { - double d; - int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d)); - if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, ULONG_MAX)) { - if (val) *val = (unsigned long)(d); - return res; - } - } - } -#endif - return SWIG_TypeError; -} - - -#ifdef SWIG_LONG_LONG_AVAILABLE -SWIGINTERN int -SWIG_AsVal_unsigned_SS_long_SS_long (PyObject *obj, unsigned long long *val) -{ - int res = SWIG_TypeError; - if (PyLong_Check(obj)) { - unsigned long long v = PyLong_AsUnsignedLongLong(obj); - if (!PyErr_Occurred()) { - if (val) *val = v; - return SWIG_OK; - } else { - PyErr_Clear(); - res = SWIG_OverflowError; - } - } else { - unsigned long v; - res = SWIG_AsVal_unsigned_SS_long (obj,&v); - if (SWIG_IsOK(res)) { - if (val) *val = v; - return res; - } - } -#ifdef SWIG_PYTHON_CAST_MODE - { - const double mant_max = 1LL << DBL_MANT_DIG; - double d; - res = SWIG_AsVal_double (obj,&d); - if (SWIG_IsOK(res) && !SWIG_CanCastAsInteger(&d, 0, mant_max)) - return SWIG_OverflowError; - if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, mant_max)) { - if (val) *val = (unsigned long long)(d); - return SWIG_AddCast(res); - } - res = SWIG_TypeError; - } -#endif - return res; -} -#endif - - -SWIGINTERNINLINE int -SWIG_AsVal_size_t (PyObject * obj, size_t *val) -{ - int res = SWIG_TypeError; -#ifdef SWIG_LONG_LONG_AVAILABLE - if (sizeof(size_t) <= sizeof(unsigned long)) { -#endif - unsigned long v; - res = SWIG_AsVal_unsigned_SS_long (obj, val ? &v : 0); - if (SWIG_IsOK(res) && val) *val = static_cast< size_t >(v); -#ifdef SWIG_LONG_LONG_AVAILABLE - } else if (sizeof(size_t) <= sizeof(unsigned long long)) { - unsigned long long v; - res = SWIG_AsVal_unsigned_SS_long_SS_long (obj, val ? &v : 0); - if (SWIG_IsOK(res) && val) *val = static_cast< size_t >(v); - } -#endif - return res; -} - - -SWIGINTERN int -SWIG_AsPtr_std_string (PyObject * obj, std::string **val) -{ - char* buf = 0 ; size_t size = 0; int alloc = SWIG_OLDOBJ; - if (SWIG_IsOK((SWIG_AsCharPtrAndSize(obj, &buf, &size, &alloc)))) { - if (buf) { - if (val) *val = new std::string(buf, size - 1); - if (alloc == SWIG_NEWOBJ) delete[] buf; - return SWIG_NEWOBJ; - } else { - if (val) *val = 0; - return SWIG_OLDOBJ; - } - } else { - static int init = 0; - static swig_type_info* descriptor = 0; - if (!init) { - descriptor = SWIG_TypeQuery("std::string" " *"); - init = 1; - } - if (descriptor) { - std::string *vptr; - int res = SWIG_ConvertPtr(obj, (void**)&vptr, descriptor, 0); - if (SWIG_IsOK(res) && val) *val = vptr; - return res; - } - } - return SWIG_ERROR; -} - -SWIGINTERN ptrdiff_t cmf_math_timeseries___len__(cmf::math::timeseries *self){ - return self->size(); - } - -SWIGINTERNINLINE PyObject * -SWIG_From_ptrdiff_t (ptrdiff_t value) -{ -#ifdef SWIG_LONG_LONG_AVAILABLE - if (sizeof(ptrdiff_t) <= sizeof(long)) { -#endif - return SWIG_From_long (static_cast< long >(value)); -#ifdef SWIG_LONG_LONG_AVAILABLE - } else { - /* assume sizeof(ptrdiff_t) <= sizeof(long long) */ - return SWIG_From_long_SS_long (static_cast< long long >(value)); - } -#endif -} - - -#include "math/statevariable.h" -#include "math/integrators/integrator.h" -#include "math/integrators/bdf2.h" -#include "math/integrators/explicit_euler.h" -#include "math/integrators/implicit_euler.h" -#include "math/integrators/RKFintegrator.h" -#include "math/integrators/cvodeintegrator.h" -#include "math/integrators/multiintegrator.h" - - -#define cmf_math_StateVariable_state_get(self_) self_->get_state() -#define cmf_math_StateVariable_state_set(self_, val_) self_->set_state(val_) - -SWIGINTERN size_t cmf_math_integratable_list___len__(cmf::math::integratable_list const *self){ - return self->size(); - } -SWIGINTERN size_t cmf_math_StateVariableList___len__(cmf::math::StateVariableList const *self){ - return self->size(); - } - -#define cmf_math_CVodeIntegrator_order_get(self_) self_->get_order() - - -SWIGINTERN int -SWIG_AsVal_bool (PyObject *obj, bool *val) -{ - int r; - if (!PyBool_Check(obj)) - return SWIG_ERROR; - r = PyObject_IsTrue(obj); - if (r == -1) - return SWIG_ERROR; - if (val) *val = r ? true : false; - return SWIG_OK; -} - -SWIGINTERN cmf::math::StateVariable::ptr cmf_math_Integrator___getitem__(cmf::math::Integrator *self,int index){ - return (*self)[index]; - } - -SWIGINTERNINLINE PyObject * -SWIG_From_char (char c) -{ - return SWIG_FromCharPtrAndSize(&c,1); -} - - - // Include Water - #include "water/Solute.h" - #include "water/SoluteStorage.h" - #include "water/WaterStorage.h" - #include "water/flux_connection.h" - #include "water/boundary_condition.h" - #include "water/simple_connections.h" - #include "water/system_bridge.h" - -SWIGINTERN std::string cmf_water_solute___repr__(cmf::water::solute *self){ return "[" + self->Name + "]"; } -SWIGINTERN cmf::water::solute *cmf_water_solute_vector___getitem__(cmf::water::solute_vector *self,int i){ - return self->get_solute(i); - } -SWIGINTERN size_t cmf_water_solute_vector___len__(cmf::water::solute_vector *self){ return self->size();} -SWIGINTERN cmf::math::timeseries &cmf_water_SoluteTimeseries___getitem__(cmf::water::SoluteTimeseries *self,cmf::water::solute const &solute){ - return (*self)[solute]; - } -SWIGINTERN void cmf_water_SoluteTimeseries___setitem__(cmf::water::SoluteTimeseries *self,cmf::water::solute const &solute,cmf::math::timeseries concentration){ - (*self)[solute]=concentration; - } -SWIGINTERN size_t cmf_water_SoluteTimeseries___len__(cmf::water::SoluteTimeseries const *self){ - return self->size(); - } - -#define cmf_water_flux_node_project_get(self_) &self_->get_project() - - -#define cmf_water_flux_node_potential_get(self_) self_->get_potential() -#define cmf_water_flux_node_potential_set(self_, val_) self_->set_potential(val_) - - -#define cmf_water_flux_node_connections_get(self_) new cmf::water::connection_list(self_->get_connections()) - - -struct SWIG_null_deleter { - void operator() (void const *) const { - } -}; -#define SWIG_NO_NULL_DELETER_0 , SWIG_null_deleter() -#define SWIG_NO_NULL_DELETER_1 -#define SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW -#define SWIG_NO_NULL_DELETER_SWIG_POINTER_OWN - - -#define SWIG_NO_NULL_DELETER_SWIG_BUILTIN_INIT - -SWIGINTERN size_t cmf_water_connection_list___len__(cmf::water::connection_list const *self){ return self->size();} -SWIGINTERN bool cmf_water_connection_list___contains__(cmf::water::connection_list const *self,cmf::water::flux_connection::ptr const &con){ return self->contains(con);} - -#define cmf_water_WaterStorage_volume_get(self_) self_->get_volume() -#define cmf_water_WaterStorage_volume_set(self_, val_) self_->set_volume(val_) - - -#define cmf_water_WaterStorage_statevariable_get(self_) self_->get_state_variable_content() -#define cmf_water_WaterStorage_statevariable_set(self_, val_) self_->set_state_variable_content(val_) - - -#include "water/collections.h" - - -#define cmf_water_node_list_potentials_get(self_) self_->get_potentials() -#define cmf_water_node_list_potentials_set(self_, val_) self_->set_potentials(val_) - - -#define cmf_water_NeumannBoundary_list_fluxes_get(self_) self_->get_fluxes() -#define cmf_water_NeumannBoundary_list_fluxes_set(self_, val_) self_->set_fluxes(val_) - - - #include "atmosphere/Weather.h" - #include "atmosphere/meteorology.h" - #include "atmosphere/precipitation.h" - -SWIGINTERN double cmf_atmosphere_RainfallStation___call__(cmf::atmosphere::RainfallStation const *self,cmf::math::Time t){ return self->data[t]; } - - #include "upslope/vegetation/StructVegetation.h" - #include "upslope/surfacewater.h" - #include "upslope/cell.h" - #include "upslope/Topology.h" - #include "upslope/algorithm.h" - - -SWIGINTERN std::string cmf_upslope_vegetation_Vegetation___repr__(cmf::upslope::vegetation::Vegetation *self){ - std::stringstream sstr; - sstr << "cmf.vegetation(\n" - << " Height = " << self->Height << " [m]" << std::endl - << " LAI = " << self->LAI << " [m2/m2]" << std::endl - << " albedo = " << self->albedo << " [W/W]" << std::endl - << " CanopyClosure = " << self->CanopyClosure << " [m2/m2]" << std::endl - << " CanopyPARExtinction = " << self->CanopyPARExtinction << std::endl - << " CanopyCapacityPerLAI = " << self->CanopyCapacityPerLAI << " [mm]" << std::endl - << " StomatalResistance = " << self->StomatalResistance << " [s/m]" << std::endl - << " RootDepth = " << self->RootDepth << " [m]" << std::endl - << " fraction_at_rootdepth = " << self->fraction_at_rootdepth << " [-]" << std::endl - << " RootContent = " << self->RootContent << " [kg/m3]" << std::endl - << ")" << std::endl; - return sstr.str(); - } - -#define cmf_upslope_Cell_topology_get(self_) &self_->get_topology() - - -#define cmf_upslope_Cell_meteorology_get(self_) &self_->get_meteorology() -#define cmf_upslope_Cell_meteorology_set(self_, val_) self_->set_meteorology(*val_) - - -#define cmf_upslope_Cell_layers_get(self_) &self_->get_layers() - - -#define cmf_upslope_Cell_project_get(self_) &self_->get_project() - - -#define cmf_upslope_Cell_saturated_depth_get(self_) self_->get_saturated_depth() -#define cmf_upslope_Cell_saturated_depth_set(self_, val_) self_->set_saturated_depth(val_) - - -#define cmf_upslope_Cell_area_get(self_) self_->get_area() - - -#define cmf_upslope_Cell_soildepth_get(self_) self_->get_soildepth() - -SWIGINTERN bool cmf_upslope_neighbor_iterator___eq__(cmf::upslope::neighbor_iterator *self,cmf::upslope::neighbor_iterator const &cmp){return (*self)==cmp;} -SWIGINTERN bool cmf_upslope_neighbor_iterator___neq__(cmf::upslope::neighbor_iterator *self,cmf::upslope::neighbor_iterator const &cmp){return (*self)!=cmp;} - -#define cmf_upslope_cell_vector_lowest_get(self_) &self_->get_lowest() - - -#define cmf_upslope_cell_vector_highest_get(self_) &self_->get_highest() - - - // Include Upslope - #include "upslope/Soil/RetentionCurve.h" - #include "upslope/SoilLayer.h" - - -#define cmf_upslope_BrooksCoreyRetentionCurve_b_get(self_) self_->get_b() -#define cmf_upslope_BrooksCoreyRetentionCurve_b_set(self_, val_) self_->set_b(val_) - - -#define cmf_upslope_SoilLayer_gravitational_potential_get(self_) self_->get_gravitational_potential() - - -#define cmf_upslope_SoilLayer_matrix_potential_get(self_) self_->get_matrix_potential() - - -#define cmf_upslope_SoilLayer_wetness_get(self_) self_->get_wetness() -#define cmf_upslope_SoilLayer_wetness_set(self_, val_) self_->set_wetness(val_) - - -#define cmf_upslope_SoilLayer_theta_get(self_) self_->get_theta() -#define cmf_upslope_SoilLayer_theta_set(self_, val_) self_->set_theta(val_) - - -#define cmf_upslope_SoilLayer_K_get(self_) self_->get_K() - - -#define cmf_upslope_SoilLayer_Ksat_get(self_) self_->get_Ksat() - - -#define cmf_upslope_SoilLayer_thickness_get(self_) self_->get_thickness() - - -#define cmf_upslope_SoilLayer_lower_boundary_get(self_) self_->get_lower_boundary() - - -#define cmf_upslope_SoilLayer_upper_boundary_get(self_) self_->get_upper_boundary() - - -#define cmf_upslope_SoilLayer_porosity_get(self_) self_->get_porosity() - - -#define cmf_upslope_SoilLayer_ice_fraction_get(self_) self_->get_ice_fraction() -#define cmf_upslope_SoilLayer_ice_fraction_set(self_, val_) self_->set_ice_fraction(val_) - - -#define cmf_upslope_SoilLayer_rootfraction_get(self_) self_->get_rootfraction() -#define cmf_upslope_SoilLayer_rootfraction_set(self_, val_) self_->set_rootfraction(val_) - - -#define cmf_upslope_layer_list_gravitational_potential_get(self_) self_->get_gravitational_potential() - - -#define cmf_upslope_layer_list_matrix_potential_get(self_) self_->get_matrix_potential() - - -#define cmf_upslope_layer_list_wetness_get(self_) self_->get_wetness() - - -#define cmf_upslope_layer_list_volume_get(self_) self_->get_volume() - - -#define cmf_upslope_layer_list_potential_get(self_) self_->get_potential() - - -#define cmf_upslope_layer_list_K_get(self_) self_->get_K() - - -#define cmf_upslope_layer_list_Ksat_get(self_) self_->get_Ksat() - - -#define cmf_upslope_layer_list_thickness_get(self_) self_->get_thickness() - - -#define cmf_upslope_layer_list_lower_boundary_get(self_) self_->get_lower_boundary() - - -#define cmf_upslope_layer_list_upper_boundary_get(self_) self_->get_upper_boundary() - - -#define cmf_upslope_layer_list_porosity_get(self_) self_->get_porosity() - - -#define cmf_upslope_layer_list_ice_fraction_get(self_) self_->get_ice_fraction() - - -#define cmf_upslope_layer_list_theta_get(self_) self_->get_theta() - - -#define cmf_upslope_layer_list_root_get(self_) self_->get_rootfraction() - -SWIGINTERN cmf::upslope::SoilLayer::ptr cmf_upslope_layer_list___get(cmf::upslope::layer_list *self,int index){ return (*self)[index];} - -#include "upslope/macropore.h" - - -#define cmf_upslope_MacroPore_filled_fraction_get(self_) self_->get_filled_fraction() - - -#define cmf_upslope_MacroPore_K_get(self_) self_->get_K() - - -#define cmf_upslope_MacroPore_capacity_get(self_) self_->get_capacity() - - -#define cmf_upslope_MacroPore_cell_get(self_) self_->get_cell() - - - #include "reach/ReachType.h" - #include "reach/OpenWaterStorage.h" - #include "reach/Reach.h" - - -#define cmf_river_OpenWaterStorage_depth_get(self_) self_->get_depth() -#define cmf_river_OpenWaterStorage_depth_set(self_, val_) self_->set_depth(val_) - - -#define cmf_river_Reach_length_get(self_) self_->get_length() - - -#define cmf_river_Reach_width_get(self_) self_->get_width() - - -#define cmf_river_Reach_channel_get(self_) &self_->get_height_function() - - -#define cmf_river_Reach_upstream_count_get(self_) self_->upstream_count() - - -#define cmf_river_Reach_diffusive_get(self_) self_->get_diffusive() -#define cmf_river_Reach_diffusive_set(self_, val_) self_->set_diffusive(val_) - - -#define cmf_river_ReachIterator_position_get(self_) self_->position() - - -#define cmf_upslope_SurfaceWater_puddledepth_get(self_) self_->get_puddledepth() -#define cmf_upslope_SurfaceWater_puddledepth_set(self_, val_) self_->set_puddledepth(val_) - - -#define cmf_upslope_SurfaceWater_nManning_get(self_) self_->get_nManning() -#define cmf_upslope_SurfaceWater_nManning_set(self_, val_) self_->set_nManning(val_) - - - #include "upslope/groundwater.h" - #include "upslope/connections/subsurfacefluxes.h" - #include "upslope/connections/surfacefluxes.h" - #include "upslope/connections/AtmosphericFluxes.h" - #include "upslope/connections/infiltration.h" - #include "upslope/connections/Percolation.h" - #include "upslope/vegetation/ET.h" - #include "upslope/vegetation/ShuttleworthWallace.h" - // Include river model - #include "reach/ManningConnection.h" - // Include the combined solver - #include "math/integrators/WaterSoluteIntegrator.h" - - -#define cmf_upslope_aquifer_base_height_get(self_) self_->get_base_height() - - -#define cmf_upslope_aquifer_top_height_get(self_) self_->get_top_height() - - - #include "project.h" - - -#define cmf_project_cells_get(self_) &self_->get_cells() - -#ifdef __cplusplus -extern "C" { -#endif -SWIGINTERN PyObject *_wrap_get_parallel_threads(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - int result; - - if (!SWIG_Python_UnpackTuple(args,"get_parallel_threads",0,0,0)) SWIG_fail; - { - try { - result = (int)cmf::math::get_parallel_threads(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_set_parallel_threads(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - int arg1 ; - int val1 ; - int ecode1 = 0 ; - PyObject * obj0 = 0 ; - char * kwnames[] = { - (char *) "numthreads", NULL - }; - int result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:set_parallel_threads",kwnames,&obj0)) SWIG_fail; - ecode1 = SWIG_AsVal_int(obj0, &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "set_parallel_threads" "', argument " "1"" of type '" "int""'"); - } - arg1 = static_cast< int >(val1); - { - try { - result = (int)cmf::math::set_parallel_threads(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_cubicspline(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::math::num_array *arg1 = 0 ; - cmf::math::num_array *arg2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "x",(char *) "y", NULL - }; - cmf::math::cubicspline *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:new_cubicspline",kwnames,&obj0,&obj1)) SWIG_fail; - { - // Convert a array_wrapper from numpy array - double * data=0; - ptrdiff_t size = from_npy_array(obj0,&data); - if (!data) { - SWIG_exception_fail(SWIG_TypeError,"Input data is not 'array-like' (in the sense of numpy arrays)"); - return NULL; - } - arg1 = new cmf::math::num_array(size,data); - } - { - // Convert a array_wrapper from numpy array - double * data=0; - ptrdiff_t size = from_npy_array(obj1,&data); - if (!data) { - SWIG_exception_fail(SWIG_TypeError,"Input data is not 'array-like' (in the sense of numpy arrays)"); - return NULL; - } - arg2 = new cmf::math::num_array(size,data); - } - { - try { - result = (cmf::math::cubicspline *)new cmf::math::cubicspline((cmf::math::num_array const &)*arg1,(cmf::math::num_array const &)*arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__cubicspline, SWIG_POINTER_NEW | 0 ); - { - delete arg1; - } - { - delete arg2; - } - return resultobj; -fail: - { - delete arg1; - } - { - delete arg2; - } - return NULL; -} - - -SWIGINTERN PyObject *_wrap_cubicspline_generate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::cubicspline *arg1 = (cmf::math::cubicspline *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__cubicspline, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cubicspline_generate" "', argument " "1"" of type '" "cmf::math::cubicspline *""'"); - } - arg1 = reinterpret_cast< cmf::math::cubicspline * >(argp1); - { - try { - (arg1)->generate(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_cubicspline_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::cubicspline *arg1 = (cmf::math::cubicspline *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - size_t result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__cubicspline, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cubicspline_size" "', argument " "1"" of type '" "cmf::math::cubicspline const *""'"); - } - arg1 = reinterpret_cast< cmf::math::cubicspline * >(argp1); - { - try { - result = ((cmf::math::cubicspline const *)arg1)->size(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_cubicspline___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::math::cubicspline *arg1 = (cmf::math::cubicspline *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "x", NULL - }; - real result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:cubicspline___call__",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__math__cubicspline, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cubicspline___call__" "', argument " "1"" of type '" "cmf::math::cubicspline *""'"); - } - arg1 = reinterpret_cast< cmf::math::cubicspline * >(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cubicspline___call__" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - { - try { - result = (real)(arg1)->operator ()(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_cubicspline(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::cubicspline *arg1 = (cmf::math::cubicspline *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__cubicspline, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_cubicspline" "', argument " "1"" of type '" "cmf::math::cubicspline *""'"); - } - arg1 = reinterpret_cast< cmf::math::cubicspline * >(argp1); - { - try { - delete arg1; - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *cubicspline_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__math__cubicspline, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *cubicspline_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN int Swig_var_PI_set(PyObject *) { - SWIG_Error(SWIG_AttributeError,"Variable PI is read-only."); - return 1; -} - - -SWIGINTERN PyObject *Swig_var_PI_get(void) { - PyObject *pyobj = 0; - - pyobj = SWIG_From_double(static_cast< double >(cmf::geometry::PI)); - return pyobj; -} - - -SWIGINTERN PyObject *_wrap_point_x_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::geometry::point *arg1 = (cmf::geometry::point *) 0 ; - double arg2 ; - cmf::geometry::point p1 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"point_x_set",2,2,swig_obj)) SWIG_fail; - { - if (SWIG_ConvertPtr(swig_obj[0], (void **) &arg1, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { - if (check_xy(swig_obj[0])) { - std::string res = convert_xyz_to_point(swig_obj[0],p1); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - return NULL; - } - } - else if (PySequence_Check(swig_obj[0])) { - std::string res = convert_seq_to_point(swig_obj[0],p1); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError, res.c_str()); - } - } else { - std::string res="<"; - res+=pyrepr(swig_obj[0]); - res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - } - arg1 = &p1; - } - } - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "point_x_set" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - if (arg1) (arg1)->x = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_point_x_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::geometry::point *arg1 = (cmf::geometry::point *) 0 ; - cmf::geometry::point p1 ; - PyObject *swig_obj[1] ; - double result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - if (SWIG_ConvertPtr(swig_obj[0], (void **) &arg1, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { - if (check_xy(swig_obj[0])) { - std::string res = convert_xyz_to_point(swig_obj[0],p1); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - return NULL; - } - } - else if (PySequence_Check(swig_obj[0])) { - std::string res = convert_seq_to_point(swig_obj[0],p1); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError, res.c_str()); - } - } else { - std::string res="<"; - res+=pyrepr(swig_obj[0]); - res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - } - arg1 = &p1; - } - } - result = (double) ((arg1)->x); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_point_y_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::geometry::point *arg1 = (cmf::geometry::point *) 0 ; - double arg2 ; - cmf::geometry::point p1 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"point_y_set",2,2,swig_obj)) SWIG_fail; - { - if (SWIG_ConvertPtr(swig_obj[0], (void **) &arg1, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { - if (check_xy(swig_obj[0])) { - std::string res = convert_xyz_to_point(swig_obj[0],p1); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - return NULL; - } - } - else if (PySequence_Check(swig_obj[0])) { - std::string res = convert_seq_to_point(swig_obj[0],p1); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError, res.c_str()); - } - } else { - std::string res="<"; - res+=pyrepr(swig_obj[0]); - res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - } - arg1 = &p1; - } - } - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "point_y_set" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - if (arg1) (arg1)->y = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_point_y_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::geometry::point *arg1 = (cmf::geometry::point *) 0 ; - cmf::geometry::point p1 ; - PyObject *swig_obj[1] ; - double result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - if (SWIG_ConvertPtr(swig_obj[0], (void **) &arg1, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { - if (check_xy(swig_obj[0])) { - std::string res = convert_xyz_to_point(swig_obj[0],p1); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - return NULL; - } - } - else if (PySequence_Check(swig_obj[0])) { - std::string res = convert_seq_to_point(swig_obj[0],p1); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError, res.c_str()); - } - } else { - std::string res="<"; - res+=pyrepr(swig_obj[0]); - res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - } - arg1 = &p1; - } - } - result = (double) ((arg1)->y); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_point_z_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::geometry::point *arg1 = (cmf::geometry::point *) 0 ; - double arg2 ; - cmf::geometry::point p1 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"point_z_set",2,2,swig_obj)) SWIG_fail; - { - if (SWIG_ConvertPtr(swig_obj[0], (void **) &arg1, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { - if (check_xy(swig_obj[0])) { - std::string res = convert_xyz_to_point(swig_obj[0],p1); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - return NULL; - } - } - else if (PySequence_Check(swig_obj[0])) { - std::string res = convert_seq_to_point(swig_obj[0],p1); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError, res.c_str()); - } - } else { - std::string res="<"; - res+=pyrepr(swig_obj[0]); - res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - } - arg1 = &p1; - } - } - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "point_z_set" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - if (arg1) (arg1)->z = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_point_z_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::geometry::point *arg1 = (cmf::geometry::point *) 0 ; - cmf::geometry::point p1 ; - PyObject *swig_obj[1] ; - double result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - if (SWIG_ConvertPtr(swig_obj[0], (void **) &arg1, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { - if (check_xy(swig_obj[0])) { - std::string res = convert_xyz_to_point(swig_obj[0],p1); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - return NULL; - } - } - else if (PySequence_Check(swig_obj[0])) { - std::string res = convert_seq_to_point(swig_obj[0],p1); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError, res.c_str()); - } - } else { - std::string res="<"; - res+=pyrepr(swig_obj[0]); - res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - } - arg1 = &p1; - } - } - result = (double) ((arg1)->z); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_point__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) { - PyObject *resultobj = 0; - cmf::geometry::point *result = 0 ; - - if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; - { - try { - result = (cmf::geometry::point *)new cmf::geometry::point(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_point__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::geometry::point *arg1 = 0 ; - cmf::geometry::point p1 ; - cmf::geometry::point *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - { - if (SWIG_ConvertPtr(swig_obj[0], (void **) &arg1, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { - if (check_xy(swig_obj[0])) { - std::string res = convert_xyz_to_point(swig_obj[0],p1); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - return NULL; - } - } - else if (PySequence_Check(swig_obj[0])) { - std::string res = convert_seq_to_point(swig_obj[0],p1); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError, res.c_str()); - } - } else { - std::string res="<"; - res+=pyrepr(swig_obj[0]); - res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - } - arg1 = &p1; - } - } - { - try { - result = (cmf::geometry::point *)new cmf::geometry::point((cmf::geometry::point const &)*arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_point__SWIG_2(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - double arg1 ; - double arg2 ; - double arg3 = (double) 0.0 ; - double val1 ; - int ecode1 = 0 ; - double val2 ; - int ecode2 = 0 ; - double val3 ; - int ecode3 = 0 ; - cmf::geometry::point *result = 0 ; - - if ((nobjs < 2) || (nobjs > 3)) SWIG_fail; - ecode1 = SWIG_AsVal_double(swig_obj[0], &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_point" "', argument " "1"" of type '" "double""'"); - } - arg1 = static_cast< double >(val1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_point" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - if (swig_obj[2]) { - ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_point" "', argument " "3"" of type '" "double""'"); - } - arg3 = static_cast< double >(val3); - } - { - try { - result = (cmf::geometry::point *)new cmf::geometry::point(arg1,arg2,arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_point(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[4] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args,"new_point",0,3,argv))) SWIG_fail; - --argc; - { - unsigned long _index = 0; - SWIG_TypeRank _rank = 0; - if (argc == 0) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 1; - if (_rank == _rankm) goto dispatch; - } - } - if (argc == 1) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - { - cmf::geometry::point p; - _v=check_xy(argv[0]) || check_seq_point(argv[0]); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 2; - if (_rank == _rankm) goto dispatch; - } - } - check_2: - - if ((argc >= 2) && (argc <= 3)) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - { - int res = SWIG_AsVal_double(argv[0], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_3; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_3; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (argc > 2) { - { - { - int res = SWIG_AsVal_double(argv[2], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_3; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - } - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 3; - if (_rank == _rankm) goto dispatch; - } - } - check_3: - - dispatch: - switch(_index) { - case 1: - return _wrap_new_point__SWIG_0(self, argc, argv); - case 2: - return _wrap_new_point__SWIG_1(self, argc, argv); - case 3: - return _wrap_new_point__SWIG_2(self, argc, argv); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_point'.\n" - " Possible C/C++ prototypes are:\n" - " cmf::geometry::point::point()\n" - " cmf::geometry::point::point(cmf::geometry::point const &)\n" - " cmf::geometry::point::point(double,double,double)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_point_distanceTo(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::geometry::point *arg1 = (cmf::geometry::point *) 0 ; - cmf::geometry::point arg2 ; - cmf::geometry::point p1 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "p", NULL - }; - double result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:point_distanceTo",kwnames,&obj0,&obj1)) SWIG_fail; - { - if (SWIG_ConvertPtr(obj0, (void **) &arg1, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { - if (check_xy(obj0)) { - std::string res = convert_xyz_to_point(obj0,p1); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - return NULL; - } - } - else if (PySequence_Check(obj0)) { - std::string res = convert_seq_to_point(obj0,p1); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError, res.c_str()); - } - } else { - std::string res="<"; - res+=pyrepr(obj0); - res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - } - arg1 = &p1; - } - } - { - if (check_xy(obj1)) { - std::string res = convert_xyz_to_point(obj1,arg2); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - return NULL; - } - } - else if (PySequence_Check(obj1)) { - std::string res = convert_seq_to_point(obj1,arg2); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError, res.c_str()); - } - } else { - std::string res="<"; - res+=pyrepr(obj1); - res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - } - } - { - try { - result = (double)((cmf::geometry::point const *)arg1)->distanceTo(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_point_z_weight_distance(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::geometry::point *arg1 = (cmf::geometry::point *) 0 ; - cmf::geometry::point arg2 ; - double arg3 ; - cmf::geometry::point p1 ; - double val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "p",(char *) "z_weight", NULL - }; - double result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:point_z_weight_distance",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; - { - if (SWIG_ConvertPtr(obj0, (void **) &arg1, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { - if (check_xy(obj0)) { - std::string res = convert_xyz_to_point(obj0,p1); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - return NULL; - } - } - else if (PySequence_Check(obj0)) { - std::string res = convert_seq_to_point(obj0,p1); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError, res.c_str()); - } - } else { - std::string res="<"; - res+=pyrepr(obj0); - res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - } - arg1 = &p1; - } - } - { - if (check_xy(obj1)) { - std::string res = convert_xyz_to_point(obj1,arg2); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - return NULL; - } - } - else if (PySequence_Check(obj1)) { - std::string res = convert_seq_to_point(obj1,arg2); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError, res.c_str()); - } - } else { - std::string res="<"; - res+=pyrepr(obj1); - res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - } - } - ecode3 = SWIG_AsVal_double(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "point_z_weight_distance" "', argument " "3"" of type '" "double""'"); - } - arg3 = static_cast< double >(val3); - { - try { - result = (double)((cmf::geometry::point const *)arg1)->z_weight_distance(arg2,arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_point_distance3DTo(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::geometry::point *arg1 = (cmf::geometry::point *) 0 ; - cmf::geometry::point arg2 ; - cmf::geometry::point p1 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "p", NULL - }; - double result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:point_distance3DTo",kwnames,&obj0,&obj1)) SWIG_fail; - { - if (SWIG_ConvertPtr(obj0, (void **) &arg1, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { - if (check_xy(obj0)) { - std::string res = convert_xyz_to_point(obj0,p1); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - return NULL; - } - } - else if (PySequence_Check(obj0)) { - std::string res = convert_seq_to_point(obj0,p1); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError, res.c_str()); - } - } else { - std::string res="<"; - res+=pyrepr(obj0); - res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - } - arg1 = &p1; - } - } - { - if (check_xy(obj1)) { - std::string res = convert_xyz_to_point(obj1,arg2); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - return NULL; - } - } - else if (PySequence_Check(obj1)) { - std::string res = convert_seq_to_point(obj1,arg2); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError, res.c_str()); - } - } else { - std::string res="<"; - res+=pyrepr(obj1); - res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - } - } - { - try { - result = (double)((cmf::geometry::point const *)arg1)->distance3DTo(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_point_distance(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::geometry::point arg1 ; - cmf::geometry::point arg2 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "p1",(char *) "p2", NULL - }; - double result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:point_distance",kwnames,&obj0,&obj1)) SWIG_fail; - { - if (check_xy(obj0)) { - std::string res = convert_xyz_to_point(obj0,arg1); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - return NULL; - } - } - else if (PySequence_Check(obj0)) { - std::string res = convert_seq_to_point(obj0,arg1); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError, res.c_str()); - } - } else { - std::string res="<"; - res+=pyrepr(obj0); - res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - } - } - { - if (check_xy(obj1)) { - std::string res = convert_xyz_to_point(obj1,arg2); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - return NULL; - } - } - else if (PySequence_Check(obj1)) { - std::string res = convert_seq_to_point(obj1,arg2); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError, res.c_str()); - } - } else { - std::string res="<"; - res+=pyrepr(obj1); - res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - } - } - { - try { - result = (double)cmf::geometry::point::distance(arg1,arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_point_distance_max(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::geometry::point *arg1 = (cmf::geometry::point *) 0 ; - cmf::geometry::point arg2 ; - cmf::geometry::point p1 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "p", NULL - }; - double result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:point_distance_max",kwnames,&obj0,&obj1)) SWIG_fail; - { - if (SWIG_ConvertPtr(obj0, (void **) &arg1, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { - if (check_xy(obj0)) { - std::string res = convert_xyz_to_point(obj0,p1); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - return NULL; - } - } - else if (PySequence_Check(obj0)) { - std::string res = convert_seq_to_point(obj0,p1); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError, res.c_str()); - } - } else { - std::string res="<"; - res+=pyrepr(obj0); - res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - } - arg1 = &p1; - } - } - { - if (check_xy(obj1)) { - std::string res = convert_xyz_to_point(obj1,arg2); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - return NULL; - } - } - else if (PySequence_Check(obj1)) { - std::string res = convert_seq_to_point(obj1,arg2); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError, res.c_str()); - } - } else { - std::string res="<"; - res+=pyrepr(obj1); - res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - } - } - { - try { - result = (double)((cmf::geometry::point const *)arg1)->distance_max(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_point_azimuth(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::geometry::point *arg1 = (cmf::geometry::point *) 0 ; - cmf::geometry::point arg2 ; - cmf::geometry::point p1 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "p", NULL - }; - double result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:point_azimuth",kwnames,&obj0,&obj1)) SWIG_fail; - { - if (SWIG_ConvertPtr(obj0, (void **) &arg1, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { - if (check_xy(obj0)) { - std::string res = convert_xyz_to_point(obj0,p1); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - return NULL; - } - } - else if (PySequence_Check(obj0)) { - std::string res = convert_seq_to_point(obj0,p1); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError, res.c_str()); - } - } else { - std::string res="<"; - res+=pyrepr(obj0); - res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - } - arg1 = &p1; - } - } - { - if (check_xy(obj1)) { - std::string res = convert_xyz_to_point(obj1,arg2); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - return NULL; - } - } - else if (PySequence_Check(obj1)) { - std::string res = convert_seq_to_point(obj1,arg2); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError, res.c_str()); - } - } else { - std::string res="<"; - res+=pyrepr(obj1); - res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - } - } - { - try { - result = (double)((cmf::geometry::point const *)arg1)->azimuth(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_point_angleToXAxis(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::geometry::point *arg1 = (cmf::geometry::point *) 0 ; - cmf::geometry::point arg2 ; - cmf::geometry::point p1 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "p", NULL - }; - double result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:point_angleToXAxis",kwnames,&obj0,&obj1)) SWIG_fail; - { - if (SWIG_ConvertPtr(obj0, (void **) &arg1, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { - if (check_xy(obj0)) { - std::string res = convert_xyz_to_point(obj0,p1); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - return NULL; - } - } - else if (PySequence_Check(obj0)) { - std::string res = convert_seq_to_point(obj0,p1); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError, res.c_str()); - } - } else { - std::string res="<"; - res+=pyrepr(obj0); - res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - } - arg1 = &p1; - } - } - { - if (check_xy(obj1)) { - std::string res = convert_xyz_to_point(obj1,arg2); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - return NULL; - } - } - else if (PySequence_Check(obj1)) { - std::string res = convert_seq_to_point(obj1,arg2); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError, res.c_str()); - } - } else { - std::string res="<"; - res+=pyrepr(obj1); - res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - } - } - { - try { - result = (double)((cmf::geometry::point const *)arg1)->angleToXAxis(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_point_sum(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::geometry::point *arg1 = (cmf::geometry::point *) 0 ; - cmf::geometry::point p1 ; - PyObject *swig_obj[1] ; - double result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - if (SWIG_ConvertPtr(swig_obj[0], (void **) &arg1, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { - if (check_xy(swig_obj[0])) { - std::string res = convert_xyz_to_point(swig_obj[0],p1); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - return NULL; - } - } - else if (PySequence_Check(swig_obj[0])) { - std::string res = convert_seq_to_point(swig_obj[0],p1); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError, res.c_str()); - } - } else { - std::string res="<"; - res+=pyrepr(swig_obj[0]); - res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - } - arg1 = &p1; - } - } - { - try { - result = (double)((cmf::geometry::point const *)arg1)->sum(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_point_length(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::geometry::point *arg1 = (cmf::geometry::point *) 0 ; - cmf::geometry::point p1 ; - PyObject *swig_obj[1] ; - double result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - if (SWIG_ConvertPtr(swig_obj[0], (void **) &arg1, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { - if (check_xy(swig_obj[0])) { - std::string res = convert_xyz_to_point(swig_obj[0],p1); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - return NULL; - } - } - else if (PySequence_Check(swig_obj[0])) { - std::string res = convert_seq_to_point(swig_obj[0],p1); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError, res.c_str()); - } - } else { - std::string res="<"; - res+=pyrepr(swig_obj[0]); - res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - } - arg1 = &p1; - } - } - { - try { - result = (double)((cmf::geometry::point const *)arg1)->length(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_point___add__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::geometry::point *arg1 = (cmf::geometry::point *) 0 ; - cmf::geometry::point *arg2 = 0 ; - cmf::geometry::point p1 ; - cmf::geometry::point p2 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "p", NULL - }; - cmf::geometry::point result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:point___add__",kwnames,&obj0,&obj1)) SWIG_fail; - { - if (SWIG_ConvertPtr(obj0, (void **) &arg1, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { - if (check_xy(obj0)) { - std::string res = convert_xyz_to_point(obj0,p1); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - return NULL; - } - } - else if (PySequence_Check(obj0)) { - std::string res = convert_seq_to_point(obj0,p1); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError, res.c_str()); - } - } else { - std::string res="<"; - res+=pyrepr(obj0); - res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - } - arg1 = &p1; - } - } - { - if (SWIG_ConvertPtr(obj1, (void **) &arg2, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { - if (check_xy(obj1)) { - std::string res = convert_xyz_to_point(obj1,p2); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - return NULL; - } - } - else if (PySequence_Check(obj1)) { - std::string res = convert_seq_to_point(obj1,p2); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError, res.c_str()); - } - } else { - std::string res="<"; - res+=pyrepr(obj1); - res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - } - arg2 = &p2; - } - } - { - try { - result = ((cmf::geometry::point const *)arg1)->operator +((cmf::geometry::point const &)*arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj((new cmf::geometry::point(static_cast< const cmf::geometry::point& >(result))), SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_point___iadd__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::geometry::point *arg1 = (cmf::geometry::point *) 0 ; - cmf::geometry::point *arg2 = 0 ; - cmf::geometry::point p1 ; - cmf::geometry::point p2 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "left", NULL - }; - cmf::geometry::point *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:point___iadd__",kwnames,&obj0,&obj1)) SWIG_fail; - { - if (SWIG_ConvertPtr(obj0, (void **) &arg1, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { - if (check_xy(obj0)) { - std::string res = convert_xyz_to_point(obj0,p1); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - return NULL; - } - } - else if (PySequence_Check(obj0)) { - std::string res = convert_seq_to_point(obj0,p1); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError, res.c_str()); - } - } else { - std::string res="<"; - res+=pyrepr(obj0); - res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - } - arg1 = &p1; - } - } - { - if (SWIG_ConvertPtr(obj1, (void **) &arg2, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { - if (check_xy(obj1)) { - std::string res = convert_xyz_to_point(obj1,p2); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - return NULL; - } - } - else if (PySequence_Check(obj1)) { - std::string res = convert_seq_to_point(obj1,p2); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError, res.c_str()); - } - } else { - std::string res="<"; - res+=pyrepr(obj1); - res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - } - arg2 = &p2; - } - } - { - try { - result = (cmf::geometry::point *) &(arg1)->operator +=((cmf::geometry::point const &)*arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_point___sub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::geometry::point *arg1 = (cmf::geometry::point *) 0 ; - cmf::geometry::point *arg2 = 0 ; - cmf::geometry::point p1 ; - cmf::geometry::point p2 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "p", NULL - }; - cmf::geometry::point result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:point___sub__",kwnames,&obj0,&obj1)) SWIG_fail; - { - if (SWIG_ConvertPtr(obj0, (void **) &arg1, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { - if (check_xy(obj0)) { - std::string res = convert_xyz_to_point(obj0,p1); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - return NULL; - } - } - else if (PySequence_Check(obj0)) { - std::string res = convert_seq_to_point(obj0,p1); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError, res.c_str()); - } - } else { - std::string res="<"; - res+=pyrepr(obj0); - res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - } - arg1 = &p1; - } - } - { - if (SWIG_ConvertPtr(obj1, (void **) &arg2, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { - if (check_xy(obj1)) { - std::string res = convert_xyz_to_point(obj1,p2); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - return NULL; - } - } - else if (PySequence_Check(obj1)) { - std::string res = convert_seq_to_point(obj1,p2); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError, res.c_str()); - } - } else { - std::string res="<"; - res+=pyrepr(obj1); - res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - } - arg2 = &p2; - } - } - { - try { - result = ((cmf::geometry::point const *)arg1)->operator -((cmf::geometry::point const &)*arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj((new cmf::geometry::point(static_cast< const cmf::geometry::point& >(result))), SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_point___isub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::geometry::point *arg1 = (cmf::geometry::point *) 0 ; - cmf::geometry::point *arg2 = 0 ; - cmf::geometry::point p1 ; - cmf::geometry::point p2 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "left", NULL - }; - cmf::geometry::point *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:point___isub__",kwnames,&obj0,&obj1)) SWIG_fail; - { - if (SWIG_ConvertPtr(obj0, (void **) &arg1, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { - if (check_xy(obj0)) { - std::string res = convert_xyz_to_point(obj0,p1); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - return NULL; - } - } - else if (PySequence_Check(obj0)) { - std::string res = convert_seq_to_point(obj0,p1); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError, res.c_str()); - } - } else { - std::string res="<"; - res+=pyrepr(obj0); - res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - } - arg1 = &p1; - } - } - { - if (SWIG_ConvertPtr(obj1, (void **) &arg2, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { - if (check_xy(obj1)) { - std::string res = convert_xyz_to_point(obj1,p2); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - return NULL; - } - } - else if (PySequence_Check(obj1)) { - std::string res = convert_seq_to_point(obj1,p2); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError, res.c_str()); - } - } else { - std::string res="<"; - res+=pyrepr(obj1); - res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - } - arg2 = &p2; - } - } - { - try { - result = (cmf::geometry::point *) &(arg1)->operator -=((cmf::geometry::point const &)*arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_point___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::geometry::point *arg1 = (cmf::geometry::point *) 0 ; - double arg2 ; - cmf::geometry::point p1 ; - double val2 ; - int ecode2 = 0 ; - cmf::geometry::point result; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - { - if (SWIG_ConvertPtr(swig_obj[0], (void **) &arg1, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { - if (check_xy(swig_obj[0])) { - std::string res = convert_xyz_to_point(swig_obj[0],p1); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - return NULL; - } - } - else if (PySequence_Check(swig_obj[0])) { - std::string res = convert_seq_to_point(swig_obj[0],p1); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError, res.c_str()); - } - } else { - std::string res="<"; - res+=pyrepr(swig_obj[0]); - res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - } - arg1 = &p1; - } - } - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "point___mul__" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - { - try { - result = ((cmf::geometry::point const *)arg1)->operator *(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj((new cmf::geometry::point(static_cast< const cmf::geometry::point& >(result))), SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_point___imul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::geometry::point *arg1 = (cmf::geometry::point *) 0 ; - double arg2 ; - cmf::geometry::point p1 ; - double val2 ; - int ecode2 = 0 ; - cmf::geometry::point *result = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - { - if (SWIG_ConvertPtr(swig_obj[0], (void **) &arg1, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { - if (check_xy(swig_obj[0])) { - std::string res = convert_xyz_to_point(swig_obj[0],p1); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - return NULL; - } - } - else if (PySequence_Check(swig_obj[0])) { - std::string res = convert_seq_to_point(swig_obj[0],p1); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError, res.c_str()); - } - } else { - std::string res="<"; - res+=pyrepr(swig_obj[0]); - res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - } - arg1 = &p1; - } - } - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "point___imul__" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - { - try { - result = (cmf::geometry::point *) &(arg1)->operator *=(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_point___truediv____SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::geometry::point *arg1 = (cmf::geometry::point *) 0 ; - double arg2 ; - cmf::geometry::point p1 ; - double val2 ; - int ecode2 = 0 ; - cmf::geometry::point result; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - { - if (SWIG_ConvertPtr(swig_obj[0], (void **) &arg1, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { - if (check_xy(swig_obj[0])) { - std::string res = convert_xyz_to_point(swig_obj[0],p1); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - return NULL; - } - } - else if (PySequence_Check(swig_obj[0])) { - std::string res = convert_seq_to_point(swig_obj[0],p1); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError, res.c_str()); - } - } else { - std::string res="<"; - res+=pyrepr(swig_obj[0]); - res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - } - arg1 = &p1; - } - } - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "point___truediv__" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - { - try { - result = ((cmf::geometry::point const *)arg1)->operator /(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj((new cmf::geometry::point(static_cast< const cmf::geometry::point& >(result))), SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_point___itruediv____SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::geometry::point *arg1 = (cmf::geometry::point *) 0 ; - double arg2 ; - cmf::geometry::point p1 ; - double val2 ; - int ecode2 = 0 ; - cmf::geometry::point *result = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - { - if (SWIG_ConvertPtr(swig_obj[0], (void **) &arg1, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { - if (check_xy(swig_obj[0])) { - std::string res = convert_xyz_to_point(swig_obj[0],p1); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - return NULL; - } - } - else if (PySequence_Check(swig_obj[0])) { - std::string res = convert_seq_to_point(swig_obj[0],p1); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError, res.c_str()); - } - } else { - std::string res="<"; - res+=pyrepr(swig_obj[0]); - res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - } - arg1 = &p1; - } - } - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "point___itruediv__" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - { - try { - result = (cmf::geometry::point *) &(arg1)->operator /=(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_point___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::geometry::point *arg1 = (cmf::geometry::point *) 0 ; - cmf::geometry::point *arg2 = 0 ; - cmf::geometry::point p1 ; - cmf::geometry::point p2 ; - cmf::geometry::point result; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - { - if (SWIG_ConvertPtr(swig_obj[0], (void **) &arg1, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { - if (check_xy(swig_obj[0])) { - std::string res = convert_xyz_to_point(swig_obj[0],p1); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - return NULL; - } - } - else if (PySequence_Check(swig_obj[0])) { - std::string res = convert_seq_to_point(swig_obj[0],p1); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError, res.c_str()); - } - } else { - std::string res="<"; - res+=pyrepr(swig_obj[0]); - res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - } - arg1 = &p1; - } - } - { - if (SWIG_ConvertPtr(swig_obj[1], (void **) &arg2, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { - if (check_xy(swig_obj[1])) { - std::string res = convert_xyz_to_point(swig_obj[1],p2); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - return NULL; - } - } - else if (PySequence_Check(swig_obj[1])) { - std::string res = convert_seq_to_point(swig_obj[1],p2); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError, res.c_str()); - } - } else { - std::string res="<"; - res+=pyrepr(swig_obj[1]); - res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - } - arg2 = &p2; - } - } - { - try { - result = ((cmf::geometry::point const *)arg1)->operator *((cmf::geometry::point const &)*arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj((new cmf::geometry::point(static_cast< const cmf::geometry::point& >(result))), SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_point___mul__(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args,"point___mul__",0,2,argv))) SWIG_fail; - --argc; - { - unsigned long _index = 0; - SWIG_TypeRank _rank = 0; - if (argc == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - { - cmf::geometry::point p; - _v=check_xy(argv[0]) || check_seq_point(argv[0]); - } - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 1; - if (_rank == _rankm) goto dispatch; - } - } - check_1: - - if (argc == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - { - cmf::geometry::point p; - _v=check_xy(argv[0]) || check_seq_point(argv[0]); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - cmf::geometry::point p; - _v=check_xy(argv[1]) || check_seq_point(argv[1]); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 2; - if (_rank == _rankm) goto dispatch; - } - } - check_2: - - dispatch: - switch(_index) { - case 1: - return _wrap_point___mul____SWIG_0(self, argc, argv); - case 2: - return _wrap_point___mul____SWIG_1(self, argc, argv); - } - } - -fail: - Py_INCREF(Py_NotImplemented); - return Py_NotImplemented; -} - - -SWIGINTERN PyObject *_wrap_point___imul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::geometry::point *arg1 = (cmf::geometry::point *) 0 ; - cmf::geometry::point *arg2 = 0 ; - cmf::geometry::point p1 ; - cmf::geometry::point p2 ; - cmf::geometry::point *result = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - { - if (SWIG_ConvertPtr(swig_obj[0], (void **) &arg1, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { - if (check_xy(swig_obj[0])) { - std::string res = convert_xyz_to_point(swig_obj[0],p1); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - return NULL; - } - } - else if (PySequence_Check(swig_obj[0])) { - std::string res = convert_seq_to_point(swig_obj[0],p1); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError, res.c_str()); - } - } else { - std::string res="<"; - res+=pyrepr(swig_obj[0]); - res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - } - arg1 = &p1; - } - } - { - if (SWIG_ConvertPtr(swig_obj[1], (void **) &arg2, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { - if (check_xy(swig_obj[1])) { - std::string res = convert_xyz_to_point(swig_obj[1],p2); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - return NULL; - } - } - else if (PySequence_Check(swig_obj[1])) { - std::string res = convert_seq_to_point(swig_obj[1],p2); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError, res.c_str()); - } - } else { - std::string res="<"; - res+=pyrepr(swig_obj[1]); - res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - } - arg2 = &p2; - } - } - { - try { - result = (cmf::geometry::point *) &(arg1)->operator *=((cmf::geometry::point const &)*arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_point___imul__(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args,"point___imul__",0,2,argv))) SWIG_fail; - --argc; - { - unsigned long _index = 0; - SWIG_TypeRank _rank = 0; - if (argc == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - { - cmf::geometry::point p; - _v=check_xy(argv[0]) || check_seq_point(argv[0]); - } - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 1; - if (_rank == _rankm) goto dispatch; - } - } - check_1: - - if (argc == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - { - cmf::geometry::point p; - _v=check_xy(argv[0]) || check_seq_point(argv[0]); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - cmf::geometry::point p; - _v=check_xy(argv[1]) || check_seq_point(argv[1]); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 2; - if (_rank == _rankm) goto dispatch; - } - } - check_2: - - dispatch: - switch(_index) { - case 1: - return _wrap_point___imul____SWIG_0(self, argc, argv); - case 2: - return _wrap_point___imul____SWIG_1(self, argc, argv); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'point___imul__'.\n" - " Possible C/C++ prototypes are:\n" - " cmf::geometry::point::operator *=(double)\n" - " cmf::geometry::point::operator *=(cmf::geometry::point const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_point___truediv____SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::geometry::point *arg1 = (cmf::geometry::point *) 0 ; - cmf::geometry::point *arg2 = 0 ; - cmf::geometry::point p1 ; - cmf::geometry::point p2 ; - cmf::geometry::point result; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - { - if (SWIG_ConvertPtr(swig_obj[0], (void **) &arg1, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { - if (check_xy(swig_obj[0])) { - std::string res = convert_xyz_to_point(swig_obj[0],p1); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - return NULL; - } - } - else if (PySequence_Check(swig_obj[0])) { - std::string res = convert_seq_to_point(swig_obj[0],p1); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError, res.c_str()); - } - } else { - std::string res="<"; - res+=pyrepr(swig_obj[0]); - res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - } - arg1 = &p1; - } - } - { - if (SWIG_ConvertPtr(swig_obj[1], (void **) &arg2, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { - if (check_xy(swig_obj[1])) { - std::string res = convert_xyz_to_point(swig_obj[1],p2); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - return NULL; - } - } - else if (PySequence_Check(swig_obj[1])) { - std::string res = convert_seq_to_point(swig_obj[1],p2); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError, res.c_str()); - } - } else { - std::string res="<"; - res+=pyrepr(swig_obj[1]); - res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - } - arg2 = &p2; - } - } - { - try { - result = ((cmf::geometry::point const *)arg1)->operator /((cmf::geometry::point const &)*arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj((new cmf::geometry::point(static_cast< const cmf::geometry::point& >(result))), SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_point___truediv__(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args,"point___truediv__",0,2,argv))) SWIG_fail; - --argc; - { - unsigned long _index = 0; - SWIG_TypeRank _rank = 0; - if (argc == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - { - cmf::geometry::point p; - _v=check_xy(argv[0]) || check_seq_point(argv[0]); - } - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 1; - if (_rank == _rankm) goto dispatch; - } - } - check_1: - - if (argc == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - { - cmf::geometry::point p; - _v=check_xy(argv[0]) || check_seq_point(argv[0]); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - cmf::geometry::point p; - _v=check_xy(argv[1]) || check_seq_point(argv[1]); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 2; - if (_rank == _rankm) goto dispatch; - } - } - check_2: - - dispatch: - switch(_index) { - case 1: - return _wrap_point___truediv____SWIG_0(self, argc, argv); - case 2: - return _wrap_point___truediv____SWIG_1(self, argc, argv); - } - } - -fail: - Py_INCREF(Py_NotImplemented); - return Py_NotImplemented; -} - - -SWIGINTERN PyObject *_wrap_point___itruediv____SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::geometry::point *arg1 = (cmf::geometry::point *) 0 ; - cmf::geometry::point *arg2 = 0 ; - cmf::geometry::point p1 ; - cmf::geometry::point p2 ; - cmf::geometry::point *result = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - { - if (SWIG_ConvertPtr(swig_obj[0], (void **) &arg1, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { - if (check_xy(swig_obj[0])) { - std::string res = convert_xyz_to_point(swig_obj[0],p1); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - return NULL; - } - } - else if (PySequence_Check(swig_obj[0])) { - std::string res = convert_seq_to_point(swig_obj[0],p1); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError, res.c_str()); - } - } else { - std::string res="<"; - res+=pyrepr(swig_obj[0]); - res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - } - arg1 = &p1; - } - } - { - if (SWIG_ConvertPtr(swig_obj[1], (void **) &arg2, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { - if (check_xy(swig_obj[1])) { - std::string res = convert_xyz_to_point(swig_obj[1],p2); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - return NULL; - } - } - else if (PySequence_Check(swig_obj[1])) { - std::string res = convert_seq_to_point(swig_obj[1],p2); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError, res.c_str()); - } - } else { - std::string res="<"; - res+=pyrepr(swig_obj[1]); - res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - } - arg2 = &p2; - } - } - { - try { - result = (cmf::geometry::point *) &(arg1)->operator /=((cmf::geometry::point const &)*arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_point___itruediv__(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args,"point___itruediv__",0,2,argv))) SWIG_fail; - --argc; - { - unsigned long _index = 0; - SWIG_TypeRank _rank = 0; - if (argc == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - { - cmf::geometry::point p; - _v=check_xy(argv[0]) || check_seq_point(argv[0]); - } - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 1; - if (_rank == _rankm) goto dispatch; - } - } - check_1: - - if (argc == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - { - cmf::geometry::point p; - _v=check_xy(argv[0]) || check_seq_point(argv[0]); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - cmf::geometry::point p; - _v=check_xy(argv[1]) || check_seq_point(argv[1]); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 2; - if (_rank == _rankm) goto dispatch; - } - } - check_2: - - dispatch: - switch(_index) { - case 1: - return _wrap_point___itruediv____SWIG_0(self, argc, argv); - case 2: - return _wrap_point___itruediv____SWIG_1(self, argc, argv); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'point___itruediv__'.\n" - " Possible C/C++ prototypes are:\n" - " cmf::geometry::point::operator /=(double)\n" - " cmf::geometry::point::operator /=(cmf::geometry::point const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_point___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::geometry::point *arg1 = (cmf::geometry::point *) 0 ; - cmf::geometry::point *arg2 = 0 ; - cmf::geometry::point p1 ; - cmf::geometry::point p2 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "p", NULL - }; - bool result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:point___eq__",kwnames,&obj0,&obj1)) SWIG_fail; - { - if (SWIG_ConvertPtr(obj0, (void **) &arg1, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { - if (check_xy(obj0)) { - std::string res = convert_xyz_to_point(obj0,p1); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - return NULL; - } - } - else if (PySequence_Check(obj0)) { - std::string res = convert_seq_to_point(obj0,p1); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError, res.c_str()); - } - } else { - std::string res="<"; - res+=pyrepr(obj0); - res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - } - arg1 = &p1; - } - } - { - if (SWIG_ConvertPtr(obj1, (void **) &arg2, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { - if (check_xy(obj1)) { - std::string res = convert_xyz_to_point(obj1,p2); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - return NULL; - } - } - else if (PySequence_Check(obj1)) { - std::string res = convert_seq_to_point(obj1,p2); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError, res.c_str()); - } - } else { - std::string res="<"; - res+=pyrepr(obj1); - res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - } - arg2 = &p2; - } - } - { - try { - result = (bool)((cmf::geometry::point const *)arg1)->operator ==((cmf::geometry::point const &)*arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_point___ne__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::geometry::point *arg1 = (cmf::geometry::point *) 0 ; - cmf::geometry::point *arg2 = 0 ; - cmf::geometry::point p1 ; - cmf::geometry::point p2 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "p", NULL - }; - bool result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:point___ne__",kwnames,&obj0,&obj1)) SWIG_fail; - { - if (SWIG_ConvertPtr(obj0, (void **) &arg1, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { - if (check_xy(obj0)) { - std::string res = convert_xyz_to_point(obj0,p1); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - return NULL; - } - } - else if (PySequence_Check(obj0)) { - std::string res = convert_seq_to_point(obj0,p1); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError, res.c_str()); - } - } else { - std::string res="<"; - res+=pyrepr(obj0); - res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - } - arg1 = &p1; - } - } - { - if (SWIG_ConvertPtr(obj1, (void **) &arg2, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { - if (check_xy(obj1)) { - std::string res = convert_xyz_to_point(obj1,p2); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - return NULL; - } - } - else if (PySequence_Check(obj1)) { - std::string res = convert_seq_to_point(obj1,p2); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError, res.c_str()); - } - } else { - std::string res="<"; - res+=pyrepr(obj1); - res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - } - arg2 = &p2; - } - } - { - try { - result = (bool)((cmf::geometry::point const *)arg1)->operator !=((cmf::geometry::point const &)*arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_point___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::geometry::point *arg1 = (cmf::geometry::point *) 0 ; - cmf::geometry::point p1 ; - PyObject *swig_obj[1] ; - int result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - if (SWIG_ConvertPtr(swig_obj[0], (void **) &arg1, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { - if (check_xy(swig_obj[0])) { - std::string res = convert_xyz_to_point(swig_obj[0],p1); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - return NULL; - } - } - else if (PySequence_Check(swig_obj[0])) { - std::string res = convert_seq_to_point(swig_obj[0],p1); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError, res.c_str()); - } - } else { - std::string res="<"; - res+=pyrepr(swig_obj[0]); - res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - } - arg1 = &p1; - } - } - { - try { - result = (int)cmf_geometry_point___len__((cmf::geometry::point const *)arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_point___rmul__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::geometry::point *arg1 = (cmf::geometry::point *) 0 ; - double arg2 ; - cmf::geometry::point p1 ; - double val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "val", NULL - }; - cmf::geometry::point result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:point___rmul__",kwnames,&obj0,&obj1)) SWIG_fail; - { - if (SWIG_ConvertPtr(obj0, (void **) &arg1, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { - if (check_xy(obj0)) { - std::string res = convert_xyz_to_point(obj0,p1); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - return NULL; - } - } - else if (PySequence_Check(obj0)) { - std::string res = convert_seq_to_point(obj0,p1); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError, res.c_str()); - } - } else { - std::string res="<"; - res+=pyrepr(obj0); - res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - } - arg1 = &p1; - } - } - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "point___rmul__" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - { - try { - result = cmf_geometry_point___rmul__(arg1,arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj((new cmf::geometry::point(static_cast< const cmf::geometry::point& >(result))), SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_point___rdiv__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::geometry::point *arg1 = (cmf::geometry::point *) 0 ; - double arg2 ; - cmf::geometry::point p1 ; - double val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "val", NULL - }; - cmf::geometry::point result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:point___rdiv__",kwnames,&obj0,&obj1)) SWIG_fail; - { - if (SWIG_ConvertPtr(obj0, (void **) &arg1, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { - if (check_xy(obj0)) { - std::string res = convert_xyz_to_point(obj0,p1); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - return NULL; - } - } - else if (PySequence_Check(obj0)) { - std::string res = convert_seq_to_point(obj0,p1); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError, res.c_str()); - } - } else { - std::string res="<"; - res+=pyrepr(obj0); - res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - } - arg1 = &p1; - } - } - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "point___rdiv__" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - { - try { - result = cmf_geometry_point___rdiv__(arg1,arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj((new cmf::geometry::point(static_cast< const cmf::geometry::point& >(result))), SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_point(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::geometry::point *arg1 = (cmf::geometry::point *) 0 ; - cmf::geometry::point p1 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - if (SWIG_ConvertPtr(swig_obj[0], (void **) &arg1, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { - if (check_xy(swig_obj[0])) { - std::string res = convert_xyz_to_point(swig_obj[0],p1); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - return NULL; - } - } - else if (PySequence_Check(swig_obj[0])) { - std::string res = convert_seq_to_point(swig_obj[0],p1); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError, res.c_str()); - } - } else { - std::string res="<"; - res+=pyrepr(swig_obj[0]); - res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - } - arg1 = &p1; - } - } - { - try { - delete arg1; - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *point_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__geometry__point, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *point_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_dot(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::geometry::point *arg1 = 0 ; - cmf::geometry::point *arg2 = 0 ; - cmf::geometry::point p1 ; - cmf::geometry::point p2 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "p1",(char *) "p2", NULL - }; - double result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:dot",kwnames,&obj0,&obj1)) SWIG_fail; - { - if (SWIG_ConvertPtr(obj0, (void **) &arg1, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { - if (check_xy(obj0)) { - std::string res = convert_xyz_to_point(obj0,p1); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - return NULL; - } - } - else if (PySequence_Check(obj0)) { - std::string res = convert_seq_to_point(obj0,p1); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError, res.c_str()); - } - } else { - std::string res="<"; - res+=pyrepr(obj0); - res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - } - arg1 = &p1; - } - } - { - if (SWIG_ConvertPtr(obj1, (void **) &arg2, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { - if (check_xy(obj1)) { - std::string res = convert_xyz_to_point(obj1,p2); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - return NULL; - } - } - else if (PySequence_Check(obj1)) { - std::string res = convert_seq_to_point(obj1,p2); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError, res.c_str()); - } - } else { - std::string res="<"; - res+=pyrepr(obj1); - res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - } - arg2 = &p2; - } - } - { - try { - result = (double)cmf::geometry::dot((cmf::geometry::point const &)*arg1,(cmf::geometry::point const &)*arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_distance(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::geometry::point *arg1 = 0 ; - cmf::geometry::point *arg2 = 0 ; - cmf::geometry::point p1 ; - cmf::geometry::point p2 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "p1",(char *) "p2", NULL - }; - double result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:distance",kwnames,&obj0,&obj1)) SWIG_fail; - { - if (SWIG_ConvertPtr(obj0, (void **) &arg1, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { - if (check_xy(obj0)) { - std::string res = convert_xyz_to_point(obj0,p1); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - return NULL; - } - } - else if (PySequence_Check(obj0)) { - std::string res = convert_seq_to_point(obj0,p1); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError, res.c_str()); - } - } else { - std::string res="<"; - res+=pyrepr(obj0); - res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - } - arg1 = &p1; - } - } - { - if (SWIG_ConvertPtr(obj1, (void **) &arg2, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { - if (check_xy(obj1)) { - std::string res = convert_xyz_to_point(obj1,p2); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - return NULL; - } - } - else if (PySequence_Check(obj1)) { - std::string res = convert_seq_to_point(obj1,p2); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError, res.c_str()); - } - } else { - std::string res="<"; - res+=pyrepr(obj1); - res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - } - arg2 = &p2; - } - } - { - try { - result = (double)cmf::geometry::distance((cmf::geometry::point const &)*arg1,(cmf::geometry::point const &)*arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_point_vector_X_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::geometry::point_vector *arg1 = (cmf::geometry::point_vector *) 0 ; - cmf::math::num_array arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"point_vector_X_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__geometry__point_vector, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "point_vector_X_set" "', argument " "1"" of type '" "cmf::geometry::point_vector *""'"); - } - arg1 = reinterpret_cast< cmf::geometry::point_vector * >(argp1); - { - // Convert a array_wrapper from numpy array - double * data=0; - ptrdiff_t size = from_npy_array(swig_obj[1],&data); - if (!data) { - SWIG_exception_fail(SWIG_TypeError,"Input data is not 'array-like' (in the sense of numpy arrays)"); - return NULL; - } - arg2 = cmf::math::num_array(size,data); - } - if (arg1) (arg1)->X = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_point_vector_X_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::geometry::point_vector *arg1 = (cmf::geometry::point_vector *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::math::num_array result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__geometry__point_vector, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "point_vector_X_get" "', argument " "1"" of type '" "cmf::geometry::point_vector *""'"); - } - arg1 = reinterpret_cast< cmf::geometry::point_vector * >(argp1); - result = ((arg1)->X); - { - resultobj = as_npy_array(result); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_point_vector_Y_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::geometry::point_vector *arg1 = (cmf::geometry::point_vector *) 0 ; - cmf::math::num_array arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"point_vector_Y_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__geometry__point_vector, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "point_vector_Y_set" "', argument " "1"" of type '" "cmf::geometry::point_vector *""'"); - } - arg1 = reinterpret_cast< cmf::geometry::point_vector * >(argp1); - { - // Convert a array_wrapper from numpy array - double * data=0; - ptrdiff_t size = from_npy_array(swig_obj[1],&data); - if (!data) { - SWIG_exception_fail(SWIG_TypeError,"Input data is not 'array-like' (in the sense of numpy arrays)"); - return NULL; - } - arg2 = cmf::math::num_array(size,data); - } - if (arg1) (arg1)->Y = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_point_vector_Y_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::geometry::point_vector *arg1 = (cmf::geometry::point_vector *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::math::num_array result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__geometry__point_vector, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "point_vector_Y_get" "', argument " "1"" of type '" "cmf::geometry::point_vector *""'"); - } - arg1 = reinterpret_cast< cmf::geometry::point_vector * >(argp1); - result = ((arg1)->Y); - { - resultobj = as_npy_array(result); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_point_vector_Z_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::geometry::point_vector *arg1 = (cmf::geometry::point_vector *) 0 ; - cmf::math::num_array arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"point_vector_Z_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__geometry__point_vector, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "point_vector_Z_set" "', argument " "1"" of type '" "cmf::geometry::point_vector *""'"); - } - arg1 = reinterpret_cast< cmf::geometry::point_vector * >(argp1); - { - // Convert a array_wrapper from numpy array - double * data=0; - ptrdiff_t size = from_npy_array(swig_obj[1],&data); - if (!data) { - SWIG_exception_fail(SWIG_TypeError,"Input data is not 'array-like' (in the sense of numpy arrays)"); - return NULL; - } - arg2 = cmf::math::num_array(size,data); - } - if (arg1) (arg1)->Z = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_point_vector_Z_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::geometry::point_vector *arg1 = (cmf::geometry::point_vector *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::math::num_array result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__geometry__point_vector, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "point_vector_Z_get" "', argument " "1"" of type '" "cmf::geometry::point_vector *""'"); - } - arg1 = reinterpret_cast< cmf::geometry::point_vector * >(argp1); - result = ((arg1)->Z); - { - resultobj = as_npy_array(result); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_point_vector(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - ptrdiff_t arg1 ; - ptrdiff_t val1 ; - int ecode1 = 0 ; - PyObject * obj0 = 0 ; - char * kwnames[] = { - (char *) "size", NULL - }; - cmf::geometry::point_vector *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:new_point_vector",kwnames,&obj0)) SWIG_fail; - ecode1 = SWIG_AsVal_ptrdiff_t(obj0, &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_point_vector" "', argument " "1"" of type '" "ptrdiff_t""'"); - } - arg1 = static_cast< ptrdiff_t >(val1); - { - try { - result = (cmf::geometry::point_vector *)new cmf::geometry::point_vector(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__geometry__point_vector, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_point_vector_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::geometry::point_vector *arg1 = (cmf::geometry::point_vector *) 0 ; - ptrdiff_t arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "index", NULL - }; - cmf::geometry::point result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:point_vector_get",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__geometry__point_vector, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "point_vector_get" "', argument " "1"" of type '" "cmf::geometry::point_vector const *""'"); - } - arg1 = reinterpret_cast< cmf::geometry::point_vector * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "point_vector_get" "', argument " "2"" of type '" "ptrdiff_t""'"); - } - arg2 = static_cast< ptrdiff_t >(val2); - { - try { - result = ((cmf::geometry::point_vector const *)arg1)->get(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj((new cmf::geometry::point(static_cast< const cmf::geometry::point& >(result))), SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_point_vector_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::geometry::point_vector *arg1 = (cmf::geometry::point_vector *) 0 ; - ptrdiff_t arg2 ; - cmf::geometry::point arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "index",(char *) "p", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:point_vector_set",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__geometry__point_vector, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "point_vector_set" "', argument " "1"" of type '" "cmf::geometry::point_vector *""'"); - } - arg1 = reinterpret_cast< cmf::geometry::point_vector * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "point_vector_set" "', argument " "2"" of type '" "ptrdiff_t""'"); - } - arg2 = static_cast< ptrdiff_t >(val2); - { - if (check_xy(obj2)) { - std::string res = convert_xyz_to_point(obj2,arg3); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - return NULL; - } - } - else if (PySequence_Check(obj2)) { - std::string res = convert_seq_to_point(obj2,arg3); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError, res.c_str()); - } - } else { - std::string res="<"; - res+=pyrepr(obj2); - res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - } - } - { - try { - (arg1)->set(arg2,arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_point_vector_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::geometry::point_vector *arg1 = (cmf::geometry::point_vector *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - size_t result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__geometry__point_vector, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "point_vector_size" "', argument " "1"" of type '" "cmf::geometry::point_vector const *""'"); - } - arg1 = reinterpret_cast< cmf::geometry::point_vector * >(argp1); - { - try { - result = ((cmf::geometry::point_vector const *)arg1)->size(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_point_vector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::geometry::point_vector *arg1 = (cmf::geometry::point_vector *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__geometry__point_vector, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_point_vector" "', argument " "1"" of type '" "cmf::geometry::point_vector *""'"); - } - arg1 = reinterpret_cast< cmf::geometry::point_vector * >(argp1); - { - try { - delete arg1; - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *point_vector_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__geometry__point_vector, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *point_vector_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN int Swig_var_Debug_set(PyObject *) { - SWIG_Error(SWIG_AttributeError,"Variable Debug is read-only."); - return 1; -} - - -SWIGINTERN PyObject *Swig_var_Debug_get(void) { - PyObject *pyobj = 0; - - pyobj = SWIG_From_bool(static_cast< bool >(Debug)); - return pyobj; -} - - -SWIGINTERN int Swig_var___compiledate___set(PyObject *) { - SWIG_Error(SWIG_AttributeError,"Variable __compiledate__ is read-only."); - return 1; -} - - -SWIGINTERN PyObject *Swig_var___compiledate___get(void) { - PyObject *pyobj = 0; - - pyobj = SWIG_From_std_string(static_cast< std::string >(__compiledate__)); - return pyobj; -} - - -SWIGINTERN PyObject *_wrap_minimum(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - real arg1 ; - real arg2 ; - double val1 ; - int ecode1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "a",(char *) "b", NULL - }; - real result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:minimum",kwnames,&obj0,&obj1)) SWIG_fail; - ecode1 = SWIG_AsVal_double(obj0, &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "minimum" "', argument " "1"" of type '" "real""'"); - } - arg1 = static_cast< real >(val1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "minimum" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - { - try { - result = (real)minimum(arg1,arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_maximum(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - real arg1 ; - real arg2 ; - double val1 ; - int ecode1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "a",(char *) "b", NULL - }; - real result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:maximum",kwnames,&obj0,&obj1)) SWIG_fail; - ecode1 = SWIG_AsVal_double(obj0, &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "maximum" "', argument " "1"" of type '" "real""'"); - } - arg1 = static_cast< real >(val1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "maximum" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - { - try { - result = (real)maximum(arg1,arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_minmax(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - real arg1 ; - real arg2 ; - real arg3 ; - double val1 ; - int ecode1 = 0 ; - double val2 ; - int ecode2 = 0 ; - double val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char * kwnames[] = { - (char *) "x",(char *) "min",(char *) "max", NULL - }; - real result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:minmax",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; - ecode1 = SWIG_AsVal_double(obj0, &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "minmax" "', argument " "1"" of type '" "real""'"); - } - arg1 = static_cast< real >(val1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "minmax" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - ecode3 = SWIG_AsVal_double(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "minmax" "', argument " "3"" of type '" "real""'"); - } - arg3 = static_cast< real >(val3); - { - try { - result = (real)minmax(arg1,arg2,arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_mean(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - real arg1 ; - real arg2 ; - double val1 ; - int ecode1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "a",(char *) "b", NULL - }; - real result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:mean",kwnames,&obj0,&obj1)) SWIG_fail; - ecode1 = SWIG_AsVal_double(obj0, &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "mean" "', argument " "1"" of type '" "real""'"); - } - arg1 = static_cast< real >(val1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "mean" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - { - try { - result = (real)mean(arg1,arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_geo_mean(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - real arg1 ; - real arg2 ; - double val1 ; - int ecode1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "a",(char *) "b", NULL - }; - real result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:geo_mean",kwnames,&obj0,&obj1)) SWIG_fail; - ecode1 = SWIG_AsVal_double(obj0, &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "geo_mean" "', argument " "1"" of type '" "real""'"); - } - arg1 = static_cast< real >(val1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "geo_mean" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - { - try { - result = (real)geo_mean(arg1,arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_harmonic_mean(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - real arg1 ; - real arg2 ; - double val1 ; - int ecode1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "a",(char *) "b", NULL - }; - real result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:harmonic_mean",kwnames,&obj0,&obj1)) SWIG_fail; - ecode1 = SWIG_AsVal_double(obj0, &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "harmonic_mean" "', argument " "1"" of type '" "real""'"); - } - arg1 = static_cast< real >(val1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "harmonic_mean" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - { - try { - result = (real)harmonic_mean(arg1,arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_piecewise_linear(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - real arg1 ; - real arg2 ; - real arg3 ; - real arg4 = (real) 0 ; - real arg5 = (real) 1 ; - double val1 ; - int ecode1 = 0 ; - double val2 ; - int ecode2 = 0 ; - double val3 ; - int ecode3 = 0 ; - double val4 ; - int ecode4 = 0 ; - double val5 ; - int ecode5 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - char * kwnames[] = { - (char *) "x",(char *) "xmin",(char *) "xmax",(char *) "ymin",(char *) "ymax", NULL - }; - real result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OO:piecewise_linear",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; - ecode1 = SWIG_AsVal_double(obj0, &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "piecewise_linear" "', argument " "1"" of type '" "real""'"); - } - arg1 = static_cast< real >(val1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "piecewise_linear" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - ecode3 = SWIG_AsVal_double(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "piecewise_linear" "', argument " "3"" of type '" "real""'"); - } - arg3 = static_cast< real >(val3); - if (obj3) { - ecode4 = SWIG_AsVal_double(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "piecewise_linear" "', argument " "4"" of type '" "real""'"); - } - arg4 = static_cast< real >(val4); - } - if (obj4) { - ecode5 = SWIG_AsVal_double(obj4, &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "piecewise_linear" "', argument " "5"" of type '" "real""'"); - } - arg5 = static_cast< real >(val5); - } - { - try { - result = (real)piecewise_linear(arg1,arg2,arg3,arg4,arg5); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_boltzmann(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - real arg1 ; - real arg2 ; - real arg3 ; - double val1 ; - int ecode1 = 0 ; - double val2 ; - int ecode2 = 0 ; - double val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char * kwnames[] = { - (char *) "x",(char *) "x_half",(char *) "tau", NULL - }; - real result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:boltzmann",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; - ecode1 = SWIG_AsVal_double(obj0, &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "boltzmann" "', argument " "1"" of type '" "real""'"); - } - arg1 = static_cast< real >(val1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "boltzmann" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - ecode3 = SWIG_AsVal_double(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "boltzmann" "', argument " "3"" of type '" "real""'"); - } - arg3 = static_cast< real >(val3); - { - try { - result = (real)boltzmann(arg1,arg2,arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_sign(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - real arg1 ; - double val1 ; - int ecode1 = 0 ; - PyObject * obj0 = 0 ; - char * kwnames[] = { - (char *) "x", NULL - }; - real result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:sign",kwnames,&obj0)) SWIG_fail; - ecode1 = SWIG_AsVal_double(obj0, &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "sign" "', argument " "1"" of type '" "real""'"); - } - arg1 = static_cast< real >(val1); - { - try { - result = (real)sign(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_square(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - real arg1 ; - double val1 ; - int ecode1 = 0 ; - PyObject * obj0 = 0 ; - char * kwnames[] = { - (char *) "x", NULL - }; - real result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:square",kwnames,&obj0)) SWIG_fail; - ecode1 = SWIG_AsVal_double(obj0, &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "square" "', argument " "1"" of type '" "real""'"); - } - arg1 = static_cast< real >(val1); - { - try { - result = (real)square(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN int Swig_var_Pi_set(PyObject *) { - SWIG_Error(SWIG_AttributeError,"Variable Pi is read-only."); - return 1; -} - - -SWIGINTERN PyObject *Swig_var_Pi_get(void) { - PyObject *pyobj = 0; - - pyobj = SWIG_From_double(static_cast< double >(Pi)); - return pyobj; -} - - -SWIGINTERN PyObject *_wrap_new_Time__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - int arg1 ; - int arg2 ; - int arg3 ; - int arg4 = (int) 0 ; - int arg5 = (int) 0 ; - int arg6 = (int) 0 ; - int arg7 = (int) 0 ; - int val1 ; - int ecode1 = 0 ; - int val2 ; - int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; - int val4 ; - int ecode4 = 0 ; - int val5 ; - int ecode5 = 0 ; - int val6 ; - int ecode6 = 0 ; - int val7 ; - int ecode7 = 0 ; - cmf::math::Time *result = 0 ; - - if ((nobjs < 3) || (nobjs > 7)) SWIG_fail; - ecode1 = SWIG_AsVal_int(swig_obj[0], &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Time" "', argument " "1"" of type '" "int""'"); - } - arg1 = static_cast< int >(val1); - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Time" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Time" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - if (swig_obj[3]) { - ecode4 = SWIG_AsVal_int(swig_obj[3], &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_Time" "', argument " "4"" of type '" "int""'"); - } - arg4 = static_cast< int >(val4); - } - if (swig_obj[4]) { - ecode5 = SWIG_AsVal_int(swig_obj[4], &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_Time" "', argument " "5"" of type '" "int""'"); - } - arg5 = static_cast< int >(val5); - } - if (swig_obj[5]) { - ecode6 = SWIG_AsVal_int(swig_obj[5], &val6); - if (!SWIG_IsOK(ecode6)) { - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_Time" "', argument " "6"" of type '" "int""'"); - } - arg6 = static_cast< int >(val6); - } - if (swig_obj[6]) { - ecode7 = SWIG_AsVal_int(swig_obj[6], &val7); - if (!SWIG_IsOK(ecode7)) { - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_Time" "', argument " "7"" of type '" "int""'"); - } - arg7 = static_cast< int >(val7); - } - { - try { - result = (cmf::math::Time *)new cmf::math::Time(arg1,arg2,arg3,arg4,arg5,arg6,arg7); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__Time, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_Time__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - SwigValueWrapper< cmf::math::Date > arg1 ; - void *argp1 ; - int res1 = 0 ; - cmf::math::Time *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - { - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_cmf__math__Date, 0 | SWIG_POINTER_IMPLICIT_CONV); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Time" "', argument " "1"" of type '" "cmf::math::Date""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Time" "', argument " "1"" of type '" "cmf::math::Date""'"); - } else { - cmf::math::Date * temp = reinterpret_cast< cmf::math::Date * >(argp1); - arg1 = *temp; - if (SWIG_IsNewObj(res1)) delete temp; - } - } - { - try { - result = (cmf::math::Time *)new cmf::math::Time(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__Time, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_Time__SWIG_2(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::math::Time *arg1 = 0 ; - cmf::math::Time T1 ; - cmf::math::Time *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - { - // typemape const Time& - T1 = convert_datetime_to_cmftime(swig_obj[0]); - if (T1 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } else { - arg1 = &T1; - } - } - { - try { - result = (cmf::math::Time *)new cmf::math::Time((cmf::math::Time const &)*arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__Time, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_Time__SWIG_3(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) { - PyObject *resultobj = 0; - cmf::math::Time *result = 0 ; - - if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; - { - try { - result = (cmf::math::Time *)new cmf::math::Time(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__Time, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_Time(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[8] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args,"new_Time",0,7,argv))) SWIG_fail; - --argc; - { - unsigned long _index = 0; - SWIG_TypeRank _rank = 0; - if (argc == 0) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 1; - if (_rank == _rankm) goto dispatch; - } - } - if (argc == 1) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_cmf__math__Date, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 2; - if (_rank == _rankm) goto dispatch; - } - } - check_2: - - if (argc == 1) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - { - _v = check_time(argv[0]); // typecheck const cmf::math::Time & - } - } - if (!_v) goto check_3; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 3; - if (_rank == _rankm) goto dispatch; - } - } - check_3: - - if (argc == 1) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_cmf__math__Date, SWIG_POINTER_IMPLICIT_CONV); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_4; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 4; - if (_rank == _rankm) goto dispatch; - } - } - check_4: - - if ((argc >= 3) && (argc <= 7)) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - { - int res = SWIG_AsVal_int(argv[0], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_5; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - int res = SWIG_AsVal_int(argv[1], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_5; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - int res = SWIG_AsVal_int(argv[2], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_5; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (argc > 3) { - { - { - int res = SWIG_AsVal_int(argv[3], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_5; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (argc > 4) { - { - { - int res = SWIG_AsVal_int(argv[4], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_5; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (argc > 5) { - { - { - int res = SWIG_AsVal_int(argv[5], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_5; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (argc > 6) { - { - { - int res = SWIG_AsVal_int(argv[6], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_5; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - } - } - } - } - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 5; - if (_rank == _rankm) goto dispatch; - } - } - check_5: - - dispatch: - switch(_index) { - case 1: - return _wrap_new_Time__SWIG_3(self, argc, argv); - case 2: - return _wrap_new_Time__SWIG_1(self, argc, argv); - case 3: - return _wrap_new_Time__SWIG_2(self, argc, argv); - case 4: - return _wrap_new_Time__SWIG_1(self, argc, argv); - case 5: - return _wrap_new_Time__SWIG_0(self, argc, argv); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_Time'.\n" - " Possible C/C++ prototypes are:\n" - " cmf::math::Time::Time(int,int,int,int,int,int,int)\n" - " cmf::math::Time::Time(cmf::math::Date)\n" - " cmf::math::Time::Time(cmf::math::Time const &)\n" - " cmf::math::Time::Time()\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_Time_AsDays(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::Time *arg1 = (cmf::math::Time *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - double result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Time, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Time_AsDays" "', argument " "1"" of type '" "cmf::math::Time const *""'"); - } - arg1 = reinterpret_cast< cmf::math::Time * >(argp1); - { - try { - result = (double)((cmf::math::Time const *)arg1)->AsDays(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Time_AsHours(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::Time *arg1 = (cmf::math::Time *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - double result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Time, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Time_AsHours" "', argument " "1"" of type '" "cmf::math::Time const *""'"); - } - arg1 = reinterpret_cast< cmf::math::Time * >(argp1); - { - try { - result = (double)((cmf::math::Time const *)arg1)->AsHours(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Time_AsMinutes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::Time *arg1 = (cmf::math::Time *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - double result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Time, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Time_AsMinutes" "', argument " "1"" of type '" "cmf::math::Time const *""'"); - } - arg1 = reinterpret_cast< cmf::math::Time * >(argp1); - { - try { - result = (double)((cmf::math::Time const *)arg1)->AsMinutes(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Time_AsSeconds(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::Time *arg1 = (cmf::math::Time *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - double result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Time, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Time_AsSeconds" "', argument " "1"" of type '" "cmf::math::Time const *""'"); - } - arg1 = reinterpret_cast< cmf::math::Time * >(argp1); - { - try { - result = (double)((cmf::math::Time const *)arg1)->AsSeconds(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Time_AsMilliseconds(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::Time *arg1 = (cmf::math::Time *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - long long result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Time, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Time_AsMilliseconds" "', argument " "1"" of type '" "cmf::math::Time const *""'"); - } - arg1 = reinterpret_cast< cmf::math::Time * >(argp1); - { - try { - result = (long long)((cmf::math::Time const *)arg1)->AsMilliseconds(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_long_SS_long(static_cast< long long >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Time_AsDate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::Time *arg1 = (cmf::math::Time *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - SwigValueWrapper< cmf::math::Date > result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Time, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Time_AsDate" "', argument " "1"" of type '" "cmf::math::Time const *""'"); - } - arg1 = reinterpret_cast< cmf::math::Time * >(argp1); - { - try { - result = ((cmf::math::Time const *)arg1)->AsDate(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj((new cmf::math::Date(static_cast< const cmf::math::Date& >(result))), SWIGTYPE_p_cmf__math__Date, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Time_to_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::math::Time *arg1 = (cmf::math::Time *) 0 ; - char arg2 = (char) ':' ; - void *argp1 = 0 ; - int res1 = 0 ; - char val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "seperator", NULL - }; - std::string result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Time_to_string",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__math__Time, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Time_to_string" "', argument " "1"" of type '" "cmf::math::Time *""'"); - } - arg1 = reinterpret_cast< cmf::math::Time * >(argp1); - if (obj1) { - ecode2 = SWIG_AsVal_char(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Time_to_string" "', argument " "2"" of type '" "char""'"); - } - arg2 = static_cast< char >(val2); - } - { - try { - result = (arg1)->to_string(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_std_string(static_cast< std::string >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Time_is_not_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::Time *arg1 = (cmf::math::Time *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - bool result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Time, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Time_is_not_0" "', argument " "1"" of type '" "cmf::math::Time const *""'"); - } - arg1 = reinterpret_cast< cmf::math::Time * >(argp1); - { - try { - result = (bool)((cmf::math::Time const *)arg1)->is_not_0(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Time_DOY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::Time *arg1 = (cmf::math::Time *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - double result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Time, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Time_DOY" "', argument " "1"" of type '" "cmf::math::Time const *""'"); - } - arg1 = reinterpret_cast< cmf::math::Time * >(argp1); - { - try { - result = (double)((cmf::math::Time const *)arg1)->DOY(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Time___add__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::math::Time *arg1 = (cmf::math::Time *) 0 ; - cmf::math::Time *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - cmf::math::Time T2 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "t1", NULL - }; - cmf::math::Time result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Time___add__",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__math__Time, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Time___add__" "', argument " "1"" of type '" "cmf::math::Time const *""'"); - } - arg1 = reinterpret_cast< cmf::math::Time * >(argp1); - { - // typemape const Time& - T2 = convert_datetime_to_cmftime(obj1); - if (T2 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } else { - arg2 = &T2; - } - } - { - try { - result = ((cmf::math::Time const *)arg1)->operator +((cmf::math::Time const &)*arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj((new cmf::math::Time(static_cast< const cmf::math::Time& >(result))), SWIGTYPE_p_cmf__math__Time, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Time___sub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::math::Time *arg1 = (cmf::math::Time *) 0 ; - cmf::math::Time *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - cmf::math::Time T2 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "t1", NULL - }; - cmf::math::Time result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Time___sub__",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__math__Time, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Time___sub__" "', argument " "1"" of type '" "cmf::math::Time const *""'"); - } - arg1 = reinterpret_cast< cmf::math::Time * >(argp1); - { - // typemape const Time& - T2 = convert_datetime_to_cmftime(obj1); - if (T2 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } else { - arg2 = &T2; - } - } - { - try { - result = ((cmf::math::Time const *)arg1)->operator -((cmf::math::Time const &)*arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj((new cmf::math::Time(static_cast< const cmf::math::Time& >(result))), SWIGTYPE_p_cmf__math__Time, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Time___iadd__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::math::Time *arg1 = (cmf::math::Time *) 0 ; - cmf::math::Time *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - cmf::math::Time T2 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "t1", NULL - }; - cmf::math::Time result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Time___iadd__",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__math__Time, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Time___iadd__" "', argument " "1"" of type '" "cmf::math::Time *""'"); - } - arg1 = reinterpret_cast< cmf::math::Time * >(argp1); - { - // typemape const Time& - T2 = convert_datetime_to_cmftime(obj1); - if (T2 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } else { - arg2 = &T2; - } - } - { - try { - result = (arg1)->operator +=((cmf::math::Time const &)*arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj((new cmf::math::Time(static_cast< const cmf::math::Time& >(result))), SWIGTYPE_p_cmf__math__Time, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Time___isub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::math::Time *arg1 = (cmf::math::Time *) 0 ; - cmf::math::Time *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - cmf::math::Time T2 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "t1", NULL - }; - cmf::math::Time result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Time___isub__",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__math__Time, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Time___isub__" "', argument " "1"" of type '" "cmf::math::Time *""'"); - } - arg1 = reinterpret_cast< cmf::math::Time * >(argp1); - { - // typemape const Time& - T2 = convert_datetime_to_cmftime(obj1); - if (T2 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } else { - arg2 = &T2; - } - } - { - try { - result = (arg1)->operator -=((cmf::math::Time const &)*arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj((new cmf::math::Time(static_cast< const cmf::math::Time& >(result))), SWIGTYPE_p_cmf__math__Time, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Time___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::math::Time *arg1 = (cmf::math::Time *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - cmf::math::Time result; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Time, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Time___mul__" "', argument " "1"" of type '" "cmf::math::Time const *""'"); - } - arg1 = reinterpret_cast< cmf::math::Time * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Time___mul__" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - { - try { - result = ((cmf::math::Time const *)arg1)->operator *(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj((new cmf::math::Time(static_cast< const cmf::math::Time& >(result))), SWIGTYPE_p_cmf__math__Time, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Time___truediv____SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::math::Time *arg1 = (cmf::math::Time *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - cmf::math::Time result; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Time, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Time___truediv__" "', argument " "1"" of type '" "cmf::math::Time const *""'"); - } - arg1 = reinterpret_cast< cmf::math::Time * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Time___truediv__" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - { - try { - result = ((cmf::math::Time const *)arg1)->operator /(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj((new cmf::math::Time(static_cast< const cmf::math::Time& >(result))), SWIGTYPE_p_cmf__math__Time, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Time___mod__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::math::Time *arg1 = (cmf::math::Time *) 0 ; - cmf::math::Time *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - cmf::math::Time T2 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "t1", NULL - }; - cmf::math::Time result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Time___mod__",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__math__Time, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Time___mod__" "', argument " "1"" of type '" "cmf::math::Time const *""'"); - } - arg1 = reinterpret_cast< cmf::math::Time * >(argp1); - { - // typemape const Time& - T2 = convert_datetime_to_cmftime(obj1); - if (T2 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } else { - arg2 = &T2; - } - } - { - try { - result = ((cmf::math::Time const *)arg1)->operator %((cmf::math::Time const &)*arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj((new cmf::math::Time(static_cast< const cmf::math::Time& >(result))), SWIGTYPE_p_cmf__math__Time, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Time___imul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::math::Time *arg1 = (cmf::math::Time *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - cmf::math::Time *result = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Time, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Time___imul__" "', argument " "1"" of type '" "cmf::math::Time *""'"); - } - arg1 = reinterpret_cast< cmf::math::Time * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Time___imul__" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - { - try { - result = (cmf::math::Time *) &(arg1)->operator *=(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__Time, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Time___itruediv____SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::math::Time *arg1 = (cmf::math::Time *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - cmf::math::Time *result = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Time, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Time___itruediv__" "', argument " "1"" of type '" "cmf::math::Time *""'"); - } - arg1 = reinterpret_cast< cmf::math::Time * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Time___itruediv__" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - { - try { - result = (cmf::math::Time *) &(arg1)->operator /=(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__Time, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Time___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::math::Time *arg1 = (cmf::math::Time *) 0 ; - long long arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - long long val2 ; - int ecode2 = 0 ; - cmf::math::Time result; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Time, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Time___mul__" "', argument " "1"" of type '" "cmf::math::Time const *""'"); - } - arg1 = reinterpret_cast< cmf::math::Time * >(argp1); - ecode2 = SWIG_AsVal_long_SS_long(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Time___mul__" "', argument " "2"" of type '" "long long""'"); - } - arg2 = static_cast< long long >(val2); - { - try { - result = ((cmf::math::Time const *)arg1)->operator *(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj((new cmf::math::Time(static_cast< const cmf::math::Time& >(result))), SWIGTYPE_p_cmf__math__Time, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Time___truediv____SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::math::Time *arg1 = (cmf::math::Time *) 0 ; - long long arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - long long val2 ; - int ecode2 = 0 ; - cmf::math::Time result; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Time, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Time___truediv__" "', argument " "1"" of type '" "cmf::math::Time const *""'"); - } - arg1 = reinterpret_cast< cmf::math::Time * >(argp1); - ecode2 = SWIG_AsVal_long_SS_long(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Time___truediv__" "', argument " "2"" of type '" "long long""'"); - } - arg2 = static_cast< long long >(val2); - { - try { - result = ((cmf::math::Time const *)arg1)->operator /(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj((new cmf::math::Time(static_cast< const cmf::math::Time& >(result))), SWIGTYPE_p_cmf__math__Time, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Time___imul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::math::Time *arg1 = (cmf::math::Time *) 0 ; - long long arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - long long val2 ; - int ecode2 = 0 ; - cmf::math::Time *result = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Time, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Time___imul__" "', argument " "1"" of type '" "cmf::math::Time *""'"); - } - arg1 = reinterpret_cast< cmf::math::Time * >(argp1); - ecode2 = SWIG_AsVal_long_SS_long(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Time___imul__" "', argument " "2"" of type '" "long long""'"); - } - arg2 = static_cast< long long >(val2); - { - try { - result = (cmf::math::Time *) &(arg1)->operator *=(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__Time, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Time___itruediv____SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::math::Time *arg1 = (cmf::math::Time *) 0 ; - long long arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - long long val2 ; - int ecode2 = 0 ; - cmf::math::Time *result = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Time, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Time___itruediv__" "', argument " "1"" of type '" "cmf::math::Time *""'"); - } - arg1 = reinterpret_cast< cmf::math::Time * >(argp1); - ecode2 = SWIG_AsVal_long_SS_long(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Time___itruediv__" "', argument " "2"" of type '" "long long""'"); - } - arg2 = static_cast< long long >(val2); - { - try { - result = (cmf::math::Time *) &(arg1)->operator /=(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__Time, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Time___mul____SWIG_2(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::math::Time *arg1 = (cmf::math::Time *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - cmf::math::Time result; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Time, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Time___mul__" "', argument " "1"" of type '" "cmf::math::Time const *""'"); - } - arg1 = reinterpret_cast< cmf::math::Time * >(argp1); - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Time___mul__" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - { - try { - result = ((cmf::math::Time const *)arg1)->operator *(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj((new cmf::math::Time(static_cast< const cmf::math::Time& >(result))), SWIGTYPE_p_cmf__math__Time, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Time___mul__(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args,"Time___mul__",0,2,argv))) SWIG_fail; - --argc; - { - unsigned long _index = 0; - SWIG_TypeRank _rank = 0; - if (argc == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__math__Time, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - int res = SWIG_AsVal_int(argv[1], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 1; - if (_rank == _rankm) goto dispatch; - } - } - check_1: - - if (argc == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__math__Time, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - int res = SWIG_AsVal_long_SS_long(argv[1], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 2; - if (_rank == _rankm) goto dispatch; - } - } - check_2: - - if (argc == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__math__Time, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_3; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_3; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 3; - if (_rank == _rankm) goto dispatch; - } - } - check_3: - - dispatch: - switch(_index) { - case 1: - return _wrap_Time___mul____SWIG_2(self, argc, argv); - case 2: - return _wrap_Time___mul____SWIG_1(self, argc, argv); - case 3: - return _wrap_Time___mul____SWIG_0(self, argc, argv); - } - } - -fail: - Py_INCREF(Py_NotImplemented); - return Py_NotImplemented; -} - - -SWIGINTERN PyObject *_wrap_Time___truediv____SWIG_2(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::math::Time *arg1 = (cmf::math::Time *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - cmf::math::Time result; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Time, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Time___truediv__" "', argument " "1"" of type '" "cmf::math::Time const *""'"); - } - arg1 = reinterpret_cast< cmf::math::Time * >(argp1); - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Time___truediv__" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - { - try { - result = ((cmf::math::Time const *)arg1)->operator /(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj((new cmf::math::Time(static_cast< const cmf::math::Time& >(result))), SWIGTYPE_p_cmf__math__Time, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Time___imul____SWIG_2(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::math::Time *arg1 = (cmf::math::Time *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - cmf::math::Time *result = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Time, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Time___imul__" "', argument " "1"" of type '" "cmf::math::Time *""'"); - } - arg1 = reinterpret_cast< cmf::math::Time * >(argp1); - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Time___imul__" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - { - try { - result = (cmf::math::Time *) &(arg1)->operator *=(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__Time, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Time___imul__(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args,"Time___imul__",0,2,argv))) SWIG_fail; - --argc; - { - unsigned long _index = 0; - SWIG_TypeRank _rank = 0; - if (argc == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__math__Time, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - int res = SWIG_AsVal_int(argv[1], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 1; - if (_rank == _rankm) goto dispatch; - } - } - check_1: - - if (argc == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__math__Time, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - int res = SWIG_AsVal_long_SS_long(argv[1], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 2; - if (_rank == _rankm) goto dispatch; - } - } - check_2: - - if (argc == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__math__Time, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_3; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_3; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 3; - if (_rank == _rankm) goto dispatch; - } - } - check_3: - - dispatch: - switch(_index) { - case 1: - return _wrap_Time___imul____SWIG_2(self, argc, argv); - case 2: - return _wrap_Time___imul____SWIG_1(self, argc, argv); - case 3: - return _wrap_Time___imul____SWIG_0(self, argc, argv); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'Time___imul__'.\n" - " Possible C/C++ prototypes are:\n" - " cmf::math::Time::operator *=(double)\n" - " cmf::math::Time::operator *=(long long)\n" - " cmf::math::Time::operator *=(int)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_Time___itruediv____SWIG_2(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::math::Time *arg1 = (cmf::math::Time *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - cmf::math::Time *result = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Time, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Time___itruediv__" "', argument " "1"" of type '" "cmf::math::Time *""'"); - } - arg1 = reinterpret_cast< cmf::math::Time * >(argp1); - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Time___itruediv__" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - { - try { - result = (cmf::math::Time *) &(arg1)->operator /=(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__Time, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Time___itruediv__(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args,"Time___itruediv__",0,2,argv))) SWIG_fail; - --argc; - { - unsigned long _index = 0; - SWIG_TypeRank _rank = 0; - if (argc == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__math__Time, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - int res = SWIG_AsVal_int(argv[1], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 1; - if (_rank == _rankm) goto dispatch; - } - } - check_1: - - if (argc == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__math__Time, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - int res = SWIG_AsVal_long_SS_long(argv[1], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 2; - if (_rank == _rankm) goto dispatch; - } - } - check_2: - - if (argc == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__math__Time, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_3; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_3; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 3; - if (_rank == _rankm) goto dispatch; - } - } - check_3: - - dispatch: - switch(_index) { - case 1: - return _wrap_Time___itruediv____SWIG_2(self, argc, argv); - case 2: - return _wrap_Time___itruediv____SWIG_1(self, argc, argv); - case 3: - return _wrap_Time___itruediv____SWIG_0(self, argc, argv); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'Time___itruediv__'.\n" - " Possible C/C++ prototypes are:\n" - " cmf::math::Time::operator /=(double)\n" - " cmf::math::Time::operator /=(long long)\n" - " cmf::math::Time::operator /=(int)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_Time___imod__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::math::Time *arg1 = (cmf::math::Time *) 0 ; - cmf::math::Time *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - cmf::math::Time T2 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "t1", NULL - }; - cmf::math::Time *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Time___imod__",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__math__Time, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Time___imod__" "', argument " "1"" of type '" "cmf::math::Time *""'"); - } - arg1 = reinterpret_cast< cmf::math::Time * >(argp1); - { - // typemape const Time& - T2 = convert_datetime_to_cmftime(obj1); - if (T2 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } else { - arg2 = &T2; - } - } - { - try { - result = (cmf::math::Time *) &(arg1)->operator %=((cmf::math::Time const &)*arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__Time, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Time___truediv____SWIG_3(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::math::Time *arg1 = (cmf::math::Time *) 0 ; - cmf::math::Time *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - cmf::math::Time T2 ; - double result; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Time, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Time___truediv__" "', argument " "1"" of type '" "cmf::math::Time const *""'"); - } - arg1 = reinterpret_cast< cmf::math::Time * >(argp1); - { - // typemape const Time& - T2 = convert_datetime_to_cmftime(swig_obj[1]); - if (T2 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } else { - arg2 = &T2; - } - } - { - try { - result = (double)((cmf::math::Time const *)arg1)->operator /((cmf::math::Time const &)*arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Time___truediv__(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args,"Time___truediv__",0,2,argv))) SWIG_fail; - --argc; - { - unsigned long _index = 0; - SWIG_TypeRank _rank = 0; - if (argc == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__math__Time, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - int res = SWIG_AsVal_int(argv[1], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 1; - if (_rank == _rankm) goto dispatch; - } - } - check_1: - - if (argc == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__math__Time, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - int res = SWIG_AsVal_long_SS_long(argv[1], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 2; - if (_rank == _rankm) goto dispatch; - } - } - check_2: - - if (argc == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__math__Time, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_3; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_3; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 3; - if (_rank == _rankm) goto dispatch; - } - } - check_3: - - if (argc == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__math__Time, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_4; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - _v = check_time(argv[1]); // typecheck const cmf::math::Time & - } - } - if (!_v) goto check_4; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 4; - if (_rank == _rankm) goto dispatch; - } - } - check_4: - - dispatch: - switch(_index) { - case 1: - return _wrap_Time___truediv____SWIG_2(self, argc, argv); - case 2: - return _wrap_Time___truediv____SWIG_1(self, argc, argv); - case 3: - return _wrap_Time___truediv____SWIG_0(self, argc, argv); - case 4: - return _wrap_Time___truediv____SWIG_3(self, argc, argv); - } - } - -fail: - Py_INCREF(Py_NotImplemented); - return Py_NotImplemented; -} - - -SWIGINTERN PyObject *_wrap_Time_times_in(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::math::Time *arg1 = (cmf::math::Time *) 0 ; - cmf::math::Time *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - cmf::math::Time T2 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "t1", NULL - }; - long long result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Time_times_in",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__math__Time, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Time_times_in" "', argument " "1"" of type '" "cmf::math::Time const *""'"); - } - arg1 = reinterpret_cast< cmf::math::Time * >(argp1); - { - // typemape const Time& - T2 = convert_datetime_to_cmftime(obj1); - if (T2 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } else { - arg2 = &T2; - } - } - { - try { - result = (long long)((cmf::math::Time const *)arg1)->times_in((cmf::math::Time const &)*arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_long_SS_long(static_cast< long long >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Time___lt__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::math::Time *arg1 = (cmf::math::Time *) 0 ; - cmf::math::Time *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - cmf::math::Time T2 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "t1", NULL - }; - bool result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Time___lt__",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__math__Time, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Time___lt__" "', argument " "1"" of type '" "cmf::math::Time const *""'"); - } - arg1 = reinterpret_cast< cmf::math::Time * >(argp1); - { - // typemape const Time& - T2 = convert_datetime_to_cmftime(obj1); - if (T2 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } else { - arg2 = &T2; - } - } - { - try { - result = (bool)((cmf::math::Time const *)arg1)->operator <((cmf::math::Time const &)*arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Time___gt__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::math::Time *arg1 = (cmf::math::Time *) 0 ; - cmf::math::Time *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - cmf::math::Time T2 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "t1", NULL - }; - bool result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Time___gt__",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__math__Time, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Time___gt__" "', argument " "1"" of type '" "cmf::math::Time const *""'"); - } - arg1 = reinterpret_cast< cmf::math::Time * >(argp1); - { - // typemape const Time& - T2 = convert_datetime_to_cmftime(obj1); - if (T2 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } else { - arg2 = &T2; - } - } - { - try { - result = (bool)((cmf::math::Time const *)arg1)->operator >((cmf::math::Time const &)*arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Time___le__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::math::Time *arg1 = (cmf::math::Time *) 0 ; - cmf::math::Time *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - cmf::math::Time T2 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "t1", NULL - }; - bool result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Time___le__",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__math__Time, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Time___le__" "', argument " "1"" of type '" "cmf::math::Time const *""'"); - } - arg1 = reinterpret_cast< cmf::math::Time * >(argp1); - { - // typemape const Time& - T2 = convert_datetime_to_cmftime(obj1); - if (T2 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } else { - arg2 = &T2; - } - } - { - try { - result = (bool)((cmf::math::Time const *)arg1)->operator <=((cmf::math::Time const &)*arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Time___ge__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::math::Time *arg1 = (cmf::math::Time *) 0 ; - cmf::math::Time *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - cmf::math::Time T2 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "t1", NULL - }; - bool result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Time___ge__",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__math__Time, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Time___ge__" "', argument " "1"" of type '" "cmf::math::Time const *""'"); - } - arg1 = reinterpret_cast< cmf::math::Time * >(argp1); - { - // typemape const Time& - T2 = convert_datetime_to_cmftime(obj1); - if (T2 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } else { - arg2 = &T2; - } - } - { - try { - result = (bool)((cmf::math::Time const *)arg1)->operator >=((cmf::math::Time const &)*arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Time___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::math::Time *arg1 = (cmf::math::Time *) 0 ; - cmf::math::Time *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - cmf::math::Time T2 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "t1", NULL - }; - bool result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Time___eq__",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__math__Time, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Time___eq__" "', argument " "1"" of type '" "cmf::math::Time const *""'"); - } - arg1 = reinterpret_cast< cmf::math::Time * >(argp1); - { - // typemape const Time& - T2 = convert_datetime_to_cmftime(obj1); - if (T2 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } else { - arg2 = &T2; - } - } - { - try { - result = (bool)((cmf::math::Time const *)arg1)->operator ==((cmf::math::Time const &)*arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Time___ne__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::math::Time *arg1 = (cmf::math::Time *) 0 ; - cmf::math::Time *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - cmf::math::Time T2 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "t1", NULL - }; - bool result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Time___ne__",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__math__Time, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Time___ne__" "', argument " "1"" of type '" "cmf::math::Time const *""'"); - } - arg1 = reinterpret_cast< cmf::math::Time * >(argp1); - { - // typemape const Time& - T2 = convert_datetime_to_cmftime(obj1); - if (T2 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } else { - arg2 = &T2; - } - } - { - try { - result = (bool)((cmf::math::Time const *)arg1)->operator !=((cmf::math::Time const &)*arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_Time(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::Time *arg1 = (cmf::math::Time *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Time, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Time" "', argument " "1"" of type '" "cmf::math::Time *""'"); - } - arg1 = reinterpret_cast< cmf::math::Time * >(argp1); - { - try { - delete arg1; - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *Time_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__math__Time, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *Time_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_Date_year_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::Date *arg1 = (cmf::math::Date *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"Date_year_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Date, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Date_year_set" "', argument " "1"" of type '" "cmf::math::Date *""'"); - } - arg1 = reinterpret_cast< cmf::math::Date * >(argp1); - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Date_year_set" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - if (arg1) (arg1)->year = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Date_year_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::Date *arg1 = (cmf::math::Date *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - int result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Date, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Date_year_get" "', argument " "1"" of type '" "cmf::math::Date *""'"); - } - arg1 = reinterpret_cast< cmf::math::Date * >(argp1); - result = (int) ((arg1)->year); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Date_month_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::Date *arg1 = (cmf::math::Date *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"Date_month_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Date, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Date_month_set" "', argument " "1"" of type '" "cmf::math::Date *""'"); - } - arg1 = reinterpret_cast< cmf::math::Date * >(argp1); - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Date_month_set" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - if (arg1) (arg1)->month = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Date_month_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::Date *arg1 = (cmf::math::Date *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - int result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Date, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Date_month_get" "', argument " "1"" of type '" "cmf::math::Date *""'"); - } - arg1 = reinterpret_cast< cmf::math::Date * >(argp1); - result = (int) ((arg1)->month); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Date_day_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::Date *arg1 = (cmf::math::Date *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"Date_day_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Date, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Date_day_set" "', argument " "1"" of type '" "cmf::math::Date *""'"); - } - arg1 = reinterpret_cast< cmf::math::Date * >(argp1); - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Date_day_set" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - if (arg1) (arg1)->day = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Date_day_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::Date *arg1 = (cmf::math::Date *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - int result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Date, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Date_day_get" "', argument " "1"" of type '" "cmf::math::Date *""'"); - } - arg1 = reinterpret_cast< cmf::math::Date * >(argp1); - result = (int) ((arg1)->day); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Date_hour_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::Date *arg1 = (cmf::math::Date *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"Date_hour_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Date, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Date_hour_set" "', argument " "1"" of type '" "cmf::math::Date *""'"); - } - arg1 = reinterpret_cast< cmf::math::Date * >(argp1); - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Date_hour_set" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - if (arg1) (arg1)->hour = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Date_hour_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::Date *arg1 = (cmf::math::Date *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - int result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Date, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Date_hour_get" "', argument " "1"" of type '" "cmf::math::Date *""'"); - } - arg1 = reinterpret_cast< cmf::math::Date * >(argp1); - result = (int) ((arg1)->hour); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Date_minute_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::Date *arg1 = (cmf::math::Date *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"Date_minute_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Date, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Date_minute_set" "', argument " "1"" of type '" "cmf::math::Date *""'"); - } - arg1 = reinterpret_cast< cmf::math::Date * >(argp1); - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Date_minute_set" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - if (arg1) (arg1)->minute = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Date_minute_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::Date *arg1 = (cmf::math::Date *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - int result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Date, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Date_minute_get" "', argument " "1"" of type '" "cmf::math::Date *""'"); - } - arg1 = reinterpret_cast< cmf::math::Date * >(argp1); - result = (int) ((arg1)->minute); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Date_second_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::Date *arg1 = (cmf::math::Date *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"Date_second_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Date, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Date_second_set" "', argument " "1"" of type '" "cmf::math::Date *""'"); - } - arg1 = reinterpret_cast< cmf::math::Date * >(argp1); - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Date_second_set" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - if (arg1) (arg1)->second = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Date_second_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::Date *arg1 = (cmf::math::Date *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - int result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Date, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Date_second_get" "', argument " "1"" of type '" "cmf::math::Date *""'"); - } - arg1 = reinterpret_cast< cmf::math::Date * >(argp1); - result = (int) ((arg1)->second); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Date_ms_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::Date *arg1 = (cmf::math::Date *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"Date_ms_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Date, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Date_ms_set" "', argument " "1"" of type '" "cmf::math::Date *""'"); - } - arg1 = reinterpret_cast< cmf::math::Date * >(argp1); - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Date_ms_set" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - if (arg1) (arg1)->ms = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Date_ms_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::Date *arg1 = (cmf::math::Date *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - int result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Date, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Date_ms_get" "', argument " "1"" of type '" "cmf::math::Date *""'"); - } - arg1 = reinterpret_cast< cmf::math::Date * >(argp1); - result = (int) ((arg1)->ms); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_Date__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - int arg1 ; - int arg2 ; - int arg3 ; - int arg4 = (int) 0 ; - int arg5 = (int) 0 ; - int arg6 = (int) 0 ; - int arg7 = (int) 0 ; - int val1 ; - int ecode1 = 0 ; - int val2 ; - int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; - int val4 ; - int ecode4 = 0 ; - int val5 ; - int ecode5 = 0 ; - int val6 ; - int ecode6 = 0 ; - int val7 ; - int ecode7 = 0 ; - cmf::math::Date *result = 0 ; - - if ((nobjs < 3) || (nobjs > 7)) SWIG_fail; - ecode1 = SWIG_AsVal_int(swig_obj[0], &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Date" "', argument " "1"" of type '" "int""'"); - } - arg1 = static_cast< int >(val1); - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Date" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Date" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - if (swig_obj[3]) { - ecode4 = SWIG_AsVal_int(swig_obj[3], &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_Date" "', argument " "4"" of type '" "int""'"); - } - arg4 = static_cast< int >(val4); - } - if (swig_obj[4]) { - ecode5 = SWIG_AsVal_int(swig_obj[4], &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_Date" "', argument " "5"" of type '" "int""'"); - } - arg5 = static_cast< int >(val5); - } - if (swig_obj[5]) { - ecode6 = SWIG_AsVal_int(swig_obj[5], &val6); - if (!SWIG_IsOK(ecode6)) { - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_Date" "', argument " "6"" of type '" "int""'"); - } - arg6 = static_cast< int >(val6); - } - if (swig_obj[6]) { - ecode7 = SWIG_AsVal_int(swig_obj[6], &val7); - if (!SWIG_IsOK(ecode7)) { - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_Date" "', argument " "7"" of type '" "int""'"); - } - arg7 = static_cast< int >(val7); - } - { - try { - result = (cmf::math::Date *)new cmf::math::Date(arg1,arg2,arg3,arg4,arg5,arg6,arg7); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__Date, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_Date__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::math::Time *arg1 = 0 ; - cmf::math::Time T1 ; - cmf::math::Date *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - { - // typemape const Time& - T1 = convert_datetime_to_cmftime(swig_obj[0]); - if (T1 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } else { - arg1 = &T1; - } - } - { - try { - result = (cmf::math::Date *)new cmf::math::Date((cmf::math::Time const &)*arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__Date, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_Date(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[8] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args,"new_Date",0,7,argv))) SWIG_fail; - --argc; - { - unsigned long _index = 0; - SWIG_TypeRank _rank = 0; - if (argc == 1) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - { - _v = check_time(argv[0]); // typecheck const cmf::math::Time & - } - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 1; - if (_rank == _rankm) goto dispatch; - } - } - check_1: - - if ((argc >= 3) && (argc <= 7)) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - { - int res = SWIG_AsVal_int(argv[0], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - int res = SWIG_AsVal_int(argv[1], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - int res = SWIG_AsVal_int(argv[2], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (argc > 3) { - { - { - int res = SWIG_AsVal_int(argv[3], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (argc > 4) { - { - { - int res = SWIG_AsVal_int(argv[4], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (argc > 5) { - { - { - int res = SWIG_AsVal_int(argv[5], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (argc > 6) { - { - { - int res = SWIG_AsVal_int(argv[6], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - } - } - } - } - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 2; - if (_rank == _rankm) goto dispatch; - } - } - check_2: - - dispatch: - switch(_index) { - case 1: - return _wrap_new_Date__SWIG_1(self, argc, argv); - case 2: - return _wrap_new_Date__SWIG_0(self, argc, argv); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_Date'.\n" - " Possible C/C++ prototypes are:\n" - " cmf::math::Date::Date(int,int,int,int,int,int,int)\n" - " cmf::math::Date::Date(cmf::math::Time const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_Date_ToTime(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::Date *arg1 = (cmf::math::Date *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::math::Time result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Date, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Date_ToTime" "', argument " "1"" of type '" "cmf::math::Date *""'"); - } - arg1 = reinterpret_cast< cmf::math::Date * >(argp1); - { - try { - result = (arg1)->ToTime(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj((new cmf::math::Time(static_cast< const cmf::math::Time& >(result))), SWIGTYPE_p_cmf__math__Time, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Date_DOY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::Date *arg1 = (cmf::math::Date *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - double result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Date, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Date_DOY" "', argument " "1"" of type '" "cmf::math::Date *""'"); - } - arg1 = reinterpret_cast< cmf::math::Date * >(argp1); - { - try { - result = (double)(arg1)->DOY(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Date_to_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::Date *arg1 = (cmf::math::Date *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::string result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Date, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Date_to_string" "', argument " "1"" of type '" "cmf::math::Date *""'"); - } - arg1 = reinterpret_cast< cmf::math::Date * >(argp1); - { - try { - result = (arg1)->to_string(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_std_string(static_cast< std::string >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_Date(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::Date *arg1 = (cmf::math::Date *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Date, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Date" "', argument " "1"" of type '" "cmf::math::Date *""'"); - } - arg1 = reinterpret_cast< cmf::math::Date * >(argp1); - { - try { - delete arg1; - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *Date_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__math__Date, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *Date_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN int Swig_var_ms_set(PyObject *) { - SWIG_Error(SWIG_AttributeError,"Variable ms is read-only."); - return 1; -} - - -SWIGINTERN PyObject *Swig_var_ms_get(void) { - PyObject *pyobj = 0; - - pyobj = SWIG_NewPointerObj(SWIG_as_voidptr(&cmf::math::ms), SWIGTYPE_p_cmf__math__Time, 0 ); - return pyobj; -} - - -SWIGINTERN int Swig_var_sec_set(PyObject *) { - SWIG_Error(SWIG_AttributeError,"Variable sec is read-only."); - return 1; -} - - -SWIGINTERN PyObject *Swig_var_sec_get(void) { - PyObject *pyobj = 0; - - pyobj = SWIG_NewPointerObj(SWIG_as_voidptr(&cmf::math::sec), SWIGTYPE_p_cmf__math__Time, 0 ); - return pyobj; -} - - -SWIGINTERN int Swig_var_min_set(PyObject *) { - SWIG_Error(SWIG_AttributeError,"Variable min is read-only."); - return 1; -} - - -SWIGINTERN PyObject *Swig_var_min_get(void) { - PyObject *pyobj = 0; - - pyobj = SWIG_NewPointerObj(SWIG_as_voidptr(&cmf::math::min), SWIGTYPE_p_cmf__math__Time, 0 ); - return pyobj; -} - - -SWIGINTERN int Swig_var_h_set(PyObject *) { - SWIG_Error(SWIG_AttributeError,"Variable h is read-only."); - return 1; -} - - -SWIGINTERN PyObject *Swig_var_h_get(void) { - PyObject *pyobj = 0; - - pyobj = SWIG_NewPointerObj(SWIG_as_voidptr(&cmf::math::h), SWIGTYPE_p_cmf__math__Time, 0 ); - return pyobj; -} - - -SWIGINTERN int Swig_var_day_set(PyObject *) { - SWIG_Error(SWIG_AttributeError,"Variable day is read-only."); - return 1; -} - - -SWIGINTERN PyObject *Swig_var_day_get(void) { - PyObject *pyobj = 0; - - pyobj = SWIG_NewPointerObj(SWIG_as_voidptr(&cmf::math::day), SWIGTYPE_p_cmf__math__Time, 0 ); - return pyobj; -} - - -SWIGINTERN int Swig_var_week_set(PyObject *) { - SWIG_Error(SWIG_AttributeError,"Variable week is read-only."); - return 1; -} - - -SWIGINTERN PyObject *Swig_var_week_get(void) { - PyObject *pyobj = 0; - - pyobj = SWIG_NewPointerObj(SWIG_as_voidptr(&cmf::math::week), SWIGTYPE_p_cmf__math__Time, 0 ); - return pyobj; -} - - -SWIGINTERN int Swig_var_year_set(PyObject *) { - SWIG_Error(SWIG_AttributeError,"Variable year is read-only."); - return 1; -} - - -SWIGINTERN PyObject *Swig_var_year_get(void) { - PyObject *pyobj = 0; - - pyobj = SWIG_NewPointerObj(SWIG_as_voidptr(&cmf::math::year), SWIGTYPE_p_cmf__math__Time, 0 ); - return pyobj; -} - - -SWIGINTERN int Swig_var_month_set(PyObject *) { - SWIG_Error(SWIG_AttributeError,"Variable month is read-only."); - return 1; -} - - -SWIGINTERN PyObject *Swig_var_month_get(void) { - PyObject *pyobj = 0; - - pyobj = SWIG_NewPointerObj(SWIG_as_voidptr(&cmf::math::month), SWIGTYPE_p_cmf__math__Time, 0 ); - return pyobj; -} - - -SWIGINTERN int Swig_var_never_set(PyObject *) { - SWIG_Error(SWIG_AttributeError,"Variable never is read-only."); - return 1; -} - - -SWIGINTERN PyObject *Swig_var_never_get(void) { - PyObject *pyobj = 0; - - pyobj = SWIG_NewPointerObj(SWIG_as_voidptr(&cmf::math::never), SWIGTYPE_p_cmf__math__Time, 0 ); - return pyobj; -} - - -SWIGINTERN PyObject *_wrap_timeseries_interpolationpower(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - int result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries_interpolationpower" "', argument " "1"" of type '" "cmf::math::timeseries const *""'"); - } - arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); - { - try { - result = (int)((cmf::math::timeseries const *)arg1)->interpolationpower(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_timeseries_add(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "Value", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:timeseries_add",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries_add" "', argument " "1"" of type '" "cmf::math::timeseries *""'"); - } - arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "timeseries_add" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - { - try { - (arg1)->add(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_timeseries_is_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - bool result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries_is_empty" "', argument " "1"" of type '" "cmf::math::timeseries const *""'"); - } - arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); - { - try { - result = (bool)((cmf::math::timeseries const *)arg1)->is_empty(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_timeseries_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries_clear" "', argument " "1"" of type '" "cmf::math::timeseries *""'"); - } - arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); - { - try { - (arg1)->clear(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_timeseries_adress(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - size_t result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries_adress" "', argument " "1"" of type '" "cmf::math::timeseries const *""'"); - } - arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); - { - try { - result = ((cmf::math::timeseries const *)arg1)->adress(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_timeseries_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::math::timeseries result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries_copy" "', argument " "1"" of type '" "cmf::math::timeseries const *""'"); - } - arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); - { - try { - result = ((cmf::math::timeseries const *)arg1)->copy(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj((new cmf::math::timeseries(static_cast< const cmf::math::timeseries& >(result))), SWIGTYPE_p_cmf__math__timeseries, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_timeseries_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - size_t result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries_size" "', argument " "1"" of type '" "cmf::math::timeseries const *""'"); - } - arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); - { - try { - result = ((cmf::math::timeseries const *)arg1)->size(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_timeseries_count_values(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - size_t result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries_count_values" "', argument " "1"" of type '" "cmf::math::timeseries const *""'"); - } - arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); - { - try { - result = ((cmf::math::timeseries const *)arg1)->count_values(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_timeseries(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::math::Time arg1 = (cmf::math::Time) cmf::math::Time() ; - cmf::math::Time arg2 = (cmf::math::Time) cmf::math::day ; - int arg3 = (int) 1 ; - size_t arg4 = (size_t) 0 ; - int val3 ; - int ecode3 = 0 ; - size_t val4 ; - int ecode4 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - char * kwnames[] = { - (char *) "begin",(char *) "step",(char *) "interpolationmethod",(char *) "count", NULL - }; - cmf::math::timeseries *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|OOOO:new_timeseries",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - if (obj0) { - { - arg1 = convert_datetime_to_cmftime(obj0); - if (arg1 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } - } - } - if (obj1) { - { - arg2 = convert_datetime_to_cmftime(obj1); - if (arg2 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } - } - } - if (obj2) { - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_timeseries" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - } - if (obj3) { - ecode4 = SWIG_AsVal_size_t(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_timeseries" "', argument " "4"" of type '" "size_t""'"); - } - arg4 = static_cast< size_t >(val4); - } - { - try { - result = (cmf::math::timeseries *)new cmf::math::timeseries(arg1,arg2,arg3,arg4); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__timeseries, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_timeseries_from_array(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::math::Time arg1 ; - cmf::math::Time arg2 ; - cmf::math::num_array *arg3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char * kwnames[] = { - (char *) "begin",(char *) "step",(char *) "data", NULL - }; - cmf::math::timeseries result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:timeseries_from_array",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; - { - arg1 = convert_datetime_to_cmftime(obj0); - if (arg1 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } - } - { - arg2 = convert_datetime_to_cmftime(obj1); - if (arg2 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } - } - { - // Convert a array_wrapper from numpy array - double * data=0; - ptrdiff_t size = from_npy_array(obj2,&data); - if (!data) { - SWIG_exception_fail(SWIG_TypeError,"Input data is not 'array-like' (in the sense of numpy arrays)"); - return NULL; - } - arg3 = new cmf::math::num_array(size,data); - } - { - try { - result = cmf::math::timeseries::from_array(arg1,arg2,(cmf::math::num_array const &)*arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj((new cmf::math::timeseries(static_cast< const cmf::math::timeseries& >(result))), SWIGTYPE_p_cmf__math__timeseries, SWIG_POINTER_OWN | 0 ); - { - delete arg3; - } - return resultobj; -fail: - { - delete arg3; - } - return NULL; -} - - -SWIGINTERN PyObject *_wrap_timeseries_from_scalar(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - double arg1 ; - double val1 ; - int ecode1 = 0 ; - PyObject * obj0 = 0 ; - char * kwnames[] = { - (char *) "scalar", NULL - }; - cmf::math::timeseries result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:timeseries_from_scalar",kwnames,&obj0)) SWIG_fail; - ecode1 = SWIG_AsVal_double(obj0, &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "timeseries_from_scalar" "', argument " "1"" of type '" "double""'"); - } - arg1 = static_cast< double >(val1); - { - try { - result = cmf::math::timeseries::from_scalar(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj((new cmf::math::timeseries(static_cast< const cmf::math::timeseries& >(result))), SWIGTYPE_p_cmf__math__timeseries, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_timeseries_from_file(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - std::string arg1 ; - PyObject * obj0 = 0 ; - char * kwnames[] = { - (char *) "filename", NULL - }; - cmf::math::timeseries result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:timeseries_from_file",kwnames,&obj0)) SWIG_fail; - { - std::string *ptr = (std::string *)0; - int res = SWIG_AsPtr_std_string(obj0, &ptr); - if (!SWIG_IsOK(res) || !ptr) { - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "timeseries_from_file" "', argument " "1"" of type '" "std::string""'"); - } - arg1 = *ptr; - if (SWIG_IsNewObj(res)) delete ptr; - } - { - try { - result = cmf::math::timeseries::from_file(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj((new cmf::math::timeseries(static_cast< const cmf::math::timeseries& >(result))), SWIGTYPE_p_cmf__math__timeseries, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_timeseries_get_t(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; - cmf::math::Time arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "t", NULL - }; - double result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:timeseries_get_t",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries_get_t" "', argument " "1"" of type '" "cmf::math::timeseries const *""'"); - } - arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); - { - arg2 = convert_datetime_to_cmftime(obj1); - if (arg2 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } - } - { - try { - result = (double)((cmf::math::timeseries const *)arg1)->get_t(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_timeseries_get_i(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; - ptrdiff_t arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "i", NULL - }; - double result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:timeseries_get_i",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries_get_i" "', argument " "1"" of type '" "cmf::math::timeseries const *""'"); - } - arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "timeseries_get_i" "', argument " "2"" of type '" "ptrdiff_t""'"); - } - arg2 = static_cast< ptrdiff_t >(val2); - { - try { - result = (double)((cmf::math::timeseries const *)arg1)->get_i(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_timeseries_set_t(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; - cmf::math::Time arg2 ; - double arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "t",(char *) "value", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:timeseries_set_t",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries_set_t" "', argument " "1"" of type '" "cmf::math::timeseries *""'"); - } - arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); - { - arg2 = convert_datetime_to_cmftime(obj1); - if (arg2 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } - } - ecode3 = SWIG_AsVal_double(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "timeseries_set_t" "', argument " "3"" of type '" "double""'"); - } - arg3 = static_cast< double >(val3); - { - try { - (arg1)->set_t(arg2,arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_timeseries_set_i(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; - ptrdiff_t arg2 ; - double arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - double val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "i",(char *) "value", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:timeseries_set_i",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries_set_i" "', argument " "1"" of type '" "cmf::math::timeseries *""'"); - } - arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "timeseries_set_i" "', argument " "2"" of type '" "ptrdiff_t""'"); - } - arg2 = static_cast< ptrdiff_t >(val2); - ecode3 = SWIG_AsVal_double(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "timeseries_set_i" "', argument " "3"" of type '" "double""'"); - } - arg3 = static_cast< double >(val3); - { - try { - (arg1)->set_i(arg2,arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_timeseries_get_slice__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; - cmf::math::Time arg2 ; - cmf::math::Time arg3 ; - cmf::math::Time arg4 = (cmf::math::Time) cmf::math::Time() ; - void *argp1 = 0 ; - int res1 = 0 ; - cmf::math::timeseries result; - - if ((nobjs < 3) || (nobjs > 4)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries_get_slice" "', argument " "1"" of type '" "cmf::math::timeseries *""'"); - } - arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); - { - arg2 = convert_datetime_to_cmftime(swig_obj[1]); - if (arg2 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } - } - { - arg3 = convert_datetime_to_cmftime(swig_obj[2]); - if (arg3 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } - } - if (swig_obj[3]) { - { - arg4 = convert_datetime_to_cmftime(swig_obj[3]); - if (arg4 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } - } - } - { - try { - result = (arg1)->get_slice(arg2,arg3,arg4); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj((new cmf::math::timeseries(static_cast< const cmf::math::timeseries& >(result))), SWIGTYPE_p_cmf__math__timeseries, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_timeseries_set_slice__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; - cmf::math::Time arg2 ; - cmf::math::Time arg3 ; - cmf::math::timeseries arg4 ; - void *argp1 = 0 ; - int res1 = 0 ; - - if ((nobjs < 4) || (nobjs > 4)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries_set_slice" "', argument " "1"" of type '" "cmf::math::timeseries *""'"); - } - arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); - { - arg2 = convert_datetime_to_cmftime(swig_obj[1]); - if (arg2 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } - } - { - arg3 = convert_datetime_to_cmftime(swig_obj[2]); - if (arg3 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } - } - { - cmf::math::timeseries *p_ts = &arg4; - int res=SWIG_ConvertPtr(swig_obj[3],(void**)(&p_ts),SWIGTYPE_p_cmf__math__timeseries,0); - if (!(SWIG_IsOK(res)) || p_ts==0) { - if (PyNumber_Check(swig_obj[3])) { - double scalar = PyFloat_AsDouble(swig_obj[3]); - arg4 = cmf::math::timeseries::from_scalar(scalar); - } else { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.timeseries object"); - } - } else { - arg4 = *p_ts; - } - } - { - try { - (arg1)->set_slice(arg2,arg3,arg4); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_timeseries_get_slice__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; - ptrdiff_t arg2 ; - ptrdiff_t arg3 ; - ptrdiff_t arg4 = (ptrdiff_t) 1 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - ptrdiff_t val3 ; - int ecode3 = 0 ; - ptrdiff_t val4 ; - int ecode4 = 0 ; - cmf::math::timeseries result; - - if ((nobjs < 3) || (nobjs > 4)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries_get_slice" "', argument " "1"" of type '" "cmf::math::timeseries *""'"); - } - arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "timeseries_get_slice" "', argument " "2"" of type '" "ptrdiff_t""'"); - } - arg2 = static_cast< ptrdiff_t >(val2); - ecode3 = SWIG_AsVal_ptrdiff_t(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "timeseries_get_slice" "', argument " "3"" of type '" "ptrdiff_t""'"); - } - arg3 = static_cast< ptrdiff_t >(val3); - if (swig_obj[3]) { - ecode4 = SWIG_AsVal_ptrdiff_t(swig_obj[3], &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "timeseries_get_slice" "', argument " "4"" of type '" "ptrdiff_t""'"); - } - arg4 = static_cast< ptrdiff_t >(val4); - } - { - try { - result = (arg1)->get_slice(arg2,arg3,arg4); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj((new cmf::math::timeseries(static_cast< const cmf::math::timeseries& >(result))), SWIGTYPE_p_cmf__math__timeseries, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_timeseries_get_slice(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[5] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args,"timeseries_get_slice",0,4,argv))) SWIG_fail; - --argc; - { - unsigned long _index = 0; - SWIG_TypeRank _rank = 0; - if ((argc >= 3) && (argc <= 4)) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__math__timeseries, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - _v = check_time(argv[1]); - } - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - _v = check_time(argv[2]); - } - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (argc > 3) { - { - { - _v = check_time(argv[3]); - } - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - } - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 1; - if (_rank == _rankm) goto dispatch; - } - } - check_1: - - if ((argc >= 3) && (argc <= 4)) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__math__timeseries, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - int res = SWIG_AsVal_ptrdiff_t(argv[2], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (argc > 3) { - { - { - int res = SWIG_AsVal_ptrdiff_t(argv[3], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - } - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 2; - if (_rank == _rankm) goto dispatch; - } - } - check_2: - - dispatch: - switch(_index) { - case 1: - return _wrap_timeseries_get_slice__SWIG_0(self, argc, argv); - case 2: - return _wrap_timeseries_get_slice__SWIG_1(self, argc, argv); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'timeseries_get_slice'.\n" - " Possible C/C++ prototypes are:\n" - " cmf::math::timeseries::get_slice(cmf::math::Time,cmf::math::Time,cmf::math::Time)\n" - " cmf::math::timeseries::get_slice(ptrdiff_t,ptrdiff_t,ptrdiff_t)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_timeseries_set_slice__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; - ptrdiff_t arg2 ; - ptrdiff_t arg3 ; - cmf::math::timeseries arg4 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - ptrdiff_t val3 ; - int ecode3 = 0 ; - - if ((nobjs < 4) || (nobjs > 4)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries_set_slice" "', argument " "1"" of type '" "cmf::math::timeseries *""'"); - } - arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "timeseries_set_slice" "', argument " "2"" of type '" "ptrdiff_t""'"); - } - arg2 = static_cast< ptrdiff_t >(val2); - ecode3 = SWIG_AsVal_ptrdiff_t(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "timeseries_set_slice" "', argument " "3"" of type '" "ptrdiff_t""'"); - } - arg3 = static_cast< ptrdiff_t >(val3); - { - cmf::math::timeseries *p_ts = &arg4; - int res=SWIG_ConvertPtr(swig_obj[3],(void**)(&p_ts),SWIGTYPE_p_cmf__math__timeseries,0); - if (!(SWIG_IsOK(res)) || p_ts==0) { - if (PyNumber_Check(swig_obj[3])) { - double scalar = PyFloat_AsDouble(swig_obj[3]); - arg4 = cmf::math::timeseries::from_scalar(scalar); - } else { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.timeseries object"); - } - } else { - arg4 = *p_ts; - } - } - { - try { - (arg1)->set_slice(arg2,arg3,arg4); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_timeseries_set_slice(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[5] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args,"timeseries_set_slice",0,4,argv))) SWIG_fail; - --argc; - { - unsigned long _index = 0; - SWIG_TypeRank _rank = 0; - if (argc == 4) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__math__timeseries, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - _v = check_time(argv[1]); - } - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - _v = check_time(argv[2]); - } - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - void * pt; - int res=SWIG_ConvertPtr(argv[3],&pt,SWIGTYPE_p_cmf__math__timeseries,0); - _v=SWIG_IsOK(res) || PyNumber_Check(argv[3]); - } - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 1; - if (_rank == _rankm) goto dispatch; - } - } - check_1: - - if (argc == 4) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__math__timeseries, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - int res = SWIG_AsVal_ptrdiff_t(argv[2], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - void * pt; - int res=SWIG_ConvertPtr(argv[3],&pt,SWIGTYPE_p_cmf__math__timeseries,0); - _v=SWIG_IsOK(res) || PyNumber_Check(argv[3]); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 2; - if (_rank == _rankm) goto dispatch; - } - } - check_2: - - dispatch: - switch(_index) { - case 1: - return _wrap_timeseries_set_slice__SWIG_0(self, argc, argv); - case 2: - return _wrap_timeseries_set_slice__SWIG_1(self, argc, argv); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'timeseries_set_slice'.\n" - " Possible C/C++ prototypes are:\n" - " cmf::math::timeseries::set_slice(cmf::math::Time,cmf::math::Time,cmf::math::timeseries)\n" - " cmf::math::timeseries::set_slice(ptrdiff_t,ptrdiff_t,cmf::math::timeseries)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_timeseries_remove_nodata(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "nodata_value", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:timeseries_remove_nodata",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries_remove_nodata" "', argument " "1"" of type '" "cmf::math::timeseries *""'"); - } - arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "timeseries_remove_nodata" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - { - try { - (arg1)->remove_nodata(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_timeseries___iadd____SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; - cmf::math::timeseries arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - cmf::math::timeseries *result = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__timeseries, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries___iadd__" "', argument " "1"" of type '" "cmf::math::timeseries *""'"); - } - arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); - { - cmf::math::timeseries *p_ts = &arg2; - int res=SWIG_ConvertPtr(swig_obj[1],(void**)(&p_ts),SWIGTYPE_p_cmf__math__timeseries,0); - if (!(SWIG_IsOK(res)) || p_ts==0) { - if (PyNumber_Check(swig_obj[1])) { - double scalar = PyFloat_AsDouble(swig_obj[1]); - arg2 = cmf::math::timeseries::from_scalar(scalar); - } else { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.timeseries object"); - } - } else { - arg2 = *p_ts; - } - } - { - try { - result = (cmf::math::timeseries *) &(arg1)->operator +=(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__timeseries, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_timeseries___iadd____SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - cmf::math::timeseries *result = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__timeseries, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries___iadd__" "', argument " "1"" of type '" "cmf::math::timeseries *""'"); - } - arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "timeseries___iadd__" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - { - try { - result = (cmf::math::timeseries *) &(arg1)->operator +=(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__timeseries, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_timeseries___iadd__(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args,"timeseries___iadd__",0,2,argv))) SWIG_fail; - --argc; - { - unsigned long _index = 0; - SWIG_TypeRank _rank = 0; - if (argc == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__math__timeseries, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 1; - if (_rank == _rankm) goto dispatch; - } - } - check_1: - - if (argc == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__math__timeseries, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - void * pt; - int res=SWIG_ConvertPtr(argv[1],&pt,SWIGTYPE_p_cmf__math__timeseries,0); - _v=SWIG_IsOK(res) || PyNumber_Check(argv[1]); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 2; - if (_rank == _rankm) goto dispatch; - } - } - check_2: - - dispatch: - switch(_index) { - case 1: - return _wrap_timeseries___iadd____SWIG_1(self, argc, argv); - case 2: - return _wrap_timeseries___iadd____SWIG_0(self, argc, argv); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'timeseries___iadd__'.\n" - " Possible C/C++ prototypes are:\n" - " cmf::math::timeseries::operator +=(cmf::math::timeseries)\n" - " cmf::math::timeseries::operator +=(double)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_timeseries___isub____SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; - cmf::math::timeseries arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - cmf::math::timeseries *result = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__timeseries, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries___isub__" "', argument " "1"" of type '" "cmf::math::timeseries *""'"); - } - arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); - { - cmf::math::timeseries *p_ts = &arg2; - int res=SWIG_ConvertPtr(swig_obj[1],(void**)(&p_ts),SWIGTYPE_p_cmf__math__timeseries,0); - if (!(SWIG_IsOK(res)) || p_ts==0) { - if (PyNumber_Check(swig_obj[1])) { - double scalar = PyFloat_AsDouble(swig_obj[1]); - arg2 = cmf::math::timeseries::from_scalar(scalar); - } else { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.timeseries object"); - } - } else { - arg2 = *p_ts; - } - } - { - try { - result = (cmf::math::timeseries *) &(arg1)->operator -=(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__timeseries, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_timeseries___isub____SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - cmf::math::timeseries *result = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__timeseries, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries___isub__" "', argument " "1"" of type '" "cmf::math::timeseries *""'"); - } - arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "timeseries___isub__" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - { - try { - result = (cmf::math::timeseries *) &(arg1)->operator -=(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__timeseries, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_timeseries___isub__(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args,"timeseries___isub__",0,2,argv))) SWIG_fail; - --argc; - { - unsigned long _index = 0; - SWIG_TypeRank _rank = 0; - if (argc == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__math__timeseries, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 1; - if (_rank == _rankm) goto dispatch; - } - } - check_1: - - if (argc == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__math__timeseries, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - void * pt; - int res=SWIG_ConvertPtr(argv[1],&pt,SWIGTYPE_p_cmf__math__timeseries,0); - _v=SWIG_IsOK(res) || PyNumber_Check(argv[1]); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 2; - if (_rank == _rankm) goto dispatch; - } - } - check_2: - - dispatch: - switch(_index) { - case 1: - return _wrap_timeseries___isub____SWIG_1(self, argc, argv); - case 2: - return _wrap_timeseries___isub____SWIG_0(self, argc, argv); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'timeseries___isub__'.\n" - " Possible C/C++ prototypes are:\n" - " cmf::math::timeseries::operator -=(cmf::math::timeseries)\n" - " cmf::math::timeseries::operator -=(double)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_timeseries___imul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; - cmf::math::timeseries arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - cmf::math::timeseries *result = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__timeseries, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries___imul__" "', argument " "1"" of type '" "cmf::math::timeseries *""'"); - } - arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); - { - cmf::math::timeseries *p_ts = &arg2; - int res=SWIG_ConvertPtr(swig_obj[1],(void**)(&p_ts),SWIGTYPE_p_cmf__math__timeseries,0); - if (!(SWIG_IsOK(res)) || p_ts==0) { - if (PyNumber_Check(swig_obj[1])) { - double scalar = PyFloat_AsDouble(swig_obj[1]); - arg2 = cmf::math::timeseries::from_scalar(scalar); - } else { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.timeseries object"); - } - } else { - arg2 = *p_ts; - } - } - { - try { - result = (cmf::math::timeseries *) &(arg1)->operator *=(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__timeseries, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_timeseries___imul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - cmf::math::timeseries *result = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__timeseries, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries___imul__" "', argument " "1"" of type '" "cmf::math::timeseries *""'"); - } - arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "timeseries___imul__" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - { - try { - result = (cmf::math::timeseries *) &(arg1)->operator *=(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__timeseries, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_timeseries___imul__(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args,"timeseries___imul__",0,2,argv))) SWIG_fail; - --argc; - { - unsigned long _index = 0; - SWIG_TypeRank _rank = 0; - if (argc == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__math__timeseries, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 1; - if (_rank == _rankm) goto dispatch; - } - } - check_1: - - if (argc == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__math__timeseries, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - void * pt; - int res=SWIG_ConvertPtr(argv[1],&pt,SWIGTYPE_p_cmf__math__timeseries,0); - _v=SWIG_IsOK(res) || PyNumber_Check(argv[1]); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 2; - if (_rank == _rankm) goto dispatch; - } - } - check_2: - - dispatch: - switch(_index) { - case 1: - return _wrap_timeseries___imul____SWIG_1(self, argc, argv); - case 2: - return _wrap_timeseries___imul____SWIG_0(self, argc, argv); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'timeseries___imul__'.\n" - " Possible C/C++ prototypes are:\n" - " cmf::math::timeseries::operator *=(cmf::math::timeseries)\n" - " cmf::math::timeseries::operator *=(double)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_timeseries___itruediv____SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; - cmf::math::timeseries arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - cmf::math::timeseries *result = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__timeseries, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries___itruediv__" "', argument " "1"" of type '" "cmf::math::timeseries *""'"); - } - arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); - { - cmf::math::timeseries *p_ts = &arg2; - int res=SWIG_ConvertPtr(swig_obj[1],(void**)(&p_ts),SWIGTYPE_p_cmf__math__timeseries,0); - if (!(SWIG_IsOK(res)) || p_ts==0) { - if (PyNumber_Check(swig_obj[1])) { - double scalar = PyFloat_AsDouble(swig_obj[1]); - arg2 = cmf::math::timeseries::from_scalar(scalar); - } else { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.timeseries object"); - } - } else { - arg2 = *p_ts; - } - } - { - try { - result = (cmf::math::timeseries *) &(arg1)->operator /=(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__timeseries, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_timeseries___itruediv____SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - cmf::math::timeseries *result = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__timeseries, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries___itruediv__" "', argument " "1"" of type '" "cmf::math::timeseries *""'"); - } - arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "timeseries___itruediv__" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - { - try { - result = (cmf::math::timeseries *) &(arg1)->operator /=(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__timeseries, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_timeseries___itruediv__(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args,"timeseries___itruediv__",0,2,argv))) SWIG_fail; - --argc; - { - unsigned long _index = 0; - SWIG_TypeRank _rank = 0; - if (argc == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__math__timeseries, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 1; - if (_rank == _rankm) goto dispatch; - } - } - check_1: - - if (argc == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__math__timeseries, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - void * pt; - int res=SWIG_ConvertPtr(argv[1],&pt,SWIGTYPE_p_cmf__math__timeseries,0); - _v=SWIG_IsOK(res) || PyNumber_Check(argv[1]); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 2; - if (_rank == _rankm) goto dispatch; - } - } - check_2: - - dispatch: - switch(_index) { - case 1: - return _wrap_timeseries___itruediv____SWIG_1(self, argc, argv); - case 2: - return _wrap_timeseries___itruediv____SWIG_0(self, argc, argv); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'timeseries___itruediv__'.\n" - " Possible C/C++ prototypes are:\n" - " cmf::math::timeseries::operator /=(cmf::math::timeseries)\n" - " cmf::math::timeseries::operator /=(double)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_timeseries___add____SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; - cmf::math::timeseries arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - cmf::math::timeseries result; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries___add__" "', argument " "1"" of type '" "cmf::math::timeseries const *""'"); - } - arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); - { - cmf::math::timeseries *p_ts = &arg2; - int res=SWIG_ConvertPtr(swig_obj[1],(void**)(&p_ts),SWIGTYPE_p_cmf__math__timeseries,0); - if (!(SWIG_IsOK(res)) || p_ts==0) { - if (PyNumber_Check(swig_obj[1])) { - double scalar = PyFloat_AsDouble(swig_obj[1]); - arg2 = cmf::math::timeseries::from_scalar(scalar); - } else { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.timeseries object"); - } - } else { - arg2 = *p_ts; - } - } - { - try { - result = ((cmf::math::timeseries const *)arg1)->operator +(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj((new cmf::math::timeseries(static_cast< const cmf::math::timeseries& >(result))), SWIGTYPE_p_cmf__math__timeseries, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_timeseries___sub____SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; - cmf::math::timeseries arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - cmf::math::timeseries result; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries___sub__" "', argument " "1"" of type '" "cmf::math::timeseries const *""'"); - } - arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); - { - cmf::math::timeseries *p_ts = &arg2; - int res=SWIG_ConvertPtr(swig_obj[1],(void**)(&p_ts),SWIGTYPE_p_cmf__math__timeseries,0); - if (!(SWIG_IsOK(res)) || p_ts==0) { - if (PyNumber_Check(swig_obj[1])) { - double scalar = PyFloat_AsDouble(swig_obj[1]); - arg2 = cmf::math::timeseries::from_scalar(scalar); - } else { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.timeseries object"); - } - } else { - arg2 = *p_ts; - } - } - { - try { - result = ((cmf::math::timeseries const *)arg1)->operator -(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj((new cmf::math::timeseries(static_cast< const cmf::math::timeseries& >(result))), SWIGTYPE_p_cmf__math__timeseries, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_timeseries___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; - cmf::math::timeseries arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - cmf::math::timeseries result; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries___mul__" "', argument " "1"" of type '" "cmf::math::timeseries const *""'"); - } - arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); - { - cmf::math::timeseries *p_ts = &arg2; - int res=SWIG_ConvertPtr(swig_obj[1],(void**)(&p_ts),SWIGTYPE_p_cmf__math__timeseries,0); - if (!(SWIG_IsOK(res)) || p_ts==0) { - if (PyNumber_Check(swig_obj[1])) { - double scalar = PyFloat_AsDouble(swig_obj[1]); - arg2 = cmf::math::timeseries::from_scalar(scalar); - } else { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.timeseries object"); - } - } else { - arg2 = *p_ts; - } - } - { - try { - result = ((cmf::math::timeseries const *)arg1)->operator *(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj((new cmf::math::timeseries(static_cast< const cmf::math::timeseries& >(result))), SWIGTYPE_p_cmf__math__timeseries, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_timeseries___truediv____SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; - cmf::math::timeseries arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - cmf::math::timeseries result; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries___truediv__" "', argument " "1"" of type '" "cmf::math::timeseries const *""'"); - } - arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); - { - cmf::math::timeseries *p_ts = &arg2; - int res=SWIG_ConvertPtr(swig_obj[1],(void**)(&p_ts),SWIGTYPE_p_cmf__math__timeseries,0); - if (!(SWIG_IsOK(res)) || p_ts==0) { - if (PyNumber_Check(swig_obj[1])) { - double scalar = PyFloat_AsDouble(swig_obj[1]); - arg2 = cmf::math::timeseries::from_scalar(scalar); - } else { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.timeseries object"); - } - } else { - arg2 = *p_ts; - } - } - { - try { - result = ((cmf::math::timeseries const *)arg1)->operator /(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj((new cmf::math::timeseries(static_cast< const cmf::math::timeseries& >(result))), SWIGTYPE_p_cmf__math__timeseries, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_timeseries___add____SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - cmf::math::timeseries result; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries___add__" "', argument " "1"" of type '" "cmf::math::timeseries const *""'"); - } - arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "timeseries___add__" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - { - try { - result = ((cmf::math::timeseries const *)arg1)->operator +(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj((new cmf::math::timeseries(static_cast< const cmf::math::timeseries& >(result))), SWIGTYPE_p_cmf__math__timeseries, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_timeseries___add__(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args,"timeseries___add__",0,2,argv))) SWIG_fail; - --argc; - { - unsigned long _index = 0; - SWIG_TypeRank _rank = 0; - if (argc == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__math__timeseries, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 1; - if (_rank == _rankm) goto dispatch; - } - } - check_1: - - if (argc == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__math__timeseries, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - void * pt; - int res=SWIG_ConvertPtr(argv[1],&pt,SWIGTYPE_p_cmf__math__timeseries,0); - _v=SWIG_IsOK(res) || PyNumber_Check(argv[1]); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 2; - if (_rank == _rankm) goto dispatch; - } - } - check_2: - - dispatch: - switch(_index) { - case 1: - return _wrap_timeseries___add____SWIG_1(self, argc, argv); - case 2: - return _wrap_timeseries___add____SWIG_0(self, argc, argv); - } - } - -fail: - Py_INCREF(Py_NotImplemented); - return Py_NotImplemented; -} - - -SWIGINTERN PyObject *_wrap_timeseries___sub____SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - cmf::math::timeseries result; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries___sub__" "', argument " "1"" of type '" "cmf::math::timeseries const *""'"); - } - arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "timeseries___sub__" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - { - try { - result = ((cmf::math::timeseries const *)arg1)->operator -(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj((new cmf::math::timeseries(static_cast< const cmf::math::timeseries& >(result))), SWIGTYPE_p_cmf__math__timeseries, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_timeseries___sub__(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args,"timeseries___sub__",0,2,argv))) SWIG_fail; - --argc; - { - unsigned long _index = 0; - SWIG_TypeRank _rank = 0; - if (argc == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__math__timeseries, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 1; - if (_rank == _rankm) goto dispatch; - } - } - check_1: - - if (argc == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__math__timeseries, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - void * pt; - int res=SWIG_ConvertPtr(argv[1],&pt,SWIGTYPE_p_cmf__math__timeseries,0); - _v=SWIG_IsOK(res) || PyNumber_Check(argv[1]); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 2; - if (_rank == _rankm) goto dispatch; - } - } - check_2: - - dispatch: - switch(_index) { - case 1: - return _wrap_timeseries___sub____SWIG_1(self, argc, argv); - case 2: - return _wrap_timeseries___sub____SWIG_0(self, argc, argv); - } - } - -fail: - Py_INCREF(Py_NotImplemented); - return Py_NotImplemented; -} - - -SWIGINTERN PyObject *_wrap_timeseries___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - cmf::math::timeseries result; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries___mul__" "', argument " "1"" of type '" "cmf::math::timeseries const *""'"); - } - arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "timeseries___mul__" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - { - try { - result = ((cmf::math::timeseries const *)arg1)->operator *(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj((new cmf::math::timeseries(static_cast< const cmf::math::timeseries& >(result))), SWIGTYPE_p_cmf__math__timeseries, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_timeseries___mul__(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args,"timeseries___mul__",0,2,argv))) SWIG_fail; - --argc; - { - unsigned long _index = 0; - SWIG_TypeRank _rank = 0; - if (argc == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__math__timeseries, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 1; - if (_rank == _rankm) goto dispatch; - } - } - check_1: - - if (argc == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__math__timeseries, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - void * pt; - int res=SWIG_ConvertPtr(argv[1],&pt,SWIGTYPE_p_cmf__math__timeseries,0); - _v=SWIG_IsOK(res) || PyNumber_Check(argv[1]); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 2; - if (_rank == _rankm) goto dispatch; - } - } - check_2: - - dispatch: - switch(_index) { - case 1: - return _wrap_timeseries___mul____SWIG_1(self, argc, argv); - case 2: - return _wrap_timeseries___mul____SWIG_0(self, argc, argv); - } - } - -fail: - Py_INCREF(Py_NotImplemented); - return Py_NotImplemented; -} - - -SWIGINTERN PyObject *_wrap_timeseries___truediv____SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - cmf::math::timeseries result; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries___truediv__" "', argument " "1"" of type '" "cmf::math::timeseries const *""'"); - } - arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "timeseries___truediv__" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - { - try { - result = ((cmf::math::timeseries const *)arg1)->operator /(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj((new cmf::math::timeseries(static_cast< const cmf::math::timeseries& >(result))), SWIGTYPE_p_cmf__math__timeseries, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_timeseries___truediv__(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args,"timeseries___truediv__",0,2,argv))) SWIG_fail; - --argc; - { - unsigned long _index = 0; - SWIG_TypeRank _rank = 0; - if (argc == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__math__timeseries, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 1; - if (_rank == _rankm) goto dispatch; - } - } - check_1: - - if (argc == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__math__timeseries, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - void * pt; - int res=SWIG_ConvertPtr(argv[1],&pt,SWIGTYPE_p_cmf__math__timeseries,0); - _v=SWIG_IsOK(res) || PyNumber_Check(argv[1]); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 2; - if (_rank == _rankm) goto dispatch; - } - } - check_2: - - dispatch: - switch(_index) { - case 1: - return _wrap_timeseries___truediv____SWIG_1(self, argc, argv); - case 2: - return _wrap_timeseries___truediv____SWIG_0(self, argc, argv); - } - } - -fail: - Py_INCREF(Py_NotImplemented); - return Py_NotImplemented; -} - - -SWIGINTERN PyObject *_wrap_timeseries___neg__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::math::timeseries result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries___neg__" "', argument " "1"" of type '" "cmf::math::timeseries const *""'"); - } - arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); - { - try { - result = ((cmf::math::timeseries const *)arg1)->operator -(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj((new cmf::math::timeseries(static_cast< const cmf::math::timeseries& >(result))), SWIGTYPE_p_cmf__math__timeseries, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_timeseries_inv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::math::timeseries result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries_inv" "', argument " "1"" of type '" "cmf::math::timeseries const *""'"); - } - arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); - { - try { - result = ((cmf::math::timeseries const *)arg1)->inv(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj((new cmf::math::timeseries(static_cast< const cmf::math::timeseries& >(result))), SWIGTYPE_p_cmf__math__timeseries, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_timeseries_reduce_min(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; - cmf::math::Time arg2 ; - cmf::math::Time arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "begin",(char *) "step", NULL - }; - cmf::math::timeseries result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:timeseries_reduce_min",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries_reduce_min" "', argument " "1"" of type '" "cmf::math::timeseries const *""'"); - } - arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); - { - arg2 = convert_datetime_to_cmftime(obj1); - if (arg2 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } - } - { - arg3 = convert_datetime_to_cmftime(obj2); - if (arg3 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } - } - { - try { - result = ((cmf::math::timeseries const *)arg1)->reduce_min(arg2,arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj((new cmf::math::timeseries(static_cast< const cmf::math::timeseries& >(result))), SWIGTYPE_p_cmf__math__timeseries, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_timeseries_reduce_max(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; - cmf::math::Time arg2 ; - cmf::math::Time arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "begin",(char *) "step", NULL - }; - cmf::math::timeseries result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:timeseries_reduce_max",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries_reduce_max" "', argument " "1"" of type '" "cmf::math::timeseries const *""'"); - } - arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); - { - arg2 = convert_datetime_to_cmftime(obj1); - if (arg2 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } - } - { - arg3 = convert_datetime_to_cmftime(obj2); - if (arg3 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } - } - { - try { - result = ((cmf::math::timeseries const *)arg1)->reduce_max(arg2,arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj((new cmf::math::timeseries(static_cast< const cmf::math::timeseries& >(result))), SWIGTYPE_p_cmf__math__timeseries, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_timeseries_reduce_sum(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; - cmf::math::Time arg2 ; - cmf::math::Time arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "begin",(char *) "step", NULL - }; - cmf::math::timeseries result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:timeseries_reduce_sum",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries_reduce_sum" "', argument " "1"" of type '" "cmf::math::timeseries const *""'"); - } - arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); - { - arg2 = convert_datetime_to_cmftime(obj1); - if (arg2 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } - } - { - arg3 = convert_datetime_to_cmftime(obj2); - if (arg3 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } - } - { - try { - result = ((cmf::math::timeseries const *)arg1)->reduce_sum(arg2,arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj((new cmf::math::timeseries(static_cast< const cmf::math::timeseries& >(result))), SWIGTYPE_p_cmf__math__timeseries, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_timeseries_reduce_avg(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; - cmf::math::Time arg2 ; - cmf::math::Time arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "begin",(char *) "step", NULL - }; - cmf::math::timeseries result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:timeseries_reduce_avg",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries_reduce_avg" "', argument " "1"" of type '" "cmf::math::timeseries const *""'"); - } - arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); - { - arg2 = convert_datetime_to_cmftime(obj1); - if (arg2 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } - } - { - arg3 = convert_datetime_to_cmftime(obj2); - if (arg3 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } - } - { - try { - result = ((cmf::math::timeseries const *)arg1)->reduce_avg(arg2,arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj((new cmf::math::timeseries(static_cast< const cmf::math::timeseries& >(result))), SWIGTYPE_p_cmf__math__timeseries, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_timeseries_floating_avg__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; - cmf::math::Time arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - cmf::math::timeseries result; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries_floating_avg" "', argument " "1"" of type '" "cmf::math::timeseries const *""'"); - } - arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); - { - arg2 = convert_datetime_to_cmftime(swig_obj[1]); - if (arg2 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } - } - { - try { - result = ((cmf::math::timeseries const *)arg1)->floating_avg(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj((new cmf::math::timeseries(static_cast< const cmf::math::timeseries& >(result))), SWIGTYPE_p_cmf__math__timeseries, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_timeseries_floating_avg__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; - size_t arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - size_t val2 ; - int ecode2 = 0 ; - cmf::math::timeseries result; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries_floating_avg" "', argument " "1"" of type '" "cmf::math::timeseries const *""'"); - } - arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); - ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "timeseries_floating_avg" "', argument " "2"" of type '" "size_t""'"); - } - arg2 = static_cast< size_t >(val2); - { - try { - result = ((cmf::math::timeseries const *)arg1)->floating_avg(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj((new cmf::math::timeseries(static_cast< const cmf::math::timeseries& >(result))), SWIGTYPE_p_cmf__math__timeseries, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_timeseries_floating_avg(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args,"timeseries_floating_avg",0,2,argv))) SWIG_fail; - --argc; - { - unsigned long _index = 0; - SWIG_TypeRank _rank = 0; - if (argc == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__math__timeseries, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - _v = check_time(argv[1]); - } - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 1; - if (_rank == _rankm) goto dispatch; - } - } - check_1: - - if (argc == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__math__timeseries, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - int res = SWIG_AsVal_size_t(argv[1], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 2; - if (_rank == _rankm) goto dispatch; - } - } - check_2: - - dispatch: - switch(_index) { - case 1: - return _wrap_timeseries_floating_avg__SWIG_0(self, argc, argv); - case 2: - return _wrap_timeseries_floating_avg__SWIG_1(self, argc, argv); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'timeseries_floating_avg'.\n" - " Possible C/C++ prototypes are:\n" - " cmf::math::timeseries::floating_avg(cmf::math::Time) const\n" - " cmf::math::timeseries::floating_avg(size_t) const\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_timeseries_floating_max(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; - cmf::math::Time arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "window_width", NULL - }; - cmf::math::timeseries result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:timeseries_floating_max",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries_floating_max" "', argument " "1"" of type '" "cmf::math::timeseries const *""'"); - } - arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); - { - arg2 = convert_datetime_to_cmftime(obj1); - if (arg2 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } - } - { - try { - result = ((cmf::math::timeseries const *)arg1)->floating_max(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj((new cmf::math::timeseries(static_cast< const cmf::math::timeseries& >(result))), SWIGTYPE_p_cmf__math__timeseries, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_timeseries_floating_min(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; - cmf::math::Time arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "window_width", NULL - }; - cmf::math::timeseries result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:timeseries_floating_min",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries_floating_min" "', argument " "1"" of type '" "cmf::math::timeseries const *""'"); - } - arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); - { - arg2 = convert_datetime_to_cmftime(obj1); - if (arg2 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } - } - { - try { - result = ((cmf::math::timeseries const *)arg1)->floating_min(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj((new cmf::math::timeseries(static_cast< const cmf::math::timeseries& >(result))), SWIGTYPE_p_cmf__math__timeseries, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_timeseries_mean(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - double result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries_mean" "', argument " "1"" of type '" "cmf::math::timeseries const *""'"); - } - arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); - { - try { - result = (double)((cmf::math::timeseries const *)arg1)->mean(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_timeseries_min(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - double result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries_min" "', argument " "1"" of type '" "cmf::math::timeseries const *""'"); - } - arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); - { - try { - result = (double)((cmf::math::timeseries const *)arg1)->min(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_timeseries_max(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - double result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries_max" "', argument " "1"" of type '" "cmf::math::timeseries const *""'"); - } - arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); - { - try { - result = (double)((cmf::math::timeseries const *)arg1)->max(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_timeseries_log(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::math::timeseries result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries_log" "', argument " "1"" of type '" "cmf::math::timeseries const *""'"); - } - arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); - { - try { - result = ((cmf::math::timeseries const *)arg1)->log(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj((new cmf::math::timeseries(static_cast< const cmf::math::timeseries& >(result))), SWIGTYPE_p_cmf__math__timeseries, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_timeseries_log10(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::math::timeseries result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries_log10" "', argument " "1"" of type '" "cmf::math::timeseries const *""'"); - } - arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); - { - try { - result = ((cmf::math::timeseries const *)arg1)->log10(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj((new cmf::math::timeseries(static_cast< const cmf::math::timeseries& >(result))), SWIGTYPE_p_cmf__math__timeseries, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_timeseries_power(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "exponent", NULL - }; - cmf::math::timeseries result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:timeseries_power",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries_power" "', argument " "1"" of type '" "cmf::math::timeseries const *""'"); - } - arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "timeseries_power" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - { - try { - result = ((cmf::math::timeseries const *)arg1)->power(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj((new cmf::math::timeseries(static_cast< const cmf::math::timeseries& >(result))), SWIGTYPE_p_cmf__math__timeseries, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_timeseries_exp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::math::timeseries result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries_exp" "', argument " "1"" of type '" "cmf::math::timeseries const *""'"); - } - arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); - { - try { - result = ((cmf::math::timeseries const *)arg1)->exp(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj((new cmf::math::timeseries(static_cast< const cmf::math::timeseries& >(result))), SWIGTYPE_p_cmf__math__timeseries, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_timeseries_begin_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::math::Time *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries_begin_get" "', argument " "1"" of type '" "cmf::math::timeseries *""'"); - } - arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); - { - try { - result = (cmf::math::Time *)cmf_math_timeseries_begin_get(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__Time, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_timeseries_step_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::math::Time *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries_step_get" "', argument " "1"" of type '" "cmf::math::timeseries *""'"); - } - arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); - { - try { - result = (cmf::math::Time *)cmf_math_timeseries_step_get(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__Time, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_timeseries_end_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::math::Time *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries_end_get" "', argument " "1"" of type '" "cmf::math::timeseries *""'"); - } - arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); - { - try { - result = (cmf::math::Time *)cmf_math_timeseries_end_get(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__Time, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_timeseries___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - ptrdiff_t result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries___len__" "', argument " "1"" of type '" "cmf::math::timeseries *""'"); - } - arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); - { - try { - result = cmf_math_timeseries___len__(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_ptrdiff_t(static_cast< ptrdiff_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_timeseries(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__timeseries, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_timeseries" "', argument " "1"" of type '" "cmf::math::timeseries *""'"); - } - arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); - { - try { - delete arg1; - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *timeseries_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__math__timeseries, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *timeseries_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_nash_sutcliffe(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::math::timeseries *arg1 = 0 ; - cmf::math::timeseries *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "model",(char *) "observation", NULL - }; - double result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:nash_sutcliffe",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_cmf__math__timeseries, 0 | SWIG_POINTER_IMPLICIT_CONV); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "nash_sutcliffe" "', argument " "1"" of type '" "cmf::math::timeseries const &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "nash_sutcliffe" "', argument " "1"" of type '" "cmf::math::timeseries const &""'"); - } - arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_cmf__math__timeseries, 0 | SWIG_POINTER_IMPLICIT_CONV); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "nash_sutcliffe" "', argument " "2"" of type '" "cmf::math::timeseries const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "nash_sutcliffe" "', argument " "2"" of type '" "cmf::math::timeseries const &""'"); - } - arg2 = reinterpret_cast< cmf::math::timeseries * >(argp2); - { - try { - result = (double)cmf::math::nash_sutcliffe((cmf::math::timeseries const &)*arg1,(cmf::math::timeseries const &)*arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_integratable_integrate(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::math::integratable *arg1 = (cmf::math::integratable *) 0 ; - cmf::math::Time arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::math::integratable > tempshared1 ; - std::shared_ptr< cmf::math::integratable > *smartarg1 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "t", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:integratable_integrate",kwnames,&obj0,&obj1)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__math__integratable_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "integratable_integrate" "', argument " "1"" of type '" "cmf::math::integratable *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::math::integratable > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::math::integratable > * >(argp1); - arg1 = const_cast< cmf::math::integratable * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::math::integratable > * >(argp1); - arg1 = const_cast< cmf::math::integratable * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - arg2 = convert_datetime_to_cmftime(obj1); - if (arg2 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } - } - { - try { - (arg1)->integrate(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_integratable_reset(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::math::integratable *arg1 = (cmf::math::integratable *) 0 ; - cmf::math::Time arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::math::integratable > tempshared1 ; - std::shared_ptr< cmf::math::integratable > *smartarg1 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "t", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:integratable_reset",kwnames,&obj0,&obj1)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__math__integratable_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "integratable_reset" "', argument " "1"" of type '" "cmf::math::integratable *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::math::integratable > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::math::integratable > * >(argp1); - arg1 = const_cast< cmf::math::integratable * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::math::integratable > * >(argp1); - arg1 = const_cast< cmf::math::integratable * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - arg2 = convert_datetime_to_cmftime(obj1); - if (arg2 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } - } - { - try { - (arg1)->reset(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_integratable_sum(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::integratable *arg1 = (cmf::math::integratable *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::math::integratable const > tempshared1 ; - std::shared_ptr< cmf::math::integratable const > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - double result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__math__integratable_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "integratable_sum" "', argument " "1"" of type '" "cmf::math::integratable const *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::math::integratable > * >(argp1); - delete reinterpret_cast< std::shared_ptr< const cmf::math::integratable > * >(argp1); - arg1 = const_cast< cmf::math::integratable * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::math::integratable > * >(argp1); - arg1 = const_cast< cmf::math::integratable * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - try { - result = (double)((cmf::math::integratable const *)arg1)->sum(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_integratable_avg(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::integratable *arg1 = (cmf::math::integratable *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::math::integratable const > tempshared1 ; - std::shared_ptr< cmf::math::integratable const > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - double result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__math__integratable_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "integratable_avg" "', argument " "1"" of type '" "cmf::math::integratable const *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::math::integratable > * >(argp1); - delete reinterpret_cast< std::shared_ptr< const cmf::math::integratable > * >(argp1); - arg1 = const_cast< cmf::math::integratable * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::math::integratable > * >(argp1); - arg1 = const_cast< cmf::math::integratable * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - try { - result = (double)((cmf::math::integratable const *)arg1)->avg(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_integratable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::integratable *arg1 = (cmf::math::integratable *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::math::integratable > tempshared1 ; - std::shared_ptr< cmf::math::integratable > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__math__integratable_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_integratable" "', argument " "1"" of type '" "cmf::math::integratable *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::math::integratable > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::math::integratable > * >(argp1); - arg1 = const_cast< cmf::math::integratable * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::math::integratable > * >(argp1); - arg1 = const_cast< cmf::math::integratable * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - try { - (void)arg1; delete smartarg1; - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *integratable_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_cmf__math__integratable_t, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *_wrap_integratable_list_append(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::math::integratable_list *arg1 = (cmf::math::integratable_list *) 0 ; - cmf::math::integratable::ptr arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "add", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:integratable_list_append",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__math__integratable_list, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "integratable_list_append" "', argument " "1"" of type '" "cmf::math::integratable_list *""'"); - } - arg1 = reinterpret_cast< cmf::math::integratable_list * >(argp1); - { - int newmem = 0; - res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__math__integratable_t, 0 , &newmem); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "integratable_list_append" "', argument " "2"" of type '" "cmf::math::integratable::ptr""'"); - } - if (argp2) arg2 = *(reinterpret_cast< cmf::math::integratable::ptr * >(argp2)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::math::integratable::ptr * >(argp2); - } - { - try { - (arg1)->append(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_integratable_list_remove(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::math::integratable_list *arg1 = (cmf::math::integratable_list *) 0 ; - cmf::math::integratable::ptr arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "rm", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:integratable_list_remove",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__math__integratable_list, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "integratable_list_remove" "', argument " "1"" of type '" "cmf::math::integratable_list *""'"); - } - arg1 = reinterpret_cast< cmf::math::integratable_list * >(argp1); - { - int newmem = 0; - res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__math__integratable_t, 0 , &newmem); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "integratable_list_remove" "', argument " "2"" of type '" "cmf::math::integratable::ptr""'"); - } - if (argp2) arg2 = *(reinterpret_cast< cmf::math::integratable::ptr * >(argp2)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::math::integratable::ptr * >(argp2); - } - { - try { - (arg1)->remove(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_integratable_list___getitem(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::math::integratable_list *arg1 = (cmf::math::integratable_list *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "index", NULL - }; - cmf::math::integratable::ptr result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:integratable_list___getitem",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__math__integratable_list, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "integratable_list___getitem" "', argument " "1"" of type '" "cmf::math::integratable_list const *""'"); - } - arg1 = reinterpret_cast< cmf::math::integratable_list * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "integratable_list___getitem" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - { - try { - result = ((cmf::math::integratable_list const *)arg1)->operator [](arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - std::shared_ptr< cmf::math::integratable > *smartresult = result ? new std::shared_ptr< cmf::math::integratable >(result) : 0; - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__math__integratable_t, SWIG_POINTER_OWN); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_integratable_list_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::integratable_list *arg1 = (cmf::math::integratable_list *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - size_t result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__integratable_list, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "integratable_list_size" "', argument " "1"" of type '" "cmf::math::integratable_list const *""'"); - } - arg1 = reinterpret_cast< cmf::math::integratable_list * >(argp1); - { - try { - result = ((cmf::math::integratable_list const *)arg1)->size(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_integratable_list_avg(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::integratable_list *arg1 = (cmf::math::integratable_list *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::math::num_array result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__integratable_list, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "integratable_list_avg" "', argument " "1"" of type '" "cmf::math::integratable_list const *""'"); - } - arg1 = reinterpret_cast< cmf::math::integratable_list * >(argp1); - { - try { - result = ((cmf::math::integratable_list const *)arg1)->avg(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - resultobj = as_npy_array(result); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_integratable_list_sum(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::integratable_list *arg1 = (cmf::math::integratable_list *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::math::num_array result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__integratable_list, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "integratable_list_sum" "', argument " "1"" of type '" "cmf::math::integratable_list const *""'"); - } - arg1 = reinterpret_cast< cmf::math::integratable_list * >(argp1); - { - try { - result = ((cmf::math::integratable_list const *)arg1)->sum(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - resultobj = as_npy_array(result); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_integratable_list_reset(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::math::integratable_list *arg1 = (cmf::math::integratable_list *) 0 ; - cmf::math::Time arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "t", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:integratable_list_reset",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__math__integratable_list, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "integratable_list_reset" "', argument " "1"" of type '" "cmf::math::integratable_list *""'"); - } - arg1 = reinterpret_cast< cmf::math::integratable_list * >(argp1); - { - arg2 = convert_datetime_to_cmftime(obj1); - if (arg2 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } - } - { - try { - (arg1)->reset(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_integratable_list_integrate(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::math::integratable_list *arg1 = (cmf::math::integratable_list *) 0 ; - cmf::math::Time arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "t", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:integratable_list_integrate",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__math__integratable_list, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "integratable_list_integrate" "', argument " "1"" of type '" "cmf::math::integratable_list *""'"); - } - arg1 = reinterpret_cast< cmf::math::integratable_list * >(argp1); - { - arg2 = convert_datetime_to_cmftime(obj1); - if (arg2 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } - } - { - try { - (arg1)->integrate(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_integratable_list__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) { - PyObject *resultobj = 0; - cmf::math::integratable_list *result = 0 ; - - if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; - { - try { - result = (cmf::math::integratable_list *)new cmf::math::integratable_list(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__integratable_list, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_integratable_list__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::math::integratable_list *arg1 = 0 ; - cmf::math::integratable_list temp_list1 ; - cmf::math::integratable_list *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - { - if (SWIG_ConvertPtr(swig_obj[0], (void **) &arg1, SWIGTYPE_p_cmf__math__integratable_list, SWIG_POINTER_EXCEPTION) == -1) { - int res = iterable_to_list(swig_obj[0],SWIGTYPE_p_std__shared_ptrT_cmf__math__integratable_t, temp_list1); - if (SWIG_IsOK(res)) { - arg1 = &temp_list1; - } else { - SWIG_exception_fail(SWIG_TypeError,"Only iterables can be converted to cmf::math::integratable_list"); - } - } - } - { - try { - result = (cmf::math::integratable_list *)new cmf::math::integratable_list((cmf::math::integratable_list const &)*arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__integratable_list, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_integratable_list(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[2] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args,"new_integratable_list",0,1,argv))) SWIG_fail; - --argc; - { - unsigned long _index = 0; - SWIG_TypeRank _rank = 0; - if (argc == 0) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 1; - if (_rank == _rankm) goto dispatch; - } - } - if (argc == 1) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - { - _v = is_listtype_or_iterable(argv[0],SWIGTYPE_p_cmf__math__integratable_list); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 2; - if (_rank == _rankm) goto dispatch; - } - } - check_2: - - dispatch: - switch(_index) { - case 1: - return _wrap_new_integratable_list__SWIG_0(self, argc, argv); - case 2: - return _wrap_new_integratable_list__SWIG_1(self, argc, argv); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_integratable_list'.\n" - " Possible C/C++ prototypes are:\n" - " cmf::math::integratable_list::integratable_list()\n" - " cmf::math::integratable_list::integratable_list(cmf::math::integratable_list const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_integratable_list___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::integratable_list *arg1 = (cmf::math::integratable_list *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - size_t result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__integratable_list, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "integratable_list___len__" "', argument " "1"" of type '" "cmf::math::integratable_list const *""'"); - } - arg1 = reinterpret_cast< cmf::math::integratable_list * >(argp1); - { - try { - result = cmf_math_integratable_list___len__((cmf::math::integratable_list const *)arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_integratable_list(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::integratable_list *arg1 = (cmf::math::integratable_list *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__integratable_list, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_integratable_list" "', argument " "1"" of type '" "cmf::math::integratable_list *""'"); - } - arg1 = reinterpret_cast< cmf::math::integratable_list * >(argp1); - { - try { - delete arg1; - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *integratable_list_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__math__integratable_list, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *integratable_list_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_StateVariable_dxdt(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::math::StateVariable *arg1 = (cmf::math::StateVariable *) 0 ; - cmf::math::Time *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::math::StateVariable > tempshared1 ; - std::shared_ptr< cmf::math::StateVariable > *smartarg1 = 0 ; - cmf::math::Time T2 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "time", NULL - }; - real result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:StateVariable_dxdt",kwnames,&obj0,&obj1)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__math__StateVariable_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StateVariable_dxdt" "', argument " "1"" of type '" "cmf::math::StateVariable *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::math::StateVariable > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::math::StateVariable > * >(argp1); - arg1 = const_cast< cmf::math::StateVariable * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::math::StateVariable > * >(argp1); - arg1 = const_cast< cmf::math::StateVariable * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - // typemape const Time& - T2 = convert_datetime_to_cmftime(obj1); - if (T2 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } else { - arg2 = &T2; - } - } - { - try { - result = (real)(arg1)->dxdt((cmf::math::Time const &)*arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StateVariable_get_abs_errtol(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::math::StateVariable *arg1 = (cmf::math::StateVariable *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::math::StateVariable const > tempshared1 ; - std::shared_ptr< cmf::math::StateVariable const > *smartarg1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "rel_errtol", NULL - }; - real result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:StateVariable_get_abs_errtol",kwnames,&obj0,&obj1)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__math__StateVariable_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StateVariable_get_abs_errtol" "', argument " "1"" of type '" "cmf::math::StateVariable const *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::math::StateVariable > * >(argp1); - delete reinterpret_cast< std::shared_ptr< const cmf::math::StateVariable > * >(argp1); - arg1 = const_cast< cmf::math::StateVariable * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::math::StateVariable > * >(argp1); - arg1 = const_cast< cmf::math::StateVariable * >((smartarg1 ? smartarg1->get() : 0)); - } - } - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StateVariable_get_abs_errtol" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - { - try { - result = (real)((cmf::math::StateVariable const *)arg1)->get_abs_errtol(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StateVariable_to_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::StateVariable *arg1 = (cmf::math::StateVariable *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::math::StateVariable const > tempshared1 ; - std::shared_ptr< cmf::math::StateVariable const > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - std::string result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__math__StateVariable_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StateVariable_to_string" "', argument " "1"" of type '" "cmf::math::StateVariable const *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::math::StateVariable > * >(argp1); - delete reinterpret_cast< std::shared_ptr< const cmf::math::StateVariable > * >(argp1); - arg1 = const_cast< cmf::math::StateVariable * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::math::StateVariable > * >(argp1); - arg1 = const_cast< cmf::math::StateVariable * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - try { - result = ((cmf::math::StateVariable const *)arg1)->to_string(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_std_string(static_cast< std::string >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_StateVariable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::StateVariable *arg1 = (cmf::math::StateVariable *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::math::StateVariable > tempshared1 ; - std::shared_ptr< cmf::math::StateVariable > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__math__StateVariable_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_StateVariable" "', argument " "1"" of type '" "cmf::math::StateVariable *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::math::StateVariable > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::math::StateVariable > * >(argp1); - arg1 = const_cast< cmf::math::StateVariable * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::math::StateVariable > * >(argp1); - arg1 = const_cast< cmf::math::StateVariable * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - try { - (void)arg1; delete smartarg1; - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StateVariable_state_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::StateVariable *arg1 = (cmf::math::StateVariable *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::math::StateVariable > tempshared1 ; - std::shared_ptr< cmf::math::StateVariable > *smartarg1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"StateVariable_state_set",2,2,swig_obj)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__math__StateVariable_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StateVariable_state_set" "', argument " "1"" of type '" "cmf::math::StateVariable *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::math::StateVariable > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::math::StateVariable > * >(argp1); - arg1 = const_cast< cmf::math::StateVariable * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::math::StateVariable > * >(argp1); - arg1 = const_cast< cmf::math::StateVariable * >((smartarg1 ? smartarg1->get() : 0)); - } - } - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StateVariable_state_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - { - try { - cmf_math_StateVariable_state_set(arg1,arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StateVariable_state_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::StateVariable *arg1 = (cmf::math::StateVariable *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::math::StateVariable > tempshared1 ; - std::shared_ptr< cmf::math::StateVariable > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__math__StateVariable_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StateVariable_state_get" "', argument " "1"" of type '" "cmf::math::StateVariable *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::math::StateVariable > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::math::StateVariable > * >(argp1); - arg1 = const_cast< cmf::math::StateVariable * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::math::StateVariable > * >(argp1); - arg1 = const_cast< cmf::math::StateVariable * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - try { - result = (real)cmf_math_StateVariable_state_get(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *StateVariable_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_cmf__math__StateVariable_t, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *_wrap_StateVariableOwner_get_states(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::StateVariableOwner *arg1 = (cmf::math::StateVariableOwner *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::math::StateVariableList result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__StateVariableOwner, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StateVariableOwner_get_states" "', argument " "1"" of type '" "cmf::math::StateVariableOwner *""'"); - } - arg1 = reinterpret_cast< cmf::math::StateVariableOwner * >(argp1); - { - try { - result = (arg1)->get_states(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj((new cmf::math::StateVariableList(static_cast< const cmf::math::StateVariableList& >(result))), SWIGTYPE_p_cmf__math__StateVariableList, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_StateVariableOwner(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::StateVariableOwner *arg1 = (cmf::math::StateVariableOwner *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__StateVariableOwner, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_StateVariableOwner" "', argument " "1"" of type '" "cmf::math::StateVariableOwner *""'"); - } - arg1 = reinterpret_cast< cmf::math::StateVariableOwner * >(argp1); - { - try { - delete arg1; - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *StateVariableOwner_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__math__StateVariableOwner, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *_wrap_StateVariableList_append(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::math::StateVariableList *arg1 = (cmf::math::StateVariableList *) 0 ; - cmf::math::StateVariable::ptr arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "sv", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:StateVariableList_append",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__math__StateVariableList, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StateVariableList_append" "', argument " "1"" of type '" "cmf::math::StateVariableList *""'"); - } - arg1 = reinterpret_cast< cmf::math::StateVariableList * >(argp1); - { - int newmem = 0; - res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__math__StateVariable_t, 0 , &newmem); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StateVariableList_append" "', argument " "2"" of type '" "cmf::math::StateVariable::ptr""'"); - } - if (argp2) arg2 = *(reinterpret_cast< cmf::math::StateVariable::ptr * >(argp2)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::math::StateVariable::ptr * >(argp2); - } - { - try { - (arg1)->append(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StateVariableList_extend(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::math::StateVariableList *arg1 = (cmf::math::StateVariableList *) 0 ; - cmf::math::StateVariableOwner *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "svo", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:StateVariableList_extend",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__math__StateVariableList, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StateVariableList_extend" "', argument " "1"" of type '" "cmf::math::StateVariableList *""'"); - } - arg1 = reinterpret_cast< cmf::math::StateVariableList * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_cmf__math__StateVariableOwner, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StateVariableList_extend" "', argument " "2"" of type '" "cmf::math::StateVariableOwner &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StateVariableList_extend" "', argument " "2"" of type '" "cmf::math::StateVariableOwner &""'"); - } - arg2 = reinterpret_cast< cmf::math::StateVariableOwner * >(argp2); - { - try { - (arg1)->extend(*arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StateVariableList___iadd____SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::math::StateVariableList *arg1 = (cmf::math::StateVariableList *) 0 ; - cmf::math::StateVariableList *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - cmf::math::StateVariableList temp_list2 ; - cmf::math::StateVariableList *result = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__StateVariableList, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StateVariableList___iadd__" "', argument " "1"" of type '" "cmf::math::StateVariableList *""'"); - } - arg1 = reinterpret_cast< cmf::math::StateVariableList * >(argp1); - { - if (SWIG_ConvertPtr(swig_obj[1], (void **) &arg2, SWIGTYPE_p_cmf__math__StateVariableList, SWIG_POINTER_EXCEPTION) == -1) { - int res = iterable_to_list(swig_obj[1],SWIGTYPE_p_std__shared_ptrT_cmf__math__StateVariable_t, temp_list2); - if (SWIG_IsOK(res)) { - arg2 = &temp_list2; - } else { - SWIG_exception_fail(SWIG_TypeError,"Only iterables can be converted to cmf::math::StateVariableList"); - } - } - } - { - try { - result = (cmf::math::StateVariableList *) &(arg1)->operator +=((cmf::math::StateVariableList const &)*arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__StateVariableList, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StateVariableList___iadd____SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::math::StateVariableList *arg1 = (cmf::math::StateVariableList *) 0 ; - cmf::math::StateVariableOwner *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - cmf::math::StateVariableList *result = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__StateVariableList, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StateVariableList___iadd__" "', argument " "1"" of type '" "cmf::math::StateVariableList *""'"); - } - arg1 = reinterpret_cast< cmf::math::StateVariableList * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_cmf__math__StateVariableOwner, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StateVariableList___iadd__" "', argument " "2"" of type '" "cmf::math::StateVariableOwner &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StateVariableList___iadd__" "', argument " "2"" of type '" "cmf::math::StateVariableOwner &""'"); - } - arg2 = reinterpret_cast< cmf::math::StateVariableOwner * >(argp2); - { - try { - result = (cmf::math::StateVariableList *) &(arg1)->operator +=(*arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__StateVariableList, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StateVariableList___iadd__(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args,"StateVariableList___iadd__",0,2,argv))) SWIG_fail; - --argc; - { - unsigned long _index = 0; - SWIG_TypeRank _rank = 0; - if (argc == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__math__StateVariableList, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - _v = is_listtype_or_iterable(argv[1],SWIGTYPE_p_cmf__math__StateVariableList); - } - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 1; - if (_rank == _rankm) goto dispatch; - } - } - check_1: - - if (argc == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__math__StateVariableList, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_cmf__math__StateVariableOwner, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 2; - if (_rank == _rankm) goto dispatch; - } - } - check_2: - - dispatch: - switch(_index) { - case 1: - return _wrap_StateVariableList___iadd____SWIG_0(self, argc, argv); - case 2: - return _wrap_StateVariableList___iadd____SWIG_1(self, argc, argv); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'StateVariableList___iadd__'.\n" - " Possible C/C++ prototypes are:\n" - " cmf::math::StateVariableList::operator +=(cmf::math::StateVariableList const &)\n" - " cmf::math::StateVariableList::operator +=(cmf::math::StateVariableOwner &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_StateVariableList_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::StateVariableList *arg1 = (cmf::math::StateVariableList *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - size_t result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__StateVariableList, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StateVariableList_size" "', argument " "1"" of type '" "cmf::math::StateVariableList const *""'"); - } - arg1 = reinterpret_cast< cmf::math::StateVariableList * >(argp1); - { - try { - result = ((cmf::math::StateVariableList const *)arg1)->size(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_StateVariableList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::StateVariableList *arg1 = (cmf::math::StateVariableList *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__StateVariableList, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_StateVariableList" "', argument " "1"" of type '" "cmf::math::StateVariableList *""'"); - } - arg1 = reinterpret_cast< cmf::math::StateVariableList * >(argp1); - { - try { - delete arg1; - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_StateVariableList___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::StateVariableList *arg1 = (cmf::math::StateVariableList *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - size_t result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__StateVariableList, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StateVariableList___len__" "', argument " "1"" of type '" "cmf::math::StateVariableList const *""'"); - } - arg1 = reinterpret_cast< cmf::math::StateVariableList * >(argp1); - { - try { - result = cmf_math_StateVariableList___len__((cmf::math::StateVariableList const *)arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_StateVariableList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::StateVariableList *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args,"new_StateVariableList",0,0,0)) SWIG_fail; - { - try { - result = (cmf::math::StateVariableList *)new cmf::math::StateVariableList(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__StateVariableList, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *StateVariableList_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__math__StateVariableList, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *StateVariableList_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_Integrator_get_dxdt(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::math::Integrator *arg1 = (cmf::math::Integrator *) 0 ; - cmf::math::Time arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "time", NULL - }; - cmf::math::num_array result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Integrator_get_dxdt",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__math__Integrator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Integrator_get_dxdt" "', argument " "1"" of type '" "cmf::math::Integrator const *""'"); - } - arg1 = reinterpret_cast< cmf::math::Integrator * >(argp1); - { - arg2 = convert_datetime_to_cmftime(obj1); - if (arg2 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } - } - { - try { - result = ((cmf::math::Integrator const *)arg1)->get_dxdt(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - resultobj = as_npy_array(result); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Integrator_get_states__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::math::Integrator *arg1 = (cmf::math::Integrator *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - cmf::math::num_array result; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Integrator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Integrator_get_states" "', argument " "1"" of type '" "cmf::math::Integrator const *""'"); - } - arg1 = reinterpret_cast< cmf::math::Integrator * >(argp1); - { - try { - result = ((cmf::math::Integrator const *)arg1)->get_states(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - resultobj = as_npy_array(result); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Integrator_add_states(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::math::Integrator *arg1 = (cmf::math::Integrator *) 0 ; - cmf::math::StateVariableOwner *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "stateOwner", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Integrator_add_states",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__math__Integrator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Integrator_add_states" "', argument " "1"" of type '" "cmf::math::Integrator *""'"); - } - arg1 = reinterpret_cast< cmf::math::Integrator * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_cmf__math__StateVariableOwner, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Integrator_add_states" "', argument " "2"" of type '" "cmf::math::StateVariableOwner &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Integrator_add_states" "', argument " "2"" of type '" "cmf::math::StateVariableOwner &""'"); - } - arg2 = reinterpret_cast< cmf::math::StateVariableOwner * >(argp2); - { - try { - (arg1)->add_states(*arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Integrator_add_single_state(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::math::Integrator *arg1 = (cmf::math::Integrator *) 0 ; - cmf::math::StateVariable::ptr arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "state", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Integrator_add_single_state",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__math__Integrator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Integrator_add_single_state" "', argument " "1"" of type '" "cmf::math::Integrator *""'"); - } - arg1 = reinterpret_cast< cmf::math::Integrator * >(argp1); - { - int newmem = 0; - res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__math__StateVariable_t, 0 , &newmem); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Integrator_add_single_state" "', argument " "2"" of type '" "cmf::math::StateVariable::ptr""'"); - } - if (argp2) arg2 = *(reinterpret_cast< cmf::math::StateVariable::ptr * >(argp2)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::math::StateVariable::ptr * >(argp2); - } - { - try { - (arg1)->add_single_state(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Integrator_integratables_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::Integrator *arg1 = (cmf::math::Integrator *) 0 ; - cmf::math::integratable_list *arg2 = (cmf::math::integratable_list *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"Integrator_integratables_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Integrator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Integrator_integratables_set" "', argument " "1"" of type '" "cmf::math::Integrator *""'"); - } - arg1 = reinterpret_cast< cmf::math::Integrator * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_cmf__math__integratable_list, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Integrator_integratables_set" "', argument " "2"" of type '" "cmf::math::integratable_list *""'"); - } - arg2 = reinterpret_cast< cmf::math::integratable_list * >(argp2); - if (arg1) (arg1)->integratables = *arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Integrator_integratables_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::Integrator *arg1 = (cmf::math::Integrator *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::math::integratable_list *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Integrator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Integrator_integratables_get" "', argument " "1"" of type '" "cmf::math::Integrator *""'"); - } - arg1 = reinterpret_cast< cmf::math::Integrator * >(argp1); - result = (cmf::math::integratable_list *)& ((arg1)->integratables); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__integratable_list, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Integrator_reset_integratables_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::Integrator *arg1 = (cmf::math::Integrator *) 0 ; - bool arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - bool val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"Integrator_reset_integratables_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Integrator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Integrator_reset_integratables_set" "', argument " "1"" of type '" "cmf::math::Integrator *""'"); - } - arg1 = reinterpret_cast< cmf::math::Integrator * >(argp1); - ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Integrator_reset_integratables_set" "', argument " "2"" of type '" "bool""'"); - } - arg2 = static_cast< bool >(val2); - if (arg1) (arg1)->reset_integratables = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Integrator_reset_integratables_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::Integrator *arg1 = (cmf::math::Integrator *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - bool result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Integrator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Integrator_reset_integratables_get" "', argument " "1"" of type '" "cmf::math::Integrator *""'"); - } - arg1 = reinterpret_cast< cmf::math::Integrator * >(argp1); - result = (bool) ((arg1)->reset_integratables); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Integrator_use_OpenMP_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::Integrator *arg1 = (cmf::math::Integrator *) 0 ; - bool arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - bool val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"Integrator_use_OpenMP_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Integrator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Integrator_use_OpenMP_set" "', argument " "1"" of type '" "cmf::math::Integrator *""'"); - } - arg1 = reinterpret_cast< cmf::math::Integrator * >(argp1); - ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Integrator_use_OpenMP_set" "', argument " "2"" of type '" "bool""'"); - } - arg2 = static_cast< bool >(val2); - if (arg1) (arg1)->use_OpenMP = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Integrator_use_OpenMP_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::Integrator *arg1 = (cmf::math::Integrator *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - bool result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Integrator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Integrator_use_OpenMP_get" "', argument " "1"" of type '" "cmf::math::Integrator *""'"); - } - arg1 = reinterpret_cast< cmf::math::Integrator * >(argp1); - result = (bool) ((arg1)->use_OpenMP); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Integrator_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::Integrator *arg1 = (cmf::math::Integrator *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - size_t result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Integrator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Integrator_size" "', argument " "1"" of type '" "cmf::math::Integrator const *""'"); - } - arg1 = reinterpret_cast< cmf::math::Integrator * >(argp1); - { - try { - result = ((cmf::math::Integrator const *)arg1)->size(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Integrator_get_state(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::math::Integrator *arg1 = (cmf::math::Integrator *) 0 ; - ptrdiff_t arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "position", NULL - }; - real result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Integrator_get_state",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__math__Integrator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Integrator_get_state" "', argument " "1"" of type '" "cmf::math::Integrator const *""'"); - } - arg1 = reinterpret_cast< cmf::math::Integrator * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Integrator_get_state" "', argument " "2"" of type '" "ptrdiff_t""'"); - } - arg2 = static_cast< ptrdiff_t >(val2); - { - try { - result = (real)((cmf::math::Integrator const *)arg1)->get_state(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Integrator_set_state(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::math::Integrator *arg1 = (cmf::math::Integrator *) 0 ; - ptrdiff_t arg2 ; - real arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - double val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "position",(char *) "newState", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:Integrator_set_state",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__math__Integrator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Integrator_set_state" "', argument " "1"" of type '" "cmf::math::Integrator *""'"); - } - arg1 = reinterpret_cast< cmf::math::Integrator * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Integrator_set_state" "', argument " "2"" of type '" "ptrdiff_t""'"); - } - arg2 = static_cast< ptrdiff_t >(val2); - ecode3 = SWIG_AsVal_double(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Integrator_set_state" "', argument " "3"" of type '" "real""'"); - } - arg3 = static_cast< real >(val3); - { - try { - (arg1)->set_state(arg2,arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Integrator_get_states__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::math::Integrator *arg1 = (cmf::math::Integrator *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - cmf::math::StateVariableList result; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Integrator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Integrator_get_states" "', argument " "1"" of type '" "cmf::math::Integrator *""'"); - } - arg1 = reinterpret_cast< cmf::math::Integrator * >(argp1); - { - try { - result = (arg1)->get_states(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj((new cmf::math::StateVariableList(static_cast< const cmf::math::StateVariableList& >(result))), SWIGTYPE_p_cmf__math__StateVariableList, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Integrator_get_states(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[2] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args,"Integrator_get_states",0,1,argv))) SWIG_fail; - --argc; - { - unsigned long _index = 0; - SWIG_TypeRank _rank = 0; - if (argc == 1) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__math__Integrator, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 1; - if (_rank == _rankm) goto dispatch; - } - } - check_1: - - if (argc == 1) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__math__Integrator, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 2; - if (_rank == _rankm) goto dispatch; - } - } - check_2: - - dispatch: - switch(_index) { - case 1: - return _wrap_Integrator_get_states__SWIG_1(self, argc, argv); - case 2: - return _wrap_Integrator_get_states__SWIG_0(self, argc, argv); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'Integrator_get_states'.\n" - " Possible C/C++ prototypes are:\n" - " cmf::math::Integrator::get_states() const\n" - " cmf::math::Integrator::get_states()\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_delete_Integrator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::Integrator *arg1 = (cmf::math::Integrator *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Integrator, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Integrator" "', argument " "1"" of type '" "cmf::math::Integrator *""'"); - } - arg1 = reinterpret_cast< cmf::math::Integrator * >(argp1); - { - try { - delete arg1; - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Integrator_get_t(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::Integrator *arg1 = (cmf::math::Integrator *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::math::Time result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Integrator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Integrator_get_t" "', argument " "1"" of type '" "cmf::math::Integrator const *""'"); - } - arg1 = reinterpret_cast< cmf::math::Integrator * >(argp1); - { - try { - result = ((cmf::math::Integrator const *)arg1)->get_t(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj((new cmf::math::Time(static_cast< const cmf::math::Time& >(result))), SWIGTYPE_p_cmf__math__Time, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Integrator_set_t(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::math::Integrator *arg1 = (cmf::math::Integrator *) 0 ; - cmf::math::Time arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "val", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Integrator_set_t",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__math__Integrator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Integrator_set_t" "', argument " "1"" of type '" "cmf::math::Integrator *""'"); - } - arg1 = reinterpret_cast< cmf::math::Integrator * >(argp1); - { - arg2 = convert_datetime_to_cmftime(obj1); - if (arg2 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } - } - { - try { - (arg1)->set_t(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Integrator_get_dt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::Integrator *arg1 = (cmf::math::Integrator *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::math::Time result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Integrator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Integrator_get_dt" "', argument " "1"" of type '" "cmf::math::Integrator const *""'"); - } - arg1 = reinterpret_cast< cmf::math::Integrator * >(argp1); - { - try { - result = ((cmf::math::Integrator const *)arg1)->get_dt(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj((new cmf::math::Time(static_cast< const cmf::math::Time& >(result))), SWIGTYPE_p_cmf__math__Time, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Integrator_reset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::Integrator *arg1 = (cmf::math::Integrator *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Integrator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Integrator_reset" "', argument " "1"" of type '" "cmf::math::Integrator *""'"); - } - arg1 = reinterpret_cast< cmf::math::Integrator * >(argp1); - { - try { - (arg1)->reset(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Integrator_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::Integrator *arg1 = (cmf::math::Integrator *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::math::Integrator *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Integrator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Integrator_copy" "', argument " "1"" of type '" "cmf::math::Integrator const *""'"); - } - arg1 = reinterpret_cast< cmf::math::Integrator * >(argp1); - { - try { - result = (cmf::math::Integrator *)((cmf::math::Integrator const *)arg1)->copy(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__Integrator, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Integrator_integrate(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::math::Integrator *arg1 = (cmf::math::Integrator *) 0 ; - cmf::math::Time arg2 ; - cmf::math::Time arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "t_max",(char *) "dt", NULL - }; - int result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:Integrator_integrate",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__math__Integrator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Integrator_integrate" "', argument " "1"" of type '" "cmf::math::Integrator *""'"); - } - arg1 = reinterpret_cast< cmf::math::Integrator * >(argp1); - { - arg2 = convert_datetime_to_cmftime(obj1); - if (arg2 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } - } - { - arg3 = convert_datetime_to_cmftime(obj2); - if (arg3 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } - } - { - try { - result = (int)(arg1)->integrate(arg2,arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Integrator_integrate_until(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::math::Integrator *arg1 = (cmf::math::Integrator *) 0 ; - cmf::math::Time arg2 ; - cmf::math::Time arg3 = (cmf::math::Time) cmf::math::Time() ; - bool arg4 = (bool) false ; - void *argp1 = 0 ; - int res1 = 0 ; - bool val4 ; - int ecode4 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "t_max",(char *) "dt",(char *) "reset", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OO:Integrator_integrate_until",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__math__Integrator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Integrator_integrate_until" "', argument " "1"" of type '" "cmf::math::Integrator *""'"); - } - arg1 = reinterpret_cast< cmf::math::Integrator * >(argp1); - { - arg2 = convert_datetime_to_cmftime(obj1); - if (arg2 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } - } - if (obj2) { - { - arg3 = convert_datetime_to_cmftime(obj2); - if (arg3 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } - } - } - if (obj3) { - ecode4 = SWIG_AsVal_bool(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Integrator_integrate_until" "', argument " "4"" of type '" "bool""'"); - } - arg4 = static_cast< bool >(val4); - } - { - try { - (arg1)->integrate_until(arg2,arg3,arg4); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Integrator___getitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::math::Integrator *arg1 = (cmf::math::Integrator *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "index", NULL - }; - cmf::math::StateVariable::ptr result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Integrator___getitem__",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__math__Integrator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Integrator___getitem__" "', argument " "1"" of type '" "cmf::math::Integrator *""'"); - } - arg1 = reinterpret_cast< cmf::math::Integrator * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Integrator___getitem__" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - { - try { - result = cmf_math_Integrator___getitem__(arg1,arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - std::shared_ptr< cmf::math::StateVariable > *smartresult = result ? new std::shared_ptr< cmf::math::StateVariable >(result) : 0; - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__math__StateVariable_t, SWIG_POINTER_OWN); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *Integrator_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__math__Integrator, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *_wrap_BDF2_get_error_position(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::BDF2 *arg1 = (cmf::math::BDF2 *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - int result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__BDF2, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BDF2_get_error_position" "', argument " "1"" of type '" "cmf::math::BDF2 const *""'"); - } - arg1 = reinterpret_cast< cmf::math::BDF2 * >(argp1); - { - try { - result = (int)((cmf::math::BDF2 const *)arg1)->get_error_position(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BDF2_max_order_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::BDF2 *arg1 = (cmf::math::BDF2 *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"BDF2_max_order_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__BDF2, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BDF2_max_order_set" "', argument " "1"" of type '" "cmf::math::BDF2 *""'"); - } - arg1 = reinterpret_cast< cmf::math::BDF2 * >(argp1); - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BDF2_max_order_set" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - if (arg1) (arg1)->max_order = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BDF2_max_order_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::BDF2 *arg1 = (cmf::math::BDF2 *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - int result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__BDF2, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BDF2_max_order_get" "', argument " "1"" of type '" "cmf::math::BDF2 *""'"); - } - arg1 = reinterpret_cast< cmf::math::BDF2 * >(argp1); - result = (int) ((arg1)->max_order); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_BDF2__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - real arg1 = (real) 1e-9 ; - cmf::math::Time arg2 = (cmf::math::Time) cmf::math::timespan(10) ; - double val1 ; - int ecode1 = 0 ; - cmf::math::BDF2 *result = 0 ; - - if ((nobjs < 0) || (nobjs > 2)) SWIG_fail; - if (swig_obj[0]) { - ecode1 = SWIG_AsVal_double(swig_obj[0], &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_BDF2" "', argument " "1"" of type '" "real""'"); - } - arg1 = static_cast< real >(val1); - } - if (swig_obj[1]) { - { - arg2 = convert_datetime_to_cmftime(swig_obj[1]); - if (arg2 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } - } - } - { - try { - result = (cmf::math::BDF2 *)new cmf::math::BDF2(arg1,arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__BDF2, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_BDF2__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::math::StateVariableOwner *arg1 = 0 ; - real arg2 = (real) 1e-9 ; - cmf::math::Time arg3 = (cmf::math::Time) cmf::math::timespan(10) ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - cmf::math::BDF2 *result = 0 ; - - if ((nobjs < 1) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_cmf__math__StateVariableOwner, 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_BDF2" "', argument " "1"" of type '" "cmf::math::StateVariableOwner &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BDF2" "', argument " "1"" of type '" "cmf::math::StateVariableOwner &""'"); - } - arg1 = reinterpret_cast< cmf::math::StateVariableOwner * >(argp1); - if (swig_obj[1]) { - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_BDF2" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - } - if (swig_obj[2]) { - { - arg3 = convert_datetime_to_cmftime(swig_obj[2]); - if (arg3 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } - } - } - { - try { - result = (cmf::math::BDF2 *)new cmf::math::BDF2(*arg1,arg2,arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__BDF2, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_BDF2__SWIG_2(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::math::Integrator *arg1 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - cmf::math::BDF2 *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_cmf__math__Integrator, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_BDF2" "', argument " "1"" of type '" "cmf::math::Integrator const &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BDF2" "', argument " "1"" of type '" "cmf::math::Integrator const &""'"); - } - arg1 = reinterpret_cast< cmf::math::Integrator * >(argp1); - { - try { - result = (cmf::math::BDF2 *)new cmf::math::BDF2((cmf::math::Integrator const &)*arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__BDF2, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_BDF2(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[4] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args,"new_BDF2",0,3,argv))) SWIG_fail; - --argc; - { - unsigned long _index = 0; - SWIG_TypeRank _rank = 0; - if ((argc >= 0) && (argc <= 2)) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - if (argc > 0) { - { - { - int res = SWIG_AsVal_double(argv[0], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (argc > 1) { - { - { - _v = check_time(argv[1]); - } - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - } - } - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 1; - if (_rank == _rankm) goto dispatch; - } - } - check_1: - - if (argc == 1) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_cmf__math__Integrator, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 2; - if (_rank == _rankm) goto dispatch; - } - } - check_2: - - if ((argc >= 1) && (argc <= 3)) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__math__StateVariableOwner, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_3; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (argc > 1) { - { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_3; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (argc > 2) { - { - { - _v = check_time(argv[2]); - } - } - if (!_v) goto check_3; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - } - } - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 3; - if (_rank == _rankm) goto dispatch; - } - } - check_3: - - dispatch: - switch(_index) { - case 1: - return _wrap_new_BDF2__SWIG_0(self, argc, argv); - case 2: - return _wrap_new_BDF2__SWIG_2(self, argc, argv); - case 3: - return _wrap_new_BDF2__SWIG_1(self, argc, argv); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_BDF2'.\n" - " Possible C/C++ prototypes are:\n" - " cmf::math::BDF2::BDF2(real,cmf::math::Time)\n" - " cmf::math::BDF2::BDF2(cmf::math::StateVariableOwner &,real,cmf::math::Time)\n" - " cmf::math::BDF2::BDF2(cmf::math::Integrator const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_delete_BDF2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::BDF2 *arg1 = (cmf::math::BDF2 *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__BDF2, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_BDF2" "', argument " "1"" of type '" "cmf::math::BDF2 *""'"); - } - arg1 = reinterpret_cast< cmf::math::BDF2 * >(argp1); - { - try { - delete arg1; - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *BDF2_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__math__BDF2, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *BDF2_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_new_ExplicitEuler_fixed__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::math::StateVariableOwner *arg1 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - cmf::math::ExplicitEuler_fixed *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_cmf__math__StateVariableOwner, 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ExplicitEuler_fixed" "', argument " "1"" of type '" "cmf::math::StateVariableOwner &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ExplicitEuler_fixed" "', argument " "1"" of type '" "cmf::math::StateVariableOwner &""'"); - } - arg1 = reinterpret_cast< cmf::math::StateVariableOwner * >(argp1); - { - try { - result = (cmf::math::ExplicitEuler_fixed *)new cmf::math::ExplicitEuler_fixed(*arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__ExplicitEuler_fixed, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_ExplicitEuler_fixed__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) { - PyObject *resultobj = 0; - cmf::math::ExplicitEuler_fixed *result = 0 ; - - if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; - { - try { - result = (cmf::math::ExplicitEuler_fixed *)new cmf::math::ExplicitEuler_fixed(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__ExplicitEuler_fixed, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_ExplicitEuler_fixed__SWIG_2(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::math::Integrator *arg1 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - cmf::math::ExplicitEuler_fixed *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_cmf__math__Integrator, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ExplicitEuler_fixed" "', argument " "1"" of type '" "cmf::math::Integrator const &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ExplicitEuler_fixed" "', argument " "1"" of type '" "cmf::math::Integrator const &""'"); - } - arg1 = reinterpret_cast< cmf::math::Integrator * >(argp1); - { - try { - result = (cmf::math::ExplicitEuler_fixed *)new cmf::math::ExplicitEuler_fixed((cmf::math::Integrator const &)*arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__ExplicitEuler_fixed, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_ExplicitEuler_fixed(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[2] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args,"new_ExplicitEuler_fixed",0,1,argv))) SWIG_fail; - --argc; - { - unsigned long _index = 0; - SWIG_TypeRank _rank = 0; - if (argc == 0) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 1; - if (_rank == _rankm) goto dispatch; - } - } - if (argc == 1) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_cmf__math__Integrator, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 2; - if (_rank == _rankm) goto dispatch; - } - } - check_2: - - if (argc == 1) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__math__StateVariableOwner, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_3; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 3; - if (_rank == _rankm) goto dispatch; - } - } - check_3: - - dispatch: - switch(_index) { - case 1: - return _wrap_new_ExplicitEuler_fixed__SWIG_1(self, argc, argv); - case 2: - return _wrap_new_ExplicitEuler_fixed__SWIG_2(self, argc, argv); - case 3: - return _wrap_new_ExplicitEuler_fixed__SWIG_0(self, argc, argv); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_ExplicitEuler_fixed'.\n" - " Possible C/C++ prototypes are:\n" - " cmf::math::ExplicitEuler_fixed::ExplicitEuler_fixed(cmf::math::StateVariableOwner &)\n" - " cmf::math::ExplicitEuler_fixed::ExplicitEuler_fixed()\n" - " cmf::math::ExplicitEuler_fixed::ExplicitEuler_fixed(cmf::math::Integrator const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_delete_ExplicitEuler_fixed(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::ExplicitEuler_fixed *arg1 = (cmf::math::ExplicitEuler_fixed *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__ExplicitEuler_fixed, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ExplicitEuler_fixed" "', argument " "1"" of type '" "cmf::math::ExplicitEuler_fixed *""'"); - } - arg1 = reinterpret_cast< cmf::math::ExplicitEuler_fixed * >(argp1); - { - try { - delete arg1; - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *ExplicitEuler_fixed_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__math__ExplicitEuler_fixed, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *ExplicitEuler_fixed_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_HeunIntegrator_alpha_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::HeunIntegrator *arg1 = (cmf::math::HeunIntegrator *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"HeunIntegrator_alpha_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__HeunIntegrator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HeunIntegrator_alpha_set" "', argument " "1"" of type '" "cmf::math::HeunIntegrator *""'"); - } - arg1 = reinterpret_cast< cmf::math::HeunIntegrator * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HeunIntegrator_alpha_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->alpha = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HeunIntegrator_alpha_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::HeunIntegrator *arg1 = (cmf::math::HeunIntegrator *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__HeunIntegrator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HeunIntegrator_alpha_get" "', argument " "1"" of type '" "cmf::math::HeunIntegrator *""'"); - } - arg1 = reinterpret_cast< cmf::math::HeunIntegrator * >(argp1); - result = (real) ((arg1)->alpha); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_HeunIntegrator__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::math::StateVariableOwner *arg1 = 0 ; - real arg2 = (real) 0.5 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - cmf::math::HeunIntegrator *result = 0 ; - - if ((nobjs < 1) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_cmf__math__StateVariableOwner, 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_HeunIntegrator" "', argument " "1"" of type '" "cmf::math::StateVariableOwner &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_HeunIntegrator" "', argument " "1"" of type '" "cmf::math::StateVariableOwner &""'"); - } - arg1 = reinterpret_cast< cmf::math::StateVariableOwner * >(argp1); - if (swig_obj[1]) { - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_HeunIntegrator" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - } - { - try { - result = (cmf::math::HeunIntegrator *)new cmf::math::HeunIntegrator(*arg1,arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__HeunIntegrator, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_HeunIntegrator__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - real arg1 = (real) 0.5 ; - double val1 ; - int ecode1 = 0 ; - cmf::math::HeunIntegrator *result = 0 ; - - if ((nobjs < 0) || (nobjs > 1)) SWIG_fail; - if (swig_obj[0]) { - ecode1 = SWIG_AsVal_double(swig_obj[0], &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_HeunIntegrator" "', argument " "1"" of type '" "real""'"); - } - arg1 = static_cast< real >(val1); - } - { - try { - result = (cmf::math::HeunIntegrator *)new cmf::math::HeunIntegrator(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__HeunIntegrator, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_HeunIntegrator__SWIG_2(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::math::Integrator *arg1 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - cmf::math::HeunIntegrator *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_cmf__math__Integrator, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_HeunIntegrator" "', argument " "1"" of type '" "cmf::math::Integrator const &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_HeunIntegrator" "', argument " "1"" of type '" "cmf::math::Integrator const &""'"); - } - arg1 = reinterpret_cast< cmf::math::Integrator * >(argp1); - { - try { - result = (cmf::math::HeunIntegrator *)new cmf::math::HeunIntegrator((cmf::math::Integrator const &)*arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__HeunIntegrator, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_HeunIntegrator(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args,"new_HeunIntegrator",0,2,argv))) SWIG_fail; - --argc; - { - unsigned long _index = 0; - SWIG_TypeRank _rank = 0; - if ((argc >= 0) && (argc <= 1)) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - if (argc > 0) { - { - { - int res = SWIG_AsVal_double(argv[0], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - } - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 1; - if (_rank == _rankm) goto dispatch; - } - } - check_1: - - if (argc == 1) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_cmf__math__Integrator, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 2; - if (_rank == _rankm) goto dispatch; - } - } - check_2: - - if ((argc >= 1) && (argc <= 2)) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__math__StateVariableOwner, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_3; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (argc > 1) { - { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_3; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - } - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 3; - if (_rank == _rankm) goto dispatch; - } - } - check_3: - - dispatch: - switch(_index) { - case 1: - return _wrap_new_HeunIntegrator__SWIG_1(self, argc, argv); - case 2: - return _wrap_new_HeunIntegrator__SWIG_2(self, argc, argv); - case 3: - return _wrap_new_HeunIntegrator__SWIG_0(self, argc, argv); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_HeunIntegrator'.\n" - " Possible C/C++ prototypes are:\n" - " cmf::math::HeunIntegrator::HeunIntegrator(cmf::math::StateVariableOwner &,real)\n" - " cmf::math::HeunIntegrator::HeunIntegrator(real)\n" - " cmf::math::HeunIntegrator::HeunIntegrator(cmf::math::Integrator const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_delete_HeunIntegrator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::HeunIntegrator *arg1 = (cmf::math::HeunIntegrator *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__HeunIntegrator, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_HeunIntegrator" "', argument " "1"" of type '" "cmf::math::HeunIntegrator *""'"); - } - arg1 = reinterpret_cast< cmf::math::HeunIntegrator * >(argp1); - { - try { - delete arg1; - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *HeunIntegrator_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__math__HeunIntegrator, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *HeunIntegrator_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_ImplicitEuler_dt_min_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::ImplicitEuler *arg1 = (cmf::math::ImplicitEuler *) 0 ; - cmf::math::Time *arg2 = (cmf::math::Time *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"ImplicitEuler_dt_min_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__ImplicitEuler, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImplicitEuler_dt_min_set" "', argument " "1"" of type '" "cmf::math::ImplicitEuler *""'"); - } - arg1 = reinterpret_cast< cmf::math::ImplicitEuler * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_cmf__math__Time, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ImplicitEuler_dt_min_set" "', argument " "2"" of type '" "cmf::math::Time *""'"); - } - arg2 = reinterpret_cast< cmf::math::Time * >(argp2); - if (arg1) (arg1)->dt_min = *arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ImplicitEuler_dt_min_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::ImplicitEuler *arg1 = (cmf::math::ImplicitEuler *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::math::Time *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__ImplicitEuler, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImplicitEuler_dt_min_get" "', argument " "1"" of type '" "cmf::math::ImplicitEuler *""'"); - } - arg1 = reinterpret_cast< cmf::math::ImplicitEuler * >(argp1); - result = (cmf::math::Time *)& ((arg1)->dt_min); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__Time, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_ImplicitEuler__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::math::StateVariableOwner *arg1 = 0 ; - real arg2 = (real) 1e-9 ; - cmf::math::Time arg3 = (cmf::math::Time) cmf::math::timespan(10) ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - cmf::math::ImplicitEuler *result = 0 ; - - if ((nobjs < 1) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_cmf__math__StateVariableOwner, 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ImplicitEuler" "', argument " "1"" of type '" "cmf::math::StateVariableOwner &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ImplicitEuler" "', argument " "1"" of type '" "cmf::math::StateVariableOwner &""'"); - } - arg1 = reinterpret_cast< cmf::math::StateVariableOwner * >(argp1); - if (swig_obj[1]) { - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_ImplicitEuler" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - } - if (swig_obj[2]) { - { - arg3 = convert_datetime_to_cmftime(swig_obj[2]); - if (arg3 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } - } - } - { - try { - result = (cmf::math::ImplicitEuler *)new cmf::math::ImplicitEuler(*arg1,arg2,arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__ImplicitEuler, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_ImplicitEuler__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - real arg1 = (real) 1e-9 ; - cmf::math::Time arg2 = (cmf::math::Time) cmf::math::timespan(10) ; - double val1 ; - int ecode1 = 0 ; - cmf::math::ImplicitEuler *result = 0 ; - - if ((nobjs < 0) || (nobjs > 2)) SWIG_fail; - if (swig_obj[0]) { - ecode1 = SWIG_AsVal_double(swig_obj[0], &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ImplicitEuler" "', argument " "1"" of type '" "real""'"); - } - arg1 = static_cast< real >(val1); - } - if (swig_obj[1]) { - { - arg2 = convert_datetime_to_cmftime(swig_obj[1]); - if (arg2 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } - } - } - { - try { - result = (cmf::math::ImplicitEuler *)new cmf::math::ImplicitEuler(arg1,arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__ImplicitEuler, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_ImplicitEuler__SWIG_2(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::math::Integrator *arg1 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - cmf::math::ImplicitEuler *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_cmf__math__Integrator, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ImplicitEuler" "', argument " "1"" of type '" "cmf::math::Integrator const &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ImplicitEuler" "', argument " "1"" of type '" "cmf::math::Integrator const &""'"); - } - arg1 = reinterpret_cast< cmf::math::Integrator * >(argp1); - { - try { - result = (cmf::math::ImplicitEuler *)new cmf::math::ImplicitEuler((cmf::math::Integrator const &)*arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__ImplicitEuler, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_ImplicitEuler(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[4] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args,"new_ImplicitEuler",0,3,argv))) SWIG_fail; - --argc; - { - unsigned long _index = 0; - SWIG_TypeRank _rank = 0; - if ((argc >= 0) && (argc <= 2)) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - if (argc > 0) { - { - { - int res = SWIG_AsVal_double(argv[0], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (argc > 1) { - { - { - _v = check_time(argv[1]); - } - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - } - } - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 1; - if (_rank == _rankm) goto dispatch; - } - } - check_1: - - if (argc == 1) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_cmf__math__Integrator, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 2; - if (_rank == _rankm) goto dispatch; - } - } - check_2: - - if ((argc >= 1) && (argc <= 3)) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__math__StateVariableOwner, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_3; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (argc > 1) { - { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_3; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (argc > 2) { - { - { - _v = check_time(argv[2]); - } - } - if (!_v) goto check_3; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - } - } - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 3; - if (_rank == _rankm) goto dispatch; - } - } - check_3: - - dispatch: - switch(_index) { - case 1: - return _wrap_new_ImplicitEuler__SWIG_1(self, argc, argv); - case 2: - return _wrap_new_ImplicitEuler__SWIG_2(self, argc, argv); - case 3: - return _wrap_new_ImplicitEuler__SWIG_0(self, argc, argv); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_ImplicitEuler'.\n" - " Possible C/C++ prototypes are:\n" - " cmf::math::ImplicitEuler::ImplicitEuler(cmf::math::StateVariableOwner &,real,cmf::math::Time)\n" - " cmf::math::ImplicitEuler::ImplicitEuler(real,cmf::math::Time)\n" - " cmf::math::ImplicitEuler::ImplicitEuler(cmf::math::Integrator const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_delete_ImplicitEuler(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::ImplicitEuler *arg1 = (cmf::math::ImplicitEuler *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__ImplicitEuler, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ImplicitEuler" "', argument " "1"" of type '" "cmf::math::ImplicitEuler *""'"); - } - arg1 = reinterpret_cast< cmf::math::ImplicitEuler * >(argp1); - { - try { - delete arg1; - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *ImplicitEuler_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__math__ImplicitEuler, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *ImplicitEuler_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_new_RKFIntegrator__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::math::StateVariableOwner *arg1 = 0 ; - real arg2 = (real) 1e-9 ; - cmf::math::Time arg3 = (cmf::math::Time) cmf::math::timespan(1000) ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - cmf::math::RKFIntegrator *result = 0 ; - - if ((nobjs < 1) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_cmf__math__StateVariableOwner, 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_RKFIntegrator" "', argument " "1"" of type '" "cmf::math::StateVariableOwner &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_RKFIntegrator" "', argument " "1"" of type '" "cmf::math::StateVariableOwner &""'"); - } - arg1 = reinterpret_cast< cmf::math::StateVariableOwner * >(argp1); - if (swig_obj[1]) { - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_RKFIntegrator" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - } - if (swig_obj[2]) { - { - arg3 = convert_datetime_to_cmftime(swig_obj[2]); - if (arg3 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } - } - } - { - try { - result = (cmf::math::RKFIntegrator *)new cmf::math::RKFIntegrator(*arg1,arg2,arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__RKFIntegrator, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_RKFIntegrator__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - real arg1 = (real) 1e-9 ; - cmf::math::Time arg2 = (cmf::math::Time) cmf::math::timespan(1000) ; - double val1 ; - int ecode1 = 0 ; - cmf::math::RKFIntegrator *result = 0 ; - - if ((nobjs < 0) || (nobjs > 2)) SWIG_fail; - if (swig_obj[0]) { - ecode1 = SWIG_AsVal_double(swig_obj[0], &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_RKFIntegrator" "', argument " "1"" of type '" "real""'"); - } - arg1 = static_cast< real >(val1); - } - if (swig_obj[1]) { - { - arg2 = convert_datetime_to_cmftime(swig_obj[1]); - if (arg2 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } - } - } - { - try { - result = (cmf::math::RKFIntegrator *)new cmf::math::RKFIntegrator(arg1,arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__RKFIntegrator, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_RKFIntegrator(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[4] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args,"new_RKFIntegrator",0,3,argv))) SWIG_fail; - --argc; - { - unsigned long _index = 0; - SWIG_TypeRank _rank = 0; - if ((argc >= 0) && (argc <= 2)) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - if (argc > 0) { - { - { - int res = SWIG_AsVal_double(argv[0], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (argc > 1) { - { - { - _v = check_time(argv[1]); - } - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - } - } - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 1; - if (_rank == _rankm) goto dispatch; - } - } - check_1: - - if ((argc >= 1) && (argc <= 3)) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__math__StateVariableOwner, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (argc > 1) { - { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (argc > 2) { - { - { - _v = check_time(argv[2]); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - } - } - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 2; - if (_rank == _rankm) goto dispatch; - } - } - check_2: - - dispatch: - switch(_index) { - case 1: - return _wrap_new_RKFIntegrator__SWIG_1(self, argc, argv); - case 2: - return _wrap_new_RKFIntegrator__SWIG_0(self, argc, argv); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_RKFIntegrator'.\n" - " Possible C/C++ prototypes are:\n" - " cmf::math::RKFIntegrator::RKFIntegrator(cmf::math::StateVariableOwner &,real,cmf::math::Time)\n" - " cmf::math::RKFIntegrator::RKFIntegrator(real,cmf::math::Time)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_delete_RKFIntegrator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::RKFIntegrator *arg1 = (cmf::math::RKFIntegrator *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__RKFIntegrator, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_RKFIntegrator" "', argument " "1"" of type '" "cmf::math::RKFIntegrator *""'"); - } - arg1 = reinterpret_cast< cmf::math::RKFIntegrator * >(argp1); - { - try { - delete arg1; - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *RKFIntegrator_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__math__RKFIntegrator, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *RKFIntegrator_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_CVodeIntegrator_preconditioner_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::CVodeIntegrator *arg1 = (cmf::math::CVodeIntegrator *) 0 ; - char arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - char val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"CVodeIntegrator_preconditioner_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__CVodeIntegrator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CVodeIntegrator_preconditioner_set" "', argument " "1"" of type '" "cmf::math::CVodeIntegrator *""'"); - } - arg1 = reinterpret_cast< cmf::math::CVodeIntegrator * >(argp1); - ecode2 = SWIG_AsVal_char(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CVodeIntegrator_preconditioner_set" "', argument " "2"" of type '" "char""'"); - } - arg2 = static_cast< char >(val2); - if (arg1) (arg1)->preconditioner = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_CVodeIntegrator_preconditioner_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::CVodeIntegrator *arg1 = (cmf::math::CVodeIntegrator *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - char result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__CVodeIntegrator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CVodeIntegrator_preconditioner_get" "', argument " "1"" of type '" "cmf::math::CVodeIntegrator *""'"); - } - arg1 = reinterpret_cast< cmf::math::CVodeIntegrator * >(argp1); - result = (char) ((arg1)->preconditioner); - resultobj = SWIG_From_char(static_cast< char >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_CVodeIntegrator_MaxNonLinearIterations_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::CVodeIntegrator *arg1 = (cmf::math::CVodeIntegrator *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"CVodeIntegrator_MaxNonLinearIterations_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__CVodeIntegrator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CVodeIntegrator_MaxNonLinearIterations_set" "', argument " "1"" of type '" "cmf::math::CVodeIntegrator *""'"); - } - arg1 = reinterpret_cast< cmf::math::CVodeIntegrator * >(argp1); - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CVodeIntegrator_MaxNonLinearIterations_set" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - if (arg1) (arg1)->MaxNonLinearIterations = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_CVodeIntegrator_MaxNonLinearIterations_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::CVodeIntegrator *arg1 = (cmf::math::CVodeIntegrator *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - int result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__CVodeIntegrator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CVodeIntegrator_MaxNonLinearIterations_get" "', argument " "1"" of type '" "cmf::math::CVodeIntegrator *""'"); - } - arg1 = reinterpret_cast< cmf::math::CVodeIntegrator * >(argp1); - result = (int) ((arg1)->MaxNonLinearIterations); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_CVodeIntegrator_MaxConvergenceFailures_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::CVodeIntegrator *arg1 = (cmf::math::CVodeIntegrator *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"CVodeIntegrator_MaxConvergenceFailures_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__CVodeIntegrator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CVodeIntegrator_MaxConvergenceFailures_set" "', argument " "1"" of type '" "cmf::math::CVodeIntegrator *""'"); - } - arg1 = reinterpret_cast< cmf::math::CVodeIntegrator * >(argp1); - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CVodeIntegrator_MaxConvergenceFailures_set" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - if (arg1) (arg1)->MaxConvergenceFailures = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_CVodeIntegrator_MaxConvergenceFailures_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::CVodeIntegrator *arg1 = (cmf::math::CVodeIntegrator *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - int result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__CVodeIntegrator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CVodeIntegrator_MaxConvergenceFailures_get" "', argument " "1"" of type '" "cmf::math::CVodeIntegrator *""'"); - } - arg1 = reinterpret_cast< cmf::math::CVodeIntegrator * >(argp1); - result = (int) ((arg1)->MaxConvergenceFailures); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_CVodeIntegrator_MaxErrorTestFailures_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::CVodeIntegrator *arg1 = (cmf::math::CVodeIntegrator *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"CVodeIntegrator_MaxErrorTestFailures_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__CVodeIntegrator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CVodeIntegrator_MaxErrorTestFailures_set" "', argument " "1"" of type '" "cmf::math::CVodeIntegrator *""'"); - } - arg1 = reinterpret_cast< cmf::math::CVodeIntegrator * >(argp1); - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CVodeIntegrator_MaxErrorTestFailures_set" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - if (arg1) (arg1)->MaxErrorTestFailures = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_CVodeIntegrator_MaxErrorTestFailures_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::CVodeIntegrator *arg1 = (cmf::math::CVodeIntegrator *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - int result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__CVodeIntegrator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CVodeIntegrator_MaxErrorTestFailures_get" "', argument " "1"" of type '" "cmf::math::CVodeIntegrator *""'"); - } - arg1 = reinterpret_cast< cmf::math::CVodeIntegrator * >(argp1); - result = (int) ((arg1)->MaxErrorTestFailures); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_CVodeIntegrator_maxl_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::CVodeIntegrator *arg1 = (cmf::math::CVodeIntegrator *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"CVodeIntegrator_maxl_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__CVodeIntegrator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CVodeIntegrator_maxl_set" "', argument " "1"" of type '" "cmf::math::CVodeIntegrator *""'"); - } - arg1 = reinterpret_cast< cmf::math::CVodeIntegrator * >(argp1); - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CVodeIntegrator_maxl_set" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - if (arg1) (arg1)->maxl = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_CVodeIntegrator_maxl_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::CVodeIntegrator *arg1 = (cmf::math::CVodeIntegrator *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - int result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__CVodeIntegrator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CVodeIntegrator_maxl_get" "', argument " "1"" of type '" "cmf::math::CVodeIntegrator *""'"); - } - arg1 = reinterpret_cast< cmf::math::CVodeIntegrator * >(argp1); - result = (int) ((arg1)->maxl); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_CVodeIntegrator_LinearSolver_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::CVodeIntegrator *arg1 = (cmf::math::CVodeIntegrator *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"CVodeIntegrator_LinearSolver_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__CVodeIntegrator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CVodeIntegrator_LinearSolver_set" "', argument " "1"" of type '" "cmf::math::CVodeIntegrator *""'"); - } - arg1 = reinterpret_cast< cmf::math::CVodeIntegrator * >(argp1); - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CVodeIntegrator_LinearSolver_set" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - if (arg1) (arg1)->LinearSolver = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_CVodeIntegrator_LinearSolver_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::CVodeIntegrator *arg1 = (cmf::math::CVodeIntegrator *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - int result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__CVodeIntegrator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CVodeIntegrator_LinearSolver_get" "', argument " "1"" of type '" "cmf::math::CVodeIntegrator *""'"); - } - arg1 = reinterpret_cast< cmf::math::CVodeIntegrator * >(argp1); - result = (int) ((arg1)->LinearSolver); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_CVodeIntegrator_MaxOrder_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::CVodeIntegrator *arg1 = (cmf::math::CVodeIntegrator *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"CVodeIntegrator_MaxOrder_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__CVodeIntegrator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CVodeIntegrator_MaxOrder_set" "', argument " "1"" of type '" "cmf::math::CVodeIntegrator *""'"); - } - arg1 = reinterpret_cast< cmf::math::CVodeIntegrator * >(argp1); - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CVodeIntegrator_MaxOrder_set" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - if (arg1) (arg1)->MaxOrder = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_CVodeIntegrator_MaxOrder_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::CVodeIntegrator *arg1 = (cmf::math::CVodeIntegrator *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - int result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__CVodeIntegrator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CVodeIntegrator_MaxOrder_get" "', argument " "1"" of type '" "cmf::math::CVodeIntegrator *""'"); - } - arg1 = reinterpret_cast< cmf::math::CVodeIntegrator * >(argp1); - result = (int) ((arg1)->MaxOrder); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_CVodeIntegrator_max_step_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::CVodeIntegrator *arg1 = (cmf::math::CVodeIntegrator *) 0 ; - cmf::math::Time *arg2 = (cmf::math::Time *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"CVodeIntegrator_max_step_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__CVodeIntegrator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CVodeIntegrator_max_step_set" "', argument " "1"" of type '" "cmf::math::CVodeIntegrator *""'"); - } - arg1 = reinterpret_cast< cmf::math::CVodeIntegrator * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_cmf__math__Time, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CVodeIntegrator_max_step_set" "', argument " "2"" of type '" "cmf::math::Time *""'"); - } - arg2 = reinterpret_cast< cmf::math::Time * >(argp2); - if (arg1) (arg1)->max_step = *arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_CVodeIntegrator_max_step_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::CVodeIntegrator *arg1 = (cmf::math::CVodeIntegrator *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::math::Time *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__CVodeIntegrator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CVodeIntegrator_max_step_get" "', argument " "1"" of type '" "cmf::math::CVodeIntegrator *""'"); - } - arg1 = reinterpret_cast< cmf::math::CVodeIntegrator * >(argp1); - result = (cmf::math::Time *)& ((arg1)->max_step); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__Time, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_CVodeIntegrator_initialize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::CVodeIntegrator *arg1 = (cmf::math::CVodeIntegrator *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__CVodeIntegrator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CVodeIntegrator_initialize" "', argument " "1"" of type '" "cmf::math::CVodeIntegrator *""'"); - } - arg1 = reinterpret_cast< cmf::math::CVodeIntegrator * >(argp1); - { - try { - (arg1)->initialize(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_CVodeIntegrator_release(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::CVodeIntegrator *arg1 = (cmf::math::CVodeIntegrator *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__CVodeIntegrator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CVodeIntegrator_release" "', argument " "1"" of type '" "cmf::math::CVodeIntegrator *""'"); - } - arg1 = reinterpret_cast< cmf::math::CVodeIntegrator * >(argp1); - { - try { - (arg1)->release(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_CVodeIntegrator__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - real arg1 = (real) 1e-9 ; - char arg2 = (char) 'R' ; - double val1 ; - int ecode1 = 0 ; - char val2 ; - int ecode2 = 0 ; - cmf::math::CVodeIntegrator *result = 0 ; - - if ((nobjs < 0) || (nobjs > 2)) SWIG_fail; - if (swig_obj[0]) { - ecode1 = SWIG_AsVal_double(swig_obj[0], &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_CVodeIntegrator" "', argument " "1"" of type '" "real""'"); - } - arg1 = static_cast< real >(val1); - } - if (swig_obj[1]) { - ecode2 = SWIG_AsVal_char(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_CVodeIntegrator" "', argument " "2"" of type '" "char""'"); - } - arg2 = static_cast< char >(val2); - } - { - try { - result = (cmf::math::CVodeIntegrator *)new cmf::math::CVodeIntegrator(arg1,arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__CVodeIntegrator, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_CVodeIntegrator__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::math::StateVariableOwner *arg1 = 0 ; - real arg2 = (real) 1e-9 ; - char arg3 = (char) 'R' ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - char val3 ; - int ecode3 = 0 ; - cmf::math::CVodeIntegrator *result = 0 ; - - if ((nobjs < 1) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_cmf__math__StateVariableOwner, 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CVodeIntegrator" "', argument " "1"" of type '" "cmf::math::StateVariableOwner &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CVodeIntegrator" "', argument " "1"" of type '" "cmf::math::StateVariableOwner &""'"); - } - arg1 = reinterpret_cast< cmf::math::StateVariableOwner * >(argp1); - if (swig_obj[1]) { - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_CVodeIntegrator" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - } - if (swig_obj[2]) { - ecode3 = SWIG_AsVal_char(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_CVodeIntegrator" "', argument " "3"" of type '" "char""'"); - } - arg3 = static_cast< char >(val3); - } - { - try { - result = (cmf::math::CVodeIntegrator *)new cmf::math::CVodeIntegrator(*arg1,arg2,arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__CVodeIntegrator, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_CVodeIntegrator__SWIG_2(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::math::CVodeIntegrator *arg1 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - cmf::math::CVodeIntegrator *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_cmf__math__CVodeIntegrator, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CVodeIntegrator" "', argument " "1"" of type '" "cmf::math::CVodeIntegrator const &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CVodeIntegrator" "', argument " "1"" of type '" "cmf::math::CVodeIntegrator const &""'"); - } - arg1 = reinterpret_cast< cmf::math::CVodeIntegrator * >(argp1); - { - try { - result = (cmf::math::CVodeIntegrator *)new cmf::math::CVodeIntegrator((cmf::math::CVodeIntegrator const &)*arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__CVodeIntegrator, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_CVodeIntegrator(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[4] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args,"new_CVodeIntegrator",0,3,argv))) SWIG_fail; - --argc; - { - unsigned long _index = 0; - SWIG_TypeRank _rank = 0; - if ((argc >= 0) && (argc <= 2)) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - if (argc > 0) { - { - { - int res = SWIG_AsVal_double(argv[0], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (argc > 1) { - { - { - int res = SWIG_AsVal_char(argv[1], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - } - } - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 1; - if (_rank == _rankm) goto dispatch; - } - } - check_1: - - if (argc == 1) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_cmf__math__CVodeIntegrator, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 2; - if (_rank == _rankm) goto dispatch; - } - } - check_2: - - if ((argc >= 1) && (argc <= 3)) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__math__StateVariableOwner, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_3; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (argc > 1) { - { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_3; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (argc > 2) { - { - { - int res = SWIG_AsVal_char(argv[2], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_3; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - } - } - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 3; - if (_rank == _rankm) goto dispatch; - } - } - check_3: - - dispatch: - switch(_index) { - case 1: - return _wrap_new_CVodeIntegrator__SWIG_0(self, argc, argv); - case 2: - return _wrap_new_CVodeIntegrator__SWIG_2(self, argc, argv); - case 3: - return _wrap_new_CVodeIntegrator__SWIG_1(self, argc, argv); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_CVodeIntegrator'.\n" - " Possible C/C++ prototypes are:\n" - " cmf::math::CVodeIntegrator::CVodeIntegrator(real,char)\n" - " cmf::math::CVodeIntegrator::CVodeIntegrator(cmf::math::StateVariableOwner &,real,char)\n" - " cmf::math::CVodeIntegrator::CVodeIntegrator(cmf::math::CVodeIntegrator const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_CVodeIntegrator_get_error(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::CVodeIntegrator *arg1 = (cmf::math::CVodeIntegrator *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::math::num_array result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__CVodeIntegrator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CVodeIntegrator_get_error" "', argument " "1"" of type '" "cmf::math::CVodeIntegrator const *""'"); - } - arg1 = reinterpret_cast< cmf::math::CVodeIntegrator * >(argp1); - { - try { - result = ((cmf::math::CVodeIntegrator const *)arg1)->get_error(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - resultobj = as_npy_array(result); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_CVodeIntegrator_get_nonlinear_iterations(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::CVodeIntegrator *arg1 = (cmf::math::CVodeIntegrator *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - int result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__CVodeIntegrator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CVodeIntegrator_get_nonlinear_iterations" "', argument " "1"" of type '" "cmf::math::CVodeIntegrator const *""'"); - } - arg1 = reinterpret_cast< cmf::math::CVodeIntegrator * >(argp1); - { - try { - result = (int)((cmf::math::CVodeIntegrator const *)arg1)->get_nonlinear_iterations(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_CVodeIntegrator_get_rhsevals(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::CVodeIntegrator *arg1 = (cmf::math::CVodeIntegrator *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - int result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__CVodeIntegrator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CVodeIntegrator_get_rhsevals" "', argument " "1"" of type '" "cmf::math::CVodeIntegrator const *""'"); - } - arg1 = reinterpret_cast< cmf::math::CVodeIntegrator * >(argp1); - { - try { - result = (int)((cmf::math::CVodeIntegrator const *)arg1)->get_rhsevals(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_CVodeIntegrator_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::CVodeIntegrator *arg1 = (cmf::math::CVodeIntegrator *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::math::CVodeIntegrator *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__CVodeIntegrator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CVodeIntegrator_copy" "', argument " "1"" of type '" "cmf::math::CVodeIntegrator const *""'"); - } - arg1 = reinterpret_cast< cmf::math::CVodeIntegrator * >(argp1); - { - try { - result = (cmf::math::CVodeIntegrator *)((cmf::math::CVodeIntegrator const *)arg1)->copy(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__CVodeIntegrator, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_CVodeIntegrator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::CVodeIntegrator *arg1 = (cmf::math::CVodeIntegrator *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__CVodeIntegrator, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CVodeIntegrator" "', argument " "1"" of type '" "cmf::math::CVodeIntegrator *""'"); - } - arg1 = reinterpret_cast< cmf::math::CVodeIntegrator * >(argp1); - { - try { - delete arg1; - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_CVodeIntegrator_order_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::CVodeIntegrator *arg1 = (cmf::math::CVodeIntegrator *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - int result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__CVodeIntegrator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CVodeIntegrator_order_get" "', argument " "1"" of type '" "cmf::math::CVodeIntegrator *""'"); - } - arg1 = reinterpret_cast< cmf::math::CVodeIntegrator * >(argp1); - { - try { - result = (int)cmf_math_CVodeIntegrator_order_get(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *CVodeIntegrator_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__math__CVodeIntegrator, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *CVodeIntegrator_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_MultiIntegrator_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::MultiIntegrator *arg1 = (cmf::math::MultiIntegrator *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::math::MultiIntegrator *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__MultiIntegrator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiIntegrator_copy" "', argument " "1"" of type '" "cmf::math::MultiIntegrator const *""'"); - } - arg1 = reinterpret_cast< cmf::math::MultiIntegrator * >(argp1); - { - try { - result = (cmf::math::MultiIntegrator *)((cmf::math::MultiIntegrator const *)arg1)->copy(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__MultiIntegrator, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MultiIntegrator_add_states_to_integrator(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::math::MultiIntegrator *arg1 = (cmf::math::MultiIntegrator *) 0 ; - cmf::math::StateVariableOwner *arg2 = 0 ; - int arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "stateOwner",(char *) "integrator_position", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:MultiIntegrator_add_states_to_integrator",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__math__MultiIntegrator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiIntegrator_add_states_to_integrator" "', argument " "1"" of type '" "cmf::math::MultiIntegrator *""'"); - } - arg1 = reinterpret_cast< cmf::math::MultiIntegrator * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_cmf__math__StateVariableOwner, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MultiIntegrator_add_states_to_integrator" "', argument " "2"" of type '" "cmf::math::StateVariableOwner &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MultiIntegrator_add_states_to_integrator" "', argument " "2"" of type '" "cmf::math::StateVariableOwner &""'"); - } - arg2 = reinterpret_cast< cmf::math::StateVariableOwner * >(argp2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MultiIntegrator_add_states_to_integrator" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - { - try { - (arg1)->add_states_to_integrator(*arg2,arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_MultiIntegrator(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::math::Integrator *arg1 = 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "template_integrator",(char *) "count", NULL - }; - cmf::math::MultiIntegrator *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:new_MultiIntegrator",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_cmf__math__Integrator, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MultiIntegrator" "', argument " "1"" of type '" "cmf::math::Integrator const &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MultiIntegrator" "', argument " "1"" of type '" "cmf::math::Integrator const &""'"); - } - arg1 = reinterpret_cast< cmf::math::Integrator * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_MultiIntegrator" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - { - try { - result = (cmf::math::MultiIntegrator *)new cmf::math::MultiIntegrator((cmf::math::Integrator const &)*arg1,arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__MultiIntegrator, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_MultiIntegrator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::MultiIntegrator *arg1 = (cmf::math::MultiIntegrator *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__MultiIntegrator, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MultiIntegrator" "', argument " "1"" of type '" "cmf::math::MultiIntegrator *""'"); - } - arg1 = reinterpret_cast< cmf::math::MultiIntegrator * >(argp1); - { - try { - delete arg1; - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *MultiIntegrator_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__math__MultiIntegrator, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *MultiIntegrator_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_Adsorption_freesolute(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::Adsorption *arg1 = (cmf::water::Adsorption *) 0 ; - real arg2 ; - real arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - double val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "xt",(char *) "V", NULL - }; - real result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:Adsorption_freesolute",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__Adsorption, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Adsorption_freesolute" "', argument " "1"" of type '" "cmf::water::Adsorption const *""'"); - } - arg1 = reinterpret_cast< cmf::water::Adsorption * >(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Adsorption_freesolute" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - ecode3 = SWIG_AsVal_double(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Adsorption_freesolute" "', argument " "3"" of type '" "real""'"); - } - arg3 = static_cast< real >(val3); - { - try { - result = (real)((cmf::water::Adsorption const *)arg1)->freesolute(arg2,arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Adsorption_totalsolute(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::Adsorption *arg1 = (cmf::water::Adsorption *) 0 ; - real arg2 ; - real arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - double val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "xf",(char *) "V", NULL - }; - real result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:Adsorption_totalsolute",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__Adsorption, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Adsorption_totalsolute" "', argument " "1"" of type '" "cmf::water::Adsorption const *""'"); - } - arg1 = reinterpret_cast< cmf::water::Adsorption * >(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Adsorption_totalsolute" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - ecode3 = SWIG_AsVal_double(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Adsorption_totalsolute" "', argument " "3"" of type '" "real""'"); - } - arg3 = static_cast< real >(val3); - { - try { - result = (real)((cmf::water::Adsorption const *)arg1)->totalsolute(arg2,arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Adsorption_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::Adsorption *arg1 = (cmf::water::Adsorption *) 0 ; - real arg2 = (real) -1 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "m", NULL - }; - cmf::water::Adsorption *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Adsorption_copy",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__Adsorption, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Adsorption_copy" "', argument " "1"" of type '" "cmf::water::Adsorption const *""'"); - } - arg1 = reinterpret_cast< cmf::water::Adsorption * >(argp1); - if (obj1) { - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Adsorption_copy" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - } - { - try { - result = (cmf::water::Adsorption *)((cmf::water::Adsorption const *)arg1)->copy(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__water__Adsorption, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_Adsorption(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::Adsorption *arg1 = (cmf::water::Adsorption *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__Adsorption, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Adsorption" "', argument " "1"" of type '" "cmf::water::Adsorption *""'"); - } - arg1 = reinterpret_cast< cmf::water::Adsorption * >(argp1); - { - try { - delete arg1; - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *Adsorption_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__water__Adsorption, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *_wrap_NullAdsorption_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::NullAdsorption *arg1 = (cmf::water::NullAdsorption *) 0 ; - real arg2 = (real) -1 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "m", NULL - }; - cmf::water::NullAdsorption *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:NullAdsorption_copy",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__NullAdsorption, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NullAdsorption_copy" "', argument " "1"" of type '" "cmf::water::NullAdsorption const *""'"); - } - arg1 = reinterpret_cast< cmf::water::NullAdsorption * >(argp1); - if (obj1) { - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "NullAdsorption_copy" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - } - { - try { - result = (cmf::water::NullAdsorption *)((cmf::water::NullAdsorption const *)arg1)->copy(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__water__NullAdsorption, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_NullAdsorption(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::NullAdsorption *arg1 = (cmf::water::NullAdsorption *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__NullAdsorption, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_NullAdsorption" "', argument " "1"" of type '" "cmf::water::NullAdsorption *""'"); - } - arg1 = reinterpret_cast< cmf::water::NullAdsorption * >(argp1); - { - try { - delete arg1; - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_NullAdsorption(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::NullAdsorption *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args,"new_NullAdsorption",0,0,0)) SWIG_fail; - { - try { - result = (cmf::water::NullAdsorption *)new cmf::water::NullAdsorption(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__water__NullAdsorption, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *NullAdsorption_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__water__NullAdsorption, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *NullAdsorption_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_LinearAdsorption_K_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::LinearAdsorption *arg1 = (cmf::water::LinearAdsorption *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"LinearAdsorption_K_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__LinearAdsorption, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LinearAdsorption_K_set" "', argument " "1"" of type '" "cmf::water::LinearAdsorption *""'"); - } - arg1 = reinterpret_cast< cmf::water::LinearAdsorption * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LinearAdsorption_K_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->K = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_LinearAdsorption_K_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::LinearAdsorption *arg1 = (cmf::water::LinearAdsorption *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__LinearAdsorption, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LinearAdsorption_K_get" "', argument " "1"" of type '" "cmf::water::LinearAdsorption *""'"); - } - arg1 = reinterpret_cast< cmf::water::LinearAdsorption * >(argp1); - result = (real) ((arg1)->K); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_LinearAdsorption_m_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::LinearAdsorption *arg1 = (cmf::water::LinearAdsorption *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"LinearAdsorption_m_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__LinearAdsorption, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LinearAdsorption_m_set" "', argument " "1"" of type '" "cmf::water::LinearAdsorption *""'"); - } - arg1 = reinterpret_cast< cmf::water::LinearAdsorption * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LinearAdsorption_m_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->m = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_LinearAdsorption_m_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::LinearAdsorption *arg1 = (cmf::water::LinearAdsorption *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__LinearAdsorption, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LinearAdsorption_m_get" "', argument " "1"" of type '" "cmf::water::LinearAdsorption *""'"); - } - arg1 = reinterpret_cast< cmf::water::LinearAdsorption * >(argp1); - result = (real) ((arg1)->m); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_LinearAdsorption__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - real arg1 ; - real arg2 ; - double val1 ; - int ecode1 = 0 ; - double val2 ; - int ecode2 = 0 ; - cmf::water::LinearAdsorption *result = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - ecode1 = SWIG_AsVal_double(swig_obj[0], &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_LinearAdsorption" "', argument " "1"" of type '" "real""'"); - } - arg1 = static_cast< real >(val1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_LinearAdsorption" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - { - try { - result = (cmf::water::LinearAdsorption *)new cmf::water::LinearAdsorption(arg1,arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__water__LinearAdsorption, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_LinearAdsorption__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::water::LinearAdsorption *arg1 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - cmf::water::LinearAdsorption *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_cmf__water__LinearAdsorption, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_LinearAdsorption" "', argument " "1"" of type '" "cmf::water::LinearAdsorption const &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LinearAdsorption" "', argument " "1"" of type '" "cmf::water::LinearAdsorption const &""'"); - } - arg1 = reinterpret_cast< cmf::water::LinearAdsorption * >(argp1); - { - try { - result = (cmf::water::LinearAdsorption *)new cmf::water::LinearAdsorption((cmf::water::LinearAdsorption const &)*arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__water__LinearAdsorption, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_LinearAdsorption(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args,"new_LinearAdsorption",0,2,argv))) SWIG_fail; - --argc; - { - unsigned long _index = 0; - SWIG_TypeRank _rank = 0; - if (argc == 1) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_cmf__water__LinearAdsorption, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 1; - if (_rank == _rankm) goto dispatch; - } - } - check_1: - - if (argc == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - { - int res = SWIG_AsVal_double(argv[0], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 2; - if (_rank == _rankm) goto dispatch; - } - } - check_2: - - dispatch: - switch(_index) { - case 1: - return _wrap_new_LinearAdsorption__SWIG_1(self, argc, argv); - case 2: - return _wrap_new_LinearAdsorption__SWIG_0(self, argc, argv); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_LinearAdsorption'.\n" - " Possible C/C++ prototypes are:\n" - " cmf::water::LinearAdsorption::LinearAdsorption(real,real)\n" - " cmf::water::LinearAdsorption::LinearAdsorption(cmf::water::LinearAdsorption const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_LinearAdsorption_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::LinearAdsorption *arg1 = (cmf::water::LinearAdsorption *) 0 ; - real arg2 = (real) -1 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "m", NULL - }; - cmf::water::LinearAdsorption *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:LinearAdsorption_copy",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__LinearAdsorption, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LinearAdsorption_copy" "', argument " "1"" of type '" "cmf::water::LinearAdsorption const *""'"); - } - arg1 = reinterpret_cast< cmf::water::LinearAdsorption * >(argp1); - if (obj1) { - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LinearAdsorption_copy" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - } - { - try { - result = (cmf::water::LinearAdsorption *)((cmf::water::LinearAdsorption const *)arg1)->copy(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__water__LinearAdsorption, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_LinearAdsorption(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::LinearAdsorption *arg1 = (cmf::water::LinearAdsorption *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__LinearAdsorption, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_LinearAdsorption" "', argument " "1"" of type '" "cmf::water::LinearAdsorption *""'"); - } - arg1 = reinterpret_cast< cmf::water::LinearAdsorption * >(argp1); - { - try { - delete arg1; - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *LinearAdsorption_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__water__LinearAdsorption, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *LinearAdsorption_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_FreundlichAdsorbtion_K_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::FreundlichAdsorbtion *arg1 = (cmf::water::FreundlichAdsorbtion *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"FreundlichAdsorbtion_K_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__FreundlichAdsorbtion, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FreundlichAdsorbtion_K_set" "', argument " "1"" of type '" "cmf::water::FreundlichAdsorbtion *""'"); - } - arg1 = reinterpret_cast< cmf::water::FreundlichAdsorbtion * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FreundlichAdsorbtion_K_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->K = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FreundlichAdsorbtion_K_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::FreundlichAdsorbtion *arg1 = (cmf::water::FreundlichAdsorbtion *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__FreundlichAdsorbtion, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FreundlichAdsorbtion_K_get" "', argument " "1"" of type '" "cmf::water::FreundlichAdsorbtion *""'"); - } - arg1 = reinterpret_cast< cmf::water::FreundlichAdsorbtion * >(argp1); - result = (real) ((arg1)->K); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FreundlichAdsorbtion_n_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::FreundlichAdsorbtion *arg1 = (cmf::water::FreundlichAdsorbtion *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"FreundlichAdsorbtion_n_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__FreundlichAdsorbtion, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FreundlichAdsorbtion_n_set" "', argument " "1"" of type '" "cmf::water::FreundlichAdsorbtion *""'"); - } - arg1 = reinterpret_cast< cmf::water::FreundlichAdsorbtion * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FreundlichAdsorbtion_n_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->n = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FreundlichAdsorbtion_n_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::FreundlichAdsorbtion *arg1 = (cmf::water::FreundlichAdsorbtion *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__FreundlichAdsorbtion, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FreundlichAdsorbtion_n_get" "', argument " "1"" of type '" "cmf::water::FreundlichAdsorbtion *""'"); - } - arg1 = reinterpret_cast< cmf::water::FreundlichAdsorbtion * >(argp1); - result = (real) ((arg1)->n); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FreundlichAdsorbtion_m_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::FreundlichAdsorbtion *arg1 = (cmf::water::FreundlichAdsorbtion *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"FreundlichAdsorbtion_m_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__FreundlichAdsorbtion, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FreundlichAdsorbtion_m_set" "', argument " "1"" of type '" "cmf::water::FreundlichAdsorbtion *""'"); - } - arg1 = reinterpret_cast< cmf::water::FreundlichAdsorbtion * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FreundlichAdsorbtion_m_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->m = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FreundlichAdsorbtion_m_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::FreundlichAdsorbtion *arg1 = (cmf::water::FreundlichAdsorbtion *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__FreundlichAdsorbtion, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FreundlichAdsorbtion_m_get" "', argument " "1"" of type '" "cmf::water::FreundlichAdsorbtion *""'"); - } - arg1 = reinterpret_cast< cmf::water::FreundlichAdsorbtion * >(argp1); - result = (real) ((arg1)->m); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FreundlichAdsorbtion_epsilon_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::FreundlichAdsorbtion *arg1 = (cmf::water::FreundlichAdsorbtion *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"FreundlichAdsorbtion_epsilon_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__FreundlichAdsorbtion, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FreundlichAdsorbtion_epsilon_set" "', argument " "1"" of type '" "cmf::water::FreundlichAdsorbtion *""'"); - } - arg1 = reinterpret_cast< cmf::water::FreundlichAdsorbtion * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FreundlichAdsorbtion_epsilon_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->epsilon = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FreundlichAdsorbtion_epsilon_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::FreundlichAdsorbtion *arg1 = (cmf::water::FreundlichAdsorbtion *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__FreundlichAdsorbtion, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FreundlichAdsorbtion_epsilon_get" "', argument " "1"" of type '" "cmf::water::FreundlichAdsorbtion *""'"); - } - arg1 = reinterpret_cast< cmf::water::FreundlichAdsorbtion * >(argp1); - result = (real) ((arg1)->epsilon); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FreundlichAdsorbtion_maxiter_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::FreundlichAdsorbtion *arg1 = (cmf::water::FreundlichAdsorbtion *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"FreundlichAdsorbtion_maxiter_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__FreundlichAdsorbtion, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FreundlichAdsorbtion_maxiter_set" "', argument " "1"" of type '" "cmf::water::FreundlichAdsorbtion *""'"); - } - arg1 = reinterpret_cast< cmf::water::FreundlichAdsorbtion * >(argp1); - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FreundlichAdsorbtion_maxiter_set" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - if (arg1) (arg1)->maxiter = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FreundlichAdsorbtion_maxiter_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::FreundlichAdsorbtion *arg1 = (cmf::water::FreundlichAdsorbtion *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - int result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__FreundlichAdsorbtion, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FreundlichAdsorbtion_maxiter_get" "', argument " "1"" of type '" "cmf::water::FreundlichAdsorbtion *""'"); - } - arg1 = reinterpret_cast< cmf::water::FreundlichAdsorbtion * >(argp1); - result = (int) ((arg1)->maxiter); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_FreundlichAdsorbtion__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - real arg1 ; - real arg2 ; - real arg3 ; - real arg4 = (real) 1e-12 ; - int arg5 = (int) 100 ; - double val1 ; - int ecode1 = 0 ; - double val2 ; - int ecode2 = 0 ; - double val3 ; - int ecode3 = 0 ; - double val4 ; - int ecode4 = 0 ; - int val5 ; - int ecode5 = 0 ; - cmf::water::FreundlichAdsorbtion *result = 0 ; - - if ((nobjs < 3) || (nobjs > 5)) SWIG_fail; - ecode1 = SWIG_AsVal_double(swig_obj[0], &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FreundlichAdsorbtion" "', argument " "1"" of type '" "real""'"); - } - arg1 = static_cast< real >(val1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FreundlichAdsorbtion" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_FreundlichAdsorbtion" "', argument " "3"" of type '" "real""'"); - } - arg3 = static_cast< real >(val3); - if (swig_obj[3]) { - ecode4 = SWIG_AsVal_double(swig_obj[3], &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_FreundlichAdsorbtion" "', argument " "4"" of type '" "real""'"); - } - arg4 = static_cast< real >(val4); - } - if (swig_obj[4]) { - ecode5 = SWIG_AsVal_int(swig_obj[4], &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_FreundlichAdsorbtion" "', argument " "5"" of type '" "int""'"); - } - arg5 = static_cast< int >(val5); - } - { - try { - result = (cmf::water::FreundlichAdsorbtion *)new cmf::water::FreundlichAdsorbtion(arg1,arg2,arg3,arg4,arg5); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__water__FreundlichAdsorbtion, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_FreundlichAdsorbtion__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::water::FreundlichAdsorbtion *arg1 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - cmf::water::FreundlichAdsorbtion *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_cmf__water__FreundlichAdsorbtion, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FreundlichAdsorbtion" "', argument " "1"" of type '" "cmf::water::FreundlichAdsorbtion const &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FreundlichAdsorbtion" "', argument " "1"" of type '" "cmf::water::FreundlichAdsorbtion const &""'"); - } - arg1 = reinterpret_cast< cmf::water::FreundlichAdsorbtion * >(argp1); - { - try { - result = (cmf::water::FreundlichAdsorbtion *)new cmf::water::FreundlichAdsorbtion((cmf::water::FreundlichAdsorbtion const &)*arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__water__FreundlichAdsorbtion, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_FreundlichAdsorbtion(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[6] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args,"new_FreundlichAdsorbtion",0,5,argv))) SWIG_fail; - --argc; - { - unsigned long _index = 0; - SWIG_TypeRank _rank = 0; - if (argc == 1) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_cmf__water__FreundlichAdsorbtion, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 1; - if (_rank == _rankm) goto dispatch; - } - } - check_1: - - if ((argc >= 3) && (argc <= 5)) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - { - int res = SWIG_AsVal_double(argv[0], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - int res = SWIG_AsVal_double(argv[2], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (argc > 3) { - { - { - int res = SWIG_AsVal_double(argv[3], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (argc > 4) { - { - { - int res = SWIG_AsVal_int(argv[4], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - } - } - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 2; - if (_rank == _rankm) goto dispatch; - } - } - check_2: - - dispatch: - switch(_index) { - case 1: - return _wrap_new_FreundlichAdsorbtion__SWIG_1(self, argc, argv); - case 2: - return _wrap_new_FreundlichAdsorbtion__SWIG_0(self, argc, argv); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_FreundlichAdsorbtion'.\n" - " Possible C/C++ prototypes are:\n" - " cmf::water::FreundlichAdsorbtion::FreundlichAdsorbtion(real,real,real,real,int)\n" - " cmf::water::FreundlichAdsorbtion::FreundlichAdsorbtion(cmf::water::FreundlichAdsorbtion const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_FreundlichAdsorbtion_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::FreundlichAdsorbtion *arg1 = (cmf::water::FreundlichAdsorbtion *) 0 ; - real arg2 = (real) -1 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "m", NULL - }; - cmf::water::FreundlichAdsorbtion *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:FreundlichAdsorbtion_copy",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__FreundlichAdsorbtion, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FreundlichAdsorbtion_copy" "', argument " "1"" of type '" "cmf::water::FreundlichAdsorbtion const *""'"); - } - arg1 = reinterpret_cast< cmf::water::FreundlichAdsorbtion * >(argp1); - if (obj1) { - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FreundlichAdsorbtion_copy" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - } - { - try { - result = (cmf::water::FreundlichAdsorbtion *)((cmf::water::FreundlichAdsorbtion const *)arg1)->copy(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__water__FreundlichAdsorbtion, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_FreundlichAdsorbtion(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::FreundlichAdsorbtion *arg1 = (cmf::water::FreundlichAdsorbtion *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__FreundlichAdsorbtion, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FreundlichAdsorbtion" "', argument " "1"" of type '" "cmf::water::FreundlichAdsorbtion *""'"); - } - arg1 = reinterpret_cast< cmf::water::FreundlichAdsorbtion * >(argp1); - { - try { - delete arg1; - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *FreundlichAdsorbtion_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__water__FreundlichAdsorbtion, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *FreundlichAdsorbtion_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_LangmuirAdsorption_K_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::LangmuirAdsorption *arg1 = (cmf::water::LangmuirAdsorption *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"LangmuirAdsorption_K_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__LangmuirAdsorption, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LangmuirAdsorption_K_set" "', argument " "1"" of type '" "cmf::water::LangmuirAdsorption *""'"); - } - arg1 = reinterpret_cast< cmf::water::LangmuirAdsorption * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LangmuirAdsorption_K_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->K = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_LangmuirAdsorption_K_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::LangmuirAdsorption *arg1 = (cmf::water::LangmuirAdsorption *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__LangmuirAdsorption, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LangmuirAdsorption_K_get" "', argument " "1"" of type '" "cmf::water::LangmuirAdsorption *""'"); - } - arg1 = reinterpret_cast< cmf::water::LangmuirAdsorption * >(argp1); - result = (real) ((arg1)->K); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_LangmuirAdsorption_m_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::LangmuirAdsorption *arg1 = (cmf::water::LangmuirAdsorption *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"LangmuirAdsorption_m_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__LangmuirAdsorption, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LangmuirAdsorption_m_set" "', argument " "1"" of type '" "cmf::water::LangmuirAdsorption *""'"); - } - arg1 = reinterpret_cast< cmf::water::LangmuirAdsorption * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LangmuirAdsorption_m_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->m = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_LangmuirAdsorption_m_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::LangmuirAdsorption *arg1 = (cmf::water::LangmuirAdsorption *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__LangmuirAdsorption, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LangmuirAdsorption_m_get" "', argument " "1"" of type '" "cmf::water::LangmuirAdsorption *""'"); - } - arg1 = reinterpret_cast< cmf::water::LangmuirAdsorption * >(argp1); - result = (real) ((arg1)->m); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_LangmuirAdsorption__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - real arg1 ; - real arg2 ; - double val1 ; - int ecode1 = 0 ; - double val2 ; - int ecode2 = 0 ; - cmf::water::LangmuirAdsorption *result = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - ecode1 = SWIG_AsVal_double(swig_obj[0], &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_LangmuirAdsorption" "', argument " "1"" of type '" "real""'"); - } - arg1 = static_cast< real >(val1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_LangmuirAdsorption" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - { - try { - result = (cmf::water::LangmuirAdsorption *)new cmf::water::LangmuirAdsorption(arg1,arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__water__LangmuirAdsorption, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_LangmuirAdsorption__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::water::LangmuirAdsorption *arg1 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - cmf::water::LangmuirAdsorption *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_cmf__water__LangmuirAdsorption, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_LangmuirAdsorption" "', argument " "1"" of type '" "cmf::water::LangmuirAdsorption const &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LangmuirAdsorption" "', argument " "1"" of type '" "cmf::water::LangmuirAdsorption const &""'"); - } - arg1 = reinterpret_cast< cmf::water::LangmuirAdsorption * >(argp1); - { - try { - result = (cmf::water::LangmuirAdsorption *)new cmf::water::LangmuirAdsorption((cmf::water::LangmuirAdsorption const &)*arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__water__LangmuirAdsorption, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_LangmuirAdsorption(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args,"new_LangmuirAdsorption",0,2,argv))) SWIG_fail; - --argc; - { - unsigned long _index = 0; - SWIG_TypeRank _rank = 0; - if (argc == 1) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_cmf__water__LangmuirAdsorption, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 1; - if (_rank == _rankm) goto dispatch; - } - } - check_1: - - if (argc == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - { - int res = SWIG_AsVal_double(argv[0], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 2; - if (_rank == _rankm) goto dispatch; - } - } - check_2: - - dispatch: - switch(_index) { - case 1: - return _wrap_new_LangmuirAdsorption__SWIG_1(self, argc, argv); - case 2: - return _wrap_new_LangmuirAdsorption__SWIG_0(self, argc, argv); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_LangmuirAdsorption'.\n" - " Possible C/C++ prototypes are:\n" - " cmf::water::LangmuirAdsorption::LangmuirAdsorption(real,real)\n" - " cmf::water::LangmuirAdsorption::LangmuirAdsorption(cmf::water::LangmuirAdsorption const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_LangmuirAdsorption_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::LangmuirAdsorption *arg1 = (cmf::water::LangmuirAdsorption *) 0 ; - real arg2 = (real) -1 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "m", NULL - }; - cmf::water::LangmuirAdsorption *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:LangmuirAdsorption_copy",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__LangmuirAdsorption, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LangmuirAdsorption_copy" "', argument " "1"" of type '" "cmf::water::LangmuirAdsorption const *""'"); - } - arg1 = reinterpret_cast< cmf::water::LangmuirAdsorption * >(argp1); - if (obj1) { - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LangmuirAdsorption_copy" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - } - { - try { - result = (cmf::water::LangmuirAdsorption *)((cmf::water::LangmuirAdsorption const *)arg1)->copy(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__water__LangmuirAdsorption, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_LangmuirAdsorption(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::LangmuirAdsorption *arg1 = (cmf::water::LangmuirAdsorption *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__LangmuirAdsorption, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_LangmuirAdsorption" "', argument " "1"" of type '" "cmf::water::LangmuirAdsorption *""'"); - } - arg1 = reinterpret_cast< cmf::water::LangmuirAdsorption * >(argp1); - { - try { - delete arg1; - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *LangmuirAdsorption_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__water__LangmuirAdsorption, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *LangmuirAdsorption_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_new_solute(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::solute *arg1 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - char * kwnames[] = { - (char *) "copy", NULL - }; - cmf::water::solute *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:new_solute",kwnames,&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_cmf__water__solute, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_solute" "', argument " "1"" of type '" "cmf::water::solute const &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_solute" "', argument " "1"" of type '" "cmf::water::solute const &""'"); - } - arg1 = reinterpret_cast< cmf::water::solute * >(argp1); - { - try { - result = (cmf::water::solute *)new cmf::water::solute((cmf::water::solute const &)*arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__water__solute, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_solute___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::solute *arg1 = (cmf::water::solute *) 0 ; - cmf::water::solute *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "cmp", NULL - }; - bool result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:solute___eq__",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__solute, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "solute___eq__" "', argument " "1"" of type '" "cmf::water::solute const *""'"); - } - arg1 = reinterpret_cast< cmf::water::solute * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_cmf__water__solute, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "solute___eq__" "', argument " "2"" of type '" "cmf::water::solute const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "solute___eq__" "', argument " "2"" of type '" "cmf::water::solute const &""'"); - } - arg2 = reinterpret_cast< cmf::water::solute * >(argp2); - { - try { - result = (bool)((cmf::water::solute const *)arg1)->operator ==((cmf::water::solute const &)*arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_solute___lt__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::solute *arg1 = (cmf::water::solute *) 0 ; - cmf::water::solute *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "cmp", NULL - }; - bool result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:solute___lt__",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__solute, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "solute___lt__" "', argument " "1"" of type '" "cmf::water::solute const *""'"); - } - arg1 = reinterpret_cast< cmf::water::solute * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_cmf__water__solute, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "solute___lt__" "', argument " "2"" of type '" "cmf::water::solute const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "solute___lt__" "', argument " "2"" of type '" "cmf::water::solute const &""'"); - } - arg2 = reinterpret_cast< cmf::water::solute * >(argp2); - { - try { - result = (bool)((cmf::water::solute const *)arg1)->operator <((cmf::water::solute const &)*arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_solute___gt__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::solute *arg1 = (cmf::water::solute *) 0 ; - cmf::water::solute *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "cmp", NULL - }; - bool result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:solute___gt__",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__solute, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "solute___gt__" "', argument " "1"" of type '" "cmf::water::solute const *""'"); - } - arg1 = reinterpret_cast< cmf::water::solute * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_cmf__water__solute, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "solute___gt__" "', argument " "2"" of type '" "cmf::water::solute const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "solute___gt__" "', argument " "2"" of type '" "cmf::water::solute const &""'"); - } - arg2 = reinterpret_cast< cmf::water::solute * >(argp2); - { - try { - result = (bool)((cmf::water::solute const *)arg1)->operator >((cmf::water::solute const &)*arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_solute___le__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::solute *arg1 = (cmf::water::solute *) 0 ; - cmf::water::solute *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "cmp", NULL - }; - bool result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:solute___le__",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__solute, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "solute___le__" "', argument " "1"" of type '" "cmf::water::solute const *""'"); - } - arg1 = reinterpret_cast< cmf::water::solute * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_cmf__water__solute, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "solute___le__" "', argument " "2"" of type '" "cmf::water::solute const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "solute___le__" "', argument " "2"" of type '" "cmf::water::solute const &""'"); - } - arg2 = reinterpret_cast< cmf::water::solute * >(argp2); - { - try { - result = (bool)((cmf::water::solute const *)arg1)->operator <=((cmf::water::solute const &)*arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_solute___ge__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::solute *arg1 = (cmf::water::solute *) 0 ; - cmf::water::solute *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "cmp", NULL - }; - bool result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:solute___ge__",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__solute, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "solute___ge__" "', argument " "1"" of type '" "cmf::water::solute const *""'"); - } - arg1 = reinterpret_cast< cmf::water::solute * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_cmf__water__solute, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "solute___ge__" "', argument " "2"" of type '" "cmf::water::solute const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "solute___ge__" "', argument " "2"" of type '" "cmf::water::solute const &""'"); - } - arg2 = reinterpret_cast< cmf::water::solute * >(argp2); - { - try { - result = (bool)((cmf::water::solute const *)arg1)->operator >=((cmf::water::solute const &)*arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_solute___ne__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::solute *arg1 = (cmf::water::solute *) 0 ; - cmf::water::solute *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "cmp", NULL - }; - bool result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:solute___ne__",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__solute, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "solute___ne__" "', argument " "1"" of type '" "cmf::water::solute const *""'"); - } - arg1 = reinterpret_cast< cmf::water::solute * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_cmf__water__solute, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "solute___ne__" "', argument " "2"" of type '" "cmf::water::solute const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "solute___ne__" "', argument " "2"" of type '" "cmf::water::solute const &""'"); - } - arg2 = reinterpret_cast< cmf::water::solute * >(argp2); - { - try { - result = (bool)((cmf::water::solute const *)arg1)->operator !=((cmf::water::solute const &)*arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_solute_Name_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::solute *arg1 = (cmf::water::solute *) 0 ; - std::string *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"solute_Name_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__solute, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "solute_Name_set" "', argument " "1"" of type '" "cmf::water::solute *""'"); - } - arg1 = reinterpret_cast< cmf::water::solute * >(argp1); - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "solute_Name_set" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "solute_Name_set" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - if (arg1) (arg1)->Name = *arg2; - resultobj = SWIG_Py_Void(); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_solute_Name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::solute *arg1 = (cmf::water::solute *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::string *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__solute, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "solute_Name_get" "', argument " "1"" of type '" "cmf::water::solute *""'"); - } - arg1 = reinterpret_cast< cmf::water::solute * >(argp1); - result = (std::string *) & ((arg1)->Name); - resultobj = SWIG_From_std_string(static_cast< std::string >(*result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_solute_Unit_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::solute *arg1 = (cmf::water::solute *) 0 ; - std::string *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"solute_Unit_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__solute, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "solute_Unit_set" "', argument " "1"" of type '" "cmf::water::solute *""'"); - } - arg1 = reinterpret_cast< cmf::water::solute * >(argp1); - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "solute_Unit_set" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "solute_Unit_set" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - if (arg1) (arg1)->Unit = *arg2; - resultobj = SWIG_Py_Void(); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_solute_Unit_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::solute *arg1 = (cmf::water::solute *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::string *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__solute, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "solute_Unit_get" "', argument " "1"" of type '" "cmf::water::solute *""'"); - } - arg1 = reinterpret_cast< cmf::water::solute * >(argp1); - result = (std::string *) & ((arg1)->Unit); - resultobj = SWIG_From_std_string(static_cast< std::string >(*result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_solute_Uptake_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::solute *arg1 = (cmf::water::solute *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"solute_Uptake_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__solute, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "solute_Uptake_set" "', argument " "1"" of type '" "cmf::water::solute *""'"); - } - arg1 = reinterpret_cast< cmf::water::solute * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "solute_Uptake_set" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - if (arg1) (arg1)->Uptake = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_solute_Uptake_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::solute *arg1 = (cmf::water::solute *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - double result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__solute, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "solute_Uptake_get" "', argument " "1"" of type '" "cmf::water::solute *""'"); - } - arg1 = reinterpret_cast< cmf::water::solute * >(argp1); - result = (double) ((arg1)->Uptake); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_solute_Id_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::solute *arg1 = (cmf::water::solute *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - size_t result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__solute, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "solute_Id_get" "', argument " "1"" of type '" "cmf::water::solute *""'"); - } - arg1 = reinterpret_cast< cmf::water::solute * >(argp1); - result = (size_t) ((arg1)->Id); - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_solute___repr__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::solute *arg1 = (cmf::water::solute *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::string result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__solute, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "solute___repr__" "', argument " "1"" of type '" "cmf::water::solute *""'"); - } - arg1 = reinterpret_cast< cmf::water::solute * >(argp1); - { - try { - result = cmf_water_solute___repr__(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_std_string(static_cast< std::string >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_solute(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::solute *arg1 = (cmf::water::solute *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__solute, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_solute" "', argument " "1"" of type '" "cmf::water::solute *""'"); - } - arg1 = reinterpret_cast< cmf::water::solute * >(argp1); - { - try { - delete arg1; - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *solute_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__water__solute, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *solute_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_solute_vector_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::solute_vector *arg1 = (cmf::water::solute_vector *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - size_t result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__solute_vector, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "solute_vector_size" "', argument " "1"" of type '" "cmf::water::solute_vector const *""'"); - } - arg1 = reinterpret_cast< cmf::water::solute_vector * >(argp1); - { - try { - result = ((cmf::water::solute_vector const *)arg1)->size(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_solute_vector(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - std::string arg1 ; - PyObject * obj0 = 0 ; - char * kwnames[] = { - (char *) "str", NULL - }; - cmf::water::solute_vector *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:new_solute_vector",kwnames,&obj0)) SWIG_fail; - { - std::string *ptr = (std::string *)0; - int res = SWIG_AsPtr_std_string(obj0, &ptr); - if (!SWIG_IsOK(res) || !ptr) { - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "new_solute_vector" "', argument " "1"" of type '" "std::string""'"); - } - arg1 = *ptr; - if (SWIG_IsNewObj(res)) delete ptr; - } - { - try { - result = (cmf::water::solute_vector *)new cmf::water::solute_vector(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__water__solute_vector, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_solute_vector_get_solute(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::solute_vector *arg1 = (cmf::water::solute_vector *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "position", NULL - }; - cmf::water::solute *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:solute_vector_get_solute",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__solute_vector, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "solute_vector_get_solute" "', argument " "1"" of type '" "cmf::water::solute_vector *""'"); - } - arg1 = reinterpret_cast< cmf::water::solute_vector * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "solute_vector_get_solute" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - { - try { - result = (cmf::water::solute *)(arg1)->get_solute(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__water__solute, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_solute_vector___getitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::solute_vector *arg1 = (cmf::water::solute_vector *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "i", NULL - }; - cmf::water::solute *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:solute_vector___getitem__",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__solute_vector, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "solute_vector___getitem__" "', argument " "1"" of type '" "cmf::water::solute_vector *""'"); - } - arg1 = reinterpret_cast< cmf::water::solute_vector * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "solute_vector___getitem__" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - { - try { - result = (cmf::water::solute *)cmf_water_solute_vector___getitem__(arg1,arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__water__solute, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_solute_vector___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::solute_vector *arg1 = (cmf::water::solute_vector *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - size_t result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__solute_vector, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "solute_vector___len__" "', argument " "1"" of type '" "cmf::water::solute_vector *""'"); - } - arg1 = reinterpret_cast< cmf::water::solute_vector * >(argp1); - { - try { - result = cmf_water_solute_vector___len__(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_solute_vector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::solute_vector *arg1 = (cmf::water::solute_vector *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__solute_vector, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_solute_vector" "', argument " "1"" of type '" "cmf::water::solute_vector *""'"); - } - arg1 = reinterpret_cast< cmf::water::solute_vector * >(argp1); - { - try { - delete arg1; - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *solute_vector_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__water__solute_vector, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *solute_vector_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_SoluteTimeseries_conc(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::SoluteTimeseries *arg1 = (cmf::water::SoluteTimeseries *) 0 ; - cmf::math::Time arg2 ; - cmf::water::solute *arg3 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "t",(char *) "_Solute", NULL - }; - real result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:SoluteTimeseries_conc",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__SoluteTimeseries, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SoluteTimeseries_conc" "', argument " "1"" of type '" "cmf::water::SoluteTimeseries const *""'"); - } - arg1 = reinterpret_cast< cmf::water::SoluteTimeseries * >(argp1); - { - arg2 = convert_datetime_to_cmftime(obj1); - if (arg2 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } - } - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_cmf__water__solute, 0 | 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SoluteTimeseries_conc" "', argument " "3"" of type '" "cmf::water::solute const &""'"); - } - if (!argp3) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SoluteTimeseries_conc" "', argument " "3"" of type '" "cmf::water::solute const &""'"); - } - arg3 = reinterpret_cast< cmf::water::solute * >(argp3); - { - try { - result = (real)((cmf::water::SoluteTimeseries const *)arg1)->conc(arg2,(cmf::water::solute const &)*arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SoluteTimeseries_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::SoluteTimeseries *arg1 = (cmf::water::SoluteTimeseries *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - size_t result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__SoluteTimeseries, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SoluteTimeseries_size" "', argument " "1"" of type '" "cmf::water::SoluteTimeseries const *""'"); - } - arg1 = reinterpret_cast< cmf::water::SoluteTimeseries * >(argp1); - { - try { - result = ((cmf::water::SoluteTimeseries const *)arg1)->size(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_SoluteTimeseries__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) { - PyObject *resultobj = 0; - cmf::water::SoluteTimeseries *result = 0 ; - - if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; - { - try { - result = (cmf::water::SoluteTimeseries *)new cmf::water::SoluteTimeseries(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__water__SoluteTimeseries, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_SoluteTimeseries__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::water::solute_vector *arg1 = 0 ; - cmf::math::Time arg2 ; - cmf::math::Time arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - cmf::water::SoluteTimeseries *result = 0 ; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_cmf__water__solute_vector, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SoluteTimeseries" "', argument " "1"" of type '" "cmf::water::solute_vector const &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SoluteTimeseries" "', argument " "1"" of type '" "cmf::water::solute_vector const &""'"); - } - arg1 = reinterpret_cast< cmf::water::solute_vector * >(argp1); - { - arg2 = convert_datetime_to_cmftime(swig_obj[1]); - if (arg2 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } - } - { - arg3 = convert_datetime_to_cmftime(swig_obj[2]); - if (arg3 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } - } - { - try { - result = (cmf::water::SoluteTimeseries *)new cmf::water::SoluteTimeseries((cmf::water::solute_vector const &)*arg1,arg2,arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__water__SoluteTimeseries, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_SoluteTimeseries__SWIG_2(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::water::SoluteTimeseries *arg1 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - cmf::water::SoluteTimeseries *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_cmf__water__SoluteTimeseries, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SoluteTimeseries" "', argument " "1"" of type '" "cmf::water::SoluteTimeseries const &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SoluteTimeseries" "', argument " "1"" of type '" "cmf::water::SoluteTimeseries const &""'"); - } - arg1 = reinterpret_cast< cmf::water::SoluteTimeseries * >(argp1); - { - try { - result = (cmf::water::SoluteTimeseries *)new cmf::water::SoluteTimeseries((cmf::water::SoluteTimeseries const &)*arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__water__SoluteTimeseries, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_SoluteTimeseries(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[4] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args,"new_SoluteTimeseries",0,3,argv))) SWIG_fail; - --argc; - { - unsigned long _index = 0; - SWIG_TypeRank _rank = 0; - if (argc == 0) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 1; - if (_rank == _rankm) goto dispatch; - } - } - if (argc == 1) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_cmf__water__SoluteTimeseries, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 2; - if (_rank == _rankm) goto dispatch; - } - } - check_2: - - if (argc == 3) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_cmf__water__solute_vector, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_3; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - _v = check_time(argv[1]); - } - } - if (!_v) goto check_3; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - _v = check_time(argv[2]); - } - } - if (!_v) goto check_3; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 3; - if (_rank == _rankm) goto dispatch; - } - } - check_3: - - dispatch: - switch(_index) { - case 1: - return _wrap_new_SoluteTimeseries__SWIG_0(self, argc, argv); - case 2: - return _wrap_new_SoluteTimeseries__SWIG_2(self, argc, argv); - case 3: - return _wrap_new_SoluteTimeseries__SWIG_1(self, argc, argv); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_SoluteTimeseries'.\n" - " Possible C/C++ prototypes are:\n" - " cmf::water::SoluteTimeseries::SoluteTimeseries()\n" - " cmf::water::SoluteTimeseries::SoluteTimeseries(cmf::water::solute_vector const &,cmf::math::Time,cmf::math::Time)\n" - " cmf::water::SoluteTimeseries::SoluteTimeseries(cmf::water::SoluteTimeseries const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_SoluteTimeseries___getitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::SoluteTimeseries *arg1 = (cmf::water::SoluteTimeseries *) 0 ; - cmf::water::solute *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "solute", NULL - }; - cmf::math::timeseries *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:SoluteTimeseries___getitem__",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__SoluteTimeseries, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SoluteTimeseries___getitem__" "', argument " "1"" of type '" "cmf::water::SoluteTimeseries *""'"); - } - arg1 = reinterpret_cast< cmf::water::SoluteTimeseries * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_cmf__water__solute, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SoluteTimeseries___getitem__" "', argument " "2"" of type '" "cmf::water::solute const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SoluteTimeseries___getitem__" "', argument " "2"" of type '" "cmf::water::solute const &""'"); - } - arg2 = reinterpret_cast< cmf::water::solute * >(argp2); - { - try { - result = (cmf::math::timeseries *) &cmf_water_SoluteTimeseries___getitem__(arg1,(cmf::water::solute const &)*arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SoluteTimeseries___setitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::SoluteTimeseries *arg1 = (cmf::water::SoluteTimeseries *) 0 ; - cmf::water::solute *arg2 = 0 ; - cmf::math::timeseries arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "solute",(char *) "concentration", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:SoluteTimeseries___setitem__",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__SoluteTimeseries, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SoluteTimeseries___setitem__" "', argument " "1"" of type '" "cmf::water::SoluteTimeseries *""'"); - } - arg1 = reinterpret_cast< cmf::water::SoluteTimeseries * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_cmf__water__solute, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SoluteTimeseries___setitem__" "', argument " "2"" of type '" "cmf::water::solute const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SoluteTimeseries___setitem__" "', argument " "2"" of type '" "cmf::water::solute const &""'"); - } - arg2 = reinterpret_cast< cmf::water::solute * >(argp2); - { - cmf::math::timeseries *p_ts = &arg3; - int res=SWIG_ConvertPtr(obj2,(void**)(&p_ts),SWIGTYPE_p_cmf__math__timeseries,0); - if (!(SWIG_IsOK(res)) || p_ts==0) { - if (PyNumber_Check(obj2)) { - double scalar = PyFloat_AsDouble(obj2); - arg3 = cmf::math::timeseries::from_scalar(scalar); - } else { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.timeseries object"); - } - } else { - arg3 = *p_ts; - } - } - { - try { - cmf_water_SoluteTimeseries___setitem__(arg1,(cmf::water::solute const &)*arg2,arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SoluteTimeseries___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::SoluteTimeseries *arg1 = (cmf::water::SoluteTimeseries *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - size_t result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__SoluteTimeseries, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SoluteTimeseries___len__" "', argument " "1"" of type '" "cmf::water::SoluteTimeseries const *""'"); - } - arg1 = reinterpret_cast< cmf::water::SoluteTimeseries * >(argp1); - { - try { - result = cmf_water_SoluteTimeseries___len__((cmf::water::SoluteTimeseries const *)arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_SoluteTimeseries(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::SoluteTimeseries *arg1 = (cmf::water::SoluteTimeseries *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__SoluteTimeseries, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SoluteTimeseries" "', argument " "1"" of type '" "cmf::water::SoluteTimeseries *""'"); - } - arg1 = reinterpret_cast< cmf::water::SoluteTimeseries * >(argp1); - { - try { - delete arg1; - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *SoluteTimeseries_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__water__SoluteTimeseries, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *SoluteTimeseries_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_SoluteStorage_set_adsorption(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::SoluteStorage *arg1 = (cmf::water::SoluteStorage *) 0 ; - cmf::water::Adsorption *arg2 = 0 ; - real arg3 = (real) -1 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::water::SoluteStorage > tempshared1 ; - std::shared_ptr< cmf::water::SoluteStorage > *smartarg1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - double val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "newadsorption",(char *) "m", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:SoluteStorage_set_adsorption",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__SoluteStorage_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SoluteStorage_set_adsorption" "', argument " "1"" of type '" "cmf::water::SoluteStorage *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::SoluteStorage > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::water::SoluteStorage > * >(argp1); - arg1 = const_cast< cmf::water::SoluteStorage * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::SoluteStorage > * >(argp1); - arg1 = const_cast< cmf::water::SoluteStorage * >((smartarg1 ? smartarg1->get() : 0)); - } - } - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_cmf__water__Adsorption, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SoluteStorage_set_adsorption" "', argument " "2"" of type '" "cmf::water::Adsorption const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SoluteStorage_set_adsorption" "', argument " "2"" of type '" "cmf::water::Adsorption const &""'"); - } - arg2 = reinterpret_cast< cmf::water::Adsorption * >(argp2); - if (obj2) { - ecode3 = SWIG_AsVal_double(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SoluteStorage_set_adsorption" "', argument " "3"" of type '" "real""'"); - } - arg3 = static_cast< real >(val3); - } - { - try { - (arg1)->set_adsorption((cmf::water::Adsorption const &)*arg2,arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SoluteStorage_decay_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::SoluteStorage *arg1 = (cmf::water::SoluteStorage *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::water::SoluteStorage > tempshared1 ; - std::shared_ptr< cmf::water::SoluteStorage > *smartarg1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"SoluteStorage_decay_set",2,2,swig_obj)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__SoluteStorage_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SoluteStorage_decay_set" "', argument " "1"" of type '" "cmf::water::SoluteStorage *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::SoluteStorage > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::water::SoluteStorage > * >(argp1); - arg1 = const_cast< cmf::water::SoluteStorage * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::SoluteStorage > * >(argp1); - arg1 = const_cast< cmf::water::SoluteStorage * >((smartarg1 ? smartarg1->get() : 0)); - } - } - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SoluteStorage_decay_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->decay = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SoluteStorage_decay_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::SoluteStorage *arg1 = (cmf::water::SoluteStorage *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::water::SoluteStorage > tempshared1 ; - std::shared_ptr< cmf::water::SoluteStorage > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__SoluteStorage_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SoluteStorage_decay_get" "', argument " "1"" of type '" "cmf::water::SoluteStorage *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::SoluteStorage > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::water::SoluteStorage > * >(argp1); - arg1 = const_cast< cmf::water::SoluteStorage * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::SoluteStorage > * >(argp1); - arg1 = const_cast< cmf::water::SoluteStorage * >((smartarg1 ? smartarg1->get() : 0)); - } - } - result = (real) ((arg1)->decay); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SoluteStorage_source_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::SoluteStorage *arg1 = (cmf::water::SoluteStorage *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::water::SoluteStorage > tempshared1 ; - std::shared_ptr< cmf::water::SoluteStorage > *smartarg1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"SoluteStorage_source_set",2,2,swig_obj)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__SoluteStorage_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SoluteStorage_source_set" "', argument " "1"" of type '" "cmf::water::SoluteStorage *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::SoluteStorage > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::water::SoluteStorage > * >(argp1); - arg1 = const_cast< cmf::water::SoluteStorage * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::SoluteStorage > * >(argp1); - arg1 = const_cast< cmf::water::SoluteStorage * >((smartarg1 ? smartarg1->get() : 0)); - } - } - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SoluteStorage_source_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->source = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SoluteStorage_source_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::SoluteStorage *arg1 = (cmf::water::SoluteStorage *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::water::SoluteStorage > tempshared1 ; - std::shared_ptr< cmf::water::SoluteStorage > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__SoluteStorage_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SoluteStorage_source_get" "', argument " "1"" of type '" "cmf::water::SoluteStorage *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::SoluteStorage > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::water::SoluteStorage > * >(argp1); - arg1 = const_cast< cmf::water::SoluteStorage * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::SoluteStorage > * >(argp1); - arg1 = const_cast< cmf::water::SoluteStorage * >((smartarg1 ? smartarg1->get() : 0)); - } - } - result = (real) ((arg1)->source); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SoluteStorage_Solute_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::SoluteStorage *arg1 = (cmf::water::SoluteStorage *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::water::SoluteStorage > tempshared1 ; - std::shared_ptr< cmf::water::SoluteStorage > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - cmf::water::solute *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__SoluteStorage_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SoluteStorage_Solute_get" "', argument " "1"" of type '" "cmf::water::SoluteStorage *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::SoluteStorage > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::water::SoluteStorage > * >(argp1); - arg1 = const_cast< cmf::water::SoluteStorage * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::SoluteStorage > * >(argp1); - arg1 = const_cast< cmf::water::SoluteStorage * >((smartarg1 ? smartarg1->get() : 0)); - } - } - result = (cmf::water::solute *) &(cmf::water::solute const &) ((arg1)->Solute); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__water__solute, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SoluteStorage_conc(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::SoluteStorage *arg1 = (cmf::water::SoluteStorage *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::water::SoluteStorage const > tempshared1 ; - std::shared_ptr< cmf::water::SoluteStorage const > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__SoluteStorage_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SoluteStorage_conc" "', argument " "1"" of type '" "cmf::water::SoluteStorage const *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::water::SoluteStorage > * >(argp1); - delete reinterpret_cast< std::shared_ptr< const cmf::water::SoluteStorage > * >(argp1); - arg1 = const_cast< cmf::water::SoluteStorage * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::water::SoluteStorage > * >(argp1); - arg1 = const_cast< cmf::water::SoluteStorage * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - try { - result = (real)((cmf::water::SoluteStorage const *)arg1)->conc(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SoluteStorage_set_conc(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::SoluteStorage *arg1 = (cmf::water::SoluteStorage *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::water::SoluteStorage > tempshared1 ; - std::shared_ptr< cmf::water::SoluteStorage > *smartarg1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "NewConcentration", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:SoluteStorage_set_conc",kwnames,&obj0,&obj1)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__SoluteStorage_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SoluteStorage_set_conc" "', argument " "1"" of type '" "cmf::water::SoluteStorage *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::SoluteStorage > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::water::SoluteStorage > * >(argp1); - arg1 = const_cast< cmf::water::SoluteStorage * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::SoluteStorage > * >(argp1); - arg1 = const_cast< cmf::water::SoluteStorage * >((smartarg1 ? smartarg1->get() : 0)); - } - } - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SoluteStorage_set_conc" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - { - try { - (arg1)->set_conc(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_SoluteStorage(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::SoluteStorage *arg1 = (cmf::water::SoluteStorage *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::water::SoluteStorage > tempshared1 ; - std::shared_ptr< cmf::water::SoluteStorage > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__SoluteStorage_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SoluteStorage" "', argument " "1"" of type '" "cmf::water::SoluteStorage *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::SoluteStorage > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::water::SoluteStorage > * >(argp1); - arg1 = const_cast< cmf::water::SoluteStorage * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::SoluteStorage > * >(argp1); - arg1 = const_cast< cmf::water::SoluteStorage * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - try { - (void)arg1; delete smartarg1; - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *SoluteStorage_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_cmf__water__SoluteStorage_t, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *_wrap_flux_node_node_id_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::flux_node *arg1 = (cmf::water::flux_node *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::water::flux_node > tempshared1 ; - std::shared_ptr< cmf::water::flux_node > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - int result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flux_node_node_id_get" "', argument " "1"" of type '" "cmf::water::flux_node *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); - arg1 = const_cast< cmf::water::flux_node * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); - arg1 = const_cast< cmf::water::flux_node * >((smartarg1 ? smartarg1->get() : 0)); - } - } - result = (int)(int) ((arg1)->node_id); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_flux_node_is_storage(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::flux_node *arg1 = (cmf::water::flux_node *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::water::flux_node const > tempshared1 ; - std::shared_ptr< cmf::water::flux_node const > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - bool result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flux_node_is_storage" "', argument " "1"" of type '" "cmf::water::flux_node const *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::water::flux_node > * >(argp1); - delete reinterpret_cast< std::shared_ptr< const cmf::water::flux_node > * >(argp1); - arg1 = const_cast< cmf::water::flux_node * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::water::flux_node > * >(argp1); - arg1 = const_cast< cmf::water::flux_node * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - try { - result = (bool)((cmf::water::flux_node const *)arg1)->is_storage(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_flux_node_Name_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::flux_node *arg1 = (cmf::water::flux_node *) 0 ; - std::string *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::water::flux_node > tempshared1 ; - std::shared_ptr< cmf::water::flux_node > *smartarg1 = 0 ; - int res2 = SWIG_OLDOBJ ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"flux_node_Name_set",2,2,swig_obj)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flux_node_Name_set" "', argument " "1"" of type '" "cmf::water::flux_node *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); - arg1 = const_cast< cmf::water::flux_node * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); - arg1 = const_cast< cmf::water::flux_node * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "flux_node_Name_set" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "flux_node_Name_set" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - if (arg1) (arg1)->Name = *arg2; - resultobj = SWIG_Py_Void(); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_flux_node_Name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::flux_node *arg1 = (cmf::water::flux_node *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::water::flux_node > tempshared1 ; - std::shared_ptr< cmf::water::flux_node > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - std::string *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flux_node_Name_get" "', argument " "1"" of type '" "cmf::water::flux_node *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); - arg1 = const_cast< cmf::water::flux_node * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); - arg1 = const_cast< cmf::water::flux_node * >((smartarg1 ? smartarg1->get() : 0)); - } - } - result = (std::string *) & ((arg1)->Name); - resultobj = SWIG_From_std_string(static_cast< std::string >(*result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_flux_node_to_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::flux_node *arg1 = (cmf::water::flux_node *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::water::flux_node const > tempshared1 ; - std::shared_ptr< cmf::water::flux_node const > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - std::string result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flux_node_to_string" "', argument " "1"" of type '" "cmf::water::flux_node const *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::water::flux_node > * >(argp1); - delete reinterpret_cast< std::shared_ptr< const cmf::water::flux_node > * >(argp1); - arg1 = const_cast< cmf::water::flux_node * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::water::flux_node > * >(argp1); - arg1 = const_cast< cmf::water::flux_node * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - try { - result = ((cmf::water::flux_node const *)arg1)->to_string(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_std_string(static_cast< std::string >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_flux_node(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::flux_node *arg1 = (cmf::water::flux_node *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::water::flux_node > tempshared1 ; - std::shared_ptr< cmf::water::flux_node > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_flux_node" "', argument " "1"" of type '" "cmf::water::flux_node *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); - arg1 = const_cast< cmf::water::flux_node * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); - arg1 = const_cast< cmf::water::flux_node * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - try { - (void)arg1; delete smartarg1; - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_flux_node___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::flux_node *arg1 = (cmf::water::flux_node *) 0 ; - cmf::water::flux_node *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::water::flux_node const > tempshared1 ; - std::shared_ptr< cmf::water::flux_node const > *smartarg1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - std::shared_ptr< cmf::water::flux_node const > tempshared2 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "other", NULL - }; - bool result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:flux_node___eq__",kwnames,&obj0,&obj1)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flux_node___eq__" "', argument " "1"" of type '" "cmf::water::flux_node const *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::water::flux_node > * >(argp1); - delete reinterpret_cast< std::shared_ptr< const cmf::water::flux_node > * >(argp1); - arg1 = const_cast< cmf::water::flux_node * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::water::flux_node > * >(argp1); - arg1 = const_cast< cmf::water::flux_node * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - int newmem = 0; - res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "flux_node___eq__" "', argument " "2"" of type '" "cmf::water::flux_node const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "flux_node___eq__" "', argument " "2"" of type '" "cmf::water::flux_node const &""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared2 = *reinterpret_cast< std::shared_ptr< const cmf::water::flux_node > * >(argp2); - delete reinterpret_cast< std::shared_ptr< const cmf::water::flux_node > * >(argp2); - arg2 = const_cast< cmf::water::flux_node * >(tempshared2.get()); - } else { - arg2 = const_cast< cmf::water::flux_node * >(reinterpret_cast< std::shared_ptr< const cmf::water::flux_node > * >(argp2)->get()); - } - } - { - try { - result = (bool)((cmf::water::flux_node const *)arg1)->operator ==((cmf::water::flux_node const &)*arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_flux_node_RecalcFluxes(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::flux_node *arg1 = (cmf::water::flux_node *) 0 ; - cmf::math::Time arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::water::flux_node > tempshared1 ; - std::shared_ptr< cmf::water::flux_node > *smartarg1 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "t", NULL - }; - bool result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:flux_node_RecalcFluxes",kwnames,&obj0,&obj1)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flux_node_RecalcFluxes" "', argument " "1"" of type '" "cmf::water::flux_node *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); - arg1 = const_cast< cmf::water::flux_node * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); - arg1 = const_cast< cmf::water::flux_node * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - arg2 = convert_datetime_to_cmftime(obj1); - if (arg2 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } - } - { - try { - result = (bool)(arg1)->RecalcFluxes(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_flux_node_connection_to(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::flux_node *arg1 = (cmf::water::flux_node *) 0 ; - cmf::water::flux_node *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::water::flux_node > tempshared1 ; - std::shared_ptr< cmf::water::flux_node > *smartarg1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - std::shared_ptr< cmf::water::flux_node const > tempshared2 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "target", NULL - }; - cmf::water::flux_connection *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:flux_node_connection_to",kwnames,&obj0,&obj1)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flux_node_connection_to" "', argument " "1"" of type '" "cmf::water::flux_node *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); - arg1 = const_cast< cmf::water::flux_node * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); - arg1 = const_cast< cmf::water::flux_node * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - int newmem = 0; - res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "flux_node_connection_to" "', argument " "2"" of type '" "cmf::water::flux_node const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "flux_node_connection_to" "', argument " "2"" of type '" "cmf::water::flux_node const &""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared2 = *reinterpret_cast< std::shared_ptr< const cmf::water::flux_node > * >(argp2); - delete reinterpret_cast< std::shared_ptr< const cmf::water::flux_node > * >(argp2); - arg2 = const_cast< cmf::water::flux_node * >(tempshared2.get()); - } else { - arg2 = const_cast< cmf::water::flux_node * >(reinterpret_cast< std::shared_ptr< const cmf::water::flux_node > * >(argp2)->get()); - } - } - { - try { - result = (cmf::water::flux_connection *)(arg1)->connection_to((cmf::water::flux_node const &)*arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__water__flux_connection, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_flux_node_remove_connection(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::flux_node *arg1 = (cmf::water::flux_node *) 0 ; - cmf::water::flux_node::ptr arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::water::flux_node > tempshared1 ; - std::shared_ptr< cmf::water::flux_node > *smartarg1 = 0 ; - void *argp2 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "To", NULL - }; - bool result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:flux_node_remove_connection",kwnames,&obj0,&obj1)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flux_node_remove_connection" "', argument " "1"" of type '" "cmf::water::flux_node *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); - arg1 = const_cast< cmf::water::flux_node * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); - arg1 = const_cast< cmf::water::flux_node * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - int newmem = 0; - res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "flux_node_remove_connection" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); - } - if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); - } - { - try { - result = (bool)(arg1)->remove_connection(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_flux_node_flux_to(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::flux_node *arg1 = (cmf::water::flux_node *) 0 ; - cmf::water::flux_node *arg2 = 0 ; - cmf::math::Time arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::water::flux_node > tempshared1 ; - std::shared_ptr< cmf::water::flux_node > *smartarg1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - std::shared_ptr< cmf::water::flux_node const > tempshared2 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "target",(char *) "t", NULL - }; - real result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:flux_node_flux_to",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flux_node_flux_to" "', argument " "1"" of type '" "cmf::water::flux_node *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); - arg1 = const_cast< cmf::water::flux_node * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); - arg1 = const_cast< cmf::water::flux_node * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - int newmem = 0; - res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "flux_node_flux_to" "', argument " "2"" of type '" "cmf::water::flux_node const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "flux_node_flux_to" "', argument " "2"" of type '" "cmf::water::flux_node const &""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared2 = *reinterpret_cast< std::shared_ptr< const cmf::water::flux_node > * >(argp2); - delete reinterpret_cast< std::shared_ptr< const cmf::water::flux_node > * >(argp2); - arg2 = const_cast< cmf::water::flux_node * >(tempshared2.get()); - } else { - arg2 = const_cast< cmf::water::flux_node * >(reinterpret_cast< std::shared_ptr< const cmf::water::flux_node > * >(argp2)->get()); - } - } - { - arg3 = convert_datetime_to_cmftime(obj2); - if (arg3 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } - } - { - try { - result = (real)(arg1)->flux_to((cmf::water::flux_node const &)*arg2,arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_flux_node_flux3d_to(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::flux_node *arg1 = (cmf::water::flux_node *) 0 ; - cmf::water::flux_node *arg2 = 0 ; - cmf::math::Time arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::water::flux_node > tempshared1 ; - std::shared_ptr< cmf::water::flux_node > *smartarg1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - std::shared_ptr< cmf::water::flux_node const > tempshared2 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "target",(char *) "t", NULL - }; - cmf::geometry::point result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:flux_node_flux3d_to",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flux_node_flux3d_to" "', argument " "1"" of type '" "cmf::water::flux_node *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); - arg1 = const_cast< cmf::water::flux_node * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); - arg1 = const_cast< cmf::water::flux_node * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - int newmem = 0; - res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "flux_node_flux3d_to" "', argument " "2"" of type '" "cmf::water::flux_node const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "flux_node_flux3d_to" "', argument " "2"" of type '" "cmf::water::flux_node const &""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared2 = *reinterpret_cast< std::shared_ptr< const cmf::water::flux_node > * >(argp2); - delete reinterpret_cast< std::shared_ptr< const cmf::water::flux_node > * >(argp2); - arg2 = const_cast< cmf::water::flux_node * >(tempshared2.get()); - } else { - arg2 = const_cast< cmf::water::flux_node * >(reinterpret_cast< std::shared_ptr< const cmf::water::flux_node > * >(argp2)->get()); - } - } - { - arg3 = convert_datetime_to_cmftime(obj2); - if (arg3 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } - } - { - try { - result = (arg1)->flux3d_to((cmf::water::flux_node const &)*arg2,arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj((new cmf::geometry::point(static_cast< const cmf::geometry::point& >(result))), SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_flux_node_get_3d_flux(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::flux_node *arg1 = (cmf::water::flux_node *) 0 ; - cmf::math::Time arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::water::flux_node > tempshared1 ; - std::shared_ptr< cmf::water::flux_node > *smartarg1 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "t", NULL - }; - cmf::geometry::point result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:flux_node_get_3d_flux",kwnames,&obj0,&obj1)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flux_node_get_3d_flux" "', argument " "1"" of type '" "cmf::water::flux_node *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); - arg1 = const_cast< cmf::water::flux_node * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); - arg1 = const_cast< cmf::water::flux_node * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - arg2 = convert_datetime_to_cmftime(obj1); - if (arg2 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } - } - { - try { - result = (arg1)->get_3d_flux(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj((new cmf::geometry::point(static_cast< const cmf::geometry::point& >(result))), SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_flux_node_waterbalance(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::flux_node *arg1 = (cmf::water::flux_node *) 0 ; - cmf::math::Time arg2 ; - cmf::water::flux_connection *arg3 = (cmf::water::flux_connection *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::water::flux_node const > tempshared1 ; - std::shared_ptr< cmf::water::flux_node const > *smartarg1 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "t",(char *) "Without", NULL - }; - real result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:flux_node_waterbalance",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flux_node_waterbalance" "', argument " "1"" of type '" "cmf::water::flux_node const *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::water::flux_node > * >(argp1); - delete reinterpret_cast< std::shared_ptr< const cmf::water::flux_node > * >(argp1); - arg1 = const_cast< cmf::water::flux_node * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::water::flux_node > * >(argp1); - arg1 = const_cast< cmf::water::flux_node * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - arg2 = convert_datetime_to_cmftime(obj1); - if (arg2 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } - } - if (obj2) { - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_cmf__water__flux_connection, 0 | 0 ); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "flux_node_waterbalance" "', argument " "3"" of type '" "cmf::water::flux_connection const *""'"); - } - arg3 = reinterpret_cast< cmf::water::flux_connection * >(argp3); - } - { - try { - result = (real)((cmf::water::flux_node const *)arg1)->waterbalance(arg2,(cmf::water::flux_connection const *)arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_flux_node___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::flux_node *arg1 = (cmf::water::flux_node *) 0 ; - cmf::math::Time arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::water::flux_node const > tempshared1 ; - std::shared_ptr< cmf::water::flux_node const > *smartarg1 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "t", NULL - }; - real result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:flux_node___call__",kwnames,&obj0,&obj1)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flux_node___call__" "', argument " "1"" of type '" "cmf::water::flux_node const *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::water::flux_node > * >(argp1); - delete reinterpret_cast< std::shared_ptr< const cmf::water::flux_node > * >(argp1); - arg1 = const_cast< cmf::water::flux_node * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::water::flux_node > * >(argp1); - arg1 = const_cast< cmf::water::flux_node * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - arg2 = convert_datetime_to_cmftime(obj1); - if (arg2 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } - } - { - try { - result = (real)((cmf::water::flux_node const *)arg1)->operator ()(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_flux_node_conc(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::flux_node *arg1 = (cmf::water::flux_node *) 0 ; - cmf::math::Time arg2 ; - cmf::water::solute *arg3 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::water::flux_node const > tempshared1 ; - std::shared_ptr< cmf::water::flux_node const > *smartarg1 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "t",(char *) "Solute", NULL - }; - real result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:flux_node_conc",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flux_node_conc" "', argument " "1"" of type '" "cmf::water::flux_node const *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::water::flux_node > * >(argp1); - delete reinterpret_cast< std::shared_ptr< const cmf::water::flux_node > * >(argp1); - arg1 = const_cast< cmf::water::flux_node * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::water::flux_node > * >(argp1); - arg1 = const_cast< cmf::water::flux_node * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - arg2 = convert_datetime_to_cmftime(obj1); - if (arg2 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } - } - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_cmf__water__solute, 0 | 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "flux_node_conc" "', argument " "3"" of type '" "cmf::water::solute const &""'"); - } - if (!argp3) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "flux_node_conc" "', argument " "3"" of type '" "cmf::water::solute const &""'"); - } - arg3 = reinterpret_cast< cmf::water::solute * >(argp3); - { - try { - result = (real)((cmf::water::flux_node const *)arg1)->conc(arg2,(cmf::water::solute const &)*arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_flux_node_position_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::flux_node *arg1 = (cmf::water::flux_node *) 0 ; - cmf::geometry::point *arg2 = (cmf::geometry::point *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::water::flux_node > tempshared1 ; - std::shared_ptr< cmf::water::flux_node > *smartarg1 = 0 ; - cmf::geometry::point p2 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"flux_node_position_set",2,2,swig_obj)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flux_node_position_set" "', argument " "1"" of type '" "cmf::water::flux_node *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); - arg1 = const_cast< cmf::water::flux_node * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); - arg1 = const_cast< cmf::water::flux_node * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - if (SWIG_ConvertPtr(swig_obj[1], (void **) &arg2, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { - if (check_xy(swig_obj[1])) { - std::string res = convert_xyz_to_point(swig_obj[1],p2); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - return NULL; - } - } - else if (PySequence_Check(swig_obj[1])) { - std::string res = convert_seq_to_point(swig_obj[1],p2); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError, res.c_str()); - } - } else { - std::string res="<"; - res+=pyrepr(swig_obj[1]); - res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - } - arg2 = &p2; - } - } - if (arg1) (arg1)->position = *arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_flux_node_position_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::flux_node *arg1 = (cmf::water::flux_node *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::water::flux_node > tempshared1 ; - std::shared_ptr< cmf::water::flux_node > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - cmf::geometry::point *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flux_node_position_get" "', argument " "1"" of type '" "cmf::water::flux_node *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); - arg1 = const_cast< cmf::water::flux_node * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); - arg1 = const_cast< cmf::water::flux_node * >((smartarg1 ? smartarg1->get() : 0)); - } - } - result = (cmf::geometry::point *)& ((arg1)->position); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__geometry__point, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_flux_node_is_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::flux_node *arg1 = (cmf::water::flux_node *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::water::flux_node const > tempshared1 ; - std::shared_ptr< cmf::water::flux_node const > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - double result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flux_node_is_empty" "', argument " "1"" of type '" "cmf::water::flux_node const *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::water::flux_node > * >(argp1); - delete reinterpret_cast< std::shared_ptr< const cmf::water::flux_node > * >(argp1); - arg1 = const_cast< cmf::water::flux_node * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::water::flux_node > * >(argp1); - arg1 = const_cast< cmf::water::flux_node * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - try { - result = (double)((cmf::water::flux_node const *)arg1)->is_empty(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_flux_node(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::project *arg1 = 0 ; - cmf::geometry::point arg2 = (cmf::geometry::point) cmf::geometry::point() ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "_project",(char *) "location", NULL - }; - cmf::water::flux_node *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:new_flux_node",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_cmf__project, 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_flux_node" "', argument " "1"" of type '" "cmf::project &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_flux_node" "', argument " "1"" of type '" "cmf::project &""'"); - } - arg1 = reinterpret_cast< cmf::project * >(argp1); - if (obj1) { - { - if (check_xy(obj1)) { - std::string res = convert_xyz_to_point(obj1,arg2); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - return NULL; - } - } - else if (PySequence_Check(obj1)) { - std::string res = convert_seq_to_point(obj1,arg2); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError, res.c_str()); - } - } else { - std::string res="<"; - res+=pyrepr(obj1); - res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - } - } - } - { - try { - result = (cmf::water::flux_node *)new cmf::water::flux_node(*arg1,arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - std::shared_ptr< cmf::water::flux_node > *smartresult = result ? new std::shared_ptr< cmf::water::flux_node >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0; - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_flux_node_project_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::flux_node *arg1 = (cmf::water::flux_node *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::water::flux_node > tempshared1 ; - std::shared_ptr< cmf::water::flux_node > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - cmf::project *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flux_node_project_get" "', argument " "1"" of type '" "cmf::water::flux_node *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); - arg1 = const_cast< cmf::water::flux_node * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); - arg1 = const_cast< cmf::water::flux_node * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - try { - result = (cmf::project *)cmf_water_flux_node_project_get(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__project, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_flux_node_potential_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::flux_node *arg1 = (cmf::water::flux_node *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::water::flux_node > tempshared1 ; - std::shared_ptr< cmf::water::flux_node > *smartarg1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"flux_node_potential_set",2,2,swig_obj)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flux_node_potential_set" "', argument " "1"" of type '" "cmf::water::flux_node *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); - arg1 = const_cast< cmf::water::flux_node * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); - arg1 = const_cast< cmf::water::flux_node * >((smartarg1 ? smartarg1->get() : 0)); - } - } - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "flux_node_potential_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - { - try { - cmf_water_flux_node_potential_set(arg1,arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_flux_node_potential_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::flux_node *arg1 = (cmf::water::flux_node *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::water::flux_node > tempshared1 ; - std::shared_ptr< cmf::water::flux_node > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flux_node_potential_get" "', argument " "1"" of type '" "cmf::water::flux_node *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); - arg1 = const_cast< cmf::water::flux_node * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); - arg1 = const_cast< cmf::water::flux_node * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - try { - result = (real)cmf_water_flux_node_potential_get(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_flux_node_connections_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::flux_node *arg1 = (cmf::water::flux_node *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::water::flux_node > tempshared1 ; - std::shared_ptr< cmf::water::flux_node > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - cmf::water::connection_list *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flux_node_connections_get" "', argument " "1"" of type '" "cmf::water::flux_node *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); - arg1 = const_cast< cmf::water::flux_node * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); - arg1 = const_cast< cmf::water::flux_node * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - try { - result = (cmf::water::connection_list *)cmf_water_flux_node_connections_get(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - // %typemap(out) cmf::water::connection_vector { - resultobj = PyList_New(result->size()); - for (Py_ssize_t i = 0; i size()); ++i) { - cmf::water::flux_connection* item = (*result)[i].get(); - PyObject* py_item = SWIG_NewPointerObj(item,SWIGTYPE_p_cmf__water__flux_connection,0); - PyList_SetItem(resultobj,i,py_item); - } - delete result; - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *flux_node_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *flux_node_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_count_node_references(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::flux_node::ptr arg1 ; - void *argp1 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - char * kwnames[] = { - (char *) "node", NULL - }; - int result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:count_node_references",kwnames,&obj0)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "count_node_references" "', argument " "1"" of type '" "cmf::water::flux_node::ptr""'"); - } - if (argp1) arg1 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp1)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp1); - } - { - try { - result = (int)cmf::water::count_node_references(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_get_higher_node(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::flux_node::ptr arg1 ; - cmf::water::flux_node::ptr arg2 ; - void *argp1 ; - int res1 = 0 ; - void *argp2 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "node1",(char *) "node2", NULL - }; - cmf::water::flux_node::ptr result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:get_higher_node",kwnames,&obj0,&obj1)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "get_higher_node" "', argument " "1"" of type '" "cmf::water::flux_node::ptr""'"); - } - if (argp1) arg1 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp1)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp1); - } - { - int newmem = 0; - res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "get_higher_node" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); - } - if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); - } - { - try { - result = cmf::water::get_higher_node(arg1,arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - std::shared_ptr< cmf::water::flux_node > *smartresult = result ? new std::shared_ptr< cmf::water::flux_node >(result) : 0; - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, SWIG_POINTER_OWN); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_get_lower_node(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::flux_node::ptr arg1 ; - cmf::water::flux_node::ptr arg2 ; - void *argp1 ; - int res1 = 0 ; - void *argp2 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "node1",(char *) "node2", NULL - }; - cmf::water::flux_node::ptr result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:get_lower_node",kwnames,&obj0,&obj1)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "get_lower_node" "', argument " "1"" of type '" "cmf::water::flux_node::ptr""'"); - } - if (argp1) arg1 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp1)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp1); - } - { - int newmem = 0; - res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "get_lower_node" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); - } - if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); - } - { - try { - result = cmf::water::get_lower_node(arg1,arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - std::shared_ptr< cmf::water::flux_node > *smartresult = result ? new std::shared_ptr< cmf::water::flux_node >(result) : 0; - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, SWIG_POINTER_OWN); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_waterbalance_integrator_integration_t(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::waterbalance_integrator *arg1 = (cmf::water::waterbalance_integrator *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::water::waterbalance_integrator const > tempshared1 ; - std::shared_ptr< cmf::water::waterbalance_integrator const > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - cmf::math::Time result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__waterbalance_integrator_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "waterbalance_integrator_integration_t" "', argument " "1"" of type '" "cmf::water::waterbalance_integrator const *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::water::waterbalance_integrator > * >(argp1); - delete reinterpret_cast< std::shared_ptr< const cmf::water::waterbalance_integrator > * >(argp1); - arg1 = const_cast< cmf::water::waterbalance_integrator * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::water::waterbalance_integrator > * >(argp1); - arg1 = const_cast< cmf::water::waterbalance_integrator * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - try { - result = ((cmf::water::waterbalance_integrator const *)arg1)->integration_t(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj((new cmf::math::Time(static_cast< const cmf::math::Time& >(result))), SWIGTYPE_p_cmf__math__Time, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_waterbalance_integrator_t0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::waterbalance_integrator *arg1 = (cmf::water::waterbalance_integrator *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::water::waterbalance_integrator const > tempshared1 ; - std::shared_ptr< cmf::water::waterbalance_integrator const > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - cmf::math::Time result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__waterbalance_integrator_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "waterbalance_integrator_t0" "', argument " "1"" of type '" "cmf::water::waterbalance_integrator const *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::water::waterbalance_integrator > * >(argp1); - delete reinterpret_cast< std::shared_ptr< const cmf::water::waterbalance_integrator > * >(argp1); - arg1 = const_cast< cmf::water::waterbalance_integrator * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::water::waterbalance_integrator > * >(argp1); - arg1 = const_cast< cmf::water::waterbalance_integrator * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - try { - result = ((cmf::water::waterbalance_integrator const *)arg1)->t0(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj((new cmf::math::Time(static_cast< const cmf::math::Time& >(result))), SWIGTYPE_p_cmf__math__Time, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_waterbalance_integrator___get_node(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::waterbalance_integrator *arg1 = (cmf::water::waterbalance_integrator *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::water::waterbalance_integrator const > tempshared1 ; - std::shared_ptr< cmf::water::waterbalance_integrator const > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - cmf::water::flux_node::ptr result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__waterbalance_integrator_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "waterbalance_integrator___get_node" "', argument " "1"" of type '" "cmf::water::waterbalance_integrator const *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::water::waterbalance_integrator > * >(argp1); - delete reinterpret_cast< std::shared_ptr< const cmf::water::waterbalance_integrator > * >(argp1); - arg1 = const_cast< cmf::water::waterbalance_integrator * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::water::waterbalance_integrator > * >(argp1); - arg1 = const_cast< cmf::water::waterbalance_integrator * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - try { - result = ((cmf::water::waterbalance_integrator const *)arg1)->get_node(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - std::shared_ptr< cmf::water::flux_node > *smartresult = result ? new std::shared_ptr< cmf::water::flux_node >(result) : 0; - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, SWIG_POINTER_OWN); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_waterbalance_integrator___set_node(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::waterbalance_integrator *arg1 = (cmf::water::waterbalance_integrator *) 0 ; - cmf::water::flux_node::ptr arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::water::waterbalance_integrator > tempshared1 ; - std::shared_ptr< cmf::water::waterbalance_integrator > *smartarg1 = 0 ; - void *argp2 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "node", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:waterbalance_integrator___set_node",kwnames,&obj0,&obj1)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__waterbalance_integrator_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "waterbalance_integrator___set_node" "', argument " "1"" of type '" "cmf::water::waterbalance_integrator *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::waterbalance_integrator > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::water::waterbalance_integrator > * >(argp1); - arg1 = const_cast< cmf::water::waterbalance_integrator * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::waterbalance_integrator > * >(argp1); - arg1 = const_cast< cmf::water::waterbalance_integrator * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - int newmem = 0; - res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "waterbalance_integrator___set_node" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); - } - if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); - } - { - try { - (arg1)->set_node(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_waterbalance_integrator(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::flux_node::ptr arg1 ; - void *argp1 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - char * kwnames[] = { - (char *) "node", NULL - }; - cmf::water::waterbalance_integrator *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:new_waterbalance_integrator",kwnames,&obj0)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_waterbalance_integrator" "', argument " "1"" of type '" "cmf::water::flux_node::ptr""'"); - } - if (argp1) arg1 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp1)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp1); - } - { - try { - result = (cmf::water::waterbalance_integrator *)new cmf::water::waterbalance_integrator(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - std::shared_ptr< cmf::water::waterbalance_integrator > *smartresult = result ? new std::shared_ptr< cmf::water::waterbalance_integrator >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0; - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__water__waterbalance_integrator_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_waterbalance_integrator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::waterbalance_integrator *arg1 = (cmf::water::waterbalance_integrator *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::water::waterbalance_integrator > tempshared1 ; - std::shared_ptr< cmf::water::waterbalance_integrator > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__waterbalance_integrator_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_waterbalance_integrator" "', argument " "1"" of type '" "cmf::water::waterbalance_integrator *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::waterbalance_integrator > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::water::waterbalance_integrator > * >(argp1); - arg1 = const_cast< cmf::water::waterbalance_integrator * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::waterbalance_integrator > * >(argp1); - arg1 = const_cast< cmf::water::waterbalance_integrator * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - try { - (void)arg1; delete smartarg1; - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *waterbalance_integrator_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_cmf__water__waterbalance_integrator_t, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *waterbalance_integrator_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_flux_connection_left_node(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::flux_connection *arg1 = (cmf::water::flux_connection *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::water::flux_node::ptr result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__flux_connection, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flux_connection_left_node" "', argument " "1"" of type '" "cmf::water::flux_connection const *""'"); - } - arg1 = reinterpret_cast< cmf::water::flux_connection * >(argp1); - { - try { - result = ((cmf::water::flux_connection const *)arg1)->left_node(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - std::shared_ptr< cmf::water::flux_node > *smartresult = result ? new std::shared_ptr< cmf::water::flux_node >(result) : 0; - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, SWIG_POINTER_OWN); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_flux_connection_right_node(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::flux_connection *arg1 = (cmf::water::flux_connection *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::water::flux_node::ptr result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__flux_connection, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flux_connection_right_node" "', argument " "1"" of type '" "cmf::water::flux_connection const *""'"); - } - arg1 = reinterpret_cast< cmf::water::flux_connection * >(argp1); - { - try { - result = ((cmf::water::flux_connection const *)arg1)->right_node(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - std::shared_ptr< cmf::water::flux_node > *smartresult = result ? new std::shared_ptr< cmf::water::flux_node >(result) : 0; - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, SWIG_POINTER_OWN); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_flux_connection_kill_me(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::flux_connection *arg1 = (cmf::water::flux_connection *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - bool result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__flux_connection, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flux_connection_kill_me" "', argument " "1"" of type '" "cmf::water::flux_connection *""'"); - } - arg1 = reinterpret_cast< cmf::water::flux_connection * >(argp1); - { - try { - result = (bool)(arg1)->kill_me(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_flux_connection_refresh(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::flux_connection *arg1 = (cmf::water::flux_connection *) 0 ; - cmf::math::Time arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "t", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:flux_connection_refresh",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__flux_connection, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flux_connection_refresh" "', argument " "1"" of type '" "cmf::water::flux_connection *""'"); - } - arg1 = reinterpret_cast< cmf::water::flux_connection * >(argp1); - { - arg2 = convert_datetime_to_cmftime(obj1); - if (arg2 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } - } - { - try { - (arg1)->refresh(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_flux_connection_connection_id_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::flux_connection *arg1 = (cmf::water::flux_connection *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - int result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__flux_connection, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flux_connection_connection_id_get" "', argument " "1"" of type '" "cmf::water::flux_connection *""'"); - } - arg1 = reinterpret_cast< cmf::water::flux_connection * >(argp1); - result = (int)(int) ((arg1)->connection_id); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_flux_connection___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::flux_connection *arg1 = (cmf::water::flux_connection *) 0 ; - cmf::water::flux_connection *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "other", NULL - }; - bool result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:flux_connection___eq__",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__flux_connection, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flux_connection___eq__" "', argument " "1"" of type '" "cmf::water::flux_connection *""'"); - } - arg1 = reinterpret_cast< cmf::water::flux_connection * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_cmf__water__flux_connection, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "flux_connection___eq__" "', argument " "2"" of type '" "cmf::water::flux_connection const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "flux_connection___eq__" "', argument " "2"" of type '" "cmf::water::flux_connection const &""'"); - } - arg2 = reinterpret_cast< cmf::water::flux_connection * >(argp2); - { - try { - result = (bool)(arg1)->operator ==((cmf::water::flux_connection const &)*arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_flux_connection_get_target__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::water::flux_connection *arg1 = (cmf::water::flux_connection *) 0 ; - cmf::water::flux_node *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - std::shared_ptr< cmf::water::flux_node const > tempshared2 ; - cmf::water::flux_node::ptr result; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__flux_connection, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flux_connection_get_target" "', argument " "1"" of type '" "cmf::water::flux_connection *""'"); - } - arg1 = reinterpret_cast< cmf::water::flux_connection * >(argp1); - { - int newmem = 0; - res2 = SWIG_ConvertPtrAndOwn(swig_obj[1], &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "flux_connection_get_target" "', argument " "2"" of type '" "cmf::water::flux_node const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "flux_connection_get_target" "', argument " "2"" of type '" "cmf::water::flux_node const &""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared2 = *reinterpret_cast< std::shared_ptr< const cmf::water::flux_node > * >(argp2); - delete reinterpret_cast< std::shared_ptr< const cmf::water::flux_node > * >(argp2); - arg2 = const_cast< cmf::water::flux_node * >(tempshared2.get()); - } else { - arg2 = const_cast< cmf::water::flux_node * >(reinterpret_cast< std::shared_ptr< const cmf::water::flux_node > * >(argp2)->get()); - } - } - { - try { - result = (arg1)->get_target((cmf::water::flux_node const &)*arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - if (!(result)) resultobj = SWIG_NewPointerObj(0,SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, SWIG_POINTER_OWN); - int dcast = 0; - /*@SWIG:C:\Apps\swigwin-3.0.12\Lib\typemaps\swigmacros.swg,200,%formacro@*//*@SWIG:C:\Apps\swigwin-3.0.12\Lib\typemaps\swigmacros.swg,192,%_formacro_1@*//*@SWIG:cmf\cmf_core_src\cmf_swiglib.i,74,%_node_down_cast@*/ - if (dcast==0 && result) /*check for cmf::atmosphere::RainSource*/ { - std::shared_ptr output = std::dynamic_pointer_cast(result); - if (output) /*flux_node is cmf::atmosphere::RainSource */ { - dcast=1; - resultobj = SWIG_NewPointerObj(new std::shared_ptr(output),SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__RainSource_t, SWIG_POINTER_OWN); - } - } - /*@SWIG@*/ - - /*@SWIG:C:\Apps\swigwin-3.0.12\Lib\typemaps\swigmacros.swg,192,%_formacro_1@*//*@SWIG:cmf\cmf_core_src\cmf_swiglib.i,74,%_node_down_cast@*/ - if (dcast==0 && result) /*check for cmf::water::DirichletBoundary*/ { - std::shared_ptr output = std::dynamic_pointer_cast(result); - if (output) /*flux_node is cmf::water::DirichletBoundary */ { - dcast=1; - resultobj = SWIG_NewPointerObj(new std::shared_ptr(output),SWIGTYPE_p_std__shared_ptrT_cmf__water__DirichletBoundary_t, SWIG_POINTER_OWN); - } - } - /*@SWIG@*/ - - /*@SWIG:C:\Apps\swigwin-3.0.12\Lib\typemaps\swigmacros.swg,192,%_formacro_1@*//*@SWIG:cmf\cmf_core_src\cmf_swiglib.i,74,%_node_down_cast@*/ - if (dcast==0 && result) /*check for cmf::water::NeumannBoundary*/ { - std::shared_ptr output = std::dynamic_pointer_cast(result); - if (output) /*flux_node is cmf::water::NeumannBoundary */ { - dcast=1; - resultobj = SWIG_NewPointerObj(new std::shared_ptr(output),SWIGTYPE_p_std__shared_ptrT_cmf__water__NeumannBoundary_t, SWIG_POINTER_OWN); - } - } - /*@SWIG@*/ - - /*@SWIG:C:\Apps\swigwin-3.0.12\Lib\typemaps\swigmacros.swg,192,%_formacro_1@*//*@SWIG:cmf\cmf_core_src\cmf_swiglib.i,74,%_node_down_cast@*/ - if (dcast==0 && result) /*check for cmf::upslope::SoilLayer*/ { - std::shared_ptr output = std::dynamic_pointer_cast(result); - if (output) /*flux_node is cmf::upslope::SoilLayer */ { - dcast=1; - resultobj = SWIG_NewPointerObj(new std::shared_ptr(output),SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, SWIG_POINTER_OWN); - } - } - /*@SWIG@*/ - - /*@SWIG:C:\Apps\swigwin-3.0.12\Lib\typemaps\swigmacros.swg,192,%_formacro_1@*//*@SWIG:cmf\cmf_core_src\cmf_swiglib.i,74,%_node_down_cast@*/ - if (dcast==0 && result) /*check for cmf::upslope::aquifer*/ { - std::shared_ptr output = std::dynamic_pointer_cast(result); - if (output) /*flux_node is cmf::upslope::aquifer */ { - dcast=1; - resultobj = SWIG_NewPointerObj(new std::shared_ptr(output),SWIGTYPE_p_std__shared_ptrT_cmf__upslope__aquifer_t, SWIG_POINTER_OWN); - } - } - /*@SWIG@*/ - - /*@SWIG:C:\Apps\swigwin-3.0.12\Lib\typemaps\swigmacros.swg,192,%_formacro_1@*//*@SWIG:cmf\cmf_core_src\cmf_swiglib.i,74,%_node_down_cast@*/ - if (dcast==0 && result) /*check for cmf::river::Reach*/ { - std::shared_ptr output = std::dynamic_pointer_cast(result); - if (output) /*flux_node is cmf::river::Reach */ { - dcast=1; - resultobj = SWIG_NewPointerObj(new std::shared_ptr(output),SWIGTYPE_p_std__shared_ptrT_cmf__river__Reach_t, SWIG_POINTER_OWN); - } - } - /*@SWIG@*/ - - /*@SWIG:C:\Apps\swigwin-3.0.12\Lib\typemaps\swigmacros.swg,192,%_formacro_1@*//*@SWIG:cmf\cmf_core_src\cmf_swiglib.i,74,%_node_down_cast@*/ - if (dcast==0 && result) /*check for cmf::river::OpenWaterStorage*/ { - std::shared_ptr output = std::dynamic_pointer_cast(result); - if (output) /*flux_node is cmf::river::OpenWaterStorage */ { - dcast=1; - resultobj = SWIG_NewPointerObj(new std::shared_ptr(output),SWIGTYPE_p_std__shared_ptrT_cmf__river__OpenWaterStorage_t, SWIG_POINTER_OWN); - } - } - /*@SWIG@*/ - - /*@SWIG:C:\Apps\swigwin-3.0.12\Lib\typemaps\swigmacros.swg,192,%_formacro_1@*//*@SWIG:cmf\cmf_core_src\cmf_swiglib.i,74,%_node_down_cast@*/ - if (dcast==0 && result) /*check for cmf::water::WaterStorage*/ { - std::shared_ptr output = std::dynamic_pointer_cast(result); - if (output) /*flux_node is cmf::water::WaterStorage */ { - dcast=1; - resultobj = SWIG_NewPointerObj(new std::shared_ptr(output),SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, SWIG_POINTER_OWN); - } - } - /*@SWIG@*/ - - /*@SWIG:C:\Apps\swigwin-3.0.12\Lib\typemaps\swigmacros.swg,192,%_formacro_1@*//*@SWIG:cmf\cmf_core_src\cmf_swiglib.i,74,%_node_down_cast@*/ - if (dcast==0 && result) /*check for cmf::upslope::MacroPore*/ { - std::shared_ptr output = std::dynamic_pointer_cast(result); - if (output) /*flux_node is cmf::upslope::MacroPore */ { - dcast=1; - resultobj = SWIG_NewPointerObj(new std::shared_ptr(output),SWIGTYPE_p_std__shared_ptrT_cmf__upslope__MacroPore_t, SWIG_POINTER_OWN); - } - } - /*@SWIG@*/ - - /*@SWIG:C:\Apps\swigwin-3.0.12\Lib\typemaps\swigmacros.swg,192,%_formacro_1@*//*@SWIG:cmf\cmf_core_src\cmf_swiglib.i,74,%_node_down_cast@*/ - if (dcast==0 && result) /*check for cmf::upslope::SurfaceWater*/ { - std::shared_ptr output = std::dynamic_pointer_cast(result); - if (output) /*flux_node is cmf::upslope::SurfaceWater */ { - dcast=1; - resultobj = SWIG_NewPointerObj(new std::shared_ptr(output),SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SurfaceWater_t, SWIG_POINTER_OWN); - } - } - /*@SWIG@*/ - - - - /*@SWIG@*/ - - /*@SWIG@*/ - - /*@SWIG@*/ - - /*@SWIG@*/ - - /*@SWIG@*/ - - /*@SWIG@*/ - - /*@SWIG@*/ - - /*@SWIG@*/ - - /*@SWIG@*/ - - /*@SWIG@*//*@SWIG@*/ - if (!dcast) resultobj = SWIG_NewPointerObj(new std::shared_ptr(result),SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, SWIG_POINTER_OWN); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_flux_connection_get_target__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::water::flux_connection *arg1 = (cmf::water::flux_connection *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - cmf::water::flux_node::ptr result; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__flux_connection, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flux_connection_get_target" "', argument " "1"" of type '" "cmf::water::flux_connection const *""'"); - } - arg1 = reinterpret_cast< cmf::water::flux_connection * >(argp1); - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "flux_connection_get_target" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - { - try { - result = ((cmf::water::flux_connection const *)arg1)->get_target(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - if (!(result)) resultobj = SWIG_NewPointerObj(0,SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, SWIG_POINTER_OWN); - int dcast = 0; - /*@SWIG:C:\Apps\swigwin-3.0.12\Lib\typemaps\swigmacros.swg,200,%formacro@*//*@SWIG:C:\Apps\swigwin-3.0.12\Lib\typemaps\swigmacros.swg,192,%_formacro_1@*//*@SWIG:cmf\cmf_core_src\cmf_swiglib.i,74,%_node_down_cast@*/ - if (dcast==0 && result) /*check for cmf::atmosphere::RainSource*/ { - std::shared_ptr output = std::dynamic_pointer_cast(result); - if (output) /*flux_node is cmf::atmosphere::RainSource */ { - dcast=1; - resultobj = SWIG_NewPointerObj(new std::shared_ptr(output),SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__RainSource_t, SWIG_POINTER_OWN); - } - } - /*@SWIG@*/ - - /*@SWIG:C:\Apps\swigwin-3.0.12\Lib\typemaps\swigmacros.swg,192,%_formacro_1@*//*@SWIG:cmf\cmf_core_src\cmf_swiglib.i,74,%_node_down_cast@*/ - if (dcast==0 && result) /*check for cmf::water::DirichletBoundary*/ { - std::shared_ptr output = std::dynamic_pointer_cast(result); - if (output) /*flux_node is cmf::water::DirichletBoundary */ { - dcast=1; - resultobj = SWIG_NewPointerObj(new std::shared_ptr(output),SWIGTYPE_p_std__shared_ptrT_cmf__water__DirichletBoundary_t, SWIG_POINTER_OWN); - } - } - /*@SWIG@*/ - - /*@SWIG:C:\Apps\swigwin-3.0.12\Lib\typemaps\swigmacros.swg,192,%_formacro_1@*//*@SWIG:cmf\cmf_core_src\cmf_swiglib.i,74,%_node_down_cast@*/ - if (dcast==0 && result) /*check for cmf::water::NeumannBoundary*/ { - std::shared_ptr output = std::dynamic_pointer_cast(result); - if (output) /*flux_node is cmf::water::NeumannBoundary */ { - dcast=1; - resultobj = SWIG_NewPointerObj(new std::shared_ptr(output),SWIGTYPE_p_std__shared_ptrT_cmf__water__NeumannBoundary_t, SWIG_POINTER_OWN); - } - } - /*@SWIG@*/ - - /*@SWIG:C:\Apps\swigwin-3.0.12\Lib\typemaps\swigmacros.swg,192,%_formacro_1@*//*@SWIG:cmf\cmf_core_src\cmf_swiglib.i,74,%_node_down_cast@*/ - if (dcast==0 && result) /*check for cmf::upslope::SoilLayer*/ { - std::shared_ptr output = std::dynamic_pointer_cast(result); - if (output) /*flux_node is cmf::upslope::SoilLayer */ { - dcast=1; - resultobj = SWIG_NewPointerObj(new std::shared_ptr(output),SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, SWIG_POINTER_OWN); - } - } - /*@SWIG@*/ - - /*@SWIG:C:\Apps\swigwin-3.0.12\Lib\typemaps\swigmacros.swg,192,%_formacro_1@*//*@SWIG:cmf\cmf_core_src\cmf_swiglib.i,74,%_node_down_cast@*/ - if (dcast==0 && result) /*check for cmf::upslope::aquifer*/ { - std::shared_ptr output = std::dynamic_pointer_cast(result); - if (output) /*flux_node is cmf::upslope::aquifer */ { - dcast=1; - resultobj = SWIG_NewPointerObj(new std::shared_ptr(output),SWIGTYPE_p_std__shared_ptrT_cmf__upslope__aquifer_t, SWIG_POINTER_OWN); - } - } - /*@SWIG@*/ - - /*@SWIG:C:\Apps\swigwin-3.0.12\Lib\typemaps\swigmacros.swg,192,%_formacro_1@*//*@SWIG:cmf\cmf_core_src\cmf_swiglib.i,74,%_node_down_cast@*/ - if (dcast==0 && result) /*check for cmf::river::Reach*/ { - std::shared_ptr output = std::dynamic_pointer_cast(result); - if (output) /*flux_node is cmf::river::Reach */ { - dcast=1; - resultobj = SWIG_NewPointerObj(new std::shared_ptr(output),SWIGTYPE_p_std__shared_ptrT_cmf__river__Reach_t, SWIG_POINTER_OWN); - } - } - /*@SWIG@*/ - - /*@SWIG:C:\Apps\swigwin-3.0.12\Lib\typemaps\swigmacros.swg,192,%_formacro_1@*//*@SWIG:cmf\cmf_core_src\cmf_swiglib.i,74,%_node_down_cast@*/ - if (dcast==0 && result) /*check for cmf::river::OpenWaterStorage*/ { - std::shared_ptr output = std::dynamic_pointer_cast(result); - if (output) /*flux_node is cmf::river::OpenWaterStorage */ { - dcast=1; - resultobj = SWIG_NewPointerObj(new std::shared_ptr(output),SWIGTYPE_p_std__shared_ptrT_cmf__river__OpenWaterStorage_t, SWIG_POINTER_OWN); - } - } - /*@SWIG@*/ - - /*@SWIG:C:\Apps\swigwin-3.0.12\Lib\typemaps\swigmacros.swg,192,%_formacro_1@*//*@SWIG:cmf\cmf_core_src\cmf_swiglib.i,74,%_node_down_cast@*/ - if (dcast==0 && result) /*check for cmf::water::WaterStorage*/ { - std::shared_ptr output = std::dynamic_pointer_cast(result); - if (output) /*flux_node is cmf::water::WaterStorage */ { - dcast=1; - resultobj = SWIG_NewPointerObj(new std::shared_ptr(output),SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, SWIG_POINTER_OWN); - } - } - /*@SWIG@*/ - - /*@SWIG:C:\Apps\swigwin-3.0.12\Lib\typemaps\swigmacros.swg,192,%_formacro_1@*//*@SWIG:cmf\cmf_core_src\cmf_swiglib.i,74,%_node_down_cast@*/ - if (dcast==0 && result) /*check for cmf::upslope::MacroPore*/ { - std::shared_ptr output = std::dynamic_pointer_cast(result); - if (output) /*flux_node is cmf::upslope::MacroPore */ { - dcast=1; - resultobj = SWIG_NewPointerObj(new std::shared_ptr(output),SWIGTYPE_p_std__shared_ptrT_cmf__upslope__MacroPore_t, SWIG_POINTER_OWN); - } - } - /*@SWIG@*/ - - /*@SWIG:C:\Apps\swigwin-3.0.12\Lib\typemaps\swigmacros.swg,192,%_formacro_1@*//*@SWIG:cmf\cmf_core_src\cmf_swiglib.i,74,%_node_down_cast@*/ - if (dcast==0 && result) /*check for cmf::upslope::SurfaceWater*/ { - std::shared_ptr output = std::dynamic_pointer_cast(result); - if (output) /*flux_node is cmf::upslope::SurfaceWater */ { - dcast=1; - resultobj = SWIG_NewPointerObj(new std::shared_ptr(output),SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SurfaceWater_t, SWIG_POINTER_OWN); - } - } - /*@SWIG@*/ - - - - /*@SWIG@*/ - - /*@SWIG@*/ - - /*@SWIG@*/ - - /*@SWIG@*/ - - /*@SWIG@*/ - - /*@SWIG@*/ - - /*@SWIG@*/ - - /*@SWIG@*/ - - /*@SWIG@*/ - - /*@SWIG@*//*@SWIG@*/ - if (!dcast) resultobj = SWIG_NewPointerObj(new std::shared_ptr(result),SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, SWIG_POINTER_OWN); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_flux_connection_get_target(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args,"flux_connection_get_target",0,2,argv))) SWIG_fail; - --argc; - { - unsigned long _index = 0; - SWIG_TypeRank _rank = 0; - if (argc == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__water__flux_connection, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 1; - if (_rank == _rankm) goto dispatch; - } - } - check_1: - - if (argc == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__water__flux_connection, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - int res = SWIG_AsVal_int(argv[1], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 2; - if (_rank == _rankm) goto dispatch; - } - } - check_2: - - dispatch: - switch(_index) { - case 1: - return _wrap_flux_connection_get_target__SWIG_0(self, argc, argv); - case 2: - return _wrap_flux_connection_get_target__SWIG_1(self, argc, argv); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'flux_connection_get_target'.\n" - " Possible C/C++ prototypes are:\n" - " cmf::water::flux_connection::get_target(cmf::water::flux_node const &)\n" - " cmf::water::flux_connection::get_target(int) const\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_flux_connection_exchange_target(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::flux_connection *arg1 = (cmf::water::flux_connection *) 0 ; - cmf::water::flux_node::ptr arg2 ; - cmf::water::flux_node::ptr arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 ; - int res2 = 0 ; - void *argp3 ; - int res3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "oldtarget",(char *) "newTarget", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:flux_connection_exchange_target",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__flux_connection, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flux_connection_exchange_target" "', argument " "1"" of type '" "cmf::water::flux_connection *""'"); - } - arg1 = reinterpret_cast< cmf::water::flux_connection * >(argp1); - { - int newmem = 0; - res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "flux_connection_exchange_target" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); - } - if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); - } - { - int newmem = 0; - res3 = SWIG_ConvertPtrAndOwn(obj2, &argp3, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "flux_connection_exchange_target" "', argument " "3"" of type '" "cmf::water::flux_node::ptr""'"); - } - if (argp3) arg3 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp3)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp3); - } - { - try { - (arg1)->exchange_target(arg2,arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_flux_connection_q(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::flux_connection *arg1 = (cmf::water::flux_connection *) 0 ; - cmf::water::flux_node *arg2 = 0 ; - cmf::math::Time arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - std::shared_ptr< cmf::water::flux_node const > tempshared2 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "inquirer",(char *) "t", NULL - }; - real result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:flux_connection_q",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__flux_connection, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flux_connection_q" "', argument " "1"" of type '" "cmf::water::flux_connection *""'"); - } - arg1 = reinterpret_cast< cmf::water::flux_connection * >(argp1); - { - int newmem = 0; - res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "flux_connection_q" "', argument " "2"" of type '" "cmf::water::flux_node const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "flux_connection_q" "', argument " "2"" of type '" "cmf::water::flux_node const &""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared2 = *reinterpret_cast< std::shared_ptr< const cmf::water::flux_node > * >(argp2); - delete reinterpret_cast< std::shared_ptr< const cmf::water::flux_node > * >(argp2); - arg2 = const_cast< cmf::water::flux_node * >(tempshared2.get()); - } else { - arg2 = const_cast< cmf::water::flux_node * >(reinterpret_cast< std::shared_ptr< const cmf::water::flux_node > * >(argp2)->get()); - } - } - { - arg3 = convert_datetime_to_cmftime(obj2); - if (arg3 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } - } - { - try { - result = (real)(arg1)->q((cmf::water::flux_node const &)*arg2,arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_flux_connection_conc(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::flux_connection *arg1 = (cmf::water::flux_connection *) 0 ; - cmf::math::Time arg2 ; - cmf::water::solute *arg3 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "t",(char *) "_Solute", NULL - }; - real result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:flux_connection_conc",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__flux_connection, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flux_connection_conc" "', argument " "1"" of type '" "cmf::water::flux_connection *""'"); - } - arg1 = reinterpret_cast< cmf::water::flux_connection * >(argp1); - { - arg2 = convert_datetime_to_cmftime(obj1); - if (arg2 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } - } - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_cmf__water__solute, 0 | 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "flux_connection_conc" "', argument " "3"" of type '" "cmf::water::solute const &""'"); - } - if (!argp3) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "flux_connection_conc" "', argument " "3"" of type '" "cmf::water::solute const &""'"); - } - arg3 = reinterpret_cast< cmf::water::solute * >(argp3); - { - try { - result = (real)(arg1)->conc(arg2,(cmf::water::solute const &)*arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_flux_connection_type_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::flux_connection *arg1 = (cmf::water::flux_connection *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::string *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__flux_connection, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flux_connection_type_get" "', argument " "1"" of type '" "cmf::water::flux_connection *""'"); - } - arg1 = reinterpret_cast< cmf::water::flux_connection * >(argp1); - result = (std::string *) & ((arg1)->type); - resultobj = SWIG_From_std_string(static_cast< std::string >(*result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_flux_connection_get_tracer_filter__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::water::flux_connection *arg1 = (cmf::water::flux_connection *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - real result; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__flux_connection, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flux_connection_get_tracer_filter" "', argument " "1"" of type '" "cmf::water::flux_connection *""'"); - } - arg1 = reinterpret_cast< cmf::water::flux_connection * >(argp1); - { - try { - result = (real)(arg1)->get_tracer_filter(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_flux_connection_get_tracer_filter__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::water::flux_connection *arg1 = (cmf::water::flux_connection *) 0 ; - SwigValueWrapper< cmf::water::solute > arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 ; - int res2 = 0 ; - real result; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__flux_connection, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flux_connection_get_tracer_filter" "', argument " "1"" of type '" "cmf::water::flux_connection *""'"); - } - arg1 = reinterpret_cast< cmf::water::flux_connection * >(argp1); - { - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_cmf__water__solute, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "flux_connection_get_tracer_filter" "', argument " "2"" of type '" "cmf::water::solute""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "flux_connection_get_tracer_filter" "', argument " "2"" of type '" "cmf::water::solute""'"); - } else { - cmf::water::solute * temp = reinterpret_cast< cmf::water::solute * >(argp2); - arg2 = *temp; - if (SWIG_IsNewObj(res2)) delete temp; - } - } - { - try { - result = (real)(arg1)->get_tracer_filter(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_flux_connection_get_tracer_filter(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args,"flux_connection_get_tracer_filter",0,2,argv))) SWIG_fail; - --argc; - { - unsigned long _index = 0; - SWIG_TypeRank _rank = 0; - if (argc == 1) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__water__flux_connection, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 1; - if (_rank == _rankm) goto dispatch; - } - } - check_1: - - if (argc == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__water__flux_connection, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_cmf__water__solute, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 2; - if (_rank == _rankm) goto dispatch; - } - } - check_2: - - dispatch: - switch(_index) { - case 1: - return _wrap_flux_connection_get_tracer_filter__SWIG_0(self, argc, argv); - case 2: - return _wrap_flux_connection_get_tracer_filter__SWIG_1(self, argc, argv); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'flux_connection_get_tracer_filter'.\n" - " Possible C/C++ prototypes are:\n" - " cmf::water::flux_connection::get_tracer_filter()\n" - " cmf::water::flux_connection::get_tracer_filter(cmf::water::solute)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_flux_connection_set_tracer_filter__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::water::flux_connection *arg1 = (cmf::water::flux_connection *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__flux_connection, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flux_connection_set_tracer_filter" "', argument " "1"" of type '" "cmf::water::flux_connection *""'"); - } - arg1 = reinterpret_cast< cmf::water::flux_connection * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "flux_connection_set_tracer_filter" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - { - try { - (arg1)->set_tracer_filter(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_flux_connection_set_tracer_filter__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::water::flux_connection *arg1 = (cmf::water::flux_connection *) 0 ; - SwigValueWrapper< cmf::water::solute > arg2 ; - real arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 ; - int res2 = 0 ; - double val3 ; - int ecode3 = 0 ; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__flux_connection, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flux_connection_set_tracer_filter" "', argument " "1"" of type '" "cmf::water::flux_connection *""'"); - } - arg1 = reinterpret_cast< cmf::water::flux_connection * >(argp1); - { - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_cmf__water__solute, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "flux_connection_set_tracer_filter" "', argument " "2"" of type '" "cmf::water::solute""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "flux_connection_set_tracer_filter" "', argument " "2"" of type '" "cmf::water::solute""'"); - } else { - cmf::water::solute * temp = reinterpret_cast< cmf::water::solute * >(argp2); - arg2 = *temp; - if (SWIG_IsNewObj(res2)) delete temp; - } - } - ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "flux_connection_set_tracer_filter" "', argument " "3"" of type '" "real""'"); - } - arg3 = static_cast< real >(val3); - { - try { - (arg1)->set_tracer_filter(arg2,arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_flux_connection_set_tracer_filter(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[4] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args,"flux_connection_set_tracer_filter",0,3,argv))) SWIG_fail; - --argc; - { - unsigned long _index = 0; - SWIG_TypeRank _rank = 0; - if (argc == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__water__flux_connection, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 1; - if (_rank == _rankm) goto dispatch; - } - } - check_1: - - if (argc == 3) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__water__flux_connection, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_cmf__water__solute, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - int res = SWIG_AsVal_double(argv[2], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 2; - if (_rank == _rankm) goto dispatch; - } - } - check_2: - - dispatch: - switch(_index) { - case 1: - return _wrap_flux_connection_set_tracer_filter__SWIG_0(self, argc, argv); - case 2: - return _wrap_flux_connection_set_tracer_filter__SWIG_1(self, argc, argv); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'flux_connection_set_tracer_filter'.\n" - " Possible C/C++ prototypes are:\n" - " cmf::water::flux_connection::set_tracer_filter(real)\n" - " cmf::water::flux_connection::set_tracer_filter(cmf::water::solute,real)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_flux_connection_to_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::flux_connection *arg1 = (cmf::water::flux_connection *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::string result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__flux_connection, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flux_connection_to_string" "', argument " "1"" of type '" "cmf::water::flux_connection const *""'"); - } - arg1 = reinterpret_cast< cmf::water::flux_connection * >(argp1); - { - try { - result = ((cmf::water::flux_connection const *)arg1)->to_string(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_std_string(static_cast< std::string >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_flux_connection_short_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::flux_connection *arg1 = (cmf::water::flux_connection *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::string result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__flux_connection, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flux_connection_short_string" "', argument " "1"" of type '" "cmf::water::flux_connection const *""'"); - } - arg1 = reinterpret_cast< cmf::water::flux_connection * >(argp1); - { - try { - result = ((cmf::water::flux_connection const *)arg1)->short_string(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_std_string(static_cast< std::string >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_flux_connection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::flux_connection *arg1 = (cmf::water::flux_connection *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__flux_connection, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_flux_connection" "', argument " "1"" of type '" "cmf::water::flux_connection *""'"); - } - arg1 = reinterpret_cast< cmf::water::flux_connection * >(argp1); - { - try { - - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *flux_connection_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__water__flux_connection, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *_wrap_replace_node(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::flux_node::ptr arg1 ; - cmf::water::flux_node::ptr arg2 ; - void *argp1 ; - int res1 = 0 ; - void *argp2 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "oldnode",(char *) "newnode", NULL - }; - int result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:replace_node",kwnames,&obj0,&obj1)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "replace_node" "', argument " "1"" of type '" "cmf::water::flux_node::ptr""'"); - } - if (argp1) arg1 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp1)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp1); - } - { - int newmem = 0; - res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "replace_node" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); - } - if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); - } - { - try { - result = (int)cmf::water::replace_node(arg1,arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_connection_list_append(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::connection_list *arg1 = (cmf::water::connection_list *) 0 ; - SwigValueWrapper< std::shared_ptr< cmf::water::flux_connection > > arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "connection", NULL - }; - bool result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:connection_list_append",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__connection_list, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "connection_list_append" "', argument " "1"" of type '" "cmf::water::connection_list *""'"); - } - arg1 = reinterpret_cast< cmf::water::connection_list * >(argp1); - { - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_connection_t, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "connection_list_append" "', argument " "2"" of type '" "cmf::water::flux_connection::ptr""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "connection_list_append" "', argument " "2"" of type '" "cmf::water::flux_connection::ptr""'"); - } else { - cmf::water::flux_connection::ptr * temp = reinterpret_cast< cmf::water::flux_connection::ptr * >(argp2); - arg2 = *temp; - if (SWIG_IsNewObj(res2)) delete temp; - } - } - { - try { - result = (bool)(arg1)->append(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_connection_list_extend(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::connection_list *arg1 = (cmf::water::connection_list *) 0 ; - cmf::water::connection_list *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - cmf::water::connection_list temp_list2 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "connections", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:connection_list_extend",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__connection_list, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "connection_list_extend" "', argument " "1"" of type '" "cmf::water::connection_list *""'"); - } - arg1 = reinterpret_cast< cmf::water::connection_list * >(argp1); - { - if (SWIG_ConvertPtr(obj1, (void **) &arg2, SWIGTYPE_p_cmf__water__connection_list, SWIG_POINTER_EXCEPTION) == -1) { - int res = iterable_to_list(obj1,SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_connection_t, temp_list2); - if (SWIG_IsOK(res)) { - arg2 = &temp_list2; - } else { - SWIG_exception_fail(SWIG_TypeError,"Only iterables can be converted to cmf::water::connection_list"); - } - } - } - { - try { - (arg1)->extend((cmf::water::connection_list const &)*arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_connection_list_contains(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::connection_list *arg1 = (cmf::water::connection_list *) 0 ; - SwigValueWrapper< std::shared_ptr< cmf::water::flux_connection > > arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "connection", NULL - }; - bool result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:connection_list_contains",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__connection_list, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "connection_list_contains" "', argument " "1"" of type '" "cmf::water::connection_list const *""'"); - } - arg1 = reinterpret_cast< cmf::water::connection_list * >(argp1); - { - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_connection_t, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "connection_list_contains" "', argument " "2"" of type '" "cmf::water::flux_connection::ptr""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "connection_list_contains" "', argument " "2"" of type '" "cmf::water::flux_connection::ptr""'"); - } else { - cmf::water::flux_connection::ptr * temp = reinterpret_cast< cmf::water::flux_connection::ptr * >(argp2); - arg2 = *temp; - if (SWIG_IsNewObj(res2)) delete temp; - } - } - { - try { - result = (bool)((cmf::water::connection_list const *)arg1)->contains(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_connection_list_remove(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::connection_list *arg1 = (cmf::water::connection_list *) 0 ; - SwigValueWrapper< std::shared_ptr< cmf::water::flux_connection > > arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "connection", NULL - }; - bool result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:connection_list_remove",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__connection_list, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "connection_list_remove" "', argument " "1"" of type '" "cmf::water::connection_list *""'"); - } - arg1 = reinterpret_cast< cmf::water::connection_list * >(argp1); - { - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_connection_t, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "connection_list_remove" "', argument " "2"" of type '" "cmf::water::flux_connection::ptr""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "connection_list_remove" "', argument " "2"" of type '" "cmf::water::flux_connection::ptr""'"); - } else { - cmf::water::flux_connection::ptr * temp = reinterpret_cast< cmf::water::flux_connection::ptr * >(argp2); - arg2 = *temp; - if (SWIG_IsNewObj(res2)) delete temp; - } - } - { - try { - result = (bool)(arg1)->remove(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_connection_list_do_action(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::connection_list *arg1 = (cmf::water::connection_list *) 0 ; - cmf::math::Time arg2 ; - bool arg3 = (bool) true ; - void *argp1 = 0 ; - int res1 = 0 ; - bool val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "t",(char *) "use_OpenMP", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:connection_list_do_action",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__connection_list, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "connection_list_do_action" "', argument " "1"" of type '" "cmf::water::connection_list *""'"); - } - arg1 = reinterpret_cast< cmf::water::connection_list * >(argp1); - { - arg2 = convert_datetime_to_cmftime(obj1); - if (arg2 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } - } - if (obj2) { - ecode3 = SWIG_AsVal_bool(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "connection_list_do_action" "', argument " "3"" of type '" "bool""'"); - } - arg3 = static_cast< bool >(val3); - } - { - try { - (arg1)->do_action(arg2,arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_connection_list_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::connection_list *arg1 = (cmf::water::connection_list *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - size_t result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__connection_list, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "connection_list_size" "', argument " "1"" of type '" "cmf::water::connection_list const *""'"); - } - arg1 = reinterpret_cast< cmf::water::connection_list * >(argp1); - { - try { - result = ((cmf::water::connection_list const *)arg1)->size(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_connection_list_at(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::connection_list *arg1 = (cmf::water::connection_list *) 0 ; - size_t arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - size_t val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "pos", NULL - }; - SwigValueWrapper< std::shared_ptr< cmf::water::flux_connection > > result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:connection_list_at",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__connection_list, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "connection_list_at" "', argument " "1"" of type '" "cmf::water::connection_list const *""'"); - } - arg1 = reinterpret_cast< cmf::water::connection_list * >(argp1); - ecode2 = SWIG_AsVal_size_t(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "connection_list_at" "', argument " "2"" of type '" "size_t""'"); - } - arg2 = static_cast< size_t >(val2); - { - try { - result = ((cmf::water::connection_list const *)arg1)->at(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj((new cmf::water::flux_connection::ptr(static_cast< const cmf::water::flux_connection::ptr& >(result))), SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_connection_t, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_connection_list_begin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::water::connection_list *arg1 = (cmf::water::connection_list *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - SwigValueWrapper< std::vector< std::shared_ptr< cmf::water::flux_connection > >::iterator > result; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__connection_list, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "connection_list_begin" "', argument " "1"" of type '" "cmf::water::connection_list *""'"); - } - arg1 = reinterpret_cast< cmf::water::connection_list * >(argp1); - { - try { - result = (arg1)->begin(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj((new cmf::water::connection_list::iterator(static_cast< const cmf::water::connection_list::iterator& >(result))), SWIGTYPE_p_std__vectorT_std__shared_ptrT_cmf__water__flux_connection_t_t__iterator, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_connection_list_end__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::water::connection_list *arg1 = (cmf::water::connection_list *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - SwigValueWrapper< std::vector< std::shared_ptr< cmf::water::flux_connection > >::iterator > result; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__connection_list, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "connection_list_end" "', argument " "1"" of type '" "cmf::water::connection_list *""'"); - } - arg1 = reinterpret_cast< cmf::water::connection_list * >(argp1); - { - try { - result = (arg1)->end(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj((new cmf::water::connection_list::iterator(static_cast< const cmf::water::connection_list::iterator& >(result))), SWIGTYPE_p_std__vectorT_std__shared_ptrT_cmf__water__flux_connection_t_t__iterator, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_connection_list_begin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::water::connection_list *arg1 = (cmf::water::connection_list *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - SwigValueWrapper< std::vector< std::shared_ptr< cmf::water::flux_connection > >::const_iterator > result; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__connection_list, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "connection_list_begin" "', argument " "1"" of type '" "cmf::water::connection_list const *""'"); - } - arg1 = reinterpret_cast< cmf::water::connection_list * >(argp1); - { - try { - result = ((cmf::water::connection_list const *)arg1)->begin(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj((new cmf::water::connection_list::const_iterator(static_cast< const cmf::water::connection_list::const_iterator& >(result))), SWIGTYPE_p_std__vectorT_std__shared_ptrT_cmf__water__flux_connection_t_t__const_iterator, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_connection_list_begin(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[2] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args,"connection_list_begin",0,1,argv))) SWIG_fail; - --argc; - { - unsigned long _index = 0; - SWIG_TypeRank _rank = 0; - if (argc == 1) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__water__connection_list, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 1; - if (_rank == _rankm) goto dispatch; - } - } - check_1: - - if (argc == 1) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__water__connection_list, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 2; - if (_rank == _rankm) goto dispatch; - } - } - check_2: - - dispatch: - switch(_index) { - case 1: - return _wrap_connection_list_begin__SWIG_0(self, argc, argv); - case 2: - return _wrap_connection_list_begin__SWIG_1(self, argc, argv); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'connection_list_begin'.\n" - " Possible C/C++ prototypes are:\n" - " cmf::water::connection_list::begin()\n" - " cmf::water::connection_list::begin() const\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_connection_list_end__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::water::connection_list *arg1 = (cmf::water::connection_list *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - SwigValueWrapper< std::vector< std::shared_ptr< cmf::water::flux_connection > >::const_iterator > result; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__connection_list, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "connection_list_end" "', argument " "1"" of type '" "cmf::water::connection_list const *""'"); - } - arg1 = reinterpret_cast< cmf::water::connection_list * >(argp1); - { - try { - result = ((cmf::water::connection_list const *)arg1)->end(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj((new cmf::water::connection_list::const_iterator(static_cast< const cmf::water::connection_list::const_iterator& >(result))), SWIGTYPE_p_std__vectorT_std__shared_ptrT_cmf__water__flux_connection_t_t__const_iterator, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_connection_list_end(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[2] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args,"connection_list_end",0,1,argv))) SWIG_fail; - --argc; - { - unsigned long _index = 0; - SWIG_TypeRank _rank = 0; - if (argc == 1) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__water__connection_list, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 1; - if (_rank == _rankm) goto dispatch; - } - } - check_1: - - if (argc == 1) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__water__connection_list, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 2; - if (_rank == _rankm) goto dispatch; - } - } - check_2: - - dispatch: - switch(_index) { - case 1: - return _wrap_connection_list_end__SWIG_0(self, argc, argv); - case 2: - return _wrap_connection_list_end__SWIG_1(self, argc, argv); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'connection_list_end'.\n" - " Possible C/C++ prototypes are:\n" - " cmf::water::connection_list::end()\n" - " cmf::water::connection_list::end() const\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_delete_connection_list(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::connection_list *arg1 = (cmf::water::connection_list *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__connection_list, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_connection_list" "', argument " "1"" of type '" "cmf::water::connection_list *""'"); - } - arg1 = reinterpret_cast< cmf::water::connection_list * >(argp1); - { - try { - delete arg1; - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_connection_list___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::connection_list *arg1 = (cmf::water::connection_list *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - size_t result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__connection_list, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "connection_list___len__" "', argument " "1"" of type '" "cmf::water::connection_list const *""'"); - } - arg1 = reinterpret_cast< cmf::water::connection_list * >(argp1); - { - try { - result = cmf_water_connection_list___len__((cmf::water::connection_list const *)arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_connection_list___contains__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::connection_list *arg1 = (cmf::water::connection_list *) 0 ; - cmf::water::flux_connection::ptr *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "con", NULL - }; - bool result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:connection_list___contains__",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__connection_list, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "connection_list___contains__" "', argument " "1"" of type '" "cmf::water::connection_list const *""'"); - } - arg1 = reinterpret_cast< cmf::water::connection_list * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_connection_t, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "connection_list___contains__" "', argument " "2"" of type '" "cmf::water::flux_connection::ptr const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "connection_list___contains__" "', argument " "2"" of type '" "cmf::water::flux_connection::ptr const &""'"); - } - arg2 = reinterpret_cast< cmf::water::flux_connection::ptr * >(argp2); - { - try { - result = (bool)cmf_water_connection_list___contains__((cmf::water::connection_list const *)arg1,(std::shared_ptr< cmf::water::flux_connection > const &)*arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_connection_list(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::connection_list *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args,"new_connection_list",0,0,0)) SWIG_fail; - { - try { - result = (cmf::water::connection_list *)new cmf::water::connection_list(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - // %typemap(out) cmf::water::connection_vector { - resultobj = PyList_New(result->size()); - for (Py_ssize_t i = 0; i size()); ++i) { - cmf::water::flux_connection* item = (*result)[i].get(); - PyObject* py_item = SWIG_NewPointerObj(item,SWIGTYPE_p_cmf__water__flux_connection,0); - PyList_SetItem(resultobj,i,py_item); - } - delete result; - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *connection_list_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__water__connection_list, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *connection_list_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_flux_integrator_integration_t(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::flux_integrator *arg1 = (cmf::water::flux_integrator *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::water::flux_integrator const > tempshared1 ; - std::shared_ptr< cmf::water::flux_integrator const > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - cmf::math::Time result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_integrator_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flux_integrator_integration_t" "', argument " "1"" of type '" "cmf::water::flux_integrator const *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::water::flux_integrator > * >(argp1); - delete reinterpret_cast< std::shared_ptr< const cmf::water::flux_integrator > * >(argp1); - arg1 = const_cast< cmf::water::flux_integrator * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::water::flux_integrator > * >(argp1); - arg1 = const_cast< cmf::water::flux_integrator * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - try { - result = ((cmf::water::flux_integrator const *)arg1)->integration_t(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj((new cmf::math::Time(static_cast< const cmf::math::Time& >(result))), SWIGTYPE_p_cmf__math__Time, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_flux_integrator_t0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::flux_integrator *arg1 = (cmf::water::flux_integrator *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::water::flux_integrator const > tempshared1 ; - std::shared_ptr< cmf::water::flux_integrator const > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - cmf::math::Time result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_integrator_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flux_integrator_t0" "', argument " "1"" of type '" "cmf::water::flux_integrator const *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::water::flux_integrator > * >(argp1); - delete reinterpret_cast< std::shared_ptr< const cmf::water::flux_integrator > * >(argp1); - arg1 = const_cast< cmf::water::flux_integrator * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::water::flux_integrator > * >(argp1); - arg1 = const_cast< cmf::water::flux_integrator * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - try { - result = ((cmf::water::flux_integrator const *)arg1)->t0(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj((new cmf::math::Time(static_cast< const cmf::math::Time& >(result))), SWIGTYPE_p_cmf__math__Time, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_flux_integrator_invert_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::flux_integrator *arg1 = (cmf::water::flux_integrator *) 0 ; - bool arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::water::flux_integrator > tempshared1 ; - std::shared_ptr< cmf::water::flux_integrator > *smartarg1 = 0 ; - bool val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"flux_integrator_invert_set",2,2,swig_obj)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_integrator_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flux_integrator_invert_set" "', argument " "1"" of type '" "cmf::water::flux_integrator *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::flux_integrator > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::water::flux_integrator > * >(argp1); - arg1 = const_cast< cmf::water::flux_integrator * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::flux_integrator > * >(argp1); - arg1 = const_cast< cmf::water::flux_integrator * >((smartarg1 ? smartarg1->get() : 0)); - } - } - ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "flux_integrator_invert_set" "', argument " "2"" of type '" "bool""'"); - } - arg2 = static_cast< bool >(val2); - if (arg1) (arg1)->invert = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_flux_integrator_invert_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::flux_integrator *arg1 = (cmf::water::flux_integrator *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::water::flux_integrator > tempshared1 ; - std::shared_ptr< cmf::water::flux_integrator > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - bool result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_integrator_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flux_integrator_invert_get" "', argument " "1"" of type '" "cmf::water::flux_integrator *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::flux_integrator > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::water::flux_integrator > * >(argp1); - arg1 = const_cast< cmf::water::flux_integrator * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::flux_integrator > * >(argp1); - arg1 = const_cast< cmf::water::flux_integrator * >((smartarg1 ? smartarg1->get() : 0)); - } - } - result = (bool) ((arg1)->invert); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_flux_integrator_connection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::flux_integrator *arg1 = (cmf::water::flux_integrator *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::water::flux_integrator const > tempshared1 ; - std::shared_ptr< cmf::water::flux_integrator const > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - SwigValueWrapper< std::shared_ptr< cmf::water::flux_connection > > result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_integrator_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flux_integrator_connection" "', argument " "1"" of type '" "cmf::water::flux_integrator const *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::water::flux_integrator > * >(argp1); - delete reinterpret_cast< std::shared_ptr< const cmf::water::flux_integrator > * >(argp1); - arg1 = const_cast< cmf::water::flux_integrator * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::water::flux_integrator > * >(argp1); - arg1 = const_cast< cmf::water::flux_integrator * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - try { - result = ((cmf::water::flux_integrator const *)arg1)->connection(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj((new cmf::water::flux_connection::ptr(static_cast< const cmf::water::flux_connection::ptr& >(result))), SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_connection_t, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_flux_integrator__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::water::flux_connection *arg1 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - cmf::water::flux_integrator *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_cmf__water__flux_connection, 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_flux_integrator" "', argument " "1"" of type '" "cmf::water::flux_connection &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_flux_integrator" "', argument " "1"" of type '" "cmf::water::flux_connection &""'"); - } - arg1 = reinterpret_cast< cmf::water::flux_connection * >(argp1); - { - try { - result = (cmf::water::flux_integrator *)new cmf::water::flux_integrator(*arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - std::shared_ptr< cmf::water::flux_integrator > *smartresult = result ? new std::shared_ptr< cmf::water::flux_integrator >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0; - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_integrator_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_flux_integrator__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::water::flux_node::ptr arg1 ; - cmf::water::flux_node::ptr arg2 ; - void *argp1 ; - int res1 = 0 ; - void *argp2 ; - int res2 = 0 ; - cmf::water::flux_integrator *result = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_flux_integrator" "', argument " "1"" of type '" "cmf::water::flux_node::ptr""'"); - } - if (argp1) arg1 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp1)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp1); - } - { - int newmem = 0; - res2 = SWIG_ConvertPtrAndOwn(swig_obj[1], &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_flux_integrator" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); - } - if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); - } - { - try { - result = (cmf::water::flux_integrator *)new cmf::water::flux_integrator(arg1,arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - std::shared_ptr< cmf::water::flux_integrator > *smartresult = result ? new std::shared_ptr< cmf::water::flux_integrator >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0; - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_integrator_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_flux_integrator(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args,"new_flux_integrator",0,2,argv))) SWIG_fail; - --argc; - { - unsigned long _index = 0; - SWIG_TypeRank _rank = 0; - if (argc == 1) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__water__flux_connection, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 1; - if (_rank == _rankm) goto dispatch; - } - } - check_1: - - if (argc == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 2; - if (_rank == _rankm) goto dispatch; - } - } - check_2: - - dispatch: - switch(_index) { - case 1: - return _wrap_new_flux_integrator__SWIG_0(self, argc, argv); - case 2: - return _wrap_new_flux_integrator__SWIG_1(self, argc, argv); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_flux_integrator'.\n" - " Possible C/C++ prototypes are:\n" - " cmf::water::flux_integrator::flux_integrator(cmf::water::flux_connection &)\n" - " cmf::water::flux_integrator::flux_integrator(cmf::water::flux_node::ptr,cmf::water::flux_node::ptr)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_delete_flux_integrator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::flux_integrator *arg1 = (cmf::water::flux_integrator *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::water::flux_integrator > tempshared1 ; - std::shared_ptr< cmf::water::flux_integrator > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_integrator_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_flux_integrator" "', argument " "1"" of type '" "cmf::water::flux_integrator *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::flux_integrator > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::water::flux_integrator > * >(argp1); - arg1 = const_cast< cmf::water::flux_integrator * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::flux_integrator > * >(argp1); - arg1 = const_cast< cmf::water::flux_integrator * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - try { - (void)arg1; delete smartarg1; - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *flux_integrator_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_integrator_t, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *flux_integrator_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_linear_scale_displacement_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::linear_scale *arg1 = (cmf::water::linear_scale *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"linear_scale_displacement_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__linear_scale, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "linear_scale_displacement_set" "', argument " "1"" of type '" "cmf::water::linear_scale *""'"); - } - arg1 = reinterpret_cast< cmf::water::linear_scale * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "linear_scale_displacement_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->displacement = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_linear_scale_displacement_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::linear_scale *arg1 = (cmf::water::linear_scale *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__linear_scale, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "linear_scale_displacement_get" "', argument " "1"" of type '" "cmf::water::linear_scale *""'"); - } - arg1 = reinterpret_cast< cmf::water::linear_scale * >(argp1); - result = (real) ((arg1)->displacement); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_linear_scale_slope_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::linear_scale *arg1 = (cmf::water::linear_scale *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"linear_scale_slope_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__linear_scale, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "linear_scale_slope_set" "', argument " "1"" of type '" "cmf::water::linear_scale *""'"); - } - arg1 = reinterpret_cast< cmf::water::linear_scale * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "linear_scale_slope_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->slope = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_linear_scale_slope_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::linear_scale *arg1 = (cmf::water::linear_scale *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__linear_scale, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "linear_scale_slope_get" "', argument " "1"" of type '" "cmf::water::linear_scale *""'"); - } - arg1 = reinterpret_cast< cmf::water::linear_scale * >(argp1); - result = (real) ((arg1)->slope); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_linear_scale___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::linear_scale *arg1 = (cmf::water::linear_scale *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "value", NULL - }; - real result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:linear_scale___call__",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__linear_scale, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "linear_scale___call__" "', argument " "1"" of type '" "cmf::water::linear_scale const *""'"); - } - arg1 = reinterpret_cast< cmf::water::linear_scale * >(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "linear_scale___call__" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - { - try { - result = (real)((cmf::water::linear_scale const *)arg1)->operator ()(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_linear_scale(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - real arg1 = (real) 1 ; - real arg2 = (real) 0 ; - double val1 ; - int ecode1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "_slope",(char *) "_displacement", NULL - }; - cmf::water::linear_scale *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|OO:new_linear_scale",kwnames,&obj0,&obj1)) SWIG_fail; - if (obj0) { - ecode1 = SWIG_AsVal_double(obj0, &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_linear_scale" "', argument " "1"" of type '" "real""'"); - } - arg1 = static_cast< real >(val1); - } - if (obj1) { - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_linear_scale" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - } - { - try { - result = (cmf::water::linear_scale *)new cmf::water::linear_scale(arg1,arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__water__linear_scale, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_linear_scale(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::linear_scale *arg1 = (cmf::water::linear_scale *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__linear_scale, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_linear_scale" "', argument " "1"" of type '" "cmf::water::linear_scale *""'"); - } - arg1 = reinterpret_cast< cmf::water::linear_scale * >(argp1); - { - try { - delete arg1; - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *linear_scale_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__water__linear_scale, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *linear_scale_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_DirichletBoundary_set_conc(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::DirichletBoundary *arg1 = (cmf::water::DirichletBoundary *) 0 ; - cmf::water::solute *arg2 = 0 ; - double arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::water::DirichletBoundary > tempshared1 ; - std::shared_ptr< cmf::water::DirichletBoundary > *smartarg1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - double val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "_Solute",(char *) "value", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:DirichletBoundary_set_conc",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__DirichletBoundary_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DirichletBoundary_set_conc" "', argument " "1"" of type '" "cmf::water::DirichletBoundary *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::DirichletBoundary > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::water::DirichletBoundary > * >(argp1); - arg1 = const_cast< cmf::water::DirichletBoundary * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::DirichletBoundary > * >(argp1); - arg1 = const_cast< cmf::water::DirichletBoundary * >((smartarg1 ? smartarg1->get() : 0)); - } - } - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_cmf__water__solute, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DirichletBoundary_set_conc" "', argument " "2"" of type '" "cmf::water::solute const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DirichletBoundary_set_conc" "', argument " "2"" of type '" "cmf::water::solute const &""'"); - } - arg2 = reinterpret_cast< cmf::water::solute * >(argp2); - ecode3 = SWIG_AsVal_double(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DirichletBoundary_set_conc" "', argument " "3"" of type '" "double""'"); - } - arg3 = static_cast< double >(val3); - { - try { - (arg1)->set_conc((cmf::water::solute const &)*arg2,arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_DirichletBoundary_is_source_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::DirichletBoundary *arg1 = (cmf::water::DirichletBoundary *) 0 ; - bool arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::water::DirichletBoundary > tempshared1 ; - std::shared_ptr< cmf::water::DirichletBoundary > *smartarg1 = 0 ; - bool val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"DirichletBoundary_is_source_set",2,2,swig_obj)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__DirichletBoundary_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DirichletBoundary_is_source_set" "', argument " "1"" of type '" "cmf::water::DirichletBoundary *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::DirichletBoundary > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::water::DirichletBoundary > * >(argp1); - arg1 = const_cast< cmf::water::DirichletBoundary * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::DirichletBoundary > * >(argp1); - arg1 = const_cast< cmf::water::DirichletBoundary * >((smartarg1 ? smartarg1->get() : 0)); - } - } - ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DirichletBoundary_is_source_set" "', argument " "2"" of type '" "bool""'"); - } - arg2 = static_cast< bool >(val2); - if (arg1) (arg1)->is_source = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_DirichletBoundary_is_source_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::DirichletBoundary *arg1 = (cmf::water::DirichletBoundary *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::water::DirichletBoundary > tempshared1 ; - std::shared_ptr< cmf::water::DirichletBoundary > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - bool result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__DirichletBoundary_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DirichletBoundary_is_source_get" "', argument " "1"" of type '" "cmf::water::DirichletBoundary *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::DirichletBoundary > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::water::DirichletBoundary > * >(argp1); - arg1 = const_cast< cmf::water::DirichletBoundary * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::DirichletBoundary > * >(argp1); - arg1 = const_cast< cmf::water::DirichletBoundary * >((smartarg1 ? smartarg1->get() : 0)); - } - } - result = (bool) ((arg1)->is_source); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_DirichletBoundary_RecalcFluxes(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::DirichletBoundary *arg1 = (cmf::water::DirichletBoundary *) 0 ; - cmf::math::Time arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::water::DirichletBoundary const > tempshared1 ; - std::shared_ptr< cmf::water::DirichletBoundary const > *smartarg1 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "t", NULL - }; - bool result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:DirichletBoundary_RecalcFluxes",kwnames,&obj0,&obj1)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__DirichletBoundary_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DirichletBoundary_RecalcFluxes" "', argument " "1"" of type '" "cmf::water::DirichletBoundary const *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::water::DirichletBoundary > * >(argp1); - delete reinterpret_cast< std::shared_ptr< const cmf::water::DirichletBoundary > * >(argp1); - arg1 = const_cast< cmf::water::DirichletBoundary * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::water::DirichletBoundary > * >(argp1); - arg1 = const_cast< cmf::water::DirichletBoundary * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - arg2 = convert_datetime_to_cmftime(obj1); - if (arg2 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } - } - { - try { - result = (bool)((cmf::water::DirichletBoundary const *)arg1)->RecalcFluxes(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_DirichletBoundary(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::project *arg1 = 0 ; - real arg2 ; - cmf::geometry::point arg3 = (cmf::geometry::point) cmf::geometry::point() ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char * kwnames[] = { - (char *) "_p",(char *) "potential",(char *) "Location", NULL - }; - cmf::water::DirichletBoundary *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:new_DirichletBoundary",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_cmf__project, 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DirichletBoundary" "', argument " "1"" of type '" "cmf::project &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DirichletBoundary" "', argument " "1"" of type '" "cmf::project &""'"); - } - arg1 = reinterpret_cast< cmf::project * >(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_DirichletBoundary" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (obj2) { - { - if (check_xy(obj2)) { - std::string res = convert_xyz_to_point(obj2,arg3); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - return NULL; - } - } - else if (PySequence_Check(obj2)) { - std::string res = convert_seq_to_point(obj2,arg3); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError, res.c_str()); - } - } else { - std::string res="<"; - res+=pyrepr(obj2); - res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - } - } - } - { - try { - result = (cmf::water::DirichletBoundary *)new cmf::water::DirichletBoundary(*arg1,arg2,arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - std::shared_ptr< cmf::water::DirichletBoundary > *smartresult = result ? new std::shared_ptr< cmf::water::DirichletBoundary >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0; - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__water__DirichletBoundary_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_DirichletBoundary(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::DirichletBoundary *arg1 = (cmf::water::DirichletBoundary *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::water::DirichletBoundary > tempshared1 ; - std::shared_ptr< cmf::water::DirichletBoundary > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__DirichletBoundary_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DirichletBoundary" "', argument " "1"" of type '" "cmf::water::DirichletBoundary *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::DirichletBoundary > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::water::DirichletBoundary > * >(argp1); - arg1 = const_cast< cmf::water::DirichletBoundary * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::DirichletBoundary > * >(argp1); - arg1 = const_cast< cmf::water::DirichletBoundary * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - try { - (void)arg1; delete smartarg1; - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *DirichletBoundary_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_cmf__water__DirichletBoundary_t, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *DirichletBoundary_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_NeumannBoundary_get_flux(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::NeumannBoundary *arg1 = (cmf::water::NeumannBoundary *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::water::NeumannBoundary > tempshared1 ; - std::shared_ptr< cmf::water::NeumannBoundary > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - cmf::math::timeseries result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__NeumannBoundary_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NeumannBoundary_get_flux" "', argument " "1"" of type '" "cmf::water::NeumannBoundary *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::NeumannBoundary > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::water::NeumannBoundary > * >(argp1); - arg1 = const_cast< cmf::water::NeumannBoundary * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::NeumannBoundary > * >(argp1); - arg1 = const_cast< cmf::water::NeumannBoundary * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - try { - result = (arg1)->get_flux(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj((new cmf::math::timeseries(static_cast< const cmf::math::timeseries& >(result))), SWIGTYPE_p_cmf__math__timeseries, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_NeumannBoundary_set_flux__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::water::NeumannBoundary *arg1 = (cmf::water::NeumannBoundary *) 0 ; - cmf::math::timeseries arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::water::NeumannBoundary > tempshared1 ; - std::shared_ptr< cmf::water::NeumannBoundary > *smartarg1 = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__NeumannBoundary_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NeumannBoundary_set_flux" "', argument " "1"" of type '" "cmf::water::NeumannBoundary *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::NeumannBoundary > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::water::NeumannBoundary > * >(argp1); - arg1 = const_cast< cmf::water::NeumannBoundary * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::NeumannBoundary > * >(argp1); - arg1 = const_cast< cmf::water::NeumannBoundary * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - cmf::math::timeseries *p_ts = &arg2; - int res=SWIG_ConvertPtr(swig_obj[1],(void**)(&p_ts),SWIGTYPE_p_cmf__math__timeseries,0); - if (!(SWIG_IsOK(res)) || p_ts==0) { - if (PyNumber_Check(swig_obj[1])) { - double scalar = PyFloat_AsDouble(swig_obj[1]); - arg2 = cmf::math::timeseries::from_scalar(scalar); - } else { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.timeseries object"); - } - } else { - arg2 = *p_ts; - } - } - { - try { - (arg1)->set_flux(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_NeumannBoundary_set_flux__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::water::NeumannBoundary *arg1 = (cmf::water::NeumannBoundary *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::water::NeumannBoundary > tempshared1 ; - std::shared_ptr< cmf::water::NeumannBoundary > *smartarg1 = 0 ; - double val2 ; - int ecode2 = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__NeumannBoundary_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NeumannBoundary_set_flux" "', argument " "1"" of type '" "cmf::water::NeumannBoundary *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::NeumannBoundary > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::water::NeumannBoundary > * >(argp1); - arg1 = const_cast< cmf::water::NeumannBoundary * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::NeumannBoundary > * >(argp1); - arg1 = const_cast< cmf::water::NeumannBoundary * >((smartarg1 ? smartarg1->get() : 0)); - } - } - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "NeumannBoundary_set_flux" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - { - try { - (arg1)->set_flux(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_NeumannBoundary_set_flux(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args,"NeumannBoundary_set_flux",0,2,argv))) SWIG_fail; - --argc; - { - unsigned long _index = 0; - SWIG_TypeRank _rank = 0; - if (argc == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_cmf__water__NeumannBoundary_t, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 1; - if (_rank == _rankm) goto dispatch; - } - } - check_1: - - if (argc == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_cmf__water__NeumannBoundary_t, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - void * pt; - int res=SWIG_ConvertPtr(argv[1],&pt,SWIGTYPE_p_cmf__math__timeseries,0); - _v=SWIG_IsOK(res) || PyNumber_Check(argv[1]); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 2; - if (_rank == _rankm) goto dispatch; - } - } - check_2: - - dispatch: - switch(_index) { - case 1: - return _wrap_NeumannBoundary_set_flux__SWIG_1(self, argc, argv); - case 2: - return _wrap_NeumannBoundary_set_flux__SWIG_0(self, argc, argv); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'NeumannBoundary_set_flux'.\n" - " Possible C/C++ prototypes are:\n" - " cmf::water::NeumannBoundary::set_flux(cmf::math::timeseries)\n" - " cmf::water::NeumannBoundary::set_flux(double)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_NeumannBoundary_flux_scale_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::NeumannBoundary *arg1 = (cmf::water::NeumannBoundary *) 0 ; - cmf::water::linear_scale *arg2 = (cmf::water::linear_scale *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::water::NeumannBoundary > tempshared1 ; - std::shared_ptr< cmf::water::NeumannBoundary > *smartarg1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"NeumannBoundary_flux_scale_set",2,2,swig_obj)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__NeumannBoundary_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NeumannBoundary_flux_scale_set" "', argument " "1"" of type '" "cmf::water::NeumannBoundary *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::NeumannBoundary > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::water::NeumannBoundary > * >(argp1); - arg1 = const_cast< cmf::water::NeumannBoundary * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::NeumannBoundary > * >(argp1); - arg1 = const_cast< cmf::water::NeumannBoundary * >((smartarg1 ? smartarg1->get() : 0)); - } - } - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_cmf__water__linear_scale, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "NeumannBoundary_flux_scale_set" "', argument " "2"" of type '" "cmf::water::linear_scale *""'"); - } - arg2 = reinterpret_cast< cmf::water::linear_scale * >(argp2); - if (arg1) (arg1)->flux_scale = *arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_NeumannBoundary_flux_scale_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::NeumannBoundary *arg1 = (cmf::water::NeumannBoundary *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::water::NeumannBoundary > tempshared1 ; - std::shared_ptr< cmf::water::NeumannBoundary > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - cmf::water::linear_scale *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__NeumannBoundary_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NeumannBoundary_flux_scale_get" "', argument " "1"" of type '" "cmf::water::NeumannBoundary *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::NeumannBoundary > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::water::NeumannBoundary > * >(argp1); - arg1 = const_cast< cmf::water::NeumannBoundary * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::NeumannBoundary > * >(argp1); - arg1 = const_cast< cmf::water::NeumannBoundary * >((smartarg1 ? smartarg1->get() : 0)); - } - } - result = (cmf::water::linear_scale *)& ((arg1)->flux_scale); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__water__linear_scale, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_NeumannBoundary_concentration_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::NeumannBoundary *arg1 = (cmf::water::NeumannBoundary *) 0 ; - cmf::water::SoluteTimeseries *arg2 = (cmf::water::SoluteTimeseries *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::water::NeumannBoundary > tempshared1 ; - std::shared_ptr< cmf::water::NeumannBoundary > *smartarg1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"NeumannBoundary_concentration_set",2,2,swig_obj)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__NeumannBoundary_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NeumannBoundary_concentration_set" "', argument " "1"" of type '" "cmf::water::NeumannBoundary *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::NeumannBoundary > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::water::NeumannBoundary > * >(argp1); - arg1 = const_cast< cmf::water::NeumannBoundary * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::NeumannBoundary > * >(argp1); - arg1 = const_cast< cmf::water::NeumannBoundary * >((smartarg1 ? smartarg1->get() : 0)); - } - } - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_cmf__water__SoluteTimeseries, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "NeumannBoundary_concentration_set" "', argument " "2"" of type '" "cmf::water::SoluteTimeseries *""'"); - } - arg2 = reinterpret_cast< cmf::water::SoluteTimeseries * >(argp2); - if (arg1) (arg1)->concentration = *arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_NeumannBoundary_concentration_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::NeumannBoundary *arg1 = (cmf::water::NeumannBoundary *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::water::NeumannBoundary > tempshared1 ; - std::shared_ptr< cmf::water::NeumannBoundary > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - cmf::water::SoluteTimeseries *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__NeumannBoundary_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NeumannBoundary_concentration_get" "', argument " "1"" of type '" "cmf::water::NeumannBoundary *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::NeumannBoundary > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::water::NeumannBoundary > * >(argp1); - arg1 = const_cast< cmf::water::NeumannBoundary * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::NeumannBoundary > * >(argp1); - arg1 = const_cast< cmf::water::NeumannBoundary * >((smartarg1 ? smartarg1->get() : 0)); - } - } - result = (cmf::water::SoluteTimeseries *)& ((arg1)->concentration); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__water__SoluteTimeseries, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_NeumannBoundary___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::NeumannBoundary *arg1 = (cmf::water::NeumannBoundary *) 0 ; - cmf::math::Time arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::water::NeumannBoundary const > tempshared1 ; - std::shared_ptr< cmf::water::NeumannBoundary const > *smartarg1 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "t", NULL - }; - real result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:NeumannBoundary___call__",kwnames,&obj0,&obj1)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__NeumannBoundary_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NeumannBoundary___call__" "', argument " "1"" of type '" "cmf::water::NeumannBoundary const *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::water::NeumannBoundary > * >(argp1); - delete reinterpret_cast< std::shared_ptr< const cmf::water::NeumannBoundary > * >(argp1); - arg1 = const_cast< cmf::water::NeumannBoundary * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::water::NeumannBoundary > * >(argp1); - arg1 = const_cast< cmf::water::NeumannBoundary * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - arg2 = convert_datetime_to_cmftime(obj1); - if (arg2 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } - } - { - try { - result = (real)((cmf::water::NeumannBoundary const *)arg1)->operator ()(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_NeumannBoundary_connect_to(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::NeumannBoundary *arg1 = (cmf::water::NeumannBoundary *) 0 ; - cmf::water::flux_node::ptr arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::water::NeumannBoundary > tempshared1 ; - std::shared_ptr< cmf::water::NeumannBoundary > *smartarg1 = 0 ; - void *argp2 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "target", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:NeumannBoundary_connect_to",kwnames,&obj0,&obj1)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__NeumannBoundary_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NeumannBoundary_connect_to" "', argument " "1"" of type '" "cmf::water::NeumannBoundary *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::NeumannBoundary > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::water::NeumannBoundary > * >(argp1); - arg1 = const_cast< cmf::water::NeumannBoundary * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::NeumannBoundary > * >(argp1); - arg1 = const_cast< cmf::water::NeumannBoundary * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - int newmem = 0; - res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "NeumannBoundary_connect_to" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); - } - if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); - } - { - try { - (arg1)->connect_to(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_NeumannBoundary__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::project *arg1 = 0 ; - cmf::math::timeseries arg2 ; - cmf::water::SoluteTimeseries arg3 = (cmf::water::SoluteTimeseries) cmf::water::SoluteTimeseries() ; - cmf::geometry::point arg4 = (cmf::geometry::point) cmf::geometry::point() ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp3 ; - int res3 = 0 ; - cmf::water::NeumannBoundary *result = 0 ; - - if ((nobjs < 2) || (nobjs > 4)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_cmf__project, 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_NeumannBoundary" "', argument " "1"" of type '" "cmf::project &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NeumannBoundary" "', argument " "1"" of type '" "cmf::project &""'"); - } - arg1 = reinterpret_cast< cmf::project * >(argp1); - { - cmf::math::timeseries *p_ts = &arg2; - int res=SWIG_ConvertPtr(swig_obj[1],(void**)(&p_ts),SWIGTYPE_p_cmf__math__timeseries,0); - if (!(SWIG_IsOK(res)) || p_ts==0) { - if (PyNumber_Check(swig_obj[1])) { - double scalar = PyFloat_AsDouble(swig_obj[1]); - arg2 = cmf::math::timeseries::from_scalar(scalar); - } else { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.timeseries object"); - } - } else { - arg2 = *p_ts; - } - } - if (swig_obj[2]) { - { - res3 = SWIG_ConvertPtr(swig_obj[2], &argp3, SWIGTYPE_p_cmf__water__SoluteTimeseries, 0 | 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_NeumannBoundary" "', argument " "3"" of type '" "cmf::water::SoluteTimeseries""'"); - } - if (!argp3) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NeumannBoundary" "', argument " "3"" of type '" "cmf::water::SoluteTimeseries""'"); - } else { - cmf::water::SoluteTimeseries * temp = reinterpret_cast< cmf::water::SoluteTimeseries * >(argp3); - arg3 = *temp; - if (SWIG_IsNewObj(res3)) delete temp; - } - } - } - if (swig_obj[3]) { - { - if (check_xy(swig_obj[3])) { - std::string res = convert_xyz_to_point(swig_obj[3],arg4); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - return NULL; - } - } - else if (PySequence_Check(swig_obj[3])) { - std::string res = convert_seq_to_point(swig_obj[3],arg4); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError, res.c_str()); - } - } else { - std::string res="<"; - res+=pyrepr(swig_obj[3]); - res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - } - } - } - { - try { - result = (cmf::water::NeumannBoundary *)new cmf::water::NeumannBoundary(*arg1,arg2,arg3,arg4); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - std::shared_ptr< cmf::water::NeumannBoundary > *smartresult = result ? new std::shared_ptr< cmf::water::NeumannBoundary >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0; - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__water__NeumannBoundary_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_NeumannBoundary__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::project *arg1 = 0 ; - cmf::geometry::point arg2 = (cmf::geometry::point) cmf::geometry::point() ; - void *argp1 = 0 ; - int res1 = 0 ; - cmf::water::NeumannBoundary *result = 0 ; - - if ((nobjs < 1) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_cmf__project, 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_NeumannBoundary" "', argument " "1"" of type '" "cmf::project &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NeumannBoundary" "', argument " "1"" of type '" "cmf::project &""'"); - } - arg1 = reinterpret_cast< cmf::project * >(argp1); - if (swig_obj[1]) { - { - if (check_xy(swig_obj[1])) { - std::string res = convert_xyz_to_point(swig_obj[1],arg2); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - return NULL; - } - } - else if (PySequence_Check(swig_obj[1])) { - std::string res = convert_seq_to_point(swig_obj[1],arg2); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError, res.c_str()); - } - } else { - std::string res="<"; - res+=pyrepr(swig_obj[1]); - res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - } - } - } - { - try { - result = (cmf::water::NeumannBoundary *)new cmf::water::NeumannBoundary(*arg1,arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - std::shared_ptr< cmf::water::NeumannBoundary > *smartresult = result ? new std::shared_ptr< cmf::water::NeumannBoundary >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0; - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__water__NeumannBoundary_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_NeumannBoundary(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[5] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args,"new_NeumannBoundary",0,4,argv))) SWIG_fail; - --argc; - { - unsigned long _index = 0; - SWIG_TypeRank _rank = 0; - if ((argc >= 1) && (argc <= 2)) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__project, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (argc > 1) { - { - { - cmf::geometry::point p; - _v=check_xy(argv[1]) || check_seq_point(argv[1]); - } - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - } - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 1; - if (_rank == _rankm) goto dispatch; - } - } - check_1: - - if ((argc >= 2) && (argc <= 4)) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__project, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - void * pt; - int res=SWIG_ConvertPtr(argv[1],&pt,SWIGTYPE_p_cmf__math__timeseries,0); - _v=SWIG_IsOK(res) || PyNumber_Check(argv[1]); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (argc > 2) { - { - int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_cmf__water__SoluteTimeseries, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (argc > 3) { - { - { - cmf::geometry::point p; - _v=check_xy(argv[3]) || check_seq_point(argv[3]); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - } - } - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 2; - if (_rank == _rankm) goto dispatch; - } - } - check_2: - - dispatch: - switch(_index) { - case 1: - return _wrap_new_NeumannBoundary__SWIG_1(self, argc, argv); - case 2: - return _wrap_new_NeumannBoundary__SWIG_0(self, argc, argv); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_NeumannBoundary'.\n" - " Possible C/C++ prototypes are:\n" - " cmf::water::NeumannBoundary::NeumannBoundary(cmf::project &,cmf::math::timeseries,cmf::water::SoluteTimeseries,cmf::geometry::point)\n" - " cmf::water::NeumannBoundary::NeumannBoundary(cmf::project &,cmf::geometry::point)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_NeumannBoundary_create(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::flux_node::ptr arg1 ; - void *argp1 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - char * kwnames[] = { - (char *) "target", NULL - }; - cmf::water::NeumannBoundary::ptr result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:NeumannBoundary_create",kwnames,&obj0)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NeumannBoundary_create" "', argument " "1"" of type '" "cmf::water::flux_node::ptr""'"); - } - if (argp1) arg1 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp1)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp1); - } - { - try { - result = cmf::water::NeumannBoundary::create(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - std::shared_ptr< cmf::water::NeumannBoundary > *smartresult = result ? new std::shared_ptr< cmf::water::NeumannBoundary >(result) : 0; - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__water__NeumannBoundary_t, SWIG_POINTER_OWN); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_NeumannBoundary(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::NeumannBoundary *arg1 = (cmf::water::NeumannBoundary *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::water::NeumannBoundary > tempshared1 ; - std::shared_ptr< cmf::water::NeumannBoundary > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__NeumannBoundary_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_NeumannBoundary" "', argument " "1"" of type '" "cmf::water::NeumannBoundary *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::NeumannBoundary > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::water::NeumannBoundary > * >(argp1); - arg1 = const_cast< cmf::water::NeumannBoundary * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::NeumannBoundary > * >(argp1); - arg1 = const_cast< cmf::water::NeumannBoundary * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - try { - (void)arg1; delete smartarg1; - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *NeumannBoundary_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_cmf__water__NeumannBoundary_t, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *NeumannBoundary_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_new_NeumannFlux(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - std::shared_ptr< cmf::water::NeumannBoundary > arg1 ; - cmf::water::flux_node::ptr arg2 ; - void *argp1 ; - int res1 = 0 ; - void *argp2 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "left",(char *) "right", NULL - }; - cmf::water::NeumannFlux *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:new_NeumannFlux",kwnames,&obj0,&obj1)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__NeumannBoundary_t, 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_NeumannFlux" "', argument " "1"" of type '" "std::shared_ptr< cmf::water::NeumannBoundary >""'"); - } - if (argp1) arg1 = *(reinterpret_cast< std::shared_ptr< cmf::water::NeumannBoundary > * >(argp1)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< std::shared_ptr< cmf::water::NeumannBoundary > * >(argp1); - } - { - int newmem = 0; - res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_NeumannFlux" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); - } - if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); - } - { - try { - result = (cmf::water::NeumannFlux *)new cmf::water::NeumannFlux(arg1,arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__water__NeumannFlux, SWIG_POINTER_NEW | 0 ); - - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_NeumannFlux(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::NeumannFlux *arg1 = (cmf::water::NeumannFlux *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__NeumannFlux, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_NeumannFlux" "', argument " "1"" of type '" "cmf::water::NeumannFlux *""'"); - } - arg1 = reinterpret_cast< cmf::water::NeumannFlux * >(argp1); - { - try { - - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *NeumannFlux_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__water__NeumannFlux, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *NeumannFlux_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_new_WaterStorage(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::project *arg1 = 0 ; - std::string const &arg2_defvalue = "" ; - std::string *arg2 = (std::string *) &arg2_defvalue ; - double arg3 = (double) 0 ; - double arg4 = (double) 1 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - double val3 ; - int ecode3 = 0 ; - double val4 ; - int ecode4 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - char * kwnames[] = { - (char *) "project",(char *) "Name",(char *) "InitialState",(char *) "scale", NULL - }; - cmf::water::WaterStorage *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOO:new_WaterStorage",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_cmf__project, 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_WaterStorage" "', argument " "1"" of type '" "cmf::project &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_WaterStorage" "', argument " "1"" of type '" "cmf::project &""'"); - } - arg1 = reinterpret_cast< cmf::project * >(argp1); - if (obj1) { - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(obj1, &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_WaterStorage" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_WaterStorage" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - } - if (obj2) { - ecode3 = SWIG_AsVal_double(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_WaterStorage" "', argument " "3"" of type '" "double""'"); - } - arg3 = static_cast< double >(val3); - } - if (obj3) { - ecode4 = SWIG_AsVal_double(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_WaterStorage" "', argument " "4"" of type '" "double""'"); - } - arg4 = static_cast< double >(val4); - } - { - try { - result = (cmf::water::WaterStorage *)new cmf::water::WaterStorage(*arg1,(std::string const &)*arg2,arg3,arg4); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - std::shared_ptr< cmf::water::WaterStorage > *smartresult = result ? new std::shared_ptr< cmf::water::WaterStorage >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0; - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN); - } - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_WaterStorage_from_node(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::flux_node::ptr arg1 ; - void *argp1 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - char * kwnames[] = { - (char *) "node", NULL - }; - std::shared_ptr< cmf::water::WaterStorage > result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:WaterStorage_from_node",kwnames,&obj0)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "WaterStorage_from_node" "', argument " "1"" of type '" "cmf::water::flux_node::ptr""'"); - } - if (argp1) arg1 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp1)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp1); - } - { - try { - result = cmf::water::WaterStorage::from_node(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - std::shared_ptr< cmf::water::WaterStorage > *smartresult = result ? new std::shared_ptr< cmf::water::WaterStorage >(result) : 0; - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, SWIG_POINTER_OWN); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_WaterStorage_Solute__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::water::WaterStorage *arg1 = (cmf::water::WaterStorage *) 0 ; - cmf::water::solute *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::water::WaterStorage > tempshared1 ; - std::shared_ptr< cmf::water::WaterStorage > *smartarg1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - cmf::water::SoluteStorage *result = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "WaterStorage_Solute" "', argument " "1"" of type '" "cmf::water::WaterStorage *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::WaterStorage > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::water::WaterStorage > * >(argp1); - arg1 = const_cast< cmf::water::WaterStorage * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::WaterStorage > * >(argp1); - arg1 = const_cast< cmf::water::WaterStorage * >((smartarg1 ? smartarg1->get() : 0)); - } - } - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_cmf__water__solute, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "WaterStorage_Solute" "', argument " "2"" of type '" "cmf::water::solute const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "WaterStorage_Solute" "', argument " "2"" of type '" "cmf::water::solute const &""'"); - } - arg2 = reinterpret_cast< cmf::water::solute * >(argp2); - { - try { - result = (cmf::water::SoluteStorage *) &(arg1)->Solute((cmf::water::solute const &)*arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - std::shared_ptr< cmf::water::SoluteStorage > *smartresult = new std::shared_ptr< cmf::water::SoluteStorage >(result SWIG_NO_NULL_DELETER_0); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__water__SoluteStorage_t, SWIG_POINTER_OWN); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_WaterStorage_Solute__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::water::WaterStorage *arg1 = (cmf::water::WaterStorage *) 0 ; - cmf::water::solute *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::water::WaterStorage const > tempshared1 ; - std::shared_ptr< cmf::water::WaterStorage const > *smartarg1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - cmf::water::SoluteStorage *result = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "WaterStorage_Solute" "', argument " "1"" of type '" "cmf::water::WaterStorage const *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::water::WaterStorage > * >(argp1); - delete reinterpret_cast< std::shared_ptr< const cmf::water::WaterStorage > * >(argp1); - arg1 = const_cast< cmf::water::WaterStorage * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::water::WaterStorage > * >(argp1); - arg1 = const_cast< cmf::water::WaterStorage * >((smartarg1 ? smartarg1->get() : 0)); - } - } - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_cmf__water__solute, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "WaterStorage_Solute" "', argument " "2"" of type '" "cmf::water::solute const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "WaterStorage_Solute" "', argument " "2"" of type '" "cmf::water::solute const &""'"); - } - arg2 = reinterpret_cast< cmf::water::solute * >(argp2); - { - try { - result = (cmf::water::SoluteStorage *) &((cmf::water::WaterStorage const *)arg1)->Solute((cmf::water::solute const &)*arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - std::shared_ptr< const cmf::water::SoluteStorage > *smartresult = new std::shared_ptr< const cmf::water::SoluteStorage >(result SWIG_NO_NULL_DELETER_0); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__water__SoluteStorage_t, SWIG_POINTER_OWN); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_WaterStorage_Solute(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args,"WaterStorage_Solute",0,2,argv))) SWIG_fail; - --argc; - { - unsigned long _index = 0; - SWIG_TypeRank _rank = 0; - if (argc == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_cmf__water__solute, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 1; - if (_rank == _rankm) goto dispatch; - } - } - check_1: - - if (argc == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_cmf__water__solute, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 2; - if (_rank == _rankm) goto dispatch; - } - } - check_2: - - dispatch: - switch(_index) { - case 1: - return _wrap_WaterStorage_Solute__SWIG_0(self, argc, argv); - case 2: - return _wrap_WaterStorage_Solute__SWIG_1(self, argc, argv); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'WaterStorage_Solute'.\n" - " Possible C/C++ prototypes are:\n" - " cmf::water::WaterStorage::Solute(cmf::water::solute const &)\n" - " cmf::water::WaterStorage::Solute(cmf::water::solute const &) const\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_WaterStorage_conc__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::water::WaterStorage *arg1 = (cmf::water::WaterStorage *) 0 ; - cmf::water::solute *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::water::WaterStorage const > tempshared1 ; - std::shared_ptr< cmf::water::WaterStorage const > *smartarg1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - real result; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "WaterStorage_conc" "', argument " "1"" of type '" "cmf::water::WaterStorage const *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::water::WaterStorage > * >(argp1); - delete reinterpret_cast< std::shared_ptr< const cmf::water::WaterStorage > * >(argp1); - arg1 = const_cast< cmf::water::WaterStorage * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::water::WaterStorage > * >(argp1); - arg1 = const_cast< cmf::water::WaterStorage * >((smartarg1 ? smartarg1->get() : 0)); - } - } - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_cmf__water__solute, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "WaterStorage_conc" "', argument " "2"" of type '" "cmf::water::solute const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "WaterStorage_conc" "', argument " "2"" of type '" "cmf::water::solute const &""'"); - } - arg2 = reinterpret_cast< cmf::water::solute * >(argp2); - { - try { - result = (real)((cmf::water::WaterStorage const *)arg1)->conc((cmf::water::solute const &)*arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_WaterStorage_conc__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::water::WaterStorage *arg1 = (cmf::water::WaterStorage *) 0 ; - cmf::math::Time arg2 ; - cmf::water::solute *arg3 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::water::WaterStorage const > tempshared1 ; - std::shared_ptr< cmf::water::WaterStorage const > *smartarg1 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - real result; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "WaterStorage_conc" "', argument " "1"" of type '" "cmf::water::WaterStorage const *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::water::WaterStorage > * >(argp1); - delete reinterpret_cast< std::shared_ptr< const cmf::water::WaterStorage > * >(argp1); - arg1 = const_cast< cmf::water::WaterStorage * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::water::WaterStorage > * >(argp1); - arg1 = const_cast< cmf::water::WaterStorage * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - arg2 = convert_datetime_to_cmftime(swig_obj[1]); - if (arg2 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } - } - res3 = SWIG_ConvertPtr(swig_obj[2], &argp3, SWIGTYPE_p_cmf__water__solute, 0 | 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "WaterStorage_conc" "', argument " "3"" of type '" "cmf::water::solute const &""'"); - } - if (!argp3) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "WaterStorage_conc" "', argument " "3"" of type '" "cmf::water::solute const &""'"); - } - arg3 = reinterpret_cast< cmf::water::solute * >(argp3); - { - try { - result = (real)((cmf::water::WaterStorage const *)arg1)->conc(arg2,(cmf::water::solute const &)*arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_WaterStorage_conc__SWIG_2(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::water::WaterStorage *arg1 = (cmf::water::WaterStorage *) 0 ; - cmf::water::solute *arg2 = 0 ; - real arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::water::WaterStorage > tempshared1 ; - std::shared_ptr< cmf::water::WaterStorage > *smartarg1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - double val3 ; - int ecode3 = 0 ; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "WaterStorage_conc" "', argument " "1"" of type '" "cmf::water::WaterStorage *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::WaterStorage > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::water::WaterStorage > * >(argp1); - arg1 = const_cast< cmf::water::WaterStorage * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::WaterStorage > * >(argp1); - arg1 = const_cast< cmf::water::WaterStorage * >((smartarg1 ? smartarg1->get() : 0)); - } - } - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_cmf__water__solute, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "WaterStorage_conc" "', argument " "2"" of type '" "cmf::water::solute const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "WaterStorage_conc" "', argument " "2"" of type '" "cmf::water::solute const &""'"); - } - arg2 = reinterpret_cast< cmf::water::solute * >(argp2); - ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "WaterStorage_conc" "', argument " "3"" of type '" "real""'"); - } - arg3 = static_cast< real >(val3); - { - try { - (arg1)->conc((cmf::water::solute const &)*arg2,arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_WaterStorage_conc(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[4] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args,"WaterStorage_conc",0,3,argv))) SWIG_fail; - --argc; - { - unsigned long _index = 0; - SWIG_TypeRank _rank = 0; - if (argc == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_cmf__water__solute, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 1; - if (_rank == _rankm) goto dispatch; - } - } - check_1: - - if (argc == 3) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - _v = check_time(argv[1]); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_cmf__water__solute, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 2; - if (_rank == _rankm) goto dispatch; - } - } - check_2: - - if (argc == 3) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_3; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_cmf__water__solute, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_3; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - int res = SWIG_AsVal_double(argv[2], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_3; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 3; - if (_rank == _rankm) goto dispatch; - } - } - check_3: - - dispatch: - switch(_index) { - case 1: - return _wrap_WaterStorage_conc__SWIG_0(self, argc, argv); - case 2: - return _wrap_WaterStorage_conc__SWIG_1(self, argc, argv); - case 3: - return _wrap_WaterStorage_conc__SWIG_2(self, argc, argv); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'WaterStorage_conc'.\n" - " Possible C/C++ prototypes are:\n" - " cmf::water::WaterStorage::conc(cmf::water::solute const &) const\n" - " cmf::water::WaterStorage::conc(cmf::math::Time,cmf::water::solute const &) const\n" - " cmf::water::WaterStorage::conc(cmf::water::solute const &,real)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_WaterStorage_cast(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - std::shared_ptr< cmf::water::flux_node > arg1 ; - void *argp1 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - char * kwnames[] = { - (char *) "node", NULL - }; - std::shared_ptr< cmf::water::WaterStorage > result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:WaterStorage_cast",kwnames,&obj0)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "WaterStorage_cast" "', argument " "1"" of type '" "std::shared_ptr< cmf::water::flux_node >""'"); - } - if (argp1) arg1 = *(reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); - } - { - try { - result = cmf::water::WaterStorage::cast(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - std::shared_ptr< cmf::water::WaterStorage > *smartresult = result ? new std::shared_ptr< cmf::water::WaterStorage >(result) : 0; - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, SWIG_POINTER_OWN); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_WaterStorage_create(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::project *arg1 = 0 ; - real arg2 = (real) 0.0 ; - real arg3 = (real) 1.0 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - double val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char * kwnames[] = { - (char *) "_project",(char *) "initial_state",(char *) "scale", NULL - }; - std::shared_ptr< cmf::water::WaterStorage > result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OO:WaterStorage_create",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_cmf__project, 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "WaterStorage_create" "', argument " "1"" of type '" "cmf::project &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "WaterStorage_create" "', argument " "1"" of type '" "cmf::project &""'"); - } - arg1 = reinterpret_cast< cmf::project * >(argp1); - if (obj1) { - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "WaterStorage_create" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - } - if (obj2) { - ecode3 = SWIG_AsVal_double(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "WaterStorage_create" "', argument " "3"" of type '" "real""'"); - } - arg3 = static_cast< real >(val3); - } - { - try { - result = cmf::water::WaterStorage::create(*arg1,arg2,arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - std::shared_ptr< cmf::water::WaterStorage > *smartresult = result ? new std::shared_ptr< cmf::water::WaterStorage >(result) : 0; - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, SWIG_POINTER_OWN); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_WaterStorage_volume_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::WaterStorage *arg1 = (cmf::water::WaterStorage *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::water::WaterStorage > tempshared1 ; - std::shared_ptr< cmf::water::WaterStorage > *smartarg1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"WaterStorage_volume_set",2,2,swig_obj)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "WaterStorage_volume_set" "', argument " "1"" of type '" "cmf::water::WaterStorage *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::WaterStorage > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::water::WaterStorage > * >(argp1); - arg1 = const_cast< cmf::water::WaterStorage * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::WaterStorage > * >(argp1); - arg1 = const_cast< cmf::water::WaterStorage * >((smartarg1 ? smartarg1->get() : 0)); - } - } - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "WaterStorage_volume_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - { - try { - cmf_water_WaterStorage_volume_set(arg1,arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_WaterStorage_volume_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::WaterStorage *arg1 = (cmf::water::WaterStorage *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::water::WaterStorage > tempshared1 ; - std::shared_ptr< cmf::water::WaterStorage > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "WaterStorage_volume_get" "', argument " "1"" of type '" "cmf::water::WaterStorage *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::WaterStorage > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::water::WaterStorage > * >(argp1); - arg1 = const_cast< cmf::water::WaterStorage * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::WaterStorage > * >(argp1); - arg1 = const_cast< cmf::water::WaterStorage * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - try { - result = (real)cmf_water_WaterStorage_volume_get(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_WaterStorage_statevariable_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::WaterStorage *arg1 = (cmf::water::WaterStorage *) 0 ; - char arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::water::WaterStorage > tempshared1 ; - std::shared_ptr< cmf::water::WaterStorage > *smartarg1 = 0 ; - char val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"WaterStorage_statevariable_set",2,2,swig_obj)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "WaterStorage_statevariable_set" "', argument " "1"" of type '" "cmf::water::WaterStorage *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::WaterStorage > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::water::WaterStorage > * >(argp1); - arg1 = const_cast< cmf::water::WaterStorage * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::WaterStorage > * >(argp1); - arg1 = const_cast< cmf::water::WaterStorage * >((smartarg1 ? smartarg1->get() : 0)); - } - } - ecode2 = SWIG_AsVal_char(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "WaterStorage_statevariable_set" "', argument " "2"" of type '" "char""'"); - } - arg2 = static_cast< char >(val2); - { - try { - cmf_water_WaterStorage_statevariable_set(arg1,arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_WaterStorage_statevariable_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::WaterStorage *arg1 = (cmf::water::WaterStorage *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::water::WaterStorage > tempshared1 ; - std::shared_ptr< cmf::water::WaterStorage > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - char result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "WaterStorage_statevariable_get" "', argument " "1"" of type '" "cmf::water::WaterStorage *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::WaterStorage > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::water::WaterStorage > * >(argp1); - arg1 = const_cast< cmf::water::WaterStorage * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::WaterStorage > * >(argp1); - arg1 = const_cast< cmf::water::WaterStorage * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - try { - result = (char)cmf_water_WaterStorage_statevariable_get(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_char(static_cast< char >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_WaterStorage(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::WaterStorage *arg1 = (cmf::water::WaterStorage *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::water::WaterStorage > tempshared1 ; - std::shared_ptr< cmf::water::WaterStorage > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_WaterStorage" "', argument " "1"" of type '" "cmf::water::WaterStorage *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::WaterStorage > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::water::WaterStorage > * >(argp1); - arg1 = const_cast< cmf::water::WaterStorage * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::WaterStorage > * >(argp1); - arg1 = const_cast< cmf::water::WaterStorage * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - try { - (void)arg1; delete smartarg1; - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *WaterStorage_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *WaterStorage_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_new_waterbalance_connection(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::flux_node::ptr arg1 ; - cmf::water::flux_node::ptr arg2 ; - void *argp1 ; - int res1 = 0 ; - void *argp2 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "source",(char *) "target", NULL - }; - cmf::water::waterbalance_connection *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:new_waterbalance_connection",kwnames,&obj0,&obj1)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_waterbalance_connection" "', argument " "1"" of type '" "cmf::water::flux_node::ptr""'"); - } - if (argp1) arg1 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp1)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp1); - } - { - int newmem = 0; - res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_waterbalance_connection" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); - } - if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); - } - { - try { - result = (cmf::water::waterbalance_connection *)new cmf::water::waterbalance_connection(arg1,arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__water__waterbalance_connection, SWIG_POINTER_NEW | 0 ); - - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_waterbalance_connection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::waterbalance_connection *arg1 = (cmf::water::waterbalance_connection *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__waterbalance_connection, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_waterbalance_connection" "', argument " "1"" of type '" "cmf::water::waterbalance_connection *""'"); - } - arg1 = reinterpret_cast< cmf::water::waterbalance_connection * >(argp1); - { - try { - - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *waterbalance_connection_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__water__waterbalance_connection, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *waterbalance_connection_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_external_control_connection_flux_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::external_control_connection *arg1 = (cmf::water::external_control_connection *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"external_control_connection_flux_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__external_control_connection, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "external_control_connection_flux_set" "', argument " "1"" of type '" "cmf::water::external_control_connection *""'"); - } - arg1 = reinterpret_cast< cmf::water::external_control_connection * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "external_control_connection_flux_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->flux = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_external_control_connection_flux_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::external_control_connection *arg1 = (cmf::water::external_control_connection *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__external_control_connection, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "external_control_connection_flux_get" "', argument " "1"" of type '" "cmf::water::external_control_connection *""'"); - } - arg1 = reinterpret_cast< cmf::water::external_control_connection * >(argp1); - result = (real) ((arg1)->flux); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_external_control_connection(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::flux_node::ptr arg1 ; - cmf::water::flux_node::ptr arg2 ; - real arg3 = (real) 0 ; - void *argp1 ; - int res1 = 0 ; - void *argp2 ; - int res2 = 0 ; - double val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char * kwnames[] = { - (char *) "source",(char *) "target",(char *) "flux_value", NULL - }; - cmf::water::external_control_connection *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:new_external_control_connection",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_external_control_connection" "', argument " "1"" of type '" "cmf::water::flux_node::ptr""'"); - } - if (argp1) arg1 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp1)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp1); - } - { - int newmem = 0; - res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_external_control_connection" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); - } - if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); - } - if (obj2) { - ecode3 = SWIG_AsVal_double(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_external_control_connection" "', argument " "3"" of type '" "real""'"); - } - arg3 = static_cast< real >(val3); - } - { - try { - result = (cmf::water::external_control_connection *)new cmf::water::external_control_connection(arg1,arg2,arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__water__external_control_connection, SWIG_POINTER_NEW | 0 ); - - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_external_control_connection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::external_control_connection *arg1 = (cmf::water::external_control_connection *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__external_control_connection, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_external_control_connection" "', argument " "1"" of type '" "cmf::water::external_control_connection *""'"); - } - arg1 = reinterpret_cast< cmf::water::external_control_connection * >(argp1); - { - try { - - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *external_control_connection_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__water__external_control_connection, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *external_control_connection_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_set_flux(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::flux_node::ptr arg1 ; - cmf::water::flux_node::ptr arg2 ; - real arg3 ; - void *argp1 ; - int res1 = 0 ; - void *argp2 ; - int res2 = 0 ; - double val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char * kwnames[] = { - (char *) "source",(char *) "target",(char *) "flux_value", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:set_flux",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "set_flux" "', argument " "1"" of type '" "cmf::water::flux_node::ptr""'"); - } - if (argp1) arg1 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp1)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp1); - } - { - int newmem = 0; - res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "set_flux" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); - } - if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); - } - ecode3 = SWIG_AsVal_double(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "set_flux" "', argument " "3"" of type '" "real""'"); - } - arg3 = static_cast< real >(val3); - { - try { - cmf::water::set_flux(arg1,arg2,arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_can_set_flux(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::flux_node::ptr arg1 ; - cmf::water::flux_node::ptr arg2 ; - void *argp1 ; - int res1 = 0 ; - void *argp2 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "source",(char *) "target", NULL - }; - bool result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:can_set_flux",kwnames,&obj0,&obj1)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "can_set_flux" "', argument " "1"" of type '" "cmf::water::flux_node::ptr""'"); - } - if (argp1) arg1 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp1)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp1); - } - { - int newmem = 0; - res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "can_set_flux" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); - } - if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); - } - { - try { - result = (bool)cmf::water::can_set_flux(arg1,arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_kinematic_wave_residencetime_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::kinematic_wave *arg1 = (cmf::water::kinematic_wave *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"kinematic_wave_residencetime_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__kinematic_wave, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "kinematic_wave_residencetime_set" "', argument " "1"" of type '" "cmf::water::kinematic_wave *""'"); - } - arg1 = reinterpret_cast< cmf::water::kinematic_wave * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "kinematic_wave_residencetime_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->residencetime = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_kinematic_wave_residencetime_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::kinematic_wave *arg1 = (cmf::water::kinematic_wave *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__kinematic_wave, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "kinematic_wave_residencetime_get" "', argument " "1"" of type '" "cmf::water::kinematic_wave *""'"); - } - arg1 = reinterpret_cast< cmf::water::kinematic_wave * >(argp1); - result = (real) ((arg1)->residencetime); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_kinematic_wave_exponent_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::kinematic_wave *arg1 = (cmf::water::kinematic_wave *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"kinematic_wave_exponent_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__kinematic_wave, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "kinematic_wave_exponent_set" "', argument " "1"" of type '" "cmf::water::kinematic_wave *""'"); - } - arg1 = reinterpret_cast< cmf::water::kinematic_wave * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "kinematic_wave_exponent_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->exponent = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_kinematic_wave_exponent_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::kinematic_wave *arg1 = (cmf::water::kinematic_wave *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__kinematic_wave, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "kinematic_wave_exponent_get" "', argument " "1"" of type '" "cmf::water::kinematic_wave *""'"); - } - arg1 = reinterpret_cast< cmf::water::kinematic_wave * >(argp1); - result = (real) ((arg1)->exponent); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_kinematic_wave_residual_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::kinematic_wave *arg1 = (cmf::water::kinematic_wave *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"kinematic_wave_residual_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__kinematic_wave, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "kinematic_wave_residual_set" "', argument " "1"" of type '" "cmf::water::kinematic_wave *""'"); - } - arg1 = reinterpret_cast< cmf::water::kinematic_wave * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "kinematic_wave_residual_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->residual = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_kinematic_wave_residual_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::kinematic_wave *arg1 = (cmf::water::kinematic_wave *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__kinematic_wave, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "kinematic_wave_residual_get" "', argument " "1"" of type '" "cmf::water::kinematic_wave *""'"); - } - arg1 = reinterpret_cast< cmf::water::kinematic_wave * >(argp1); - result = (real) ((arg1)->residual); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_kinematic_wave_V0_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::kinematic_wave *arg1 = (cmf::water::kinematic_wave *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"kinematic_wave_V0_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__kinematic_wave, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "kinematic_wave_V0_set" "', argument " "1"" of type '" "cmf::water::kinematic_wave *""'"); - } - arg1 = reinterpret_cast< cmf::water::kinematic_wave * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "kinematic_wave_V0_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->V0 = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_kinematic_wave_V0_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::kinematic_wave *arg1 = (cmf::water::kinematic_wave *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__kinematic_wave, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "kinematic_wave_V0_get" "', argument " "1"" of type '" "cmf::water::kinematic_wave *""'"); - } - arg1 = reinterpret_cast< cmf::water::kinematic_wave * >(argp1); - result = (real) ((arg1)->V0); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_kinematic_wave(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::WaterStorage::ptr arg1 ; - cmf::water::flux_node::ptr arg2 ; - real arg3 ; - real arg4 = (real) 1.0 ; - real arg5 = (real) 0.0 ; - real arg6 = (real) 1.0 ; - void *argp1 ; - int res1 = 0 ; - void *argp2 ; - int res2 = 0 ; - double val3 ; - int ecode3 = 0 ; - double val4 ; - int ecode4 = 0 ; - double val5 ; - int ecode5 = 0 ; - double val6 ; - int ecode6 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - char * kwnames[] = { - (char *) "source",(char *) "target",(char *) "residencetime",(char *) "exponent",(char *) "residual",(char *) "V0", NULL - }; - cmf::water::kinematic_wave *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOO:new_kinematic_wave",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_kinematic_wave" "', argument " "1"" of type '" "cmf::water::WaterStorage::ptr""'"); - } - if (argp1) arg1 = *(reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp1)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp1); - } - { - int newmem = 0; - res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_kinematic_wave" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); - } - if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); - } - ecode3 = SWIG_AsVal_double(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_kinematic_wave" "', argument " "3"" of type '" "real""'"); - } - arg3 = static_cast< real >(val3); - if (obj3) { - ecode4 = SWIG_AsVal_double(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_kinematic_wave" "', argument " "4"" of type '" "real""'"); - } - arg4 = static_cast< real >(val4); - } - if (obj4) { - ecode5 = SWIG_AsVal_double(obj4, &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_kinematic_wave" "', argument " "5"" of type '" "real""'"); - } - arg5 = static_cast< real >(val5); - } - if (obj5) { - ecode6 = SWIG_AsVal_double(obj5, &val6); - if (!SWIG_IsOK(ecode6)) { - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_kinematic_wave" "', argument " "6"" of type '" "real""'"); - } - arg6 = static_cast< real >(val6); - } - { - try { - result = (cmf::water::kinematic_wave *)new cmf::water::kinematic_wave(arg1,arg2,arg3,arg4,arg5,arg6); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__water__kinematic_wave, SWIG_POINTER_NEW | 0 ); - - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_kinematic_wave(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::kinematic_wave *arg1 = (cmf::water::kinematic_wave *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__kinematic_wave, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_kinematic_wave" "', argument " "1"" of type '" "cmf::water::kinematic_wave *""'"); - } - arg1 = reinterpret_cast< cmf::water::kinematic_wave * >(argp1); - { - try { - - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *kinematic_wave_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__water__kinematic_wave, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *kinematic_wave_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_LinearStorageConnection_residencetime_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::LinearStorageConnection *arg1 = (cmf::water::LinearStorageConnection *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"LinearStorageConnection_residencetime_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__LinearStorageConnection, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LinearStorageConnection_residencetime_set" "', argument " "1"" of type '" "cmf::water::LinearStorageConnection *""'"); - } - arg1 = reinterpret_cast< cmf::water::LinearStorageConnection * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LinearStorageConnection_residencetime_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->residencetime = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_LinearStorageConnection_residencetime_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::LinearStorageConnection *arg1 = (cmf::water::LinearStorageConnection *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__LinearStorageConnection, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LinearStorageConnection_residencetime_get" "', argument " "1"" of type '" "cmf::water::LinearStorageConnection *""'"); - } - arg1 = reinterpret_cast< cmf::water::LinearStorageConnection * >(argp1); - result = (real) ((arg1)->residencetime); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_LinearStorageConnection_residual_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::LinearStorageConnection *arg1 = (cmf::water::LinearStorageConnection *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"LinearStorageConnection_residual_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__LinearStorageConnection, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LinearStorageConnection_residual_set" "', argument " "1"" of type '" "cmf::water::LinearStorageConnection *""'"); - } - arg1 = reinterpret_cast< cmf::water::LinearStorageConnection * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LinearStorageConnection_residual_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->residual = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_LinearStorageConnection_residual_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::LinearStorageConnection *arg1 = (cmf::water::LinearStorageConnection *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__LinearStorageConnection, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LinearStorageConnection_residual_get" "', argument " "1"" of type '" "cmf::water::LinearStorageConnection *""'"); - } - arg1 = reinterpret_cast< cmf::water::LinearStorageConnection * >(argp1); - result = (real) ((arg1)->residual); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_LinearStorageConnection(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::WaterStorage::ptr arg1 ; - cmf::water::flux_node::ptr arg2 ; - real arg3 ; - real arg4 = (real) 0.0 ; - void *argp1 ; - int res1 = 0 ; - void *argp2 ; - int res2 = 0 ; - double val3 ; - int ecode3 = 0 ; - double val4 ; - int ecode4 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - char * kwnames[] = { - (char *) "source",(char *) "target",(char *) "residencetime",(char *) "residual", NULL - }; - cmf::water::LinearStorageConnection *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|O:new_LinearStorageConnection",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_LinearStorageConnection" "', argument " "1"" of type '" "cmf::water::WaterStorage::ptr""'"); - } - if (argp1) arg1 = *(reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp1)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp1); - } - { - int newmem = 0; - res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_LinearStorageConnection" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); - } - if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); - } - ecode3 = SWIG_AsVal_double(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_LinearStorageConnection" "', argument " "3"" of type '" "real""'"); - } - arg3 = static_cast< real >(val3); - if (obj3) { - ecode4 = SWIG_AsVal_double(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_LinearStorageConnection" "', argument " "4"" of type '" "real""'"); - } - arg4 = static_cast< real >(val4); - } - { - try { - result = (cmf::water::LinearStorageConnection *)new cmf::water::LinearStorageConnection(arg1,arg2,arg3,arg4); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__water__LinearStorageConnection, SWIG_POINTER_NEW | 0 ); - - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_LinearStorageConnection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::LinearStorageConnection *arg1 = (cmf::water::LinearStorageConnection *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__LinearStorageConnection, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_LinearStorageConnection" "', argument " "1"" of type '" "cmf::water::LinearStorageConnection *""'"); - } - arg1 = reinterpret_cast< cmf::water::LinearStorageConnection * >(argp1); - { - try { - - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *LinearStorageConnection_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__water__LinearStorageConnection, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *LinearStorageConnection_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_PowerLawConnection_Q0_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::PowerLawConnection *arg1 = (cmf::water::PowerLawConnection *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"PowerLawConnection_Q0_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__PowerLawConnection, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PowerLawConnection_Q0_set" "', argument " "1"" of type '" "cmf::water::PowerLawConnection *""'"); - } - arg1 = reinterpret_cast< cmf::water::PowerLawConnection * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "PowerLawConnection_Q0_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->Q0 = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_PowerLawConnection_Q0_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::PowerLawConnection *arg1 = (cmf::water::PowerLawConnection *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__PowerLawConnection, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PowerLawConnection_Q0_get" "', argument " "1"" of type '" "cmf::water::PowerLawConnection *""'"); - } - arg1 = reinterpret_cast< cmf::water::PowerLawConnection * >(argp1); - result = (real) ((arg1)->Q0); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_PowerLawConnection_beta_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::PowerLawConnection *arg1 = (cmf::water::PowerLawConnection *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"PowerLawConnection_beta_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__PowerLawConnection, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PowerLawConnection_beta_set" "', argument " "1"" of type '" "cmf::water::PowerLawConnection *""'"); - } - arg1 = reinterpret_cast< cmf::water::PowerLawConnection * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "PowerLawConnection_beta_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->beta = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_PowerLawConnection_beta_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::PowerLawConnection *arg1 = (cmf::water::PowerLawConnection *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__PowerLawConnection, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PowerLawConnection_beta_get" "', argument " "1"" of type '" "cmf::water::PowerLawConnection *""'"); - } - arg1 = reinterpret_cast< cmf::water::PowerLawConnection * >(argp1); - result = (real) ((arg1)->beta); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_PowerLawConnection_residual_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::PowerLawConnection *arg1 = (cmf::water::PowerLawConnection *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"PowerLawConnection_residual_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__PowerLawConnection, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PowerLawConnection_residual_set" "', argument " "1"" of type '" "cmf::water::PowerLawConnection *""'"); - } - arg1 = reinterpret_cast< cmf::water::PowerLawConnection * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "PowerLawConnection_residual_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->residual = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_PowerLawConnection_residual_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::PowerLawConnection *arg1 = (cmf::water::PowerLawConnection *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__PowerLawConnection, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PowerLawConnection_residual_get" "', argument " "1"" of type '" "cmf::water::PowerLawConnection *""'"); - } - arg1 = reinterpret_cast< cmf::water::PowerLawConnection * >(argp1); - result = (real) ((arg1)->residual); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_PowerLawConnection_V0_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::PowerLawConnection *arg1 = (cmf::water::PowerLawConnection *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"PowerLawConnection_V0_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__PowerLawConnection, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PowerLawConnection_V0_set" "', argument " "1"" of type '" "cmf::water::PowerLawConnection *""'"); - } - arg1 = reinterpret_cast< cmf::water::PowerLawConnection * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "PowerLawConnection_V0_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->V0 = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_PowerLawConnection_V0_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::PowerLawConnection *arg1 = (cmf::water::PowerLawConnection *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__PowerLawConnection, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PowerLawConnection_V0_get" "', argument " "1"" of type '" "cmf::water::PowerLawConnection *""'"); - } - arg1 = reinterpret_cast< cmf::water::PowerLawConnection * >(argp1); - result = (real) ((arg1)->V0); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_PowerLawConnection(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::WaterStorage::ptr arg1 ; - cmf::water::flux_node::ptr arg2 ; - real arg3 ; - real arg4 ; - real arg5 = (real) 1.0 ; - real arg6 = (real) 0.0 ; - void *argp1 ; - int res1 = 0 ; - void *argp2 ; - int res2 = 0 ; - double val3 ; - int ecode3 = 0 ; - double val4 ; - int ecode4 = 0 ; - double val5 ; - int ecode5 = 0 ; - double val6 ; - int ecode6 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - char * kwnames[] = { - (char *) "source",(char *) "target",(char *) "Q0",(char *) "V0",(char *) "beta",(char *) "residual", NULL - }; - cmf::water::PowerLawConnection *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO|OO:new_PowerLawConnection",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_PowerLawConnection" "', argument " "1"" of type '" "cmf::water::WaterStorage::ptr""'"); - } - if (argp1) arg1 = *(reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp1)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp1); - } - { - int newmem = 0; - res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_PowerLawConnection" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); - } - if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); - } - ecode3 = SWIG_AsVal_double(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_PowerLawConnection" "', argument " "3"" of type '" "real""'"); - } - arg3 = static_cast< real >(val3); - ecode4 = SWIG_AsVal_double(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_PowerLawConnection" "', argument " "4"" of type '" "real""'"); - } - arg4 = static_cast< real >(val4); - if (obj4) { - ecode5 = SWIG_AsVal_double(obj4, &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_PowerLawConnection" "', argument " "5"" of type '" "real""'"); - } - arg5 = static_cast< real >(val5); - } - if (obj5) { - ecode6 = SWIG_AsVal_double(obj5, &val6); - if (!SWIG_IsOK(ecode6)) { - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_PowerLawConnection" "', argument " "6"" of type '" "real""'"); - } - arg6 = static_cast< real >(val6); - } - { - try { - result = (cmf::water::PowerLawConnection *)new cmf::water::PowerLawConnection(arg1,arg2,arg3,arg4,arg5,arg6); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__water__PowerLawConnection, SWIG_POINTER_NEW | 0 ); - - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_PowerLawConnection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::PowerLawConnection *arg1 = (cmf::water::PowerLawConnection *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__PowerLawConnection, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_PowerLawConnection" "', argument " "1"" of type '" "cmf::water::PowerLawConnection *""'"); - } - arg1 = reinterpret_cast< cmf::water::PowerLawConnection * >(argp1); - { - try { - - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *PowerLawConnection_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__water__PowerLawConnection, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *PowerLawConnection_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_ExponentialDeclineConnection_Q0_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::ExponentialDeclineConnection *arg1 = (cmf::water::ExponentialDeclineConnection *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"ExponentialDeclineConnection_Q0_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__ExponentialDeclineConnection, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExponentialDeclineConnection_Q0_set" "', argument " "1"" of type '" "cmf::water::ExponentialDeclineConnection *""'"); - } - arg1 = reinterpret_cast< cmf::water::ExponentialDeclineConnection * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ExponentialDeclineConnection_Q0_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->Q0 = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ExponentialDeclineConnection_Q0_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::ExponentialDeclineConnection *arg1 = (cmf::water::ExponentialDeclineConnection *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__ExponentialDeclineConnection, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExponentialDeclineConnection_Q0_get" "', argument " "1"" of type '" "cmf::water::ExponentialDeclineConnection *""'"); - } - arg1 = reinterpret_cast< cmf::water::ExponentialDeclineConnection * >(argp1); - result = (real) ((arg1)->Q0); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ExponentialDeclineConnection_m_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::ExponentialDeclineConnection *arg1 = (cmf::water::ExponentialDeclineConnection *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"ExponentialDeclineConnection_m_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__ExponentialDeclineConnection, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExponentialDeclineConnection_m_set" "', argument " "1"" of type '" "cmf::water::ExponentialDeclineConnection *""'"); - } - arg1 = reinterpret_cast< cmf::water::ExponentialDeclineConnection * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ExponentialDeclineConnection_m_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->m = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ExponentialDeclineConnection_m_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::ExponentialDeclineConnection *arg1 = (cmf::water::ExponentialDeclineConnection *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__ExponentialDeclineConnection, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExponentialDeclineConnection_m_get" "', argument " "1"" of type '" "cmf::water::ExponentialDeclineConnection *""'"); - } - arg1 = reinterpret_cast< cmf::water::ExponentialDeclineConnection * >(argp1); - result = (real) ((arg1)->m); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ExponentialDeclineConnection_V0_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::ExponentialDeclineConnection *arg1 = (cmf::water::ExponentialDeclineConnection *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"ExponentialDeclineConnection_V0_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__ExponentialDeclineConnection, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExponentialDeclineConnection_V0_set" "', argument " "1"" of type '" "cmf::water::ExponentialDeclineConnection *""'"); - } - arg1 = reinterpret_cast< cmf::water::ExponentialDeclineConnection * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ExponentialDeclineConnection_V0_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->V0 = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ExponentialDeclineConnection_V0_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::ExponentialDeclineConnection *arg1 = (cmf::water::ExponentialDeclineConnection *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__ExponentialDeclineConnection, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExponentialDeclineConnection_V0_get" "', argument " "1"" of type '" "cmf::water::ExponentialDeclineConnection *""'"); - } - arg1 = reinterpret_cast< cmf::water::ExponentialDeclineConnection * >(argp1); - result = (real) ((arg1)->V0); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_ExponentialDeclineConnection(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::WaterStorage::ptr arg1 ; - cmf::water::flux_node::ptr arg2 ; - real arg3 ; - real arg4 ; - real arg5 ; - void *argp1 ; - int res1 = 0 ; - void *argp2 ; - int res2 = 0 ; - double val3 ; - int ecode3 = 0 ; - double val4 ; - int ecode4 = 0 ; - double val5 ; - int ecode5 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - char * kwnames[] = { - (char *) "source",(char *) "target",(char *) "Q0",(char *) "V0",(char *) "m", NULL - }; - cmf::water::ExponentialDeclineConnection *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOO:new_ExponentialDeclineConnection",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ExponentialDeclineConnection" "', argument " "1"" of type '" "cmf::water::WaterStorage::ptr""'"); - } - if (argp1) arg1 = *(reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp1)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp1); - } - { - int newmem = 0; - res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ExponentialDeclineConnection" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); - } - if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); - } - ecode3 = SWIG_AsVal_double(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_ExponentialDeclineConnection" "', argument " "3"" of type '" "real""'"); - } - arg3 = static_cast< real >(val3); - ecode4 = SWIG_AsVal_double(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_ExponentialDeclineConnection" "', argument " "4"" of type '" "real""'"); - } - arg4 = static_cast< real >(val4); - ecode5 = SWIG_AsVal_double(obj4, &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_ExponentialDeclineConnection" "', argument " "5"" of type '" "real""'"); - } - arg5 = static_cast< real >(val5); - { - try { - result = (cmf::water::ExponentialDeclineConnection *)new cmf::water::ExponentialDeclineConnection(arg1,arg2,arg3,arg4,arg5); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__water__ExponentialDeclineConnection, SWIG_POINTER_NEW | 0 ); - - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_ExponentialDeclineConnection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::ExponentialDeclineConnection *arg1 = (cmf::water::ExponentialDeclineConnection *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__ExponentialDeclineConnection, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ExponentialDeclineConnection" "', argument " "1"" of type '" "cmf::water::ExponentialDeclineConnection *""'"); - } - arg1 = reinterpret_cast< cmf::water::ExponentialDeclineConnection * >(argp1); - { - try { - - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *ExponentialDeclineConnection_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__water__ExponentialDeclineConnection, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *ExponentialDeclineConnection_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_ConstraintLinearStorageConnection_residencetime_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::ConstraintLinearStorageConnection *arg1 = (cmf::water::ConstraintLinearStorageConnection *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"ConstraintLinearStorageConnection_residencetime_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__ConstraintLinearStorageConnection, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ConstraintLinearStorageConnection_residencetime_set" "', argument " "1"" of type '" "cmf::water::ConstraintLinearStorageConnection *""'"); - } - arg1 = reinterpret_cast< cmf::water::ConstraintLinearStorageConnection * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ConstraintLinearStorageConnection_residencetime_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->residencetime = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ConstraintLinearStorageConnection_residencetime_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::ConstraintLinearStorageConnection *arg1 = (cmf::water::ConstraintLinearStorageConnection *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__ConstraintLinearStorageConnection, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ConstraintLinearStorageConnection_residencetime_get" "', argument " "1"" of type '" "cmf::water::ConstraintLinearStorageConnection *""'"); - } - arg1 = reinterpret_cast< cmf::water::ConstraintLinearStorageConnection * >(argp1); - result = (real) ((arg1)->residencetime); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ConstraintLinearStorageConnection_Vlmin_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::ConstraintLinearStorageConnection *arg1 = (cmf::water::ConstraintLinearStorageConnection *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"ConstraintLinearStorageConnection_Vlmin_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__ConstraintLinearStorageConnection, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ConstraintLinearStorageConnection_Vlmin_set" "', argument " "1"" of type '" "cmf::water::ConstraintLinearStorageConnection *""'"); - } - arg1 = reinterpret_cast< cmf::water::ConstraintLinearStorageConnection * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ConstraintLinearStorageConnection_Vlmin_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->Vlmin = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ConstraintLinearStorageConnection_Vlmin_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::ConstraintLinearStorageConnection *arg1 = (cmf::water::ConstraintLinearStorageConnection *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__ConstraintLinearStorageConnection, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ConstraintLinearStorageConnection_Vlmin_get" "', argument " "1"" of type '" "cmf::water::ConstraintLinearStorageConnection *""'"); - } - arg1 = reinterpret_cast< cmf::water::ConstraintLinearStorageConnection * >(argp1); - result = (real) ((arg1)->Vlmin); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ConstraintLinearStorageConnection_Vrmax_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::ConstraintLinearStorageConnection *arg1 = (cmf::water::ConstraintLinearStorageConnection *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"ConstraintLinearStorageConnection_Vrmax_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__ConstraintLinearStorageConnection, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ConstraintLinearStorageConnection_Vrmax_set" "', argument " "1"" of type '" "cmf::water::ConstraintLinearStorageConnection *""'"); - } - arg1 = reinterpret_cast< cmf::water::ConstraintLinearStorageConnection * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ConstraintLinearStorageConnection_Vrmax_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->Vrmax = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ConstraintLinearStorageConnection_Vrmax_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::ConstraintLinearStorageConnection *arg1 = (cmf::water::ConstraintLinearStorageConnection *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__ConstraintLinearStorageConnection, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ConstraintLinearStorageConnection_Vrmax_get" "', argument " "1"" of type '" "cmf::water::ConstraintLinearStorageConnection *""'"); - } - arg1 = reinterpret_cast< cmf::water::ConstraintLinearStorageConnection * >(argp1); - result = (real) ((arg1)->Vrmax); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_ConstraintLinearStorageConnection(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::WaterStorage::ptr arg1 ; - cmf::water::WaterStorage::ptr arg2 ; - real arg3 = (real) 1.0 ; - real arg4 = (real) 0.0 ; - real arg5 = (real) 1.0 ; - void *argp1 ; - int res1 = 0 ; - void *argp2 ; - int res2 = 0 ; - double val3 ; - int ecode3 = 0 ; - double val4 ; - int ecode4 = 0 ; - double val5 ; - int ecode5 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - char * kwnames[] = { - (char *) "source",(char *) "target",(char *) "residencetime",(char *) "Vlmin",(char *) "Vrmax", NULL - }; - cmf::water::ConstraintLinearStorageConnection *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOO:new_ConstraintLinearStorageConnection",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ConstraintLinearStorageConnection" "', argument " "1"" of type '" "cmf::water::WaterStorage::ptr""'"); - } - if (argp1) arg1 = *(reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp1)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp1); - } - { - int newmem = 0; - res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0 , &newmem); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ConstraintLinearStorageConnection" "', argument " "2"" of type '" "cmf::water::WaterStorage::ptr""'"); - } - if (argp2) arg2 = *(reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp2)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp2); - } - if (obj2) { - ecode3 = SWIG_AsVal_double(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_ConstraintLinearStorageConnection" "', argument " "3"" of type '" "real""'"); - } - arg3 = static_cast< real >(val3); - } - if (obj3) { - ecode4 = SWIG_AsVal_double(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_ConstraintLinearStorageConnection" "', argument " "4"" of type '" "real""'"); - } - arg4 = static_cast< real >(val4); - } - if (obj4) { - ecode5 = SWIG_AsVal_double(obj4, &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_ConstraintLinearStorageConnection" "', argument " "5"" of type '" "real""'"); - } - arg5 = static_cast< real >(val5); - } - { - try { - result = (cmf::water::ConstraintLinearStorageConnection *)new cmf::water::ConstraintLinearStorageConnection(arg1,arg2,arg3,arg4,arg5); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__water__ConstraintLinearStorageConnection, SWIG_POINTER_NEW | 0 ); - - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_ConstraintLinearStorageConnection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::ConstraintLinearStorageConnection *arg1 = (cmf::water::ConstraintLinearStorageConnection *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__ConstraintLinearStorageConnection, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ConstraintLinearStorageConnection" "', argument " "1"" of type '" "cmf::water::ConstraintLinearStorageConnection *""'"); - } - arg1 = reinterpret_cast< cmf::water::ConstraintLinearStorageConnection * >(argp1); - { - try { - - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *ConstraintLinearStorageConnection_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__water__ConstraintLinearStorageConnection, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *ConstraintLinearStorageConnection_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_bidirectional_kinematic_exchange_Vmaxsuc_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::bidirectional_kinematic_exchange *arg1 = (cmf::water::bidirectional_kinematic_exchange *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"bidirectional_kinematic_exchange_Vmaxsuc_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__bidirectional_kinematic_exchange, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bidirectional_kinematic_exchange_Vmaxsuc_set" "', argument " "1"" of type '" "cmf::water::bidirectional_kinematic_exchange *""'"); - } - arg1 = reinterpret_cast< cmf::water::bidirectional_kinematic_exchange * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "bidirectional_kinematic_exchange_Vmaxsuc_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->Vmaxsuc = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_bidirectional_kinematic_exchange_Vmaxsuc_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::bidirectional_kinematic_exchange *arg1 = (cmf::water::bidirectional_kinematic_exchange *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__bidirectional_kinematic_exchange, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bidirectional_kinematic_exchange_Vmaxsuc_get" "', argument " "1"" of type '" "cmf::water::bidirectional_kinematic_exchange *""'"); - } - arg1 = reinterpret_cast< cmf::water::bidirectional_kinematic_exchange * >(argp1); - result = (real) ((arg1)->Vmaxsuc); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_bidirectional_kinematic_exchange_Vminspill_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::bidirectional_kinematic_exchange *arg1 = (cmf::water::bidirectional_kinematic_exchange *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"bidirectional_kinematic_exchange_Vminspill_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__bidirectional_kinematic_exchange, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bidirectional_kinematic_exchange_Vminspill_set" "', argument " "1"" of type '" "cmf::water::bidirectional_kinematic_exchange *""'"); - } - arg1 = reinterpret_cast< cmf::water::bidirectional_kinematic_exchange * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "bidirectional_kinematic_exchange_Vminspill_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->Vminspill = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_bidirectional_kinematic_exchange_Vminspill_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::bidirectional_kinematic_exchange *arg1 = (cmf::water::bidirectional_kinematic_exchange *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__bidirectional_kinematic_exchange, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bidirectional_kinematic_exchange_Vminspill_get" "', argument " "1"" of type '" "cmf::water::bidirectional_kinematic_exchange *""'"); - } - arg1 = reinterpret_cast< cmf::water::bidirectional_kinematic_exchange * >(argp1); - result = (real) ((arg1)->Vminspill); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_bidirectional_kinematic_exchange_qspill_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::bidirectional_kinematic_exchange *arg1 = (cmf::water::bidirectional_kinematic_exchange *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"bidirectional_kinematic_exchange_qspill_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__bidirectional_kinematic_exchange, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bidirectional_kinematic_exchange_qspill_set" "', argument " "1"" of type '" "cmf::water::bidirectional_kinematic_exchange *""'"); - } - arg1 = reinterpret_cast< cmf::water::bidirectional_kinematic_exchange * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "bidirectional_kinematic_exchange_qspill_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->qspill = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_bidirectional_kinematic_exchange_qspill_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::bidirectional_kinematic_exchange *arg1 = (cmf::water::bidirectional_kinematic_exchange *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__bidirectional_kinematic_exchange, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bidirectional_kinematic_exchange_qspill_get" "', argument " "1"" of type '" "cmf::water::bidirectional_kinematic_exchange *""'"); - } - arg1 = reinterpret_cast< cmf::water::bidirectional_kinematic_exchange * >(argp1); - result = (real) ((arg1)->qspill); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_bidirectional_kinematic_exchange_qsuc_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::bidirectional_kinematic_exchange *arg1 = (cmf::water::bidirectional_kinematic_exchange *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"bidirectional_kinematic_exchange_qsuc_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__bidirectional_kinematic_exchange, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bidirectional_kinematic_exchange_qsuc_set" "', argument " "1"" of type '" "cmf::water::bidirectional_kinematic_exchange *""'"); - } - arg1 = reinterpret_cast< cmf::water::bidirectional_kinematic_exchange * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "bidirectional_kinematic_exchange_qsuc_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->qsuc = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_bidirectional_kinematic_exchange_qsuc_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::bidirectional_kinematic_exchange *arg1 = (cmf::water::bidirectional_kinematic_exchange *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__bidirectional_kinematic_exchange, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bidirectional_kinematic_exchange_qsuc_get" "', argument " "1"" of type '" "cmf::water::bidirectional_kinematic_exchange *""'"); - } - arg1 = reinterpret_cast< cmf::water::bidirectional_kinematic_exchange * >(argp1); - result = (real) ((arg1)->qsuc); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_bidirectional_kinematic_exchange_beta_suc_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::bidirectional_kinematic_exchange *arg1 = (cmf::water::bidirectional_kinematic_exchange *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"bidirectional_kinematic_exchange_beta_suc_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__bidirectional_kinematic_exchange, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bidirectional_kinematic_exchange_beta_suc_set" "', argument " "1"" of type '" "cmf::water::bidirectional_kinematic_exchange *""'"); - } - arg1 = reinterpret_cast< cmf::water::bidirectional_kinematic_exchange * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "bidirectional_kinematic_exchange_beta_suc_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->beta_suc = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_bidirectional_kinematic_exchange_beta_suc_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::bidirectional_kinematic_exchange *arg1 = (cmf::water::bidirectional_kinematic_exchange *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__bidirectional_kinematic_exchange, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bidirectional_kinematic_exchange_beta_suc_get" "', argument " "1"" of type '" "cmf::water::bidirectional_kinematic_exchange *""'"); - } - arg1 = reinterpret_cast< cmf::water::bidirectional_kinematic_exchange * >(argp1); - result = (real) ((arg1)->beta_suc); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_bidirectional_kinematic_exchange_beta_spill_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::bidirectional_kinematic_exchange *arg1 = (cmf::water::bidirectional_kinematic_exchange *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"bidirectional_kinematic_exchange_beta_spill_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__bidirectional_kinematic_exchange, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bidirectional_kinematic_exchange_beta_spill_set" "', argument " "1"" of type '" "cmf::water::bidirectional_kinematic_exchange *""'"); - } - arg1 = reinterpret_cast< cmf::water::bidirectional_kinematic_exchange * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "bidirectional_kinematic_exchange_beta_spill_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->beta_spill = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_bidirectional_kinematic_exchange_beta_spill_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::bidirectional_kinematic_exchange *arg1 = (cmf::water::bidirectional_kinematic_exchange *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__bidirectional_kinematic_exchange, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bidirectional_kinematic_exchange_beta_spill_get" "', argument " "1"" of type '" "cmf::water::bidirectional_kinematic_exchange *""'"); - } - arg1 = reinterpret_cast< cmf::water::bidirectional_kinematic_exchange * >(argp1); - result = (real) ((arg1)->beta_spill); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_bidirectional_kinematic_exchange(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::WaterStorage::ptr arg1 ; - cmf::water::flux_node::ptr arg2 ; - real arg3 ; - real arg4 ; - real arg5 ; - real arg6 ; - real arg7 ; - real arg8 ; - void *argp1 ; - int res1 = 0 ; - void *argp2 ; - int res2 = 0 ; - double val3 ; - int ecode3 = 0 ; - double val4 ; - int ecode4 = 0 ; - double val5 ; - int ecode5 = 0 ; - double val6 ; - int ecode6 = 0 ; - double val7 ; - int ecode7 = 0 ; - double val8 ; - int ecode8 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - PyObject * obj6 = 0 ; - PyObject * obj7 = 0 ; - char * kwnames[] = { - (char *) "source",(char *) "target",(char *) "Vminspill",(char *) "Vmaxsuc",(char *) "qspill",(char *) "qsuc",(char *) "beta_spill",(char *) "beta_suc", NULL - }; - cmf::water::bidirectional_kinematic_exchange *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOOOOO:new_bidirectional_kinematic_exchange",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_bidirectional_kinematic_exchange" "', argument " "1"" of type '" "cmf::water::WaterStorage::ptr""'"); - } - if (argp1) arg1 = *(reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp1)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp1); - } - { - int newmem = 0; - res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_bidirectional_kinematic_exchange" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); - } - if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); - } - ecode3 = SWIG_AsVal_double(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_bidirectional_kinematic_exchange" "', argument " "3"" of type '" "real""'"); - } - arg3 = static_cast< real >(val3); - ecode4 = SWIG_AsVal_double(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_bidirectional_kinematic_exchange" "', argument " "4"" of type '" "real""'"); - } - arg4 = static_cast< real >(val4); - ecode5 = SWIG_AsVal_double(obj4, &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_bidirectional_kinematic_exchange" "', argument " "5"" of type '" "real""'"); - } - arg5 = static_cast< real >(val5); - ecode6 = SWIG_AsVal_double(obj5, &val6); - if (!SWIG_IsOK(ecode6)) { - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_bidirectional_kinematic_exchange" "', argument " "6"" of type '" "real""'"); - } - arg6 = static_cast< real >(val6); - ecode7 = SWIG_AsVal_double(obj6, &val7); - if (!SWIG_IsOK(ecode7)) { - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_bidirectional_kinematic_exchange" "', argument " "7"" of type '" "real""'"); - } - arg7 = static_cast< real >(val7); - ecode8 = SWIG_AsVal_double(obj7, &val8); - if (!SWIG_IsOK(ecode8)) { - SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_bidirectional_kinematic_exchange" "', argument " "8"" of type '" "real""'"); - } - arg8 = static_cast< real >(val8); - { - try { - result = (cmf::water::bidirectional_kinematic_exchange *)new cmf::water::bidirectional_kinematic_exchange(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__water__bidirectional_kinematic_exchange, SWIG_POINTER_NEW | 0 ); - - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_bidirectional_kinematic_exchange(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::bidirectional_kinematic_exchange *arg1 = (cmf::water::bidirectional_kinematic_exchange *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__bidirectional_kinematic_exchange, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_bidirectional_kinematic_exchange" "', argument " "1"" of type '" "cmf::water::bidirectional_kinematic_exchange *""'"); - } - arg1 = reinterpret_cast< cmf::water::bidirectional_kinematic_exchange * >(argp1); - { - try { - - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *bidirectional_kinematic_exchange_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__water__bidirectional_kinematic_exchange, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *bidirectional_kinematic_exchange_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_constraint_kinematic_wave_residencetime_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::constraint_kinematic_wave *arg1 = (cmf::water::constraint_kinematic_wave *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"constraint_kinematic_wave_residencetime_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__constraint_kinematic_wave, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "constraint_kinematic_wave_residencetime_set" "', argument " "1"" of type '" "cmf::water::constraint_kinematic_wave *""'"); - } - arg1 = reinterpret_cast< cmf::water::constraint_kinematic_wave * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "constraint_kinematic_wave_residencetime_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->residencetime = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_constraint_kinematic_wave_residencetime_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::constraint_kinematic_wave *arg1 = (cmf::water::constraint_kinematic_wave *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__constraint_kinematic_wave, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "constraint_kinematic_wave_residencetime_get" "', argument " "1"" of type '" "cmf::water::constraint_kinematic_wave *""'"); - } - arg1 = reinterpret_cast< cmf::water::constraint_kinematic_wave * >(argp1); - result = (real) ((arg1)->residencetime); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_constraint_kinematic_wave_beta_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::constraint_kinematic_wave *arg1 = (cmf::water::constraint_kinematic_wave *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"constraint_kinematic_wave_beta_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__constraint_kinematic_wave, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "constraint_kinematic_wave_beta_set" "', argument " "1"" of type '" "cmf::water::constraint_kinematic_wave *""'"); - } - arg1 = reinterpret_cast< cmf::water::constraint_kinematic_wave * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "constraint_kinematic_wave_beta_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->beta = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_constraint_kinematic_wave_beta_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::constraint_kinematic_wave *arg1 = (cmf::water::constraint_kinematic_wave *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__constraint_kinematic_wave, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "constraint_kinematic_wave_beta_get" "', argument " "1"" of type '" "cmf::water::constraint_kinematic_wave *""'"); - } - arg1 = reinterpret_cast< cmf::water::constraint_kinematic_wave * >(argp1); - result = (real) ((arg1)->beta); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_constraint_kinematic_wave_residual_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::constraint_kinematic_wave *arg1 = (cmf::water::constraint_kinematic_wave *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"constraint_kinematic_wave_residual_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__constraint_kinematic_wave, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "constraint_kinematic_wave_residual_set" "', argument " "1"" of type '" "cmf::water::constraint_kinematic_wave *""'"); - } - arg1 = reinterpret_cast< cmf::water::constraint_kinematic_wave * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "constraint_kinematic_wave_residual_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->residual = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_constraint_kinematic_wave_residual_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::constraint_kinematic_wave *arg1 = (cmf::water::constraint_kinematic_wave *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__constraint_kinematic_wave, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "constraint_kinematic_wave_residual_get" "', argument " "1"" of type '" "cmf::water::constraint_kinematic_wave *""'"); - } - arg1 = reinterpret_cast< cmf::water::constraint_kinematic_wave * >(argp1); - result = (real) ((arg1)->residual); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_constraint_kinematic_wave_V0_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::constraint_kinematic_wave *arg1 = (cmf::water::constraint_kinematic_wave *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"constraint_kinematic_wave_V0_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__constraint_kinematic_wave, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "constraint_kinematic_wave_V0_set" "', argument " "1"" of type '" "cmf::water::constraint_kinematic_wave *""'"); - } - arg1 = reinterpret_cast< cmf::water::constraint_kinematic_wave * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "constraint_kinematic_wave_V0_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->V0 = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_constraint_kinematic_wave_V0_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::constraint_kinematic_wave *arg1 = (cmf::water::constraint_kinematic_wave *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__constraint_kinematic_wave, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "constraint_kinematic_wave_V0_get" "', argument " "1"" of type '" "cmf::water::constraint_kinematic_wave *""'"); - } - arg1 = reinterpret_cast< cmf::water::constraint_kinematic_wave * >(argp1); - result = (real) ((arg1)->V0); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_constraint_kinematic_wave_Vrmax_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::constraint_kinematic_wave *arg1 = (cmf::water::constraint_kinematic_wave *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"constraint_kinematic_wave_Vrmax_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__constraint_kinematic_wave, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "constraint_kinematic_wave_Vrmax_set" "', argument " "1"" of type '" "cmf::water::constraint_kinematic_wave *""'"); - } - arg1 = reinterpret_cast< cmf::water::constraint_kinematic_wave * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "constraint_kinematic_wave_Vrmax_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->Vrmax = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_constraint_kinematic_wave_Vrmax_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::constraint_kinematic_wave *arg1 = (cmf::water::constraint_kinematic_wave *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__constraint_kinematic_wave, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "constraint_kinematic_wave_Vrmax_get" "', argument " "1"" of type '" "cmf::water::constraint_kinematic_wave *""'"); - } - arg1 = reinterpret_cast< cmf::water::constraint_kinematic_wave * >(argp1); - result = (real) ((arg1)->Vrmax); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_constraint_kinematic_wave_gamma_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::constraint_kinematic_wave *arg1 = (cmf::water::constraint_kinematic_wave *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"constraint_kinematic_wave_gamma_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__constraint_kinematic_wave, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "constraint_kinematic_wave_gamma_set" "', argument " "1"" of type '" "cmf::water::constraint_kinematic_wave *""'"); - } - arg1 = reinterpret_cast< cmf::water::constraint_kinematic_wave * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "constraint_kinematic_wave_gamma_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->gamma = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_constraint_kinematic_wave_gamma_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::constraint_kinematic_wave *arg1 = (cmf::water::constraint_kinematic_wave *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__constraint_kinematic_wave, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "constraint_kinematic_wave_gamma_get" "', argument " "1"" of type '" "cmf::water::constraint_kinematic_wave *""'"); - } - arg1 = reinterpret_cast< cmf::water::constraint_kinematic_wave * >(argp1); - result = (real) ((arg1)->gamma); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_constraint_kinematic_wave(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::WaterStorage::ptr arg1 ; - cmf::water::WaterStorage::ptr arg2 ; - real arg3 = (real) 1.0 ; - real arg4 = (real) 1.0 ; - real arg5 = (real) 0.0 ; - real arg6 = (real) 1.0 ; - real arg7 = (real) 1.0 ; - real arg8 = (real) 1.0 ; - void *argp1 ; - int res1 = 0 ; - void *argp2 ; - int res2 = 0 ; - double val3 ; - int ecode3 = 0 ; - double val4 ; - int ecode4 = 0 ; - double val5 ; - int ecode5 = 0 ; - double val6 ; - int ecode6 = 0 ; - double val7 ; - int ecode7 = 0 ; - double val8 ; - int ecode8 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - PyObject * obj6 = 0 ; - PyObject * obj7 = 0 ; - char * kwnames[] = { - (char *) "source",(char *) "target",(char *) "residencetime",(char *) "exponent",(char *) "residual",(char *) "V0",(char *) "Vrmax",(char *) "gamma", NULL - }; - cmf::water::constraint_kinematic_wave *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOOOO:new_constraint_kinematic_wave",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_constraint_kinematic_wave" "', argument " "1"" of type '" "cmf::water::WaterStorage::ptr""'"); - } - if (argp1) arg1 = *(reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp1)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp1); - } - { - int newmem = 0; - res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0 , &newmem); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_constraint_kinematic_wave" "', argument " "2"" of type '" "cmf::water::WaterStorage::ptr""'"); - } - if (argp2) arg2 = *(reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp2)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp2); - } - if (obj2) { - ecode3 = SWIG_AsVal_double(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_constraint_kinematic_wave" "', argument " "3"" of type '" "real""'"); - } - arg3 = static_cast< real >(val3); - } - if (obj3) { - ecode4 = SWIG_AsVal_double(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_constraint_kinematic_wave" "', argument " "4"" of type '" "real""'"); - } - arg4 = static_cast< real >(val4); - } - if (obj4) { - ecode5 = SWIG_AsVal_double(obj4, &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_constraint_kinematic_wave" "', argument " "5"" of type '" "real""'"); - } - arg5 = static_cast< real >(val5); - } - if (obj5) { - ecode6 = SWIG_AsVal_double(obj5, &val6); - if (!SWIG_IsOK(ecode6)) { - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_constraint_kinematic_wave" "', argument " "6"" of type '" "real""'"); - } - arg6 = static_cast< real >(val6); - } - if (obj6) { - ecode7 = SWIG_AsVal_double(obj6, &val7); - if (!SWIG_IsOK(ecode7)) { - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_constraint_kinematic_wave" "', argument " "7"" of type '" "real""'"); - } - arg7 = static_cast< real >(val7); - } - if (obj7) { - ecode8 = SWIG_AsVal_double(obj7, &val8); - if (!SWIG_IsOK(ecode8)) { - SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_constraint_kinematic_wave" "', argument " "8"" of type '" "real""'"); - } - arg8 = static_cast< real >(val8); - } - { - try { - result = (cmf::water::constraint_kinematic_wave *)new cmf::water::constraint_kinematic_wave(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__water__constraint_kinematic_wave, SWIG_POINTER_NEW | 0 ); - - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_constraint_kinematic_wave(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::constraint_kinematic_wave *arg1 = (cmf::water::constraint_kinematic_wave *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__constraint_kinematic_wave, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_constraint_kinematic_wave" "', argument " "1"" of type '" "cmf::water::constraint_kinematic_wave *""'"); - } - arg1 = reinterpret_cast< cmf::water::constraint_kinematic_wave * >(argp1); - { - try { - - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *constraint_kinematic_wave_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__water__constraint_kinematic_wave, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *constraint_kinematic_wave_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_TechnicalFlux_MaxFlux_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::TechnicalFlux *arg1 = (cmf::water::TechnicalFlux *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"TechnicalFlux_MaxFlux_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__TechnicalFlux, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TechnicalFlux_MaxFlux_set" "', argument " "1"" of type '" "cmf::water::TechnicalFlux *""'"); - } - arg1 = reinterpret_cast< cmf::water::TechnicalFlux * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "TechnicalFlux_MaxFlux_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->MaxFlux = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_TechnicalFlux_MaxFlux_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::TechnicalFlux *arg1 = (cmf::water::TechnicalFlux *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__TechnicalFlux, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TechnicalFlux_MaxFlux_get" "', argument " "1"" of type '" "cmf::water::TechnicalFlux *""'"); - } - arg1 = reinterpret_cast< cmf::water::TechnicalFlux * >(argp1); - result = (real) ((arg1)->MaxFlux); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_TechnicalFlux_MinState_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::TechnicalFlux *arg1 = (cmf::water::TechnicalFlux *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"TechnicalFlux_MinState_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__TechnicalFlux, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TechnicalFlux_MinState_set" "', argument " "1"" of type '" "cmf::water::TechnicalFlux *""'"); - } - arg1 = reinterpret_cast< cmf::water::TechnicalFlux * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "TechnicalFlux_MinState_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->MinState = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_TechnicalFlux_MinState_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::TechnicalFlux *arg1 = (cmf::water::TechnicalFlux *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__TechnicalFlux, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TechnicalFlux_MinState_get" "', argument " "1"" of type '" "cmf::water::TechnicalFlux *""'"); - } - arg1 = reinterpret_cast< cmf::water::TechnicalFlux * >(argp1); - result = (real) ((arg1)->MinState); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_TechnicalFlux_FluxDecreaseTime_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::TechnicalFlux *arg1 = (cmf::water::TechnicalFlux *) 0 ; - cmf::math::Time *arg2 = (cmf::math::Time *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"TechnicalFlux_FluxDecreaseTime_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__TechnicalFlux, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TechnicalFlux_FluxDecreaseTime_set" "', argument " "1"" of type '" "cmf::water::TechnicalFlux *""'"); - } - arg1 = reinterpret_cast< cmf::water::TechnicalFlux * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_cmf__math__Time, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TechnicalFlux_FluxDecreaseTime_set" "', argument " "2"" of type '" "cmf::math::Time *""'"); - } - arg2 = reinterpret_cast< cmf::math::Time * >(argp2); - if (arg1) (arg1)->FluxDecreaseTime = *arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_TechnicalFlux_FluxDecreaseTime_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::TechnicalFlux *arg1 = (cmf::water::TechnicalFlux *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::math::Time *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__TechnicalFlux, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TechnicalFlux_FluxDecreaseTime_get" "', argument " "1"" of type '" "cmf::water::TechnicalFlux *""'"); - } - arg1 = reinterpret_cast< cmf::water::TechnicalFlux * >(argp1); - result = (cmf::math::Time *)& ((arg1)->FluxDecreaseTime); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__Time, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_TechnicalFlux(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::WaterStorage::ptr arg1 ; - cmf::water::flux_node::ptr arg2 ; - real arg3 ; - real arg4 = (real) 0 ; - cmf::math::Time arg5 = (cmf::math::Time) cmf::math::h ; - void *argp1 ; - int res1 = 0 ; - void *argp2 ; - int res2 = 0 ; - double val3 ; - int ecode3 = 0 ; - double val4 ; - int ecode4 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - char * kwnames[] = { - (char *) "source",(char *) "target",(char *) "maximum_flux",(char *) "minimal_state",(char *) "flux_decrease_time", NULL - }; - cmf::water::TechnicalFlux *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OO:new_TechnicalFlux",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_TechnicalFlux" "', argument " "1"" of type '" "cmf::water::WaterStorage::ptr""'"); - } - if (argp1) arg1 = *(reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp1)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp1); - } - { - int newmem = 0; - res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_TechnicalFlux" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); - } - if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); - } - ecode3 = SWIG_AsVal_double(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_TechnicalFlux" "', argument " "3"" of type '" "real""'"); - } - arg3 = static_cast< real >(val3); - if (obj3) { - ecode4 = SWIG_AsVal_double(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_TechnicalFlux" "', argument " "4"" of type '" "real""'"); - } - arg4 = static_cast< real >(val4); - } - if (obj4) { - { - arg5 = convert_datetime_to_cmftime(obj4); - if (arg5 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } - } - } - { - try { - result = (cmf::water::TechnicalFlux *)new cmf::water::TechnicalFlux(arg1,arg2,arg3,arg4,arg5); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__water__TechnicalFlux, SWIG_POINTER_NEW | 0 ); - - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_TechnicalFlux(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::TechnicalFlux *arg1 = (cmf::water::TechnicalFlux *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__TechnicalFlux, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_TechnicalFlux" "', argument " "1"" of type '" "cmf::water::TechnicalFlux *""'"); - } - arg1 = reinterpret_cast< cmf::water::TechnicalFlux * >(argp1); - { - try { - - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *TechnicalFlux_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__water__TechnicalFlux, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *TechnicalFlux_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_generic_gradient_connection_K_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::generic_gradient_connection *arg1 = (cmf::water::generic_gradient_connection *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"generic_gradient_connection_K_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__generic_gradient_connection, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "generic_gradient_connection_K_set" "', argument " "1"" of type '" "cmf::water::generic_gradient_connection *""'"); - } - arg1 = reinterpret_cast< cmf::water::generic_gradient_connection * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "generic_gradient_connection_K_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->K = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_generic_gradient_connection_K_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::generic_gradient_connection *arg1 = (cmf::water::generic_gradient_connection *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__generic_gradient_connection, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "generic_gradient_connection_K_get" "', argument " "1"" of type '" "cmf::water::generic_gradient_connection *""'"); - } - arg1 = reinterpret_cast< cmf::water::generic_gradient_connection * >(argp1); - result = (real) ((arg1)->K); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_generic_gradient_connection_A_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::generic_gradient_connection *arg1 = (cmf::water::generic_gradient_connection *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"generic_gradient_connection_A_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__generic_gradient_connection, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "generic_gradient_connection_A_set" "', argument " "1"" of type '" "cmf::water::generic_gradient_connection *""'"); - } - arg1 = reinterpret_cast< cmf::water::generic_gradient_connection * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "generic_gradient_connection_A_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->A = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_generic_gradient_connection_A_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::generic_gradient_connection *arg1 = (cmf::water::generic_gradient_connection *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__generic_gradient_connection, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "generic_gradient_connection_A_get" "', argument " "1"" of type '" "cmf::water::generic_gradient_connection *""'"); - } - arg1 = reinterpret_cast< cmf::water::generic_gradient_connection * >(argp1); - result = (real) ((arg1)->A); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_generic_gradient_connection_d_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::generic_gradient_connection *arg1 = (cmf::water::generic_gradient_connection *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"generic_gradient_connection_d_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__generic_gradient_connection, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "generic_gradient_connection_d_set" "', argument " "1"" of type '" "cmf::water::generic_gradient_connection *""'"); - } - arg1 = reinterpret_cast< cmf::water::generic_gradient_connection * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "generic_gradient_connection_d_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->d = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_generic_gradient_connection_d_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::generic_gradient_connection *arg1 = (cmf::water::generic_gradient_connection *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__generic_gradient_connection, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "generic_gradient_connection_d_get" "', argument " "1"" of type '" "cmf::water::generic_gradient_connection *""'"); - } - arg1 = reinterpret_cast< cmf::water::generic_gradient_connection * >(argp1); - result = (real) ((arg1)->d); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_generic_gradient_connection(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::WaterStorage::ptr arg1 ; - cmf::water::WaterStorage::ptr arg2 ; - real arg3 ; - real arg4 = (real) 1.0 ; - real arg5 = (real) 1.0 ; - void *argp1 ; - int res1 = 0 ; - void *argp2 ; - int res2 = 0 ; - double val3 ; - int ecode3 = 0 ; - double val4 ; - int ecode4 = 0 ; - double val5 ; - int ecode5 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - char * kwnames[] = { - (char *) "left",(char *) "right",(char *) "K",(char *) "d",(char *) "A", NULL - }; - cmf::water::generic_gradient_connection *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OO:new_generic_gradient_connection",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_generic_gradient_connection" "', argument " "1"" of type '" "cmf::water::WaterStorage::ptr""'"); - } - if (argp1) arg1 = *(reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp1)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp1); - } - { - int newmem = 0; - res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0 , &newmem); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_generic_gradient_connection" "', argument " "2"" of type '" "cmf::water::WaterStorage::ptr""'"); - } - if (argp2) arg2 = *(reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp2)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp2); - } - ecode3 = SWIG_AsVal_double(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_generic_gradient_connection" "', argument " "3"" of type '" "real""'"); - } - arg3 = static_cast< real >(val3); - if (obj3) { - ecode4 = SWIG_AsVal_double(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_generic_gradient_connection" "', argument " "4"" of type '" "real""'"); - } - arg4 = static_cast< real >(val4); - } - if (obj4) { - ecode5 = SWIG_AsVal_double(obj4, &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_generic_gradient_connection" "', argument " "5"" of type '" "real""'"); - } - arg5 = static_cast< real >(val5); - } - { - try { - result = (cmf::water::generic_gradient_connection *)new cmf::water::generic_gradient_connection(arg1,arg2,arg3,arg4,arg5); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__water__generic_gradient_connection, SWIG_POINTER_NEW | 0 ); - - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_generic_gradient_connection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::generic_gradient_connection *arg1 = (cmf::water::generic_gradient_connection *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__generic_gradient_connection, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_generic_gradient_connection" "', argument " "1"" of type '" "cmf::water::generic_gradient_connection *""'"); - } - arg1 = reinterpret_cast< cmf::water::generic_gradient_connection * >(argp1); - { - try { - - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *generic_gradient_connection_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__water__generic_gradient_connection, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *generic_gradient_connection_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_statecontrol_connection_reaction_time_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::statecontrol_connection *arg1 = (cmf::water::statecontrol_connection *) 0 ; - cmf::math::Time *arg2 = (cmf::math::Time *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"statecontrol_connection_reaction_time_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__statecontrol_connection, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "statecontrol_connection_reaction_time_set" "', argument " "1"" of type '" "cmf::water::statecontrol_connection *""'"); - } - arg1 = reinterpret_cast< cmf::water::statecontrol_connection * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_cmf__math__Time, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "statecontrol_connection_reaction_time_set" "', argument " "2"" of type '" "cmf::math::Time *""'"); - } - arg2 = reinterpret_cast< cmf::math::Time * >(argp2); - if (arg1) (arg1)->reaction_time = *arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_statecontrol_connection_reaction_time_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::statecontrol_connection *arg1 = (cmf::water::statecontrol_connection *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::math::Time *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__statecontrol_connection, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "statecontrol_connection_reaction_time_get" "', argument " "1"" of type '" "cmf::water::statecontrol_connection *""'"); - } - arg1 = reinterpret_cast< cmf::water::statecontrol_connection * >(argp1); - result = (cmf::math::Time *)& ((arg1)->reaction_time); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__Time, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_statecontrol_connection_target_state_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::statecontrol_connection *arg1 = (cmf::water::statecontrol_connection *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"statecontrol_connection_target_state_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__statecontrol_connection, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "statecontrol_connection_target_state_set" "', argument " "1"" of type '" "cmf::water::statecontrol_connection *""'"); - } - arg1 = reinterpret_cast< cmf::water::statecontrol_connection * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "statecontrol_connection_target_state_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->target_state = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_statecontrol_connection_target_state_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::statecontrol_connection *arg1 = (cmf::water::statecontrol_connection *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__statecontrol_connection, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "statecontrol_connection_target_state_get" "', argument " "1"" of type '" "cmf::water::statecontrol_connection *""'"); - } - arg1 = reinterpret_cast< cmf::water::statecontrol_connection * >(argp1); - result = (real) ((arg1)->target_state); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_statecontrol_connection(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::WaterStorage::ptr arg1 ; - cmf::water::flux_node::ptr arg2 ; - real arg3 ; - cmf::math::Time arg4 ; - void *argp1 ; - int res1 = 0 ; - void *argp2 ; - int res2 = 0 ; - double val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - char * kwnames[] = { - (char *) "controlled_storage",(char *) "other_end",(char *) "target_state",(char *) "reaction_time", NULL - }; - cmf::water::statecontrol_connection *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO:new_statecontrol_connection",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_statecontrol_connection" "', argument " "1"" of type '" "cmf::water::WaterStorage::ptr""'"); - } - if (argp1) arg1 = *(reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp1)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp1); - } - { - int newmem = 0; - res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_statecontrol_connection" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); - } - if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); - } - ecode3 = SWIG_AsVal_double(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_statecontrol_connection" "', argument " "3"" of type '" "real""'"); - } - arg3 = static_cast< real >(val3); - { - arg4 = convert_datetime_to_cmftime(obj3); - if (arg4 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } - } - { - try { - result = (cmf::water::statecontrol_connection *)new cmf::water::statecontrol_connection(arg1,arg2,arg3,arg4); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__water__statecontrol_connection, SWIG_POINTER_NEW | 0 ); - - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_statecontrol_connection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::statecontrol_connection *arg1 = (cmf::water::statecontrol_connection *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__statecontrol_connection, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_statecontrol_connection" "', argument " "1"" of type '" "cmf::water::statecontrol_connection *""'"); - } - arg1 = reinterpret_cast< cmf::water::statecontrol_connection * >(argp1); - { - try { - - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *statecontrol_connection_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__water__statecontrol_connection, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *statecontrol_connection_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_node_list_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::node_list *arg1 = (cmf::water::node_list *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - size_t result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__node_list, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "node_list_size" "', argument " "1"" of type '" "cmf::water::node_list const *""'"); - } - arg1 = reinterpret_cast< cmf::water::node_list * >(argp1); - { - try { - result = ((cmf::water::node_list const *)arg1)->size(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_node_list__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) { - PyObject *resultobj = 0; - cmf::water::node_list *result = 0 ; - - if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; - { - try { - result = (cmf::water::node_list *)new cmf::water::node_list(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__water__node_list, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_node_list__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::water::node_list *arg1 = 0 ; - cmf::water::node_list temp_list1 ; - cmf::water::node_list *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - { - if (SWIG_ConvertPtr(swig_obj[0], (void **) &arg1, SWIGTYPE_p_cmf__water__node_list, SWIG_POINTER_EXCEPTION) == -1) { - int res = iterable_to_list(swig_obj[0],SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, temp_list1); - if (SWIG_IsOK(res)) { - arg1 = &temp_list1; - } else { - SWIG_exception_fail(SWIG_TypeError,"Only iterables can be converted to cmf::water::node_list"); - } - } - } - { - try { - result = (cmf::water::node_list *)new cmf::water::node_list((cmf::water::node_list const &)*arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__water__node_list, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_node_list(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[2] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args,"new_node_list",0,1,argv))) SWIG_fail; - --argc; - { - unsigned long _index = 0; - SWIG_TypeRank _rank = 0; - if (argc == 0) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 1; - if (_rank == _rankm) goto dispatch; - } - } - if (argc == 1) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - { - _v = is_listtype_or_iterable(argv[0],SWIGTYPE_p_cmf__water__node_list); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 2; - if (_rank == _rankm) goto dispatch; - } - } - check_2: - - dispatch: - switch(_index) { - case 1: - return _wrap_new_node_list__SWIG_0(self, argc, argv); - case 2: - return _wrap_new_node_list__SWIG_1(self, argc, argv); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_node_list'.\n" - " Possible C/C++ prototypes are:\n" - " cmf::water::node_list::node_list()\n" - " cmf::water::node_list::node_list(cmf::water::node_list const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_node_list___iadd__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::node_list *arg1 = (cmf::water::node_list *) 0 ; - cmf::water::node_list *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - cmf::water::node_list temp_list2 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "right", NULL - }; - cmf::water::node_list *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:node_list___iadd__",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__node_list, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "node_list___iadd__" "', argument " "1"" of type '" "cmf::water::node_list *""'"); - } - arg1 = reinterpret_cast< cmf::water::node_list * >(argp1); - { - if (SWIG_ConvertPtr(obj1, (void **) &arg2, SWIGTYPE_p_cmf__water__node_list, SWIG_POINTER_EXCEPTION) == -1) { - int res = iterable_to_list(obj1,SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, temp_list2); - if (SWIG_IsOK(res)) { - arg2 = &temp_list2; - } else { - SWIG_exception_fail(SWIG_TypeError,"Only iterables can be converted to cmf::water::node_list"); - } - } - } - { - try { - result = (cmf::water::node_list *) &(arg1)->operator +=((cmf::water::node_list const &)*arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__water__node_list, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_node_list___add__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::node_list *arg1 = (cmf::water::node_list *) 0 ; - cmf::water::node_list *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - cmf::water::node_list temp_list2 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "right", NULL - }; - cmf::water::node_list result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:node_list___add__",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__node_list, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "node_list___add__" "', argument " "1"" of type '" "cmf::water::node_list const *""'"); - } - arg1 = reinterpret_cast< cmf::water::node_list * >(argp1); - { - if (SWIG_ConvertPtr(obj1, (void **) &arg2, SWIGTYPE_p_cmf__water__node_list, SWIG_POINTER_EXCEPTION) == -1) { - int res = iterable_to_list(obj1,SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, temp_list2); - if (SWIG_IsOK(res)) { - arg2 = &temp_list2; - } else { - SWIG_exception_fail(SWIG_TypeError,"Only iterables can be converted to cmf::water::node_list"); - } - } - } - { - try { - result = ((cmf::water::node_list const *)arg1)->operator +((cmf::water::node_list const &)*arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj((new cmf::water::node_list(static_cast< const cmf::water::node_list& >(result))), SWIGTYPE_p_cmf__water__node_list, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_node_list___get(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::node_list *arg1 = (cmf::water::node_list *) 0 ; - ptrdiff_t arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "index", NULL - }; - cmf::water::flux_node::ptr result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:node_list___get",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__node_list, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "node_list___get" "', argument " "1"" of type '" "cmf::water::node_list const *""'"); - } - arg1 = reinterpret_cast< cmf::water::node_list * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "node_list___get" "', argument " "2"" of type '" "ptrdiff_t""'"); - } - arg2 = static_cast< ptrdiff_t >(val2); - { - try { - result = ((cmf::water::node_list const *)arg1)->get(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - if (!(result)) resultobj = SWIG_NewPointerObj(0,SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, SWIG_POINTER_OWN); - int dcast = 0; - /*@SWIG:C:\Apps\swigwin-3.0.12\Lib\typemaps\swigmacros.swg,200,%formacro@*//*@SWIG:C:\Apps\swigwin-3.0.12\Lib\typemaps\swigmacros.swg,192,%_formacro_1@*//*@SWIG:cmf\cmf_core_src\cmf_swiglib.i,74,%_node_down_cast@*/ - if (dcast==0 && result) /*check for cmf::atmosphere::RainSource*/ { - std::shared_ptr output = std::dynamic_pointer_cast(result); - if (output) /*flux_node is cmf::atmosphere::RainSource */ { - dcast=1; - resultobj = SWIG_NewPointerObj(new std::shared_ptr(output),SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__RainSource_t, SWIG_POINTER_OWN); - } - } - /*@SWIG@*/ - - /*@SWIG:C:\Apps\swigwin-3.0.12\Lib\typemaps\swigmacros.swg,192,%_formacro_1@*//*@SWIG:cmf\cmf_core_src\cmf_swiglib.i,74,%_node_down_cast@*/ - if (dcast==0 && result) /*check for cmf::water::DirichletBoundary*/ { - std::shared_ptr output = std::dynamic_pointer_cast(result); - if (output) /*flux_node is cmf::water::DirichletBoundary */ { - dcast=1; - resultobj = SWIG_NewPointerObj(new std::shared_ptr(output),SWIGTYPE_p_std__shared_ptrT_cmf__water__DirichletBoundary_t, SWIG_POINTER_OWN); - } - } - /*@SWIG@*/ - - /*@SWIG:C:\Apps\swigwin-3.0.12\Lib\typemaps\swigmacros.swg,192,%_formacro_1@*//*@SWIG:cmf\cmf_core_src\cmf_swiglib.i,74,%_node_down_cast@*/ - if (dcast==0 && result) /*check for cmf::water::NeumannBoundary*/ { - std::shared_ptr output = std::dynamic_pointer_cast(result); - if (output) /*flux_node is cmf::water::NeumannBoundary */ { - dcast=1; - resultobj = SWIG_NewPointerObj(new std::shared_ptr(output),SWIGTYPE_p_std__shared_ptrT_cmf__water__NeumannBoundary_t, SWIG_POINTER_OWN); - } - } - /*@SWIG@*/ - - /*@SWIG:C:\Apps\swigwin-3.0.12\Lib\typemaps\swigmacros.swg,192,%_formacro_1@*//*@SWIG:cmf\cmf_core_src\cmf_swiglib.i,74,%_node_down_cast@*/ - if (dcast==0 && result) /*check for cmf::upslope::SoilLayer*/ { - std::shared_ptr output = std::dynamic_pointer_cast(result); - if (output) /*flux_node is cmf::upslope::SoilLayer */ { - dcast=1; - resultobj = SWIG_NewPointerObj(new std::shared_ptr(output),SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, SWIG_POINTER_OWN); - } - } - /*@SWIG@*/ - - /*@SWIG:C:\Apps\swigwin-3.0.12\Lib\typemaps\swigmacros.swg,192,%_formacro_1@*//*@SWIG:cmf\cmf_core_src\cmf_swiglib.i,74,%_node_down_cast@*/ - if (dcast==0 && result) /*check for cmf::upslope::aquifer*/ { - std::shared_ptr output = std::dynamic_pointer_cast(result); - if (output) /*flux_node is cmf::upslope::aquifer */ { - dcast=1; - resultobj = SWIG_NewPointerObj(new std::shared_ptr(output),SWIGTYPE_p_std__shared_ptrT_cmf__upslope__aquifer_t, SWIG_POINTER_OWN); - } - } - /*@SWIG@*/ - - /*@SWIG:C:\Apps\swigwin-3.0.12\Lib\typemaps\swigmacros.swg,192,%_formacro_1@*//*@SWIG:cmf\cmf_core_src\cmf_swiglib.i,74,%_node_down_cast@*/ - if (dcast==0 && result) /*check for cmf::river::Reach*/ { - std::shared_ptr output = std::dynamic_pointer_cast(result); - if (output) /*flux_node is cmf::river::Reach */ { - dcast=1; - resultobj = SWIG_NewPointerObj(new std::shared_ptr(output),SWIGTYPE_p_std__shared_ptrT_cmf__river__Reach_t, SWIG_POINTER_OWN); - } - } - /*@SWIG@*/ - - /*@SWIG:C:\Apps\swigwin-3.0.12\Lib\typemaps\swigmacros.swg,192,%_formacro_1@*//*@SWIG:cmf\cmf_core_src\cmf_swiglib.i,74,%_node_down_cast@*/ - if (dcast==0 && result) /*check for cmf::river::OpenWaterStorage*/ { - std::shared_ptr output = std::dynamic_pointer_cast(result); - if (output) /*flux_node is cmf::river::OpenWaterStorage */ { - dcast=1; - resultobj = SWIG_NewPointerObj(new std::shared_ptr(output),SWIGTYPE_p_std__shared_ptrT_cmf__river__OpenWaterStorage_t, SWIG_POINTER_OWN); - } - } - /*@SWIG@*/ - - /*@SWIG:C:\Apps\swigwin-3.0.12\Lib\typemaps\swigmacros.swg,192,%_formacro_1@*//*@SWIG:cmf\cmf_core_src\cmf_swiglib.i,74,%_node_down_cast@*/ - if (dcast==0 && result) /*check for cmf::water::WaterStorage*/ { - std::shared_ptr output = std::dynamic_pointer_cast(result); - if (output) /*flux_node is cmf::water::WaterStorage */ { - dcast=1; - resultobj = SWIG_NewPointerObj(new std::shared_ptr(output),SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, SWIG_POINTER_OWN); - } - } - /*@SWIG@*/ - - /*@SWIG:C:\Apps\swigwin-3.0.12\Lib\typemaps\swigmacros.swg,192,%_formacro_1@*//*@SWIG:cmf\cmf_core_src\cmf_swiglib.i,74,%_node_down_cast@*/ - if (dcast==0 && result) /*check for cmf::upslope::MacroPore*/ { - std::shared_ptr output = std::dynamic_pointer_cast(result); - if (output) /*flux_node is cmf::upslope::MacroPore */ { - dcast=1; - resultobj = SWIG_NewPointerObj(new std::shared_ptr(output),SWIGTYPE_p_std__shared_ptrT_cmf__upslope__MacroPore_t, SWIG_POINTER_OWN); - } - } - /*@SWIG@*/ - - /*@SWIG:C:\Apps\swigwin-3.0.12\Lib\typemaps\swigmacros.swg,192,%_formacro_1@*//*@SWIG:cmf\cmf_core_src\cmf_swiglib.i,74,%_node_down_cast@*/ - if (dcast==0 && result) /*check for cmf::upslope::SurfaceWater*/ { - std::shared_ptr output = std::dynamic_pointer_cast(result); - if (output) /*flux_node is cmf::upslope::SurfaceWater */ { - dcast=1; - resultobj = SWIG_NewPointerObj(new std::shared_ptr(output),SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SurfaceWater_t, SWIG_POINTER_OWN); - } - } - /*@SWIG@*/ - - - - /*@SWIG@*/ - - /*@SWIG@*/ - - /*@SWIG@*/ - - /*@SWIG@*/ - - /*@SWIG@*/ - - /*@SWIG@*/ - - /*@SWIG@*/ - - /*@SWIG@*/ - - /*@SWIG@*/ - - /*@SWIG@*//*@SWIG@*/ - if (!dcast) resultobj = SWIG_NewPointerObj(new std::shared_ptr(result),SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, SWIG_POINTER_OWN); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_node_list___getslice(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::node_list *arg1 = (cmf::water::node_list *) 0 ; - ptrdiff_t arg2 ; - ptrdiff_t arg3 ; - ptrdiff_t arg4 = (ptrdiff_t) 1 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - ptrdiff_t val3 ; - int ecode3 = 0 ; - ptrdiff_t val4 ; - int ecode4 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "begin",(char *) "end",(char *) "step", NULL - }; - cmf::water::node_list result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|O:node_list___getslice",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__node_list, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "node_list___getslice" "', argument " "1"" of type '" "cmf::water::node_list const *""'"); - } - arg1 = reinterpret_cast< cmf::water::node_list * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "node_list___getslice" "', argument " "2"" of type '" "ptrdiff_t""'"); - } - arg2 = static_cast< ptrdiff_t >(val2); - ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "node_list___getslice" "', argument " "3"" of type '" "ptrdiff_t""'"); - } - arg3 = static_cast< ptrdiff_t >(val3); - if (obj3) { - ecode4 = SWIG_AsVal_ptrdiff_t(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "node_list___getslice" "', argument " "4"" of type '" "ptrdiff_t""'"); - } - arg4 = static_cast< ptrdiff_t >(val4); - } - { - try { - result = ((cmf::water::node_list const *)arg1)->getslice(arg2,arg3,arg4); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj((new cmf::water::node_list(static_cast< const cmf::water::node_list& >(result))), SWIGTYPE_p_cmf__water__node_list, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_node_list_append(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::node_list *arg1 = (cmf::water::node_list *) 0 ; - cmf::water::flux_node::ptr arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "node", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:node_list_append",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__node_list, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "node_list_append" "', argument " "1"" of type '" "cmf::water::node_list *""'"); - } - arg1 = reinterpret_cast< cmf::water::node_list * >(argp1); - { - int newmem = 0; - res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "node_list_append" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); - } - if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); - } - { - try { - (arg1)->append(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_node_list_remove(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::node_list *arg1 = (cmf::water::node_list *) 0 ; - cmf::water::flux_node::ptr arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "node", NULL - }; - bool result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:node_list_remove",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__node_list, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "node_list_remove" "', argument " "1"" of type '" "cmf::water::node_list *""'"); - } - arg1 = reinterpret_cast< cmf::water::node_list * >(argp1); - { - int newmem = 0; - res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "node_list_remove" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); - } - if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); - } - { - try { - result = (bool)(arg1)->remove(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_node_list_global_water_balance(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::node_list *arg1 = (cmf::water::node_list *) 0 ; - cmf::math::Time arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "t", NULL - }; - real result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:node_list_global_water_balance",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__node_list, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "node_list_global_water_balance" "', argument " "1"" of type '" "cmf::water::node_list const *""'"); - } - arg1 = reinterpret_cast< cmf::water::node_list * >(argp1); - { - arg2 = convert_datetime_to_cmftime(obj1); - if (arg2 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } - } - { - try { - result = (real)((cmf::water::node_list const *)arg1)->global_water_balance(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_node_list_water_balance(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::node_list *arg1 = (cmf::water::node_list *) 0 ; - cmf::math::Time arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "t", NULL - }; - cmf::math::num_array result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:node_list_water_balance",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__node_list, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "node_list_water_balance" "', argument " "1"" of type '" "cmf::water::node_list const *""'"); - } - arg1 = reinterpret_cast< cmf::water::node_list * >(argp1); - { - arg2 = convert_datetime_to_cmftime(obj1); - if (arg2 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } - } - { - try { - result = ((cmf::water::node_list const *)arg1)->water_balance(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - resultobj = as_npy_array(result); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_node_list_conc(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::node_list *arg1 = (cmf::water::node_list *) 0 ; - cmf::math::Time arg2 ; - cmf::water::solute *arg3 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "t",(char *) "_Solute", NULL - }; - cmf::math::num_array result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:node_list_conc",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__node_list, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "node_list_conc" "', argument " "1"" of type '" "cmf::water::node_list const *""'"); - } - arg1 = reinterpret_cast< cmf::water::node_list * >(argp1); - { - arg2 = convert_datetime_to_cmftime(obj1); - if (arg2 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } - } - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_cmf__water__solute, 0 | 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "node_list_conc" "', argument " "3"" of type '" "cmf::water::solute const &""'"); - } - if (!argp3) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "node_list_conc" "', argument " "3"" of type '" "cmf::water::solute const &""'"); - } - arg3 = reinterpret_cast< cmf::water::solute * >(argp3); - { - try { - result = ((cmf::water::node_list const *)arg1)->conc(arg2,(cmf::water::solute const &)*arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - resultobj = as_npy_array(result); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_node_list_set_solute_source(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::node_list *arg1 = (cmf::water::node_list *) 0 ; - cmf::water::solute *arg2 = 0 ; - cmf::math::num_array arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "_Solute",(char *) "source_fluxes", NULL - }; - ptrdiff_t result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:node_list_set_solute_source",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__node_list, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "node_list_set_solute_source" "', argument " "1"" of type '" "cmf::water::node_list *""'"); - } - arg1 = reinterpret_cast< cmf::water::node_list * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_cmf__water__solute, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "node_list_set_solute_source" "', argument " "2"" of type '" "cmf::water::solute const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "node_list_set_solute_source" "', argument " "2"" of type '" "cmf::water::solute const &""'"); - } - arg2 = reinterpret_cast< cmf::water::solute * >(argp2); - { - // Convert a array_wrapper from numpy array - double * data=0; - ptrdiff_t size = from_npy_array(obj2,&data); - if (!data) { - SWIG_exception_fail(SWIG_TypeError,"Input data is not 'array-like' (in the sense of numpy arrays)"); - return NULL; - } - arg3 = cmf::math::num_array(size,data); - } - { - try { - result = (arg1)->set_solute_source((cmf::water::solute const &)*arg2,arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_ptrdiff_t(static_cast< ptrdiff_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_node_list_get_fluxes_to(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::node_list *arg1 = (cmf::water::node_list *) 0 ; - cmf::water::node_list *arg2 = 0 ; - cmf::math::Time arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - cmf::water::node_list temp_list2 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "targets",(char *) "t", NULL - }; - cmf::math::num_array result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:node_list_get_fluxes_to",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__node_list, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "node_list_get_fluxes_to" "', argument " "1"" of type '" "cmf::water::node_list const *""'"); - } - arg1 = reinterpret_cast< cmf::water::node_list * >(argp1); - { - if (SWIG_ConvertPtr(obj1, (void **) &arg2, SWIGTYPE_p_cmf__water__node_list, SWIG_POINTER_EXCEPTION) == -1) { - int res = iterable_to_list(obj1,SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, temp_list2); - if (SWIG_IsOK(res)) { - arg2 = &temp_list2; - } else { - SWIG_exception_fail(SWIG_TypeError,"Only iterables can be converted to cmf::water::node_list"); - } - } - } - { - arg3 = convert_datetime_to_cmftime(obj2); - if (arg3 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } - } - { - try { - result = ((cmf::water::node_list const *)arg1)->get_fluxes_to((cmf::water::node_list const &)*arg2,arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - resultobj = as_npy_array(result); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_node_list_get_fluxes3d_to(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::node_list *arg1 = (cmf::water::node_list *) 0 ; - cmf::water::node_list *arg2 = 0 ; - cmf::math::Time arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - cmf::water::node_list temp_list2 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "targets",(char *) "t", NULL - }; - SwigValueWrapper< cmf::geometry::point_vector > result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:node_list_get_fluxes3d_to",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__node_list, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "node_list_get_fluxes3d_to" "', argument " "1"" of type '" "cmf::water::node_list const *""'"); - } - arg1 = reinterpret_cast< cmf::water::node_list * >(argp1); - { - if (SWIG_ConvertPtr(obj1, (void **) &arg2, SWIGTYPE_p_cmf__water__node_list, SWIG_POINTER_EXCEPTION) == -1) { - int res = iterable_to_list(obj1,SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, temp_list2); - if (SWIG_IsOK(res)) { - arg2 = &temp_list2; - } else { - SWIG_exception_fail(SWIG_TypeError,"Only iterables can be converted to cmf::water::node_list"); - } - } - } - { - arg3 = convert_datetime_to_cmftime(obj2); - if (arg3 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } - } - { - try { - result = ((cmf::water::node_list const *)arg1)->get_fluxes3d_to((cmf::water::node_list const &)*arg2,arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj((new cmf::geometry::point_vector(static_cast< const cmf::geometry::point_vector& >(result))), SWIGTYPE_p_cmf__geometry__point_vector, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_node_list_get_fluxes3d(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::node_list *arg1 = (cmf::water::node_list *) 0 ; - cmf::math::Time arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "t", NULL - }; - SwigValueWrapper< cmf::geometry::point_vector > result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:node_list_get_fluxes3d",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__node_list, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "node_list_get_fluxes3d" "', argument " "1"" of type '" "cmf::water::node_list const *""'"); - } - arg1 = reinterpret_cast< cmf::water::node_list * >(argp1); - { - arg2 = convert_datetime_to_cmftime(obj1); - if (arg2 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } - } - { - try { - result = ((cmf::water::node_list const *)arg1)->get_fluxes3d(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj((new cmf::geometry::point_vector(static_cast< const cmf::geometry::point_vector& >(result))), SWIGTYPE_p_cmf__geometry__point_vector, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_node_list_get_positions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::node_list *arg1 = (cmf::water::node_list *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - SwigValueWrapper< cmf::geometry::point_vector > result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__node_list, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "node_list_get_positions" "', argument " "1"" of type '" "cmf::water::node_list const *""'"); - } - arg1 = reinterpret_cast< cmf::water::node_list * >(argp1); - { - try { - result = ((cmf::water::node_list const *)arg1)->get_positions(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj((new cmf::geometry::point_vector(static_cast< const cmf::geometry::point_vector& >(result))), SWIGTYPE_p_cmf__geometry__point_vector, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_node_list(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::node_list *arg1 = (cmf::water::node_list *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__node_list, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_node_list" "', argument " "1"" of type '" "cmf::water::node_list *""'"); - } - arg1 = reinterpret_cast< cmf::water::node_list * >(argp1); - { - try { - delete arg1; - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_node_list_potentials_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::node_list *arg1 = (cmf::water::node_list *) 0 ; - cmf::math::num_array arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"node_list_potentials_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__node_list, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "node_list_potentials_set" "', argument " "1"" of type '" "cmf::water::node_list *""'"); - } - arg1 = reinterpret_cast< cmf::water::node_list * >(argp1); - { - // Convert a array_wrapper from numpy array - double * data=0; - ptrdiff_t size = from_npy_array(swig_obj[1],&data); - if (!data) { - SWIG_exception_fail(SWIG_TypeError,"Input data is not 'array-like' (in the sense of numpy arrays)"); - return NULL; - } - arg2 = cmf::math::num_array(size,data); - } - { - try { - cmf_water_node_list_potentials_set(arg1,arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_node_list_potentials_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::node_list *arg1 = (cmf::water::node_list *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::math::num_array result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__node_list, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "node_list_potentials_get" "', argument " "1"" of type '" "cmf::water::node_list *""'"); - } - arg1 = reinterpret_cast< cmf::water::node_list * >(argp1); - { - try { - result = cmf_water_node_list_potentials_get(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - resultobj = as_npy_array(result); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *node_list_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__water__node_list, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *node_list_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_NeumannBoundary_list_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::NeumannBoundary_list *arg1 = (cmf::water::NeumannBoundary_list *) 0 ; - ptrdiff_t arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "index", NULL - }; - cmf::water::NeumannBoundary::ptr result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:NeumannBoundary_list_get",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__NeumannBoundary_list, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NeumannBoundary_list_get" "', argument " "1"" of type '" "cmf::water::NeumannBoundary_list const *""'"); - } - arg1 = reinterpret_cast< cmf::water::NeumannBoundary_list * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "NeumannBoundary_list_get" "', argument " "2"" of type '" "ptrdiff_t""'"); - } - arg2 = static_cast< ptrdiff_t >(val2); - { - try { - result = ((cmf::water::NeumannBoundary_list const *)arg1)->get(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - std::shared_ptr< cmf::water::NeumannBoundary > *smartresult = result ? new std::shared_ptr< cmf::water::NeumannBoundary >(result) : 0; - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__water__NeumannBoundary_t, SWIG_POINTER_OWN); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_NeumannBoundary_list_get_fluxes(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::NeumannBoundary_list *arg1 = (cmf::water::NeumannBoundary_list *) 0 ; - cmf::math::Time arg2 = (cmf::math::Time) cmf::math::Time() ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "t", NULL - }; - cmf::math::num_array result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:NeumannBoundary_list_get_fluxes",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__NeumannBoundary_list, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NeumannBoundary_list_get_fluxes" "', argument " "1"" of type '" "cmf::water::NeumannBoundary_list const *""'"); - } - arg1 = reinterpret_cast< cmf::water::NeumannBoundary_list * >(argp1); - if (obj1) { - { - arg2 = convert_datetime_to_cmftime(obj1); - if (arg2 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } - } - } - { - try { - result = ((cmf::water::NeumannBoundary_list const *)arg1)->get_fluxes(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - resultobj = as_npy_array(result); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_NeumannBoundary_list_append(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::NeumannBoundary_list *arg1 = (cmf::water::NeumannBoundary_list *) 0 ; - cmf::water::NeumannBoundary::ptr arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "nbc", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:NeumannBoundary_list_append",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__NeumannBoundary_list, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NeumannBoundary_list_append" "', argument " "1"" of type '" "cmf::water::NeumannBoundary_list *""'"); - } - arg1 = reinterpret_cast< cmf::water::NeumannBoundary_list * >(argp1); - { - int newmem = 0; - res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__NeumannBoundary_t, 0 , &newmem); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "NeumannBoundary_list_append" "', argument " "2"" of type '" "cmf::water::NeumannBoundary::ptr""'"); - } - if (argp2) arg2 = *(reinterpret_cast< cmf::water::NeumannBoundary::ptr * >(argp2)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::NeumannBoundary::ptr * >(argp2); - } - { - try { - (arg1)->append(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_NeumannBoundary_list_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::NeumannBoundary_list *arg1 = (cmf::water::NeumannBoundary_list *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - size_t result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__NeumannBoundary_list, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NeumannBoundary_list_size" "', argument " "1"" of type '" "cmf::water::NeumannBoundary_list const *""'"); - } - arg1 = reinterpret_cast< cmf::water::NeumannBoundary_list * >(argp1); - { - try { - result = ((cmf::water::NeumannBoundary_list const *)arg1)->size(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_NeumannBoundary_list__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) { - PyObject *resultobj = 0; - cmf::water::NeumannBoundary_list *result = 0 ; - - if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; - { - try { - result = (cmf::water::NeumannBoundary_list *)new cmf::water::NeumannBoundary_list(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__water__NeumannBoundary_list, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_NeumannBoundary_list__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::water::node_list *arg1 = 0 ; - cmf::water::node_list temp_list1 ; - cmf::water::NeumannBoundary_list *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - { - if (SWIG_ConvertPtr(swig_obj[0], (void **) &arg1, SWIGTYPE_p_cmf__water__node_list, SWIG_POINTER_EXCEPTION) == -1) { - int res = iterable_to_list(swig_obj[0],SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, temp_list1); - if (SWIG_IsOK(res)) { - arg1 = &temp_list1; - } else { - SWIG_exception_fail(SWIG_TypeError,"Only iterables can be converted to cmf::water::node_list"); - } - } - } - { - try { - result = (cmf::water::NeumannBoundary_list *)new cmf::water::NeumannBoundary_list((cmf::water::node_list const &)*arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__water__NeumannBoundary_list, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_NeumannBoundary_list__SWIG_2(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::water::NeumannBoundary_list *arg1 = 0 ; - cmf::water::NeumannBoundary_list temp_list1 ; - cmf::water::NeumannBoundary_list *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - { - if (SWIG_ConvertPtr(swig_obj[0], (void **) &arg1, SWIGTYPE_p_cmf__water__NeumannBoundary_list, SWIG_POINTER_EXCEPTION) == -1) { - int res = iterable_to_list(swig_obj[0],SWIGTYPE_p_std__shared_ptrT_cmf__water__NeumannBoundary_t, temp_list1); - if (SWIG_IsOK(res)) { - arg1 = &temp_list1; - } else { - SWIG_exception_fail(SWIG_TypeError,"Only iterables can be converted to cmf::water::NeumannBoundary_list"); - } - } - } - { - try { - result = (cmf::water::NeumannBoundary_list *)new cmf::water::NeumannBoundary_list((cmf::water::NeumannBoundary_list const &)*arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__water__NeumannBoundary_list, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_NeumannBoundary_list(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[2] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args,"new_NeumannBoundary_list",0,1,argv))) SWIG_fail; - --argc; - { - unsigned long _index = 0; - SWIG_TypeRank _rank = 0; - if (argc == 0) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 1; - if (_rank == _rankm) goto dispatch; - } - } - if (argc == 1) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - { - _v = is_listtype_or_iterable(argv[0],SWIGTYPE_p_cmf__water__node_list); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 2; - if (_rank == _rankm) goto dispatch; - } - } - check_2: - - if (argc == 1) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - { - _v = is_listtype_or_iterable(argv[0],SWIGTYPE_p_cmf__water__NeumannBoundary_list); - } - } - if (!_v) goto check_3; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 3; - if (_rank == _rankm) goto dispatch; - } - } - check_3: - - dispatch: - switch(_index) { - case 1: - return _wrap_new_NeumannBoundary_list__SWIG_0(self, argc, argv); - case 2: - return _wrap_new_NeumannBoundary_list__SWIG_1(self, argc, argv); - case 3: - return _wrap_new_NeumannBoundary_list__SWIG_2(self, argc, argv); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_NeumannBoundary_list'.\n" - " Possible C/C++ prototypes are:\n" - " cmf::water::NeumannBoundary_list::NeumannBoundary_list()\n" - " cmf::water::NeumannBoundary_list::NeumannBoundary_list(cmf::water::node_list const &)\n" - " cmf::water::NeumannBoundary_list::NeumannBoundary_list(cmf::water::NeumannBoundary_list const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_NeumannBoundary_list_to_node_list(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::NeumannBoundary_list *arg1 = (cmf::water::NeumannBoundary_list *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::water::node_list result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__NeumannBoundary_list, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NeumannBoundary_list_to_node_list" "', argument " "1"" of type '" "cmf::water::NeumannBoundary_list const *""'"); - } - arg1 = reinterpret_cast< cmf::water::NeumannBoundary_list * >(argp1); - { - try { - result = ((cmf::water::NeumannBoundary_list const *)arg1)->to_node_list(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj((new cmf::water::node_list(static_cast< const cmf::water::node_list& >(result))), SWIGTYPE_p_cmf__water__node_list, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_NeumannBoundary_list_global_water_balance(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::NeumannBoundary_list *arg1 = (cmf::water::NeumannBoundary_list *) 0 ; - cmf::math::Time arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "t", NULL - }; - real result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:NeumannBoundary_list_global_water_balance",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__NeumannBoundary_list, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NeumannBoundary_list_global_water_balance" "', argument " "1"" of type '" "cmf::water::NeumannBoundary_list const *""'"); - } - arg1 = reinterpret_cast< cmf::water::NeumannBoundary_list * >(argp1); - { - arg2 = convert_datetime_to_cmftime(obj1); - if (arg2 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } - } - { - try { - result = (real)((cmf::water::NeumannBoundary_list const *)arg1)->global_water_balance(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_NeumannBoundary_list_water_balance(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::NeumannBoundary_list *arg1 = (cmf::water::NeumannBoundary_list *) 0 ; - cmf::math::Time arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "t", NULL - }; - cmf::math::num_array result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:NeumannBoundary_list_water_balance",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__NeumannBoundary_list, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NeumannBoundary_list_water_balance" "', argument " "1"" of type '" "cmf::water::NeumannBoundary_list const *""'"); - } - arg1 = reinterpret_cast< cmf::water::NeumannBoundary_list * >(argp1); - { - arg2 = convert_datetime_to_cmftime(obj1); - if (arg2 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } - } - { - try { - result = ((cmf::water::NeumannBoundary_list const *)arg1)->water_balance(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - resultobj = as_npy_array(result); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_NeumannBoundary_list_fluxes_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::NeumannBoundary_list *arg1 = (cmf::water::NeumannBoundary_list *) 0 ; - cmf::math::num_array arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"NeumannBoundary_list_fluxes_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__NeumannBoundary_list, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NeumannBoundary_list_fluxes_set" "', argument " "1"" of type '" "cmf::water::NeumannBoundary_list *""'"); - } - arg1 = reinterpret_cast< cmf::water::NeumannBoundary_list * >(argp1); - { - // Convert a array_wrapper from numpy array - double * data=0; - ptrdiff_t size = from_npy_array(swig_obj[1],&data); - if (!data) { - SWIG_exception_fail(SWIG_TypeError,"Input data is not 'array-like' (in the sense of numpy arrays)"); - return NULL; - } - arg2 = cmf::math::num_array(size,data); - } - { - try { - cmf_water_NeumannBoundary_list_fluxes_set(arg1,arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_NeumannBoundary_list_fluxes_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::NeumannBoundary_list *arg1 = (cmf::water::NeumannBoundary_list *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::math::num_array result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__NeumannBoundary_list, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NeumannBoundary_list_fluxes_get" "', argument " "1"" of type '" "cmf::water::NeumannBoundary_list *""'"); - } - arg1 = reinterpret_cast< cmf::water::NeumannBoundary_list * >(argp1); - { - try { - result = cmf_water_NeumannBoundary_list_fluxes_get(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - resultobj = as_npy_array(result); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_NeumannBoundary_list(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::NeumannBoundary_list *arg1 = (cmf::water::NeumannBoundary_list *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__NeumannBoundary_list, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_NeumannBoundary_list" "', argument " "1"" of type '" "cmf::water::NeumannBoundary_list *""'"); - } - arg1 = reinterpret_cast< cmf::water::NeumannBoundary_list * >(argp1); - { - try { - delete arg1; - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *NeumannBoundary_list_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__water__NeumannBoundary_list, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *NeumannBoundary_list_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_SystemBridge_get_upper_node(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::SystemBridge *arg1 = (cmf::water::SystemBridge *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::water::SystemBridge const > tempshared1 ; - std::shared_ptr< cmf::water::SystemBridge const > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - cmf::water::flux_node::ptr result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__SystemBridge_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SystemBridge_get_upper_node" "', argument " "1"" of type '" "cmf::water::SystemBridge const *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::water::SystemBridge > * >(argp1); - delete reinterpret_cast< std::shared_ptr< const cmf::water::SystemBridge > * >(argp1); - arg1 = const_cast< cmf::water::SystemBridge * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::water::SystemBridge > * >(argp1); - arg1 = const_cast< cmf::water::SystemBridge * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - try { - result = ((cmf::water::SystemBridge const *)arg1)->get_upper_node(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - std::shared_ptr< cmf::water::flux_node > *smartresult = result ? new std::shared_ptr< cmf::water::flux_node >(result) : 0; - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, SWIG_POINTER_OWN); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SystemBridge_get_lower_node(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::SystemBridge *arg1 = (cmf::water::SystemBridge *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::water::SystemBridge const > tempshared1 ; - std::shared_ptr< cmf::water::SystemBridge const > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - cmf::water::flux_node::ptr result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__SystemBridge_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SystemBridge_get_lower_node" "', argument " "1"" of type '" "cmf::water::SystemBridge const *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::water::SystemBridge > * >(argp1); - delete reinterpret_cast< std::shared_ptr< const cmf::water::SystemBridge > * >(argp1); - arg1 = const_cast< cmf::water::SystemBridge * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::water::SystemBridge > * >(argp1); - arg1 = const_cast< cmf::water::SystemBridge * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - try { - result = ((cmf::water::SystemBridge const *)arg1)->get_lower_node(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - std::shared_ptr< cmf::water::flux_node > *smartresult = result ? new std::shared_ptr< cmf::water::flux_node >(result) : 0; - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, SWIG_POINTER_OWN); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SystemBridge_get_down_flux(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::SystemBridge *arg1 = (cmf::water::SystemBridge *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::water::SystemBridge const > tempshared1 ; - std::shared_ptr< cmf::water::SystemBridge const > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - double result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__SystemBridge_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SystemBridge_get_down_flux" "', argument " "1"" of type '" "cmf::water::SystemBridge const *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::water::SystemBridge > * >(argp1); - delete reinterpret_cast< std::shared_ptr< const cmf::water::SystemBridge > * >(argp1); - arg1 = const_cast< cmf::water::SystemBridge * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::water::SystemBridge > * >(argp1); - arg1 = const_cast< cmf::water::SystemBridge * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - try { - result = (double)((cmf::water::SystemBridge const *)arg1)->get_down_flux(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SystemBridge_down_flux_integrator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::SystemBridge *arg1 = (cmf::water::SystemBridge *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::water::SystemBridge const > tempshared1 ; - std::shared_ptr< cmf::water::SystemBridge const > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - cmf::water::flux_integrator::ptr result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__SystemBridge_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SystemBridge_down_flux_integrator" "', argument " "1"" of type '" "cmf::water::SystemBridge const *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::water::SystemBridge > * >(argp1); - delete reinterpret_cast< std::shared_ptr< const cmf::water::SystemBridge > * >(argp1); - arg1 = const_cast< cmf::water::SystemBridge * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::water::SystemBridge > * >(argp1); - arg1 = const_cast< cmf::water::SystemBridge * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - try { - result = ((cmf::water::SystemBridge const *)arg1)->down_flux_integrator(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - std::shared_ptr< cmf::math::integratable > *smartresult = result ? new std::shared_ptr< cmf::math::integratable >(result) : 0; - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__math__integratable_t, SWIG_POINTER_OWN); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_SystemBridge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::SystemBridge *arg1 = (cmf::water::SystemBridge *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::water::SystemBridge > tempshared1 ; - std::shared_ptr< cmf::water::SystemBridge > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__SystemBridge_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SystemBridge" "', argument " "1"" of type '" "cmf::water::SystemBridge *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::SystemBridge > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::water::SystemBridge > * >(argp1); - arg1 = const_cast< cmf::water::SystemBridge * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::SystemBridge > * >(argp1); - arg1 = const_cast< cmf::water::SystemBridge * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - try { - (void)arg1; delete smartarg1; - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *SystemBridge_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_cmf__water__SystemBridge_t, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *_wrap_delete_SystemBridgeConnection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::water::SystemBridgeConnection *arg1 = (cmf::water::SystemBridgeConnection *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__SystemBridgeConnection, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SystemBridgeConnection" "', argument " "1"" of type '" "cmf::water::SystemBridgeConnection *""'"); - } - arg1 = reinterpret_cast< cmf::water::SystemBridgeConnection * >(argp1); - { - try { - - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *SystemBridgeConnection_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__water__SystemBridgeConnection, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *_wrap_system_bridge(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::project *arg1 = 0 ; - cmf::water::flux_node::ptr arg2 ; - cmf::water::flux_node::ptr arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 ; - int res2 = 0 ; - void *argp3 ; - int res3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char * kwnames[] = { - (char *) "p",(char *) "upper",(char *) "lower", NULL - }; - cmf::water::SystemBridge::ptr result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:system_bridge",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_cmf__project, 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "system_bridge" "', argument " "1"" of type '" "cmf::project &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "system_bridge" "', argument " "1"" of type '" "cmf::project &""'"); - } - arg1 = reinterpret_cast< cmf::project * >(argp1); - { - int newmem = 0; - res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "system_bridge" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); - } - if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); - } - { - int newmem = 0; - res3 = SWIG_ConvertPtrAndOwn(obj2, &argp3, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "system_bridge" "', argument " "3"" of type '" "cmf::water::flux_node::ptr""'"); - } - if (argp3) arg3 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp3)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp3); - } - { - try { - result = cmf::water::system_bridge(*arg1,arg2,arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - std::shared_ptr< cmf::water::SystemBridge > *smartresult = result ? new std::shared_ptr< cmf::water::SystemBridge >(result) : 0; - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__water__SystemBridge_t, SWIG_POINTER_OWN); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_vapour_pressure(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - double arg1 ; - double val1 ; - int ecode1 = 0 ; - PyObject * obj0 = 0 ; - char * kwnames[] = { - (char *) "T", NULL - }; - double result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:vapour_pressure",kwnames,&obj0)) SWIG_fail; - ecode1 = SWIG_AsVal_double(obj0, &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "vapour_pressure" "', argument " "1"" of type '" "double""'"); - } - arg1 = static_cast< double >(val1); - { - try { - result = (double)cmf::atmosphere::vapour_pressure(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_vpd_from_rH(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - double arg1 ; - double arg2 ; - double val1 ; - int ecode1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "T",(char *) "rH", NULL - }; - double result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:vpd_from_rH",kwnames,&obj0,&obj1)) SWIG_fail; - ecode1 = SWIG_AsVal_double(obj0, &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "vpd_from_rH" "', argument " "1"" of type '" "double""'"); - } - arg1 = static_cast< double >(val1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vpd_from_rH" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - { - try { - result = (double)cmf::atmosphere::vpd_from_rH(arg1,arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_rH_from_vpd(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - double arg1 ; - double arg2 ; - double val1 ; - int ecode1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "T",(char *) "vpd", NULL - }; - double result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:rH_from_vpd",kwnames,&obj0,&obj1)) SWIG_fail; - ecode1 = SWIG_AsVal_double(obj0, &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "rH_from_vpd" "', argument " "1"" of type '" "double""'"); - } - arg1 = static_cast< double >(val1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "rH_from_vpd" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - { - try { - result = (double)cmf::atmosphere::rH_from_vpd(arg1,arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_global_radiation(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::math::Time arg1 ; - double arg2 ; - double arg3 ; - double arg4 = (double) 8 ; - double arg5 = (double) 51 ; - double arg6 = (double) 1 ; - bool arg7 = (bool) 0 ; - double val2 ; - int ecode2 = 0 ; - double val3 ; - int ecode3 = 0 ; - double val4 ; - int ecode4 = 0 ; - double val5 ; - int ecode5 = 0 ; - double val6 ; - int ecode6 = 0 ; - bool val7 ; - int ecode7 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - PyObject * obj6 = 0 ; - char * kwnames[] = { - (char *) "t",(char *) "height",(char *) "sunshine_fraction",(char *) "longitude",(char *) "latitude",(char *) "time_zone",(char *) "daily", NULL - }; - double result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOOO:global_radiation",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail; - { - arg1 = convert_datetime_to_cmftime(obj0); - if (arg1 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } - } - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "global_radiation" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - ecode3 = SWIG_AsVal_double(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "global_radiation" "', argument " "3"" of type '" "double""'"); - } - arg3 = static_cast< double >(val3); - if (obj3) { - ecode4 = SWIG_AsVal_double(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "global_radiation" "', argument " "4"" of type '" "double""'"); - } - arg4 = static_cast< double >(val4); - } - if (obj4) { - ecode5 = SWIG_AsVal_double(obj4, &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "global_radiation" "', argument " "5"" of type '" "double""'"); - } - arg5 = static_cast< double >(val5); - } - if (obj5) { - ecode6 = SWIG_AsVal_double(obj5, &val6); - if (!SWIG_IsOK(ecode6)) { - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "global_radiation" "', argument " "6"" of type '" "double""'"); - } - arg6 = static_cast< double >(val6); - } - if (obj6) { - ecode7 = SWIG_AsVal_bool(obj6, &val7); - if (!SWIG_IsOK(ecode7)) { - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "global_radiation" "', argument " "7"" of type '" "bool""'"); - } - arg7 = static_cast< bool >(val7); - } - { - try { - result = (double)cmf::atmosphere::global_radiation(arg1,arg2,arg3,arg4,arg5,arg6,arg7); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Pressure(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - double arg1 ; - double val1 ; - int ecode1 = 0 ; - PyObject * obj0 = 0 ; - char * kwnames[] = { - (char *) "height", NULL - }; - double result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:Pressure",kwnames,&obj0)) SWIG_fail; - ecode1 = SWIG_AsVal_double(obj0, &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "Pressure" "', argument " "1"" of type '" "double""'"); - } - arg1 = static_cast< double >(val1); - { - try { - result = (double)cmf::atmosphere::Pressure(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Weather_T_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::Weather *arg1 = (cmf::atmosphere::Weather *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"Weather_T_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__atmosphere__Weather, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Weather_T_set" "', argument " "1"" of type '" "cmf::atmosphere::Weather *""'"); - } - arg1 = reinterpret_cast< cmf::atmosphere::Weather * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Weather_T_set" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - if (arg1) (arg1)->T = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Weather_T_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::Weather *arg1 = (cmf::atmosphere::Weather *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - double result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__atmosphere__Weather, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Weather_T_get" "', argument " "1"" of type '" "cmf::atmosphere::Weather *""'"); - } - arg1 = reinterpret_cast< cmf::atmosphere::Weather * >(argp1); - result = (double) ((arg1)->T); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Weather_Tmax_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::Weather *arg1 = (cmf::atmosphere::Weather *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"Weather_Tmax_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__atmosphere__Weather, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Weather_Tmax_set" "', argument " "1"" of type '" "cmf::atmosphere::Weather *""'"); - } - arg1 = reinterpret_cast< cmf::atmosphere::Weather * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Weather_Tmax_set" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - if (arg1) (arg1)->Tmax = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Weather_Tmax_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::Weather *arg1 = (cmf::atmosphere::Weather *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - double result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__atmosphere__Weather, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Weather_Tmax_get" "', argument " "1"" of type '" "cmf::atmosphere::Weather *""'"); - } - arg1 = reinterpret_cast< cmf::atmosphere::Weather * >(argp1); - result = (double) ((arg1)->Tmax); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Weather_Tmin_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::Weather *arg1 = (cmf::atmosphere::Weather *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"Weather_Tmin_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__atmosphere__Weather, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Weather_Tmin_set" "', argument " "1"" of type '" "cmf::atmosphere::Weather *""'"); - } - arg1 = reinterpret_cast< cmf::atmosphere::Weather * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Weather_Tmin_set" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - if (arg1) (arg1)->Tmin = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Weather_Tmin_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::Weather *arg1 = (cmf::atmosphere::Weather *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - double result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__atmosphere__Weather, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Weather_Tmin_get" "', argument " "1"" of type '" "cmf::atmosphere::Weather *""'"); - } - arg1 = reinterpret_cast< cmf::atmosphere::Weather * >(argp1); - result = (double) ((arg1)->Tmin); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Weather_Tground_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::Weather *arg1 = (cmf::atmosphere::Weather *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"Weather_Tground_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__atmosphere__Weather, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Weather_Tground_set" "', argument " "1"" of type '" "cmf::atmosphere::Weather *""'"); - } - arg1 = reinterpret_cast< cmf::atmosphere::Weather * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Weather_Tground_set" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - if (arg1) (arg1)->Tground = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Weather_Tground_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::Weather *arg1 = (cmf::atmosphere::Weather *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - double result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__atmosphere__Weather, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Weather_Tground_get" "', argument " "1"" of type '" "cmf::atmosphere::Weather *""'"); - } - arg1 = reinterpret_cast< cmf::atmosphere::Weather * >(argp1); - result = (double) ((arg1)->Tground); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Weather_Windspeed_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::Weather *arg1 = (cmf::atmosphere::Weather *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"Weather_Windspeed_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__atmosphere__Weather, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Weather_Windspeed_set" "', argument " "1"" of type '" "cmf::atmosphere::Weather *""'"); - } - arg1 = reinterpret_cast< cmf::atmosphere::Weather * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Weather_Windspeed_set" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - if (arg1) (arg1)->Windspeed = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Weather_Windspeed_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::Weather *arg1 = (cmf::atmosphere::Weather *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - double result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__atmosphere__Weather, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Weather_Windspeed_get" "', argument " "1"" of type '" "cmf::atmosphere::Weather *""'"); - } - arg1 = reinterpret_cast< cmf::atmosphere::Weather * >(argp1); - result = (double) ((arg1)->Windspeed); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Weather_e_a_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::Weather *arg1 = (cmf::atmosphere::Weather *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"Weather_e_a_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__atmosphere__Weather, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Weather_e_a_set" "', argument " "1"" of type '" "cmf::atmosphere::Weather *""'"); - } - arg1 = reinterpret_cast< cmf::atmosphere::Weather * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Weather_e_a_set" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - if (arg1) (arg1)->e_a = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Weather_e_a_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::Weather *arg1 = (cmf::atmosphere::Weather *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - double result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__atmosphere__Weather, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Weather_e_a_get" "', argument " "1"" of type '" "cmf::atmosphere::Weather *""'"); - } - arg1 = reinterpret_cast< cmf::atmosphere::Weather * >(argp1); - result = (double) ((arg1)->e_a); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Weather_e_s_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::Weather *arg1 = (cmf::atmosphere::Weather *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"Weather_e_s_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__atmosphere__Weather, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Weather_e_s_set" "', argument " "1"" of type '" "cmf::atmosphere::Weather *""'"); - } - arg1 = reinterpret_cast< cmf::atmosphere::Weather * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Weather_e_s_set" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - if (arg1) (arg1)->e_s = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Weather_e_s_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::Weather *arg1 = (cmf::atmosphere::Weather *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - double result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__atmosphere__Weather, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Weather_e_s_get" "', argument " "1"" of type '" "cmf::atmosphere::Weather *""'"); - } - arg1 = reinterpret_cast< cmf::atmosphere::Weather * >(argp1); - result = (double) ((arg1)->e_s); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Weather_sunshine_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::Weather *arg1 = (cmf::atmosphere::Weather *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"Weather_sunshine_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__atmosphere__Weather, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Weather_sunshine_set" "', argument " "1"" of type '" "cmf::atmosphere::Weather *""'"); - } - arg1 = reinterpret_cast< cmf::atmosphere::Weather * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Weather_sunshine_set" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - if (arg1) (arg1)->sunshine = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Weather_sunshine_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::Weather *arg1 = (cmf::atmosphere::Weather *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - double result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__atmosphere__Weather, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Weather_sunshine_get" "', argument " "1"" of type '" "cmf::atmosphere::Weather *""'"); - } - arg1 = reinterpret_cast< cmf::atmosphere::Weather * >(argp1); - result = (double) ((arg1)->sunshine); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Weather_Rs_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::Weather *arg1 = (cmf::atmosphere::Weather *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"Weather_Rs_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__atmosphere__Weather, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Weather_Rs_set" "', argument " "1"" of type '" "cmf::atmosphere::Weather *""'"); - } - arg1 = reinterpret_cast< cmf::atmosphere::Weather * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Weather_Rs_set" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - if (arg1) (arg1)->Rs = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Weather_Rs_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::Weather *arg1 = (cmf::atmosphere::Weather *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - double result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__atmosphere__Weather, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Weather_Rs_get" "', argument " "1"" of type '" "cmf::atmosphere::Weather *""'"); - } - arg1 = reinterpret_cast< cmf::atmosphere::Weather * >(argp1); - result = (double) ((arg1)->Rs); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Weather_daylength_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::Weather *arg1 = (cmf::atmosphere::Weather *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"Weather_daylength_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__atmosphere__Weather, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Weather_daylength_set" "', argument " "1"" of type '" "cmf::atmosphere::Weather *""'"); - } - arg1 = reinterpret_cast< cmf::atmosphere::Weather * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Weather_daylength_set" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - if (arg1) (arg1)->daylength = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Weather_daylength_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::Weather *arg1 = (cmf::atmosphere::Weather *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - double result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__atmosphere__Weather, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Weather_daylength_get" "', argument " "1"" of type '" "cmf::atmosphere::Weather *""'"); - } - arg1 = reinterpret_cast< cmf::atmosphere::Weather * >(argp1); - result = (double) ((arg1)->daylength); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Weather_instrument_height_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::Weather *arg1 = (cmf::atmosphere::Weather *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"Weather_instrument_height_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__atmosphere__Weather, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Weather_instrument_height_set" "', argument " "1"" of type '" "cmf::atmosphere::Weather *""'"); - } - arg1 = reinterpret_cast< cmf::atmosphere::Weather * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Weather_instrument_height_set" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - if (arg1) (arg1)->instrument_height = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Weather_instrument_height_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::Weather *arg1 = (cmf::atmosphere::Weather *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - double result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__atmosphere__Weather, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Weather_instrument_height_get" "', argument " "1"" of type '" "cmf::atmosphere::Weather *""'"); - } - arg1 = reinterpret_cast< cmf::atmosphere::Weather * >(argp1); - result = (double) ((arg1)->instrument_height); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Weather_Rn(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::atmosphere::Weather *arg1 = (cmf::atmosphere::Weather *) 0 ; - double arg2 ; - bool arg3 = (bool) false ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - bool val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "albedo",(char *) "daily", NULL - }; - double result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:Weather_Rn",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__atmosphere__Weather, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Weather_Rn" "', argument " "1"" of type '" "cmf::atmosphere::Weather const *""'"); - } - arg1 = reinterpret_cast< cmf::atmosphere::Weather * >(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Weather_Rn" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - if (obj2) { - ecode3 = SWIG_AsVal_bool(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Weather_Rn" "', argument " "3"" of type '" "bool""'"); - } - arg3 = static_cast< bool >(val3); - } - { - try { - result = (double)((cmf::atmosphere::Weather const *)arg1)->Rn(arg2,arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_Weather(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - double arg1 = (double) 15.0 ; - double arg2 = (double) 17.0 ; - double arg3 = (double) 13.0 ; - double arg4 = (double) 70.0 ; - double arg5 = (double) 2.0 ; - double arg6 = (double) 0.5 ; - double arg7 = (double) 15 ; - double arg8 = (double) 12 ; - double val1 ; - int ecode1 = 0 ; - double val2 ; - int ecode2 = 0 ; - double val3 ; - int ecode3 = 0 ; - double val4 ; - int ecode4 = 0 ; - double val5 ; - int ecode5 = 0 ; - double val6 ; - int ecode6 = 0 ; - double val7 ; - int ecode7 = 0 ; - double val8 ; - int ecode8 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - PyObject * obj6 = 0 ; - PyObject * obj7 = 0 ; - char * kwnames[] = { - (char *) "T",(char *) "Tmax",(char *) "Tmin",(char *) "rH",(char *) "wind",(char *) "sunshine",(char *) "Rs",(char *) "daylength", NULL - }; - cmf::atmosphere::Weather *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|OOOOOOOO:new_Weather",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail; - if (obj0) { - ecode1 = SWIG_AsVal_double(obj0, &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Weather" "', argument " "1"" of type '" "double""'"); - } - arg1 = static_cast< double >(val1); - } - if (obj1) { - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Weather" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - } - if (obj2) { - ecode3 = SWIG_AsVal_double(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Weather" "', argument " "3"" of type '" "double""'"); - } - arg3 = static_cast< double >(val3); - } - if (obj3) { - ecode4 = SWIG_AsVal_double(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_Weather" "', argument " "4"" of type '" "double""'"); - } - arg4 = static_cast< double >(val4); - } - if (obj4) { - ecode5 = SWIG_AsVal_double(obj4, &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_Weather" "', argument " "5"" of type '" "double""'"); - } - arg5 = static_cast< double >(val5); - } - if (obj5) { - ecode6 = SWIG_AsVal_double(obj5, &val6); - if (!SWIG_IsOK(ecode6)) { - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_Weather" "', argument " "6"" of type '" "double""'"); - } - arg6 = static_cast< double >(val6); - } - if (obj6) { - ecode7 = SWIG_AsVal_double(obj6, &val7); - if (!SWIG_IsOK(ecode7)) { - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_Weather" "', argument " "7"" of type '" "double""'"); - } - arg7 = static_cast< double >(val7); - } - if (obj7) { - ecode8 = SWIG_AsVal_double(obj7, &val8); - if (!SWIG_IsOK(ecode8)) { - SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_Weather" "', argument " "8"" of type '" "double""'"); - } - arg8 = static_cast< double >(val8); - } - { - try { - result = (cmf::atmosphere::Weather *)new cmf::atmosphere::Weather(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__atmosphere__Weather, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Weather_to_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::Weather *arg1 = (cmf::atmosphere::Weather *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::string result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__atmosphere__Weather, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Weather_to_string" "', argument " "1"" of type '" "cmf::atmosphere::Weather const *""'"); - } - arg1 = reinterpret_cast< cmf::atmosphere::Weather * >(argp1); - { - try { - result = ((cmf::atmosphere::Weather const *)arg1)->to_string(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_std_string(static_cast< std::string >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Weather_set_snow_threshold(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - double arg1 ; - double val1 ; - int ecode1 = 0 ; - PyObject * obj0 = 0 ; - char * kwnames[] = { - (char *) "new_threshold", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:Weather_set_snow_threshold",kwnames,&obj0)) SWIG_fail; - ecode1 = SWIG_AsVal_double(obj0, &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "Weather_set_snow_threshold" "', argument " "1"" of type '" "double""'"); - } - arg1 = static_cast< double >(val1); - { - try { - cmf::atmosphere::Weather::set_snow_threshold(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Weather_get_snow_threshold(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - double result; - - if (!SWIG_Python_UnpackTuple(args,"Weather_get_snow_threshold",0,0,0)) SWIG_fail; - { - try { - result = (double)cmf::atmosphere::Weather::get_snow_threshold(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Weather___iadd__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::atmosphere::Weather *arg1 = (cmf::atmosphere::Weather *) 0 ; - cmf::atmosphere::Weather *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "w", NULL - }; - cmf::atmosphere::Weather *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Weather___iadd__",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__atmosphere__Weather, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Weather___iadd__" "', argument " "1"" of type '" "cmf::atmosphere::Weather *""'"); - } - arg1 = reinterpret_cast< cmf::atmosphere::Weather * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_cmf__atmosphere__Weather, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Weather___iadd__" "', argument " "2"" of type '" "cmf::atmosphere::Weather const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Weather___iadd__" "', argument " "2"" of type '" "cmf::atmosphere::Weather const &""'"); - } - arg2 = reinterpret_cast< cmf::atmosphere::Weather * >(argp2); - { - try { - result = (cmf::atmosphere::Weather *) &(arg1)->operator +=((cmf::atmosphere::Weather const &)*arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__atmosphere__Weather, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Weather___imul__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::atmosphere::Weather *arg1 = (cmf::atmosphere::Weather *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "factor", NULL - }; - cmf::atmosphere::Weather *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Weather___imul__",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__atmosphere__Weather, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Weather___imul__" "', argument " "1"" of type '" "cmf::atmosphere::Weather *""'"); - } - arg1 = reinterpret_cast< cmf::atmosphere::Weather * >(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Weather___imul__" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - { - try { - result = (cmf::atmosphere::Weather *) &(arg1)->operator *=(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__atmosphere__Weather, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Weather___add__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::atmosphere::Weather *arg1 = (cmf::atmosphere::Weather *) 0 ; - cmf::atmosphere::Weather *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "w", NULL - }; - cmf::atmosphere::Weather result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Weather___add__",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__atmosphere__Weather, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Weather___add__" "', argument " "1"" of type '" "cmf::atmosphere::Weather *""'"); - } - arg1 = reinterpret_cast< cmf::atmosphere::Weather * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_cmf__atmosphere__Weather, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Weather___add__" "', argument " "2"" of type '" "cmf::atmosphere::Weather const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Weather___add__" "', argument " "2"" of type '" "cmf::atmosphere::Weather const &""'"); - } - arg2 = reinterpret_cast< cmf::atmosphere::Weather * >(argp2); - { - try { - result = (arg1)->operator +((cmf::atmosphere::Weather const &)*arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj((new cmf::atmosphere::Weather(static_cast< const cmf::atmosphere::Weather& >(result))), SWIGTYPE_p_cmf__atmosphere__Weather, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Weather___mul__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::atmosphere::Weather *arg1 = (cmf::atmosphere::Weather *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "factor", NULL - }; - cmf::atmosphere::Weather result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Weather___mul__",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__atmosphere__Weather, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Weather___mul__" "', argument " "1"" of type '" "cmf::atmosphere::Weather *""'"); - } - arg1 = reinterpret_cast< cmf::atmosphere::Weather * >(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Weather___mul__" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - { - try { - result = (arg1)->operator *(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj((new cmf::atmosphere::Weather(static_cast< const cmf::atmosphere::Weather& >(result))), SWIGTYPE_p_cmf__atmosphere__Weather, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_Weather(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::Weather *arg1 = (cmf::atmosphere::Weather *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__atmosphere__Weather, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Weather" "', argument " "1"" of type '" "cmf::atmosphere::Weather *""'"); - } - arg1 = reinterpret_cast< cmf::atmosphere::Weather * >(argp1); - { - try { - delete arg1; - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *Weather_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__atmosphere__Weather, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *Weather_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_Meteorology___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::atmosphere::Meteorology *arg1 = (cmf::atmosphere::Meteorology *) 0 ; - cmf::math::Time arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "t", NULL - }; - cmf::atmosphere::Weather result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Meteorology___call__",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__atmosphere__Meteorology, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Meteorology___call__" "', argument " "1"" of type '" "cmf::atmosphere::Meteorology *""'"); - } - arg1 = reinterpret_cast< cmf::atmosphere::Meteorology * >(argp1); - { - arg2 = convert_datetime_to_cmftime(obj1); - if (arg2 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } - } - { - try { - result = (arg1)->operator ()(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj((new cmf::atmosphere::Weather(static_cast< const cmf::atmosphere::Weather& >(result))), SWIGTYPE_p_cmf__atmosphere__Weather, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Meteorology_get_weather(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::atmosphere::Meteorology *arg1 = (cmf::atmosphere::Meteorology *) 0 ; - cmf::math::Time arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "t", NULL - }; - cmf::atmosphere::Weather result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Meteorology_get_weather",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__atmosphere__Meteorology, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Meteorology_get_weather" "', argument " "1"" of type '" "cmf::atmosphere::Meteorology const *""'"); - } - arg1 = reinterpret_cast< cmf::atmosphere::Meteorology * >(argp1); - { - arg2 = convert_datetime_to_cmftime(obj1); - if (arg2 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } - } - { - try { - result = ((cmf::atmosphere::Meteorology const *)arg1)->get_weather(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj((new cmf::atmosphere::Weather(static_cast< const cmf::atmosphere::Weather& >(result))), SWIGTYPE_p_cmf__atmosphere__Weather, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Meteorology_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::Meteorology *arg1 = (cmf::atmosphere::Meteorology *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::atmosphere::Meteorology *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__atmosphere__Meteorology, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Meteorology_copy" "', argument " "1"" of type '" "cmf::atmosphere::Meteorology const *""'"); - } - arg1 = reinterpret_cast< cmf::atmosphere::Meteorology * >(argp1); - { - try { - result = (cmf::atmosphere::Meteorology *)((cmf::atmosphere::Meteorology const *)arg1)->copy(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__atmosphere__Meteorology, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Meteorology_get_instrument_height(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::Meteorology *arg1 = (cmf::atmosphere::Meteorology *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__atmosphere__Meteorology, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Meteorology_get_instrument_height" "', argument " "1"" of type '" "cmf::atmosphere::Meteorology const *""'"); - } - arg1 = reinterpret_cast< cmf::atmosphere::Meteorology * >(argp1); - { - try { - result = (real)((cmf::atmosphere::Meteorology const *)arg1)->get_instrument_height(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_Meteorology(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::Meteorology *arg1 = (cmf::atmosphere::Meteorology *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__atmosphere__Meteorology, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Meteorology" "', argument " "1"" of type '" "cmf::atmosphere::Meteorology *""'"); - } - arg1 = reinterpret_cast< cmf::atmosphere::Meteorology * >(argp1); - { - try { - delete arg1; - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *Meteorology_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__atmosphere__Meteorology, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *_wrap_ConstantMeteorology_weather_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::ConstantMeteorology *arg1 = (cmf::atmosphere::ConstantMeteorology *) 0 ; - cmf::atmosphere::Weather *arg2 = (cmf::atmosphere::Weather *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"ConstantMeteorology_weather_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__atmosphere__ConstantMeteorology, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ConstantMeteorology_weather_set" "', argument " "1"" of type '" "cmf::atmosphere::ConstantMeteorology *""'"); - } - arg1 = reinterpret_cast< cmf::atmosphere::ConstantMeteorology * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_cmf__atmosphere__Weather, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ConstantMeteorology_weather_set" "', argument " "2"" of type '" "cmf::atmosphere::Weather *""'"); - } - arg2 = reinterpret_cast< cmf::atmosphere::Weather * >(argp2); - if (arg1) (arg1)->weather = *arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ConstantMeteorology_weather_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::ConstantMeteorology *arg1 = (cmf::atmosphere::ConstantMeteorology *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::atmosphere::Weather *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__atmosphere__ConstantMeteorology, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ConstantMeteorology_weather_get" "', argument " "1"" of type '" "cmf::atmosphere::ConstantMeteorology *""'"); - } - arg1 = reinterpret_cast< cmf::atmosphere::ConstantMeteorology * >(argp1); - result = (cmf::atmosphere::Weather *)& ((arg1)->weather); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__atmosphere__Weather, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_ConstantMeteorology__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) { - PyObject *resultobj = 0; - cmf::atmosphere::ConstantMeteorology *result = 0 ; - - if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; - { - try { - result = (cmf::atmosphere::ConstantMeteorology *)new cmf::atmosphere::ConstantMeteorology(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__atmosphere__ConstantMeteorology, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_ConstantMeteorology__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::atmosphere::Weather *arg1 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - cmf::atmosphere::ConstantMeteorology *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_cmf__atmosphere__Weather, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ConstantMeteorology" "', argument " "1"" of type '" "cmf::atmosphere::Weather const &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConstantMeteorology" "', argument " "1"" of type '" "cmf::atmosphere::Weather const &""'"); - } - arg1 = reinterpret_cast< cmf::atmosphere::Weather * >(argp1); - { - try { - result = (cmf::atmosphere::ConstantMeteorology *)new cmf::atmosphere::ConstantMeteorology((cmf::atmosphere::Weather const &)*arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__atmosphere__ConstantMeteorology, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_ConstantMeteorology__SWIG_2(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::atmosphere::ConstantMeteorology *arg1 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - cmf::atmosphere::ConstantMeteorology *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_cmf__atmosphere__ConstantMeteorology, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ConstantMeteorology" "', argument " "1"" of type '" "cmf::atmosphere::ConstantMeteorology const &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConstantMeteorology" "', argument " "1"" of type '" "cmf::atmosphere::ConstantMeteorology const &""'"); - } - arg1 = reinterpret_cast< cmf::atmosphere::ConstantMeteorology * >(argp1); - { - try { - result = (cmf::atmosphere::ConstantMeteorology *)new cmf::atmosphere::ConstantMeteorology((cmf::atmosphere::ConstantMeteorology const &)*arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__atmosphere__ConstantMeteorology, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_ConstantMeteorology(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[2] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args,"new_ConstantMeteorology",0,1,argv))) SWIG_fail; - --argc; - { - unsigned long _index = 0; - SWIG_TypeRank _rank = 0; - if (argc == 0) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 1; - if (_rank == _rankm) goto dispatch; - } - } - if (argc == 1) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_cmf__atmosphere__Weather, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 2; - if (_rank == _rankm) goto dispatch; - } - } - check_2: - - if (argc == 1) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_cmf__atmosphere__ConstantMeteorology, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_3; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 3; - if (_rank == _rankm) goto dispatch; - } - } - check_3: - - dispatch: - switch(_index) { - case 1: - return _wrap_new_ConstantMeteorology__SWIG_0(self, argc, argv); - case 2: - return _wrap_new_ConstantMeteorology__SWIG_1(self, argc, argv); - case 3: - return _wrap_new_ConstantMeteorology__SWIG_2(self, argc, argv); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_ConstantMeteorology'.\n" - " Possible C/C++ prototypes are:\n" - " cmf::atmosphere::ConstantMeteorology::ConstantMeteorology()\n" - " cmf::atmosphere::ConstantMeteorology::ConstantMeteorology(cmf::atmosphere::Weather const &)\n" - " cmf::atmosphere::ConstantMeteorology::ConstantMeteorology(cmf::atmosphere::ConstantMeteorology const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_ConstantMeteorology_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::ConstantMeteorology *arg1 = (cmf::atmosphere::ConstantMeteorology *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::atmosphere::ConstantMeteorology *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__atmosphere__ConstantMeteorology, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ConstantMeteorology_copy" "', argument " "1"" of type '" "cmf::atmosphere::ConstantMeteorology const *""'"); - } - arg1 = reinterpret_cast< cmf::atmosphere::ConstantMeteorology * >(argp1); - { - try { - result = (cmf::atmosphere::ConstantMeteorology *)((cmf::atmosphere::ConstantMeteorology const *)arg1)->copy(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__atmosphere__ConstantMeteorology, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_ConstantMeteorology(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::ConstantMeteorology *arg1 = (cmf::atmosphere::ConstantMeteorology *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__atmosphere__ConstantMeteorology, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ConstantMeteorology" "', argument " "1"" of type '" "cmf::atmosphere::ConstantMeteorology *""'"); - } - arg1 = reinterpret_cast< cmf::atmosphere::ConstantMeteorology * >(argp1); - { - try { - delete arg1; - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *ConstantMeteorology_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__atmosphere__ConstantMeteorology, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *ConstantMeteorology_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_MeteoStation_Latitude_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::MeteoStation *arg1 = (cmf::atmosphere::MeteoStation *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::atmosphere::MeteoStation > tempshared1 ; - std::shared_ptr< cmf::atmosphere::MeteoStation > *smartarg1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"MeteoStation_Latitude_set",2,2,swig_obj)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStation_Latitude_set" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::MeteoStation * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::MeteoStation * >((smartarg1 ? smartarg1->get() : 0)); - } - } - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MeteoStation_Latitude_set" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - if (arg1) (arg1)->Latitude = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MeteoStation_Latitude_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::MeteoStation *arg1 = (cmf::atmosphere::MeteoStation *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::atmosphere::MeteoStation > tempshared1 ; - std::shared_ptr< cmf::atmosphere::MeteoStation > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - double result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStation_Latitude_get" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::MeteoStation * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::MeteoStation * >((smartarg1 ? smartarg1->get() : 0)); - } - } - result = (double) ((arg1)->Latitude); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MeteoStation_Longitude_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::MeteoStation *arg1 = (cmf::atmosphere::MeteoStation *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::atmosphere::MeteoStation > tempshared1 ; - std::shared_ptr< cmf::atmosphere::MeteoStation > *smartarg1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"MeteoStation_Longitude_set",2,2,swig_obj)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStation_Longitude_set" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::MeteoStation * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::MeteoStation * >((smartarg1 ? smartarg1->get() : 0)); - } - } - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MeteoStation_Longitude_set" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - if (arg1) (arg1)->Longitude = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MeteoStation_Longitude_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::MeteoStation *arg1 = (cmf::atmosphere::MeteoStation *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::atmosphere::MeteoStation > tempshared1 ; - std::shared_ptr< cmf::atmosphere::MeteoStation > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - double result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStation_Longitude_get" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::MeteoStation * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::MeteoStation * >((smartarg1 ? smartarg1->get() : 0)); - } - } - result = (double) ((arg1)->Longitude); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MeteoStation_Timezone_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::MeteoStation *arg1 = (cmf::atmosphere::MeteoStation *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::atmosphere::MeteoStation > tempshared1 ; - std::shared_ptr< cmf::atmosphere::MeteoStation > *smartarg1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"MeteoStation_Timezone_set",2,2,swig_obj)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStation_Timezone_set" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::MeteoStation * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::MeteoStation * >((smartarg1 ? smartarg1->get() : 0)); - } - } - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MeteoStation_Timezone_set" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - if (arg1) (arg1)->Timezone = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MeteoStation_Timezone_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::MeteoStation *arg1 = (cmf::atmosphere::MeteoStation *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::atmosphere::MeteoStation > tempshared1 ; - std::shared_ptr< cmf::atmosphere::MeteoStation > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - double result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStation_Timezone_get" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::MeteoStation * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::MeteoStation * >((smartarg1 ? smartarg1->get() : 0)); - } - } - result = (double) ((arg1)->Timezone); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MeteoStation_x_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::MeteoStation *arg1 = (cmf::atmosphere::MeteoStation *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::atmosphere::MeteoStation > tempshared1 ; - std::shared_ptr< cmf::atmosphere::MeteoStation > *smartarg1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"MeteoStation_x_set",2,2,swig_obj)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStation_x_set" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::MeteoStation * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::MeteoStation * >((smartarg1 ? smartarg1->get() : 0)); - } - } - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MeteoStation_x_set" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - if (arg1) (arg1)->x = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MeteoStation_x_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::MeteoStation *arg1 = (cmf::atmosphere::MeteoStation *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::atmosphere::MeteoStation > tempshared1 ; - std::shared_ptr< cmf::atmosphere::MeteoStation > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - double result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStation_x_get" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::MeteoStation * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::MeteoStation * >((smartarg1 ? smartarg1->get() : 0)); - } - } - result = (double) ((arg1)->x); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MeteoStation_y_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::MeteoStation *arg1 = (cmf::atmosphere::MeteoStation *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::atmosphere::MeteoStation > tempshared1 ; - std::shared_ptr< cmf::atmosphere::MeteoStation > *smartarg1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"MeteoStation_y_set",2,2,swig_obj)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStation_y_set" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::MeteoStation * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::MeteoStation * >((smartarg1 ? smartarg1->get() : 0)); - } - } - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MeteoStation_y_set" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - if (arg1) (arg1)->y = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MeteoStation_y_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::MeteoStation *arg1 = (cmf::atmosphere::MeteoStation *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::atmosphere::MeteoStation > tempshared1 ; - std::shared_ptr< cmf::atmosphere::MeteoStation > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - double result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStation_y_get" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::MeteoStation * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::MeteoStation * >((smartarg1 ? smartarg1->get() : 0)); - } - } - result = (double) ((arg1)->y); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MeteoStation_z_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::MeteoStation *arg1 = (cmf::atmosphere::MeteoStation *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::atmosphere::MeteoStation > tempshared1 ; - std::shared_ptr< cmf::atmosphere::MeteoStation > *smartarg1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"MeteoStation_z_set",2,2,swig_obj)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStation_z_set" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::MeteoStation * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::MeteoStation * >((smartarg1 ? smartarg1->get() : 0)); - } - } - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MeteoStation_z_set" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - if (arg1) (arg1)->z = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MeteoStation_z_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::MeteoStation *arg1 = (cmf::atmosphere::MeteoStation *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::atmosphere::MeteoStation > tempshared1 ; - std::shared_ptr< cmf::atmosphere::MeteoStation > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - double result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStation_z_get" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::MeteoStation * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::MeteoStation * >((smartarg1 ? smartarg1->get() : 0)); - } - } - result = (double) ((arg1)->z); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MeteoStation_Name_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::MeteoStation *arg1 = (cmf::atmosphere::MeteoStation *) 0 ; - std::string *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::atmosphere::MeteoStation > tempshared1 ; - std::shared_ptr< cmf::atmosphere::MeteoStation > *smartarg1 = 0 ; - int res2 = SWIG_OLDOBJ ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"MeteoStation_Name_set",2,2,swig_obj)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStation_Name_set" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::MeteoStation * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::MeteoStation * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MeteoStation_Name_set" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MeteoStation_Name_set" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - if (arg1) (arg1)->Name = *arg2; - resultobj = SWIG_Py_Void(); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MeteoStation_Name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::MeteoStation *arg1 = (cmf::atmosphere::MeteoStation *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::atmosphere::MeteoStation > tempshared1 ; - std::shared_ptr< cmf::atmosphere::MeteoStation > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - std::string *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStation_Name_get" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::MeteoStation * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::MeteoStation * >((smartarg1 ? smartarg1->get() : 0)); - } - } - result = (std::string *) & ((arg1)->Name); - resultobj = SWIG_From_std_string(static_cast< std::string >(*result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MeteoStation_get_position(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::MeteoStation *arg1 = (cmf::atmosphere::MeteoStation *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::atmosphere::MeteoStation const > tempshared1 ; - std::shared_ptr< cmf::atmosphere::MeteoStation const > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - cmf::geometry::point result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStation_get_position" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation const *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::atmosphere::MeteoStation > * >(argp1); - delete reinterpret_cast< std::shared_ptr< const cmf::atmosphere::MeteoStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::MeteoStation * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::atmosphere::MeteoStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::MeteoStation * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - try { - result = ((cmf::atmosphere::MeteoStation const *)arg1)->get_position(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj((new cmf::geometry::point(static_cast< const cmf::geometry::point& >(result))), SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MeteoStation_daily_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::MeteoStation *arg1 = (cmf::atmosphere::MeteoStation *) 0 ; - bool arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::atmosphere::MeteoStation > tempshared1 ; - std::shared_ptr< cmf::atmosphere::MeteoStation > *smartarg1 = 0 ; - bool val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"MeteoStation_daily_set",2,2,swig_obj)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStation_daily_set" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::MeteoStation * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::MeteoStation * >((smartarg1 ? smartarg1->get() : 0)); - } - } - ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MeteoStation_daily_set" "', argument " "2"" of type '" "bool""'"); - } - arg2 = static_cast< bool >(val2); - if (arg1) (arg1)->daily = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MeteoStation_daily_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::MeteoStation *arg1 = (cmf::atmosphere::MeteoStation *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::atmosphere::MeteoStation > tempshared1 ; - std::shared_ptr< cmf::atmosphere::MeteoStation > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - bool result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStation_daily_get" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::MeteoStation * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::MeteoStation * >((smartarg1 ? smartarg1->get() : 0)); - } - } - result = (bool) ((arg1)->daily); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MeteoStation_InstrumentHeight_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::MeteoStation *arg1 = (cmf::atmosphere::MeteoStation *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::atmosphere::MeteoStation > tempshared1 ; - std::shared_ptr< cmf::atmosphere::MeteoStation > *smartarg1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"MeteoStation_InstrumentHeight_set",2,2,swig_obj)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStation_InstrumentHeight_set" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::MeteoStation * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::MeteoStation * >((smartarg1 ? smartarg1->get() : 0)); - } - } - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MeteoStation_InstrumentHeight_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->InstrumentHeight = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MeteoStation_InstrumentHeight_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::MeteoStation *arg1 = (cmf::atmosphere::MeteoStation *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::atmosphere::MeteoStation > tempshared1 ; - std::shared_ptr< cmf::atmosphere::MeteoStation > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStation_InstrumentHeight_get" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::MeteoStation * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::MeteoStation * >((smartarg1 ? smartarg1->get() : 0)); - } - } - result = (real) ((arg1)->InstrumentHeight); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_MeteoStation(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::atmosphere::MeteoStation *arg1 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::atmosphere::MeteoStation const > tempshared1 ; - PyObject * obj0 = 0 ; - char * kwnames[] = { - (char *) "other", NULL - }; - cmf::atmosphere::MeteoStation *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:new_MeteoStation",kwnames,&obj0)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MeteoStation" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation const &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MeteoStation" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation const &""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::atmosphere::MeteoStation > * >(argp1); - delete reinterpret_cast< std::shared_ptr< const cmf::atmosphere::MeteoStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::MeteoStation * >(tempshared1.get()); - } else { - arg1 = const_cast< cmf::atmosphere::MeteoStation * >(reinterpret_cast< std::shared_ptr< const cmf::atmosphere::MeteoStation > * >(argp1)->get()); - } - } - { - try { - result = (cmf::atmosphere::MeteoStation *)new cmf::atmosphere::MeteoStation((cmf::atmosphere::MeteoStation const &)*arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - std::shared_ptr< cmf::atmosphere::MeteoStation > *smartresult = result ? new std::shared_ptr< cmf::atmosphere::MeteoStation >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0; - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MeteoStation_get_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::atmosphere::MeteoStation *arg1 = (cmf::atmosphere::MeteoStation *) 0 ; - cmf::math::Time arg2 ; - double arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::atmosphere::MeteoStation const > tempshared1 ; - std::shared_ptr< cmf::atmosphere::MeteoStation const > *smartarg1 = 0 ; - double val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "t",(char *) "height", NULL - }; - cmf::atmosphere::Weather result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:MeteoStation_get_data",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStation_get_data" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation const *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::atmosphere::MeteoStation > * >(argp1); - delete reinterpret_cast< std::shared_ptr< const cmf::atmosphere::MeteoStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::MeteoStation * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::atmosphere::MeteoStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::MeteoStation * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - arg2 = convert_datetime_to_cmftime(obj1); - if (arg2 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } - } - ecode3 = SWIG_AsVal_double(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MeteoStation_get_data" "', argument " "3"" of type '" "double""'"); - } - arg3 = static_cast< double >(val3); - { - try { - result = ((cmf::atmosphere::MeteoStation const *)arg1)->get_data(arg2,arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj((new cmf::atmosphere::Weather(static_cast< const cmf::atmosphere::Weather& >(result))), SWIGTYPE_p_cmf__atmosphere__Weather, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MeteoStation_use_for_cell(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::atmosphere::MeteoStation *arg1 = (cmf::atmosphere::MeteoStation *) 0 ; - cmf::upslope::Cell *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::atmosphere::MeteoStation > tempshared1 ; - std::shared_ptr< cmf::atmosphere::MeteoStation > *smartarg1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "c", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:MeteoStation_use_for_cell",kwnames,&obj0,&obj1)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStation_use_for_cell" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::MeteoStation * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::MeteoStation * >((smartarg1 ? smartarg1->get() : 0)); - } - } - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_cmf__upslope__Cell, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MeteoStation_use_for_cell" "', argument " "2"" of type '" "cmf::upslope::Cell &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MeteoStation_use_for_cell" "', argument " "2"" of type '" "cmf::upslope::Cell &""'"); - } - arg2 = reinterpret_cast< cmf::upslope::Cell * >(argp2); - { - try { - (arg1)->use_for_cell(*arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MeteoStation_SetSunshineFraction(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::atmosphere::MeteoStation *arg1 = (cmf::atmosphere::MeteoStation *) 0 ; - cmf::math::timeseries arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::atmosphere::MeteoStation > tempshared1 ; - std::shared_ptr< cmf::atmosphere::MeteoStation > *smartarg1 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "sunshine_duration", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:MeteoStation_SetSunshineFraction",kwnames,&obj0,&obj1)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStation_SetSunshineFraction" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::MeteoStation * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::MeteoStation * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - cmf::math::timeseries *p_ts = &arg2; - int res=SWIG_ConvertPtr(obj1,(void**)(&p_ts),SWIGTYPE_p_cmf__math__timeseries,0); - if (!(SWIG_IsOK(res)) || p_ts==0) { - if (PyNumber_Check(obj1)) { - double scalar = PyFloat_AsDouble(obj1); - arg2 = cmf::math::timeseries::from_scalar(scalar); - } else { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.timeseries object"); - } - } else { - arg2 = *p_ts; - } - } - { - try { - (arg1)->SetSunshineFraction(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MeteoStation_T_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::MeteoStation *arg1 = (cmf::atmosphere::MeteoStation *) 0 ; - cmf::math::timeseries *arg2 = (cmf::math::timeseries *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::atmosphere::MeteoStation > tempshared1 ; - std::shared_ptr< cmf::atmosphere::MeteoStation > *smartarg1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"MeteoStation_T_set",2,2,swig_obj)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStation_T_set" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::MeteoStation * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::MeteoStation * >((smartarg1 ? smartarg1->get() : 0)); - } - } - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MeteoStation_T_set" "', argument " "2"" of type '" "cmf::math::timeseries *""'"); - } - arg2 = reinterpret_cast< cmf::math::timeseries * >(argp2); - if (arg1) (arg1)->T = *arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MeteoStation_T_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::MeteoStation *arg1 = (cmf::atmosphere::MeteoStation *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::atmosphere::MeteoStation > tempshared1 ; - std::shared_ptr< cmf::atmosphere::MeteoStation > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - cmf::math::timeseries *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStation_T_get" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::MeteoStation * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::MeteoStation * >((smartarg1 ? smartarg1->get() : 0)); - } - } - result = (cmf::math::timeseries *)& ((arg1)->T); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MeteoStation_Tmax_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::MeteoStation *arg1 = (cmf::atmosphere::MeteoStation *) 0 ; - cmf::math::timeseries *arg2 = (cmf::math::timeseries *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::atmosphere::MeteoStation > tempshared1 ; - std::shared_ptr< cmf::atmosphere::MeteoStation > *smartarg1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"MeteoStation_Tmax_set",2,2,swig_obj)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStation_Tmax_set" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::MeteoStation * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::MeteoStation * >((smartarg1 ? smartarg1->get() : 0)); - } - } - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MeteoStation_Tmax_set" "', argument " "2"" of type '" "cmf::math::timeseries *""'"); - } - arg2 = reinterpret_cast< cmf::math::timeseries * >(argp2); - if (arg1) (arg1)->Tmax = *arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MeteoStation_Tmax_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::MeteoStation *arg1 = (cmf::atmosphere::MeteoStation *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::atmosphere::MeteoStation > tempshared1 ; - std::shared_ptr< cmf::atmosphere::MeteoStation > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - cmf::math::timeseries *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStation_Tmax_get" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::MeteoStation * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::MeteoStation * >((smartarg1 ? smartarg1->get() : 0)); - } - } - result = (cmf::math::timeseries *)& ((arg1)->Tmax); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MeteoStation_Tmin_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::MeteoStation *arg1 = (cmf::atmosphere::MeteoStation *) 0 ; - cmf::math::timeseries *arg2 = (cmf::math::timeseries *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::atmosphere::MeteoStation > tempshared1 ; - std::shared_ptr< cmf::atmosphere::MeteoStation > *smartarg1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"MeteoStation_Tmin_set",2,2,swig_obj)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStation_Tmin_set" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::MeteoStation * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::MeteoStation * >((smartarg1 ? smartarg1->get() : 0)); - } - } - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MeteoStation_Tmin_set" "', argument " "2"" of type '" "cmf::math::timeseries *""'"); - } - arg2 = reinterpret_cast< cmf::math::timeseries * >(argp2); - if (arg1) (arg1)->Tmin = *arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MeteoStation_Tmin_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::MeteoStation *arg1 = (cmf::atmosphere::MeteoStation *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::atmosphere::MeteoStation > tempshared1 ; - std::shared_ptr< cmf::atmosphere::MeteoStation > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - cmf::math::timeseries *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStation_Tmin_get" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::MeteoStation * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::MeteoStation * >((smartarg1 ? smartarg1->get() : 0)); - } - } - result = (cmf::math::timeseries *)& ((arg1)->Tmin); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MeteoStation_Tground_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::MeteoStation *arg1 = (cmf::atmosphere::MeteoStation *) 0 ; - cmf::math::timeseries *arg2 = (cmf::math::timeseries *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::atmosphere::MeteoStation > tempshared1 ; - std::shared_ptr< cmf::atmosphere::MeteoStation > *smartarg1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"MeteoStation_Tground_set",2,2,swig_obj)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStation_Tground_set" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::MeteoStation * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::MeteoStation * >((smartarg1 ? smartarg1->get() : 0)); - } - } - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MeteoStation_Tground_set" "', argument " "2"" of type '" "cmf::math::timeseries *""'"); - } - arg2 = reinterpret_cast< cmf::math::timeseries * >(argp2); - if (arg1) (arg1)->Tground = *arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MeteoStation_Tground_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::MeteoStation *arg1 = (cmf::atmosphere::MeteoStation *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::atmosphere::MeteoStation > tempshared1 ; - std::shared_ptr< cmf::atmosphere::MeteoStation > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - cmf::math::timeseries *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStation_Tground_get" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::MeteoStation * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::MeteoStation * >((smartarg1 ? smartarg1->get() : 0)); - } - } - result = (cmf::math::timeseries *)& ((arg1)->Tground); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MeteoStation_Windspeed_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::MeteoStation *arg1 = (cmf::atmosphere::MeteoStation *) 0 ; - cmf::math::timeseries *arg2 = (cmf::math::timeseries *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::atmosphere::MeteoStation > tempshared1 ; - std::shared_ptr< cmf::atmosphere::MeteoStation > *smartarg1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"MeteoStation_Windspeed_set",2,2,swig_obj)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStation_Windspeed_set" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::MeteoStation * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::MeteoStation * >((smartarg1 ? smartarg1->get() : 0)); - } - } - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MeteoStation_Windspeed_set" "', argument " "2"" of type '" "cmf::math::timeseries *""'"); - } - arg2 = reinterpret_cast< cmf::math::timeseries * >(argp2); - if (arg1) (arg1)->Windspeed = *arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MeteoStation_Windspeed_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::MeteoStation *arg1 = (cmf::atmosphere::MeteoStation *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::atmosphere::MeteoStation > tempshared1 ; - std::shared_ptr< cmf::atmosphere::MeteoStation > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - cmf::math::timeseries *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStation_Windspeed_get" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::MeteoStation * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::MeteoStation * >((smartarg1 ? smartarg1->get() : 0)); - } - } - result = (cmf::math::timeseries *)& ((arg1)->Windspeed); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MeteoStation_rHmean_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::MeteoStation *arg1 = (cmf::atmosphere::MeteoStation *) 0 ; - cmf::math::timeseries *arg2 = (cmf::math::timeseries *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::atmosphere::MeteoStation > tempshared1 ; - std::shared_ptr< cmf::atmosphere::MeteoStation > *smartarg1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"MeteoStation_rHmean_set",2,2,swig_obj)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStation_rHmean_set" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::MeteoStation * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::MeteoStation * >((smartarg1 ? smartarg1->get() : 0)); - } - } - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MeteoStation_rHmean_set" "', argument " "2"" of type '" "cmf::math::timeseries *""'"); - } - arg2 = reinterpret_cast< cmf::math::timeseries * >(argp2); - if (arg1) (arg1)->rHmean = *arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MeteoStation_rHmean_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::MeteoStation *arg1 = (cmf::atmosphere::MeteoStation *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::atmosphere::MeteoStation > tempshared1 ; - std::shared_ptr< cmf::atmosphere::MeteoStation > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - cmf::math::timeseries *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStation_rHmean_get" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::MeteoStation * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::MeteoStation * >((smartarg1 ? smartarg1->get() : 0)); - } - } - result = (cmf::math::timeseries *)& ((arg1)->rHmean); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MeteoStation_rHmin_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::MeteoStation *arg1 = (cmf::atmosphere::MeteoStation *) 0 ; - cmf::math::timeseries *arg2 = (cmf::math::timeseries *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::atmosphere::MeteoStation > tempshared1 ; - std::shared_ptr< cmf::atmosphere::MeteoStation > *smartarg1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"MeteoStation_rHmin_set",2,2,swig_obj)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStation_rHmin_set" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::MeteoStation * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::MeteoStation * >((smartarg1 ? smartarg1->get() : 0)); - } - } - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MeteoStation_rHmin_set" "', argument " "2"" of type '" "cmf::math::timeseries *""'"); - } - arg2 = reinterpret_cast< cmf::math::timeseries * >(argp2); - if (arg1) (arg1)->rHmin = *arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MeteoStation_rHmin_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::MeteoStation *arg1 = (cmf::atmosphere::MeteoStation *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::atmosphere::MeteoStation > tempshared1 ; - std::shared_ptr< cmf::atmosphere::MeteoStation > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - cmf::math::timeseries *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStation_rHmin_get" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::MeteoStation * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::MeteoStation * >((smartarg1 ? smartarg1->get() : 0)); - } - } - result = (cmf::math::timeseries *)& ((arg1)->rHmin); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MeteoStation_rHmax_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::MeteoStation *arg1 = (cmf::atmosphere::MeteoStation *) 0 ; - cmf::math::timeseries *arg2 = (cmf::math::timeseries *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::atmosphere::MeteoStation > tempshared1 ; - std::shared_ptr< cmf::atmosphere::MeteoStation > *smartarg1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"MeteoStation_rHmax_set",2,2,swig_obj)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStation_rHmax_set" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::MeteoStation * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::MeteoStation * >((smartarg1 ? smartarg1->get() : 0)); - } - } - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MeteoStation_rHmax_set" "', argument " "2"" of type '" "cmf::math::timeseries *""'"); - } - arg2 = reinterpret_cast< cmf::math::timeseries * >(argp2); - if (arg1) (arg1)->rHmax = *arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MeteoStation_rHmax_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::MeteoStation *arg1 = (cmf::atmosphere::MeteoStation *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::atmosphere::MeteoStation > tempshared1 ; - std::shared_ptr< cmf::atmosphere::MeteoStation > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - cmf::math::timeseries *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStation_rHmax_get" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::MeteoStation * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::MeteoStation * >((smartarg1 ? smartarg1->get() : 0)); - } - } - result = (cmf::math::timeseries *)& ((arg1)->rHmax); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MeteoStation_Tdew_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::MeteoStation *arg1 = (cmf::atmosphere::MeteoStation *) 0 ; - cmf::math::timeseries *arg2 = (cmf::math::timeseries *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::atmosphere::MeteoStation > tempshared1 ; - std::shared_ptr< cmf::atmosphere::MeteoStation > *smartarg1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"MeteoStation_Tdew_set",2,2,swig_obj)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStation_Tdew_set" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::MeteoStation * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::MeteoStation * >((smartarg1 ? smartarg1->get() : 0)); - } - } - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MeteoStation_Tdew_set" "', argument " "2"" of type '" "cmf::math::timeseries *""'"); - } - arg2 = reinterpret_cast< cmf::math::timeseries * >(argp2); - if (arg1) (arg1)->Tdew = *arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MeteoStation_Tdew_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::MeteoStation *arg1 = (cmf::atmosphere::MeteoStation *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::atmosphere::MeteoStation > tempshared1 ; - std::shared_ptr< cmf::atmosphere::MeteoStation > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - cmf::math::timeseries *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStation_Tdew_get" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::MeteoStation * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::MeteoStation * >((smartarg1 ? smartarg1->get() : 0)); - } - } - result = (cmf::math::timeseries *)& ((arg1)->Tdew); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MeteoStation_Sunshine_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::MeteoStation *arg1 = (cmf::atmosphere::MeteoStation *) 0 ; - cmf::math::timeseries *arg2 = (cmf::math::timeseries *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::atmosphere::MeteoStation > tempshared1 ; - std::shared_ptr< cmf::atmosphere::MeteoStation > *smartarg1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"MeteoStation_Sunshine_set",2,2,swig_obj)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStation_Sunshine_set" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::MeteoStation * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::MeteoStation * >((smartarg1 ? smartarg1->get() : 0)); - } - } - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MeteoStation_Sunshine_set" "', argument " "2"" of type '" "cmf::math::timeseries *""'"); - } - arg2 = reinterpret_cast< cmf::math::timeseries * >(argp2); - if (arg1) (arg1)->Sunshine = *arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MeteoStation_Sunshine_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::MeteoStation *arg1 = (cmf::atmosphere::MeteoStation *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::atmosphere::MeteoStation > tempshared1 ; - std::shared_ptr< cmf::atmosphere::MeteoStation > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - cmf::math::timeseries *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStation_Sunshine_get" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::MeteoStation * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::MeteoStation * >((smartarg1 ? smartarg1->get() : 0)); - } - } - result = (cmf::math::timeseries *)& ((arg1)->Sunshine); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MeteoStation_Rs_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::MeteoStation *arg1 = (cmf::atmosphere::MeteoStation *) 0 ; - cmf::math::timeseries *arg2 = (cmf::math::timeseries *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::atmosphere::MeteoStation > tempshared1 ; - std::shared_ptr< cmf::atmosphere::MeteoStation > *smartarg1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"MeteoStation_Rs_set",2,2,swig_obj)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStation_Rs_set" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::MeteoStation * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::MeteoStation * >((smartarg1 ? smartarg1->get() : 0)); - } - } - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MeteoStation_Rs_set" "', argument " "2"" of type '" "cmf::math::timeseries *""'"); - } - arg2 = reinterpret_cast< cmf::math::timeseries * >(argp2); - if (arg1) (arg1)->Rs = *arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MeteoStation_Rs_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::MeteoStation *arg1 = (cmf::atmosphere::MeteoStation *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::atmosphere::MeteoStation > tempshared1 ; - std::shared_ptr< cmf::atmosphere::MeteoStation > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - cmf::math::timeseries *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStation_Rs_get" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::MeteoStation * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::MeteoStation * >((smartarg1 ? smartarg1->get() : 0)); - } - } - result = (cmf::math::timeseries *)& ((arg1)->Rs); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MeteoStation_T_lapse_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::MeteoStation *arg1 = (cmf::atmosphere::MeteoStation *) 0 ; - cmf::math::timeseries *arg2 = (cmf::math::timeseries *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::atmosphere::MeteoStation > tempshared1 ; - std::shared_ptr< cmf::atmosphere::MeteoStation > *smartarg1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"MeteoStation_T_lapse_set",2,2,swig_obj)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStation_T_lapse_set" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::MeteoStation * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::MeteoStation * >((smartarg1 ? smartarg1->get() : 0)); - } - } - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MeteoStation_T_lapse_set" "', argument " "2"" of type '" "cmf::math::timeseries *""'"); - } - arg2 = reinterpret_cast< cmf::math::timeseries * >(argp2); - if (arg1) (arg1)->T_lapse = *arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MeteoStation_T_lapse_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::MeteoStation *arg1 = (cmf::atmosphere::MeteoStation *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::atmosphere::MeteoStation > tempshared1 ; - std::shared_ptr< cmf::atmosphere::MeteoStation > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - cmf::math::timeseries *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStation_T_lapse_get" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::MeteoStation * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::MeteoStation * >((smartarg1 ? smartarg1->get() : 0)); - } - } - result = (cmf::math::timeseries *)& ((arg1)->T_lapse); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_MeteoStation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::MeteoStation *arg1 = (cmf::atmosphere::MeteoStation *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::atmosphere::MeteoStation > tempshared1 ; - std::shared_ptr< cmf::atmosphere::MeteoStation > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MeteoStation" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::MeteoStation * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::MeteoStation * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - try { - (void)arg1; delete smartarg1; - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *MeteoStation_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *MeteoStation_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_MeteoStationReference_get_station(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::MeteoStationReference *arg1 = (cmf::atmosphere::MeteoStationReference *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::atmosphere::MeteoStation::ptr result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__atmosphere__MeteoStationReference, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStationReference_get_station" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStationReference const *""'"); - } - arg1 = reinterpret_cast< cmf::atmosphere::MeteoStationReference * >(argp1); - { - try { - result = ((cmf::atmosphere::MeteoStationReference const *)arg1)->get_station(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - std::shared_ptr< cmf::atmosphere::MeteoStation > *smartresult = result ? new std::shared_ptr< cmf::atmosphere::MeteoStation >(result) : 0; - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, SWIG_POINTER_OWN); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MeteoStationReference_get_position(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::MeteoStationReference *arg1 = (cmf::atmosphere::MeteoStationReference *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::geometry::point result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__atmosphere__MeteoStationReference, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStationReference_get_position" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStationReference const *""'"); - } - arg1 = reinterpret_cast< cmf::atmosphere::MeteoStationReference * >(argp1); - { - try { - result = ((cmf::atmosphere::MeteoStationReference const *)arg1)->get_position(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj((new cmf::geometry::point(static_cast< const cmf::geometry::point& >(result))), SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_MeteoStationReference__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::atmosphere::MeteoStation::ptr arg1 ; - cmf::geometry::point arg2 ; - void *argp1 ; - int res1 = 0 ; - cmf::atmosphere::MeteoStationReference *result = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MeteoStationReference" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation::ptr""'"); - } - if (argp1) arg1 = *(reinterpret_cast< cmf::atmosphere::MeteoStation::ptr * >(argp1)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::atmosphere::MeteoStation::ptr * >(argp1); - } - { - if (check_xy(swig_obj[1])) { - std::string res = convert_xyz_to_point(swig_obj[1],arg2); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - return NULL; - } - } - else if (PySequence_Check(swig_obj[1])) { - std::string res = convert_seq_to_point(swig_obj[1],arg2); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError, res.c_str()); - } - } else { - std::string res="<"; - res+=pyrepr(swig_obj[1]); - res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - } - } - { - try { - result = (cmf::atmosphere::MeteoStationReference *)new cmf::atmosphere::MeteoStationReference(arg1,arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__atmosphere__MeteoStationReference, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_MeteoStationReference__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::atmosphere::MeteoStationReference *arg1 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - cmf::atmosphere::MeteoStationReference *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_cmf__atmosphere__MeteoStationReference, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MeteoStationReference" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStationReference const &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MeteoStationReference" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStationReference const &""'"); - } - arg1 = reinterpret_cast< cmf::atmosphere::MeteoStationReference * >(argp1); - { - try { - result = (cmf::atmosphere::MeteoStationReference *)new cmf::atmosphere::MeteoStationReference((cmf::atmosphere::MeteoStationReference const &)*arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__atmosphere__MeteoStationReference, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_MeteoStationReference(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args,"new_MeteoStationReference",0,2,argv))) SWIG_fail; - --argc; - { - unsigned long _index = 0; - SWIG_TypeRank _rank = 0; - if (argc == 1) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_cmf__atmosphere__MeteoStationReference, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 1; - if (_rank == _rankm) goto dispatch; - } - } - check_1: - - if (argc == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - cmf::geometry::point p; - _v=check_xy(argv[1]) || check_seq_point(argv[1]); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 2; - if (_rank == _rankm) goto dispatch; - } - } - check_2: - - dispatch: - switch(_index) { - case 1: - return _wrap_new_MeteoStationReference__SWIG_1(self, argc, argv); - case 2: - return _wrap_new_MeteoStationReference__SWIG_0(self, argc, argv); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_MeteoStationReference'.\n" - " Possible C/C++ prototypes are:\n" - " cmf::atmosphere::MeteoStationReference::MeteoStationReference(cmf::atmosphere::MeteoStation::ptr,cmf::geometry::point)\n" - " cmf::atmosphere::MeteoStationReference::MeteoStationReference(cmf::atmosphere::MeteoStationReference const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_MeteoStationReference_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::MeteoStationReference *arg1 = (cmf::atmosphere::MeteoStationReference *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::atmosphere::MeteoStationReference *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__atmosphere__MeteoStationReference, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStationReference_copy" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStationReference const *""'"); - } - arg1 = reinterpret_cast< cmf::atmosphere::MeteoStationReference * >(argp1); - { - try { - result = (cmf::atmosphere::MeteoStationReference *)((cmf::atmosphere::MeteoStationReference const *)arg1)->copy(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__atmosphere__MeteoStationReference, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_MeteoStationReference(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::MeteoStationReference *arg1 = (cmf::atmosphere::MeteoStationReference *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__atmosphere__MeteoStationReference, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MeteoStationReference" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStationReference *""'"); - } - arg1 = reinterpret_cast< cmf::atmosphere::MeteoStationReference * >(argp1); - { - try { - delete arg1; - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *MeteoStationReference_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__atmosphere__MeteoStationReference, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *MeteoStationReference_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_MeteoStationList___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::MeteoStationList *arg1 = (cmf::atmosphere::MeteoStationList *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - size_t result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__atmosphere__MeteoStationList, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStationList___len__" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStationList const *""'"); - } - arg1 = reinterpret_cast< cmf::atmosphere::MeteoStationList * >(argp1); - { - try { - result = ((cmf::atmosphere::MeteoStationList const *)arg1)->size(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MeteoStationList___getitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::atmosphere::MeteoStationList *arg1 = (cmf::atmosphere::MeteoStationList *) 0 ; - ptrdiff_t arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - cmf::atmosphere::MeteoStation::ptr result; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__atmosphere__MeteoStationList, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStationList___getitem__" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStationList const *""'"); - } - arg1 = reinterpret_cast< cmf::atmosphere::MeteoStationList * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MeteoStationList___getitem__" "', argument " "2"" of type '" "ptrdiff_t""'"); - } - arg2 = static_cast< ptrdiff_t >(val2); - { - try { - result = ((cmf::atmosphere::MeteoStationList const *)arg1)->operator [](arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - std::shared_ptr< cmf::atmosphere::MeteoStation > *smartresult = result ? new std::shared_ptr< cmf::atmosphere::MeteoStation >(result) : 0; - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, SWIG_POINTER_OWN); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MeteoStationList___getitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::atmosphere::MeteoStationList *arg1 = (cmf::atmosphere::MeteoStationList *) 0 ; - std::string *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - cmf::atmosphere::MeteoStation::ptr result; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__atmosphere__MeteoStationList, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStationList___getitem__" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStationList const *""'"); - } - arg1 = reinterpret_cast< cmf::atmosphere::MeteoStationList * >(argp1); - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MeteoStationList___getitem__" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MeteoStationList___getitem__" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - { - try { - result = ((cmf::atmosphere::MeteoStationList const *)arg1)->operator []((std::string const &)*arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - std::shared_ptr< cmf::atmosphere::MeteoStation > *smartresult = result ? new std::shared_ptr< cmf::atmosphere::MeteoStation >(result) : 0; - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, SWIG_POINTER_OWN); - } - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MeteoStationList___getitem__(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args,"MeteoStationList___getitem__",0,2,argv))) SWIG_fail; - --argc; - { - unsigned long _index = 0; - SWIG_TypeRank _rank = 0; - if (argc == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__atmosphere__MeteoStationList, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 1; - if (_rank == _rankm) goto dispatch; - } - } - check_1: - - if (argc == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__atmosphere__MeteoStationList, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0)); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 2; - if (_rank == _rankm) goto dispatch; - } - } - check_2: - - dispatch: - switch(_index) { - case 1: - return _wrap_MeteoStationList___getitem____SWIG_0(self, argc, argv); - case 2: - return _wrap_MeteoStationList___getitem____SWIG_1(self, argc, argv); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'MeteoStationList___getitem__'.\n" - " Possible C/C++ prototypes are:\n" - " cmf::atmosphere::MeteoStationList::operator [](ptrdiff_t) const\n" - " cmf::atmosphere::MeteoStationList::operator [](std::string const &) const\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_MeteoStationList_calculate_Temp_lapse(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::atmosphere::MeteoStationList *arg1 = (cmf::atmosphere::MeteoStationList *) 0 ; - cmf::math::Time arg2 ; - cmf::math::Time arg3 ; - cmf::math::Time arg4 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "begin",(char *) "step",(char *) "end", NULL - }; - double result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO:MeteoStationList_calculate_Temp_lapse",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__atmosphere__MeteoStationList, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStationList_calculate_Temp_lapse" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStationList *""'"); - } - arg1 = reinterpret_cast< cmf::atmosphere::MeteoStationList * >(argp1); - { - arg2 = convert_datetime_to_cmftime(obj1); - if (arg2 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } - } - { - arg3 = convert_datetime_to_cmftime(obj2); - if (arg3 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } - } - { - arg4 = convert_datetime_to_cmftime(obj3); - if (arg4 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } - } - { - try { - result = (double)(arg1)->calculate_Temp_lapse(arg2,arg3,arg4); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MeteoStationList_add_station(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::atmosphere::MeteoStationList *arg1 = (cmf::atmosphere::MeteoStationList *) 0 ; - std::string arg2 ; - cmf::geometry::point arg3 ; - double arg4 = (double) 51.0 ; - double arg5 = (double) 8.0 ; - double arg6 = (double) 1.0 ; - cmf::math::Time arg7 = (cmf::math::Time) cmf::math::Time(1,1,2001) ; - cmf::math::Time arg8 = (cmf::math::Time) cmf::math::day ; - void *argp1 = 0 ; - int res1 = 0 ; - double val4 ; - int ecode4 = 0 ; - double val5 ; - int ecode5 = 0 ; - double val6 ; - int ecode6 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - PyObject * obj6 = 0 ; - PyObject * obj7 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "name",(char *) "position",(char *) "latitude",(char *) "longitude",(char *) "tz",(char *) "startTime",(char *) "timestep", NULL - }; - cmf::atmosphere::MeteoStation::ptr result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOOOO:MeteoStationList_add_station",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__atmosphere__MeteoStationList, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStationList_add_station" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStationList *""'"); - } - arg1 = reinterpret_cast< cmf::atmosphere::MeteoStationList * >(argp1); - { - std::string *ptr = (std::string *)0; - int res = SWIG_AsPtr_std_string(obj1, &ptr); - if (!SWIG_IsOK(res) || !ptr) { - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "MeteoStationList_add_station" "', argument " "2"" of type '" "std::string""'"); - } - arg2 = *ptr; - if (SWIG_IsNewObj(res)) delete ptr; - } - { - if (check_xy(obj2)) { - std::string res = convert_xyz_to_point(obj2,arg3); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - return NULL; - } - } - else if (PySequence_Check(obj2)) { - std::string res = convert_seq_to_point(obj2,arg3); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError, res.c_str()); - } - } else { - std::string res="<"; - res+=pyrepr(obj2); - res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - } - } - if (obj3) { - ecode4 = SWIG_AsVal_double(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "MeteoStationList_add_station" "', argument " "4"" of type '" "double""'"); - } - arg4 = static_cast< double >(val4); - } - if (obj4) { - ecode5 = SWIG_AsVal_double(obj4, &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "MeteoStationList_add_station" "', argument " "5"" of type '" "double""'"); - } - arg5 = static_cast< double >(val5); - } - if (obj5) { - ecode6 = SWIG_AsVal_double(obj5, &val6); - if (!SWIG_IsOK(ecode6)) { - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "MeteoStationList_add_station" "', argument " "6"" of type '" "double""'"); - } - arg6 = static_cast< double >(val6); - } - if (obj6) { - { - arg7 = convert_datetime_to_cmftime(obj6); - if (arg7 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } - } - } - if (obj7) { - { - arg8 = convert_datetime_to_cmftime(obj7); - if (arg8 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } - } - } - { - try { - result = (arg1)->add_station(arg2,arg3,arg4,arg5,arg6,arg7,arg8); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - std::shared_ptr< cmf::atmosphere::MeteoStation > *smartresult = result ? new std::shared_ptr< cmf::atmosphere::MeteoStation >(result) : 0; - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, SWIG_POINTER_OWN); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MeteoStationList_remove_station(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::atmosphere::MeteoStationList *arg1 = (cmf::atmosphere::MeteoStationList *) 0 ; - ptrdiff_t arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "index", NULL - }; - ptrdiff_t result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:MeteoStationList_remove_station",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__atmosphere__MeteoStationList, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStationList_remove_station" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStationList *""'"); - } - arg1 = reinterpret_cast< cmf::atmosphere::MeteoStationList * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MeteoStationList_remove_station" "', argument " "2"" of type '" "ptrdiff_t""'"); - } - arg2 = static_cast< ptrdiff_t >(val2); - { - try { - result = (arg1)->remove_station(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_ptrdiff_t(static_cast< ptrdiff_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_MeteoStationList__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) { - PyObject *resultobj = 0; - cmf::atmosphere::MeteoStationList *result = 0 ; - - if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; - { - try { - result = (cmf::atmosphere::MeteoStationList *)new cmf::atmosphere::MeteoStationList(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__atmosphere__MeteoStationList, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_MeteoStationList__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::atmosphere::MeteoStationList *arg1 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - cmf::atmosphere::MeteoStationList *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_cmf__atmosphere__MeteoStationList, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MeteoStationList" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStationList const &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MeteoStationList" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStationList const &""'"); - } - arg1 = reinterpret_cast< cmf::atmosphere::MeteoStationList * >(argp1); - { - try { - result = (cmf::atmosphere::MeteoStationList *)new cmf::atmosphere::MeteoStationList((cmf::atmosphere::MeteoStationList const &)*arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__atmosphere__MeteoStationList, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_MeteoStationList(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[2] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args,"new_MeteoStationList",0,1,argv))) SWIG_fail; - --argc; - { - unsigned long _index = 0; - SWIG_TypeRank _rank = 0; - if (argc == 0) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 1; - if (_rank == _rankm) goto dispatch; - } - } - if (argc == 1) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_cmf__atmosphere__MeteoStationList, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 2; - if (_rank == _rankm) goto dispatch; - } - } - check_2: - - dispatch: - switch(_index) { - case 1: - return _wrap_new_MeteoStationList__SWIG_0(self, argc, argv); - case 2: - return _wrap_new_MeteoStationList__SWIG_1(self, argc, argv); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_MeteoStationList'.\n" - " Possible C/C++ prototypes are:\n" - " cmf::atmosphere::MeteoStationList::MeteoStationList()\n" - " cmf::atmosphere::MeteoStationList::MeteoStationList(cmf::atmosphere::MeteoStationList const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_MeteoStationList_reference_to_nearest(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::atmosphere::MeteoStationList *arg1 = (cmf::atmosphere::MeteoStationList *) 0 ; - cmf::geometry::point *arg2 = 0 ; - double arg3 = (double) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - cmf::geometry::point p2 ; - double val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "position",(char *) "z_weight", NULL - }; - SwigValueWrapper< cmf::atmosphere::MeteoStationReference > result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:MeteoStationList_reference_to_nearest",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__atmosphere__MeteoStationList, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStationList_reference_to_nearest" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStationList const *""'"); - } - arg1 = reinterpret_cast< cmf::atmosphere::MeteoStationList * >(argp1); - { - if (SWIG_ConvertPtr(obj1, (void **) &arg2, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { - if (check_xy(obj1)) { - std::string res = convert_xyz_to_point(obj1,p2); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - return NULL; - } - } - else if (PySequence_Check(obj1)) { - std::string res = convert_seq_to_point(obj1,p2); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError, res.c_str()); - } - } else { - std::string res="<"; - res+=pyrepr(obj1); - res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - } - arg2 = &p2; - } - } - if (obj2) { - ecode3 = SWIG_AsVal_double(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MeteoStationList_reference_to_nearest" "', argument " "3"" of type '" "double""'"); - } - arg3 = static_cast< double >(val3); - } - { - try { - result = ((cmf::atmosphere::MeteoStationList const *)arg1)->reference_to_nearest((cmf::geometry::point const &)*arg2,arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj((new cmf::atmosphere::MeteoStationReference(static_cast< const cmf::atmosphere::MeteoStationReference& >(result))), SWIGTYPE_p_cmf__atmosphere__MeteoStationReference, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_MeteoStationList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::MeteoStationList *arg1 = (cmf::atmosphere::MeteoStationList *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__atmosphere__MeteoStationList, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MeteoStationList" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStationList *""'"); - } - arg1 = reinterpret_cast< cmf::atmosphere::MeteoStationList * >(argp1); - { - try { - delete arg1; - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *MeteoStationList_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__atmosphere__MeteoStationList, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *MeteoStationList_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_new_IDW_Meteorology__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::geometry::point *arg1 = 0 ; - cmf::atmosphere::MeteoStationList *arg2 = 0 ; - double arg3 ; - double arg4 ; - cmf::geometry::point p1 ; - void *argp2 = 0 ; - int res2 = 0 ; - double val3 ; - int ecode3 = 0 ; - double val4 ; - int ecode4 = 0 ; - cmf::atmosphere::IDW_Meteorology *result = 0 ; - - if ((nobjs < 4) || (nobjs > 4)) SWIG_fail; - { - if (SWIG_ConvertPtr(swig_obj[0], (void **) &arg1, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { - if (check_xy(swig_obj[0])) { - std::string res = convert_xyz_to_point(swig_obj[0],p1); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - return NULL; - } - } - else if (PySequence_Check(swig_obj[0])) { - std::string res = convert_seq_to_point(swig_obj[0],p1); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError, res.c_str()); - } - } else { - std::string res="<"; - res+=pyrepr(swig_obj[0]); - res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - } - arg1 = &p1; - } - } - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_cmf__atmosphere__MeteoStationList, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_IDW_Meteorology" "', argument " "2"" of type '" "cmf::atmosphere::MeteoStationList const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_IDW_Meteorology" "', argument " "2"" of type '" "cmf::atmosphere::MeteoStationList const &""'"); - } - arg2 = reinterpret_cast< cmf::atmosphere::MeteoStationList * >(argp2); - ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_IDW_Meteorology" "', argument " "3"" of type '" "double""'"); - } - arg3 = static_cast< double >(val3); - ecode4 = SWIG_AsVal_double(swig_obj[3], &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_IDW_Meteorology" "', argument " "4"" of type '" "double""'"); - } - arg4 = static_cast< double >(val4); - { - try { - result = (cmf::atmosphere::IDW_Meteorology *)new cmf::atmosphere::IDW_Meteorology((cmf::geometry::point const &)*arg1,(cmf::atmosphere::MeteoStationList const &)*arg2,arg3,arg4); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__atmosphere__IDW_Meteorology, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_IDW_Meteorology__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::atmosphere::IDW_Meteorology *arg1 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - cmf::atmosphere::IDW_Meteorology *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_cmf__atmosphere__IDW_Meteorology, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_IDW_Meteorology" "', argument " "1"" of type '" "cmf::atmosphere::IDW_Meteorology const &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_IDW_Meteorology" "', argument " "1"" of type '" "cmf::atmosphere::IDW_Meteorology const &""'"); - } - arg1 = reinterpret_cast< cmf::atmosphere::IDW_Meteorology * >(argp1); - { - try { - result = (cmf::atmosphere::IDW_Meteorology *)new cmf::atmosphere::IDW_Meteorology((cmf::atmosphere::IDW_Meteorology const &)*arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__atmosphere__IDW_Meteorology, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_IDW_Meteorology(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[5] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args,"new_IDW_Meteorology",0,4,argv))) SWIG_fail; - --argc; - { - unsigned long _index = 0; - SWIG_TypeRank _rank = 0; - if (argc == 1) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_cmf__atmosphere__IDW_Meteorology, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 1; - if (_rank == _rankm) goto dispatch; - } - } - check_1: - - if (argc == 4) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - { - cmf::geometry::point p; - _v=check_xy(argv[0]) || check_seq_point(argv[0]); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_cmf__atmosphere__MeteoStationList, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - int res = SWIG_AsVal_double(argv[2], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - int res = SWIG_AsVal_double(argv[3], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 2; - if (_rank == _rankm) goto dispatch; - } - } - check_2: - - dispatch: - switch(_index) { - case 1: - return _wrap_new_IDW_Meteorology__SWIG_1(self, argc, argv); - case 2: - return _wrap_new_IDW_Meteorology__SWIG_0(self, argc, argv); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_IDW_Meteorology'.\n" - " Possible C/C++ prototypes are:\n" - " cmf::atmosphere::IDW_Meteorology::IDW_Meteorology(cmf::geometry::point const &,cmf::atmosphere::MeteoStationList const &,double,double)\n" - " cmf::atmosphere::IDW_Meteorology::IDW_Meteorology(cmf::atmosphere::IDW_Meteorology const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_IDW_Meteorology_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::IDW_Meteorology *arg1 = (cmf::atmosphere::IDW_Meteorology *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::atmosphere::IDW_Meteorology *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__atmosphere__IDW_Meteorology, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDW_Meteorology_copy" "', argument " "1"" of type '" "cmf::atmosphere::IDW_Meteorology const *""'"); - } - arg1 = reinterpret_cast< cmf::atmosphere::IDW_Meteorology * >(argp1); - { - try { - result = (cmf::atmosphere::IDW_Meteorology *)((cmf::atmosphere::IDW_Meteorology const *)arg1)->copy(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__atmosphere__IDW_Meteorology, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_IDW_Meteorology(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::IDW_Meteorology *arg1 = (cmf::atmosphere::IDW_Meteorology *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__atmosphere__IDW_Meteorology, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IDW_Meteorology" "', argument " "1"" of type '" "cmf::atmosphere::IDW_Meteorology *""'"); - } - arg1 = reinterpret_cast< cmf::atmosphere::IDW_Meteorology * >(argp1); - { - try { - delete arg1; - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *IDW_Meteorology_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__atmosphere__IDW_Meteorology, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *IDW_Meteorology_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_aerodynamic_resistance_get_aerodynamic_resistance(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::atmosphere::aerodynamic_resistance *arg1 = (cmf::atmosphere::aerodynamic_resistance *) 0 ; - double *arg2 = 0 ; - double *arg3 = 0 ; - cmf::math::Time arg4 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "r_ag",(char *) "r_ac",(char *) "t", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO:aerodynamic_resistance_get_aerodynamic_resistance",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__atmosphere__aerodynamic_resistance, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "aerodynamic_resistance_get_aerodynamic_resistance" "', argument " "1"" of type '" "cmf::atmosphere::aerodynamic_resistance const *""'"); - } - arg1 = reinterpret_cast< cmf::atmosphere::aerodynamic_resistance * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_double, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "aerodynamic_resistance_get_aerodynamic_resistance" "', argument " "2"" of type '" "double &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "aerodynamic_resistance_get_aerodynamic_resistance" "', argument " "2"" of type '" "double &""'"); - } - arg2 = reinterpret_cast< double * >(argp2); - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_double, 0 ); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "aerodynamic_resistance_get_aerodynamic_resistance" "', argument " "3"" of type '" "double &""'"); - } - if (!argp3) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "aerodynamic_resistance_get_aerodynamic_resistance" "', argument " "3"" of type '" "double &""'"); - } - arg3 = reinterpret_cast< double * >(argp3); - { - arg4 = convert_datetime_to_cmftime(obj3); - if (arg4 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } - } - { - try { - ((cmf::atmosphere::aerodynamic_resistance const *)arg1)->get_aerodynamic_resistance(*arg2,*arg3,arg4); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_aerodynamic_resistance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::aerodynamic_resistance *arg1 = (cmf::atmosphere::aerodynamic_resistance *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__atmosphere__aerodynamic_resistance, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_aerodynamic_resistance" "', argument " "1"" of type '" "cmf::atmosphere::aerodynamic_resistance *""'"); - } - arg1 = reinterpret_cast< cmf::atmosphere::aerodynamic_resistance * >(argp1); - { - try { - delete arg1; - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *aerodynamic_resistance_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__atmosphere__aerodynamic_resistance, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *_wrap_RainSource___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::atmosphere::RainSource *arg1 = (cmf::atmosphere::RainSource *) 0 ; - cmf::math::Time arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::atmosphere::RainSource const > tempshared1 ; - std::shared_ptr< cmf::atmosphere::RainSource const > *smartarg1 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "t", NULL - }; - real result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:RainSource___call__",kwnames,&obj0,&obj1)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__RainSource_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RainSource___call__" "', argument " "1"" of type '" "cmf::atmosphere::RainSource const *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::atmosphere::RainSource > * >(argp1); - delete reinterpret_cast< std::shared_ptr< const cmf::atmosphere::RainSource > * >(argp1); - arg1 = const_cast< cmf::atmosphere::RainSource * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::atmosphere::RainSource > * >(argp1); - arg1 = const_cast< cmf::atmosphere::RainSource * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - arg2 = convert_datetime_to_cmftime(obj1); - if (arg2 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } - } - { - try { - result = (real)((cmf::atmosphere::RainSource const *)arg1)->operator ()(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_RainSource_get_intensity(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::atmosphere::RainSource *arg1 = (cmf::atmosphere::RainSource *) 0 ; - cmf::math::Time arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::atmosphere::RainSource const > tempshared1 ; - std::shared_ptr< cmf::atmosphere::RainSource const > *smartarg1 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "t", NULL - }; - real result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:RainSource_get_intensity",kwnames,&obj0,&obj1)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__RainSource_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RainSource_get_intensity" "', argument " "1"" of type '" "cmf::atmosphere::RainSource const *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::atmosphere::RainSource > * >(argp1); - delete reinterpret_cast< std::shared_ptr< const cmf::atmosphere::RainSource > * >(argp1); - arg1 = const_cast< cmf::atmosphere::RainSource * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::atmosphere::RainSource > * >(argp1); - arg1 = const_cast< cmf::atmosphere::RainSource * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - arg2 = convert_datetime_to_cmftime(obj1); - if (arg2 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } - } - { - try { - result = (real)((cmf::atmosphere::RainSource const *)arg1)->get_intensity(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_RainSource(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::RainSource *arg1 = (cmf::atmosphere::RainSource *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::atmosphere::RainSource > tempshared1 ; - std::shared_ptr< cmf::atmosphere::RainSource > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__RainSource_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_RainSource" "', argument " "1"" of type '" "cmf::atmosphere::RainSource *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::RainSource > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::RainSource > * >(argp1); - arg1 = const_cast< cmf::atmosphere::RainSource * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::RainSource > * >(argp1); - arg1 = const_cast< cmf::atmosphere::RainSource * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - try { - (void)arg1; delete smartarg1; - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *RainSource_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__RainSource_t, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *_wrap_ConstantRainSource_intensity_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::ConstantRainSource *arg1 = (cmf::atmosphere::ConstantRainSource *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::atmosphere::ConstantRainSource > tempshared1 ; - std::shared_ptr< cmf::atmosphere::ConstantRainSource > *smartarg1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"ConstantRainSource_intensity_set",2,2,swig_obj)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__ConstantRainSource_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ConstantRainSource_intensity_set" "', argument " "1"" of type '" "cmf::atmosphere::ConstantRainSource *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::ConstantRainSource > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::ConstantRainSource > * >(argp1); - arg1 = const_cast< cmf::atmosphere::ConstantRainSource * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::ConstantRainSource > * >(argp1); - arg1 = const_cast< cmf::atmosphere::ConstantRainSource * >((smartarg1 ? smartarg1->get() : 0)); - } - } - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ConstantRainSource_intensity_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->intensity = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ConstantRainSource_intensity_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::ConstantRainSource *arg1 = (cmf::atmosphere::ConstantRainSource *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::atmosphere::ConstantRainSource > tempshared1 ; - std::shared_ptr< cmf::atmosphere::ConstantRainSource > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__ConstantRainSource_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ConstantRainSource_intensity_get" "', argument " "1"" of type '" "cmf::atmosphere::ConstantRainSource *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::ConstantRainSource > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::ConstantRainSource > * >(argp1); - arg1 = const_cast< cmf::atmosphere::ConstantRainSource * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::ConstantRainSource > * >(argp1); - arg1 = const_cast< cmf::atmosphere::ConstantRainSource * >((smartarg1 ? smartarg1->get() : 0)); - } - } - result = (real) ((arg1)->intensity); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_ConstantRainSource(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::project *arg1 = 0 ; - cmf::geometry::point arg2 ; - real arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char * kwnames[] = { - (char *) "_project",(char *) "location",(char *) "_intensity", NULL - }; - cmf::atmosphere::ConstantRainSource *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:new_ConstantRainSource",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_cmf__project, 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ConstantRainSource" "', argument " "1"" of type '" "cmf::project &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConstantRainSource" "', argument " "1"" of type '" "cmf::project &""'"); - } - arg1 = reinterpret_cast< cmf::project * >(argp1); - { - if (check_xy(obj1)) { - std::string res = convert_xyz_to_point(obj1,arg2); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - return NULL; - } - } - else if (PySequence_Check(obj1)) { - std::string res = convert_seq_to_point(obj1,arg2); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError, res.c_str()); - } - } else { - std::string res="<"; - res+=pyrepr(obj1); - res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - } - } - ecode3 = SWIG_AsVal_double(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_ConstantRainSource" "', argument " "3"" of type '" "real""'"); - } - arg3 = static_cast< real >(val3); - { - try { - result = (cmf::atmosphere::ConstantRainSource *)new cmf::atmosphere::ConstantRainSource(*arg1,arg2,arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - std::shared_ptr< cmf::atmosphere::ConstantRainSource > *smartresult = result ? new std::shared_ptr< cmf::atmosphere::ConstantRainSource >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0; - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__ConstantRainSource_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ConstantRainSource_set_conc(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::atmosphere::ConstantRainSource *arg1 = (cmf::atmosphere::ConstantRainSource *) 0 ; - cmf::water::solute *arg2 = 0 ; - real arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::atmosphere::ConstantRainSource > tempshared1 ; - std::shared_ptr< cmf::atmosphere::ConstantRainSource > *smartarg1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - double val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "Solute",(char *) "value", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:ConstantRainSource_set_conc",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__ConstantRainSource_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ConstantRainSource_set_conc" "', argument " "1"" of type '" "cmf::atmosphere::ConstantRainSource *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::ConstantRainSource > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::ConstantRainSource > * >(argp1); - arg1 = const_cast< cmf::atmosphere::ConstantRainSource * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::ConstantRainSource > * >(argp1); - arg1 = const_cast< cmf::atmosphere::ConstantRainSource * >((smartarg1 ? smartarg1->get() : 0)); - } - } - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_cmf__water__solute, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ConstantRainSource_set_conc" "', argument " "2"" of type '" "cmf::water::solute const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ConstantRainSource_set_conc" "', argument " "2"" of type '" "cmf::water::solute const &""'"); - } - arg2 = reinterpret_cast< cmf::water::solute * >(argp2); - ecode3 = SWIG_AsVal_double(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ConstantRainSource_set_conc" "', argument " "3"" of type '" "real""'"); - } - arg3 = static_cast< real >(val3); - { - try { - (arg1)->set_conc((cmf::water::solute const &)*arg2,arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_ConstantRainSource(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::ConstantRainSource *arg1 = (cmf::atmosphere::ConstantRainSource *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::atmosphere::ConstantRainSource > tempshared1 ; - std::shared_ptr< cmf::atmosphere::ConstantRainSource > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__ConstantRainSource_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ConstantRainSource" "', argument " "1"" of type '" "cmf::atmosphere::ConstantRainSource *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::ConstantRainSource > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::ConstantRainSource > * >(argp1); - arg1 = const_cast< cmf::atmosphere::ConstantRainSource * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::ConstantRainSource > * >(argp1); - arg1 = const_cast< cmf::atmosphere::ConstantRainSource * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - try { - (void)arg1; delete smartarg1; - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *ConstantRainSource_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__ConstantRainSource_t, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *ConstantRainSource_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_TimeseriesRainSource_data_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::TimeseriesRainSource *arg1 = (cmf::atmosphere::TimeseriesRainSource *) 0 ; - cmf::math::timeseries *arg2 = (cmf::math::timeseries *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::atmosphere::TimeseriesRainSource > tempshared1 ; - std::shared_ptr< cmf::atmosphere::TimeseriesRainSource > *smartarg1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"TimeseriesRainSource_data_set",2,2,swig_obj)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__TimeseriesRainSource_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TimeseriesRainSource_data_set" "', argument " "1"" of type '" "cmf::atmosphere::TimeseriesRainSource *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::TimeseriesRainSource > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::TimeseriesRainSource > * >(argp1); - arg1 = const_cast< cmf::atmosphere::TimeseriesRainSource * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::TimeseriesRainSource > * >(argp1); - arg1 = const_cast< cmf::atmosphere::TimeseriesRainSource * >((smartarg1 ? smartarg1->get() : 0)); - } - } - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TimeseriesRainSource_data_set" "', argument " "2"" of type '" "cmf::math::timeseries *""'"); - } - arg2 = reinterpret_cast< cmf::math::timeseries * >(argp2); - if (arg1) (arg1)->data = *arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_TimeseriesRainSource_data_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::TimeseriesRainSource *arg1 = (cmf::atmosphere::TimeseriesRainSource *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::atmosphere::TimeseriesRainSource > tempshared1 ; - std::shared_ptr< cmf::atmosphere::TimeseriesRainSource > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - cmf::math::timeseries *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__TimeseriesRainSource_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TimeseriesRainSource_data_get" "', argument " "1"" of type '" "cmf::atmosphere::TimeseriesRainSource *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::TimeseriesRainSource > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::TimeseriesRainSource > * >(argp1); - arg1 = const_cast< cmf::atmosphere::TimeseriesRainSource * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::TimeseriesRainSource > * >(argp1); - arg1 = const_cast< cmf::atmosphere::TimeseriesRainSource * >((smartarg1 ? smartarg1->get() : 0)); - } - } - result = (cmf::math::timeseries *)& ((arg1)->data); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_TimeseriesRainSource_concentrations_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::TimeseriesRainSource *arg1 = (cmf::atmosphere::TimeseriesRainSource *) 0 ; - cmf::water::SoluteTimeseries *arg2 = (cmf::water::SoluteTimeseries *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::atmosphere::TimeseriesRainSource > tempshared1 ; - std::shared_ptr< cmf::atmosphere::TimeseriesRainSource > *smartarg1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"TimeseriesRainSource_concentrations_set",2,2,swig_obj)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__TimeseriesRainSource_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TimeseriesRainSource_concentrations_set" "', argument " "1"" of type '" "cmf::atmosphere::TimeseriesRainSource *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::TimeseriesRainSource > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::TimeseriesRainSource > * >(argp1); - arg1 = const_cast< cmf::atmosphere::TimeseriesRainSource * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::TimeseriesRainSource > * >(argp1); - arg1 = const_cast< cmf::atmosphere::TimeseriesRainSource * >((smartarg1 ? smartarg1->get() : 0)); - } - } - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_cmf__water__SoluteTimeseries, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TimeseriesRainSource_concentrations_set" "', argument " "2"" of type '" "cmf::water::SoluteTimeseries *""'"); - } - arg2 = reinterpret_cast< cmf::water::SoluteTimeseries * >(argp2); - if (arg1) (arg1)->concentrations = *arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_TimeseriesRainSource_concentrations_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::TimeseriesRainSource *arg1 = (cmf::atmosphere::TimeseriesRainSource *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::atmosphere::TimeseriesRainSource > tempshared1 ; - std::shared_ptr< cmf::atmosphere::TimeseriesRainSource > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - cmf::water::SoluteTimeseries *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__TimeseriesRainSource_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TimeseriesRainSource_concentrations_get" "', argument " "1"" of type '" "cmf::atmosphere::TimeseriesRainSource *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::TimeseriesRainSource > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::TimeseriesRainSource > * >(argp1); - arg1 = const_cast< cmf::atmosphere::TimeseriesRainSource * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::TimeseriesRainSource > * >(argp1); - arg1 = const_cast< cmf::atmosphere::TimeseriesRainSource * >((smartarg1 ? smartarg1->get() : 0)); - } - } - result = (cmf::water::SoluteTimeseries *)& ((arg1)->concentrations); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__water__SoluteTimeseries, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_TimeseriesRainSource(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::TimeseriesRainSource *arg1 = (cmf::atmosphere::TimeseriesRainSource *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::atmosphere::TimeseriesRainSource > tempshared1 ; - std::shared_ptr< cmf::atmosphere::TimeseriesRainSource > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__TimeseriesRainSource_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_TimeseriesRainSource" "', argument " "1"" of type '" "cmf::atmosphere::TimeseriesRainSource *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::TimeseriesRainSource > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::TimeseriesRainSource > * >(argp1); - arg1 = const_cast< cmf::atmosphere::TimeseriesRainSource * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::TimeseriesRainSource > * >(argp1); - arg1 = const_cast< cmf::atmosphere::TimeseriesRainSource * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - try { - (void)arg1; delete smartarg1; - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *TimeseriesRainSource_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__TimeseriesRainSource_t, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *_wrap_RainfallStation_Location_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::RainfallStation *arg1 = (cmf::atmosphere::RainfallStation *) 0 ; - cmf::geometry::point *arg2 = (cmf::geometry::point *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::atmosphere::RainfallStation > tempshared1 ; - std::shared_ptr< cmf::atmosphere::RainfallStation > *smartarg1 = 0 ; - cmf::geometry::point p2 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"RainfallStation_Location_set",2,2,swig_obj)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__RainfallStation_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RainfallStation_Location_set" "', argument " "1"" of type '" "cmf::atmosphere::RainfallStation *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::RainfallStation > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::RainfallStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::RainfallStation * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::RainfallStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::RainfallStation * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - if (SWIG_ConvertPtr(swig_obj[1], (void **) &arg2, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { - if (check_xy(swig_obj[1])) { - std::string res = convert_xyz_to_point(swig_obj[1],p2); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - return NULL; - } - } - else if (PySequence_Check(swig_obj[1])) { - std::string res = convert_seq_to_point(swig_obj[1],p2); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError, res.c_str()); - } - } else { - std::string res="<"; - res+=pyrepr(swig_obj[1]); - res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - } - arg2 = &p2; - } - } - if (arg1) (arg1)->Location = *arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_RainfallStation_Location_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::RainfallStation *arg1 = (cmf::atmosphere::RainfallStation *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::atmosphere::RainfallStation > tempshared1 ; - std::shared_ptr< cmf::atmosphere::RainfallStation > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - cmf::geometry::point *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__RainfallStation_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RainfallStation_Location_get" "', argument " "1"" of type '" "cmf::atmosphere::RainfallStation *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::RainfallStation > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::RainfallStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::RainfallStation * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::RainfallStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::RainfallStation * >((smartarg1 ? smartarg1->get() : 0)); - } - } - result = (cmf::geometry::point *)& ((arg1)->Location); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__geometry__point, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_RainfallStation_create(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - size_t arg1 ; - std::string arg2 ; - cmf::math::timeseries arg3 ; - cmf::geometry::point arg4 ; - size_t val1 ; - int ecode1 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - char * kwnames[] = { - (char *) "Id",(char *) "Name",(char *) "Data",(char *) "position", NULL - }; - cmf::atmosphere::RainfallStation::ptr result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO:RainfallStation_create",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - ecode1 = SWIG_AsVal_size_t(obj0, &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "RainfallStation_create" "', argument " "1"" of type '" "size_t""'"); - } - arg1 = static_cast< size_t >(val1); - { - std::string *ptr = (std::string *)0; - int res = SWIG_AsPtr_std_string(obj1, &ptr); - if (!SWIG_IsOK(res) || !ptr) { - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "RainfallStation_create" "', argument " "2"" of type '" "std::string""'"); - } - arg2 = *ptr; - if (SWIG_IsNewObj(res)) delete ptr; - } - { - cmf::math::timeseries *p_ts = &arg3; - int res=SWIG_ConvertPtr(obj2,(void**)(&p_ts),SWIGTYPE_p_cmf__math__timeseries,0); - if (!(SWIG_IsOK(res)) || p_ts==0) { - if (PyNumber_Check(obj2)) { - double scalar = PyFloat_AsDouble(obj2); - arg3 = cmf::math::timeseries::from_scalar(scalar); - } else { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.timeseries object"); - } - } else { - arg3 = *p_ts; - } - } - { - if (check_xy(obj3)) { - std::string res = convert_xyz_to_point(obj3,arg4); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - return NULL; - } - } - else if (PySequence_Check(obj3)) { - std::string res = convert_seq_to_point(obj3,arg4); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError, res.c_str()); - } - } else { - std::string res="<"; - res+=pyrepr(obj3); - res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - } - } - { - try { - result = cmf::atmosphere::RainfallStation::create(arg1,arg2,arg3,arg4); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - std::shared_ptr< cmf::atmosphere::RainfallStation > *smartresult = result ? new std::shared_ptr< cmf::atmosphere::RainfallStation >(result) : 0; - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__RainfallStation_t, SWIG_POINTER_OWN); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_RainfallStation_id_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::RainfallStation *arg1 = (cmf::atmosphere::RainfallStation *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::atmosphere::RainfallStation > tempshared1 ; - std::shared_ptr< cmf::atmosphere::RainfallStation > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - size_t result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__RainfallStation_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RainfallStation_id_get" "', argument " "1"" of type '" "cmf::atmosphere::RainfallStation *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::RainfallStation > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::RainfallStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::RainfallStation * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::RainfallStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::RainfallStation * >((smartarg1 ? smartarg1->get() : 0)); - } - } - result = (size_t) ((arg1)->id); - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_RainfallStation_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::RainfallStation *arg1 = (cmf::atmosphere::RainfallStation *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::atmosphere::RainfallStation > tempshared1 ; - std::shared_ptr< cmf::atmosphere::RainfallStation > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - std::string *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__RainfallStation_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RainfallStation_name_get" "', argument " "1"" of type '" "cmf::atmosphere::RainfallStation *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::RainfallStation > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::RainfallStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::RainfallStation * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::RainfallStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::RainfallStation * >((smartarg1 ? smartarg1->get() : 0)); - } - } - result = (std::string *) & ((arg1)->name); - resultobj = SWIG_From_std_string(static_cast< std::string >(*result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_RainfallStation_data_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::RainfallStation *arg1 = (cmf::atmosphere::RainfallStation *) 0 ; - cmf::math::timeseries *arg2 = (cmf::math::timeseries *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::atmosphere::RainfallStation > tempshared1 ; - std::shared_ptr< cmf::atmosphere::RainfallStation > *smartarg1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"RainfallStation_data_set",2,2,swig_obj)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__RainfallStation_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RainfallStation_data_set" "', argument " "1"" of type '" "cmf::atmosphere::RainfallStation *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::RainfallStation > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::RainfallStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::RainfallStation * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::RainfallStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::RainfallStation * >((smartarg1 ? smartarg1->get() : 0)); - } - } - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "RainfallStation_data_set" "', argument " "2"" of type '" "cmf::math::timeseries *""'"); - } - arg2 = reinterpret_cast< cmf::math::timeseries * >(argp2); - if (arg1) (arg1)->data = *arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_RainfallStation_data_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::RainfallStation *arg1 = (cmf::atmosphere::RainfallStation *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::atmosphere::RainfallStation > tempshared1 ; - std::shared_ptr< cmf::atmosphere::RainfallStation > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - cmf::math::timeseries *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__RainfallStation_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RainfallStation_data_get" "', argument " "1"" of type '" "cmf::atmosphere::RainfallStation *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::RainfallStation > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::RainfallStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::RainfallStation * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::RainfallStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::RainfallStation * >((smartarg1 ? smartarg1->get() : 0)); - } - } - result = (cmf::math::timeseries *)& ((arg1)->data); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_RainfallStation___repr__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::RainfallStation *arg1 = (cmf::atmosphere::RainfallStation *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::atmosphere::RainfallStation const > tempshared1 ; - std::shared_ptr< cmf::atmosphere::RainfallStation const > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - std::string result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__RainfallStation_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RainfallStation___repr__" "', argument " "1"" of type '" "cmf::atmosphere::RainfallStation const *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::atmosphere::RainfallStation > * >(argp1); - delete reinterpret_cast< std::shared_ptr< const cmf::atmosphere::RainfallStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::RainfallStation * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::atmosphere::RainfallStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::RainfallStation * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - try { - result = ((cmf::atmosphere::RainfallStation const *)arg1)->tostring(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_std_string(static_cast< std::string >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_RainfallStation_concentration_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::RainfallStation *arg1 = (cmf::atmosphere::RainfallStation *) 0 ; - cmf::water::SoluteTimeseries *arg2 = (cmf::water::SoluteTimeseries *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::atmosphere::RainfallStation > tempshared1 ; - std::shared_ptr< cmf::atmosphere::RainfallStation > *smartarg1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"RainfallStation_concentration_set",2,2,swig_obj)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__RainfallStation_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RainfallStation_concentration_set" "', argument " "1"" of type '" "cmf::atmosphere::RainfallStation *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::RainfallStation > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::RainfallStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::RainfallStation * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::RainfallStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::RainfallStation * >((smartarg1 ? smartarg1->get() : 0)); - } - } - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_cmf__water__SoluteTimeseries, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "RainfallStation_concentration_set" "', argument " "2"" of type '" "cmf::water::SoluteTimeseries *""'"); - } - arg2 = reinterpret_cast< cmf::water::SoluteTimeseries * >(argp2); - if (arg1) (arg1)->concentration = *arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_RainfallStation_concentration_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::RainfallStation *arg1 = (cmf::atmosphere::RainfallStation *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::atmosphere::RainfallStation > tempshared1 ; - std::shared_ptr< cmf::atmosphere::RainfallStation > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - cmf::water::SoluteTimeseries *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__RainfallStation_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RainfallStation_concentration_get" "', argument " "1"" of type '" "cmf::atmosphere::RainfallStation *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::RainfallStation > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::RainfallStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::RainfallStation * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::RainfallStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::RainfallStation * >((smartarg1 ? smartarg1->get() : 0)); - } - } - result = (cmf::water::SoluteTimeseries *)& ((arg1)->concentration); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__water__SoluteTimeseries, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_RainfallStation_use_for_cell(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::atmosphere::RainfallStation *arg1 = (cmf::atmosphere::RainfallStation *) 0 ; - cmf::upslope::Cell *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::atmosphere::RainfallStation > tempshared1 ; - std::shared_ptr< cmf::atmosphere::RainfallStation > *smartarg1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "c", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:RainfallStation_use_for_cell",kwnames,&obj0,&obj1)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__RainfallStation_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RainfallStation_use_for_cell" "', argument " "1"" of type '" "cmf::atmosphere::RainfallStation *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::RainfallStation > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::RainfallStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::RainfallStation * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::RainfallStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::RainfallStation * >((smartarg1 ? smartarg1->get() : 0)); - } - } - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_cmf__upslope__Cell, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "RainfallStation_use_for_cell" "', argument " "2"" of type '" "cmf::upslope::Cell &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "RainfallStation_use_for_cell" "', argument " "2"" of type '" "cmf::upslope::Cell &""'"); - } - arg2 = reinterpret_cast< cmf::upslope::Cell * >(argp2); - { - try { - (arg1)->use_for_cell(*arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_RainfallStation(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::atmosphere::RainfallStation *arg1 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::atmosphere::RainfallStation const > tempshared1 ; - PyObject * obj0 = 0 ; - char * kwnames[] = { - (char *) "copy", NULL - }; - cmf::atmosphere::RainfallStation *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:new_RainfallStation",kwnames,&obj0)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__RainfallStation_t, 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_RainfallStation" "', argument " "1"" of type '" "cmf::atmosphere::RainfallStation const &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_RainfallStation" "', argument " "1"" of type '" "cmf::atmosphere::RainfallStation const &""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::atmosphere::RainfallStation > * >(argp1); - delete reinterpret_cast< std::shared_ptr< const cmf::atmosphere::RainfallStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::RainfallStation * >(tempshared1.get()); - } else { - arg1 = const_cast< cmf::atmosphere::RainfallStation * >(reinterpret_cast< std::shared_ptr< const cmf::atmosphere::RainfallStation > * >(argp1)->get()); - } - } - { - try { - result = (cmf::atmosphere::RainfallStation *)new cmf::atmosphere::RainfallStation((cmf::atmosphere::RainfallStation const &)*arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - std::shared_ptr< cmf::atmosphere::RainfallStation > *smartresult = result ? new std::shared_ptr< cmf::atmosphere::RainfallStation >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0; - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__RainfallStation_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_RainfallStation___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::atmosphere::RainfallStation *arg1 = (cmf::atmosphere::RainfallStation *) 0 ; - cmf::math::Time arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::atmosphere::RainfallStation const > tempshared1 ; - std::shared_ptr< cmf::atmosphere::RainfallStation const > *smartarg1 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "t", NULL - }; - double result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:RainfallStation___call__",kwnames,&obj0,&obj1)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__RainfallStation_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RainfallStation___call__" "', argument " "1"" of type '" "cmf::atmosphere::RainfallStation const *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::atmosphere::RainfallStation > * >(argp1); - delete reinterpret_cast< std::shared_ptr< const cmf::atmosphere::RainfallStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::RainfallStation * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::atmosphere::RainfallStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::RainfallStation * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - arg2 = convert_datetime_to_cmftime(obj1); - if (arg2 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } - } - { - try { - result = (double)cmf_atmosphere_RainfallStation___call__((cmf::atmosphere::RainfallStation const *)arg1,arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_RainfallStation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::RainfallStation *arg1 = (cmf::atmosphere::RainfallStation *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::atmosphere::RainfallStation > tempshared1 ; - std::shared_ptr< cmf::atmosphere::RainfallStation > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__RainfallStation_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_RainfallStation" "', argument " "1"" of type '" "cmf::atmosphere::RainfallStation *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::RainfallStation > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::RainfallStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::RainfallStation * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::RainfallStation > * >(argp1); - arg1 = const_cast< cmf::atmosphere::RainfallStation * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - try { - (void)arg1; delete smartarg1; - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *RainfallStation_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__RainfallStation_t, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *RainfallStation_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_RainfallStationList___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::RainfallStationList *arg1 = (cmf::atmosphere::RainfallStationList *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - size_t result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__atmosphere__RainfallStationList, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RainfallStationList___len__" "', argument " "1"" of type '" "cmf::atmosphere::RainfallStationList const *""'"); - } - arg1 = reinterpret_cast< cmf::atmosphere::RainfallStationList * >(argp1); - { - try { - result = ((cmf::atmosphere::RainfallStationList const *)arg1)->size(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_RainfallStationList___getitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::atmosphere::RainfallStationList *arg1 = (cmf::atmosphere::RainfallStationList *) 0 ; - ptrdiff_t arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - cmf::atmosphere::RainfallStation::ptr result; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__atmosphere__RainfallStationList, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RainfallStationList___getitem__" "', argument " "1"" of type '" "cmf::atmosphere::RainfallStationList *""'"); - } - arg1 = reinterpret_cast< cmf::atmosphere::RainfallStationList * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RainfallStationList___getitem__" "', argument " "2"" of type '" "ptrdiff_t""'"); - } - arg2 = static_cast< ptrdiff_t >(val2); - { - try { - result = (arg1)->operator [](arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - std::shared_ptr< cmf::atmosphere::RainfallStation > *smartresult = result ? new std::shared_ptr< cmf::atmosphere::RainfallStation >(result) : 0; - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__RainfallStation_t, SWIG_POINTER_OWN); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_RainfallStationList___getitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::atmosphere::RainfallStationList *arg1 = (cmf::atmosphere::RainfallStationList *) 0 ; - ptrdiff_t arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - cmf::atmosphere::RainfallStation::ptr result; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__atmosphere__RainfallStationList, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RainfallStationList___getitem__" "', argument " "1"" of type '" "cmf::atmosphere::RainfallStationList const *""'"); - } - arg1 = reinterpret_cast< cmf::atmosphere::RainfallStationList * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RainfallStationList___getitem__" "', argument " "2"" of type '" "ptrdiff_t""'"); - } - arg2 = static_cast< ptrdiff_t >(val2); - { - try { - result = ((cmf::atmosphere::RainfallStationList const *)arg1)->operator [](arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - std::shared_ptr< cmf::atmosphere::RainfallStation > *smartresult = result ? new std::shared_ptr< cmf::atmosphere::RainfallStation >(result) : 0; - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__RainfallStation_t, SWIG_POINTER_OWN); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_RainfallStationList___getitem__(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args,"RainfallStationList___getitem__",0,2,argv))) SWIG_fail; - --argc; - { - unsigned long _index = 0; - SWIG_TypeRank _rank = 0; - if (argc == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__atmosphere__RainfallStationList, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 1; - if (_rank == _rankm) goto dispatch; - } - } - check_1: - - if (argc == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__atmosphere__RainfallStationList, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 2; - if (_rank == _rankm) goto dispatch; - } - } - check_2: - - dispatch: - switch(_index) { - case 1: - return _wrap_RainfallStationList___getitem____SWIG_0(self, argc, argv); - case 2: - return _wrap_RainfallStationList___getitem____SWIG_1(self, argc, argv); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'RainfallStationList___getitem__'.\n" - " Possible C/C++ prototypes are:\n" - " cmf::atmosphere::RainfallStationList::operator [](ptrdiff_t)\n" - " cmf::atmosphere::RainfallStationList::operator [](ptrdiff_t) const\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_RainfallStationList_add(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::atmosphere::RainfallStationList *arg1 = (cmf::atmosphere::RainfallStationList *) 0 ; - std::string arg2 ; - cmf::math::timeseries arg3 ; - cmf::geometry::point arg4 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "Name",(char *) "Data",(char *) "Position", NULL - }; - cmf::atmosphere::RainfallStation::ptr result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO:RainfallStationList_add",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__atmosphere__RainfallStationList, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RainfallStationList_add" "', argument " "1"" of type '" "cmf::atmosphere::RainfallStationList *""'"); - } - arg1 = reinterpret_cast< cmf::atmosphere::RainfallStationList * >(argp1); - { - std::string *ptr = (std::string *)0; - int res = SWIG_AsPtr_std_string(obj1, &ptr); - if (!SWIG_IsOK(res) || !ptr) { - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "RainfallStationList_add" "', argument " "2"" of type '" "std::string""'"); - } - arg2 = *ptr; - if (SWIG_IsNewObj(res)) delete ptr; - } - { - cmf::math::timeseries *p_ts = &arg3; - int res=SWIG_ConvertPtr(obj2,(void**)(&p_ts),SWIGTYPE_p_cmf__math__timeseries,0); - if (!(SWIG_IsOK(res)) || p_ts==0) { - if (PyNumber_Check(obj2)) { - double scalar = PyFloat_AsDouble(obj2); - arg3 = cmf::math::timeseries::from_scalar(scalar); - } else { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.timeseries object"); - } - } else { - arg3 = *p_ts; - } - } - { - if (check_xy(obj3)) { - std::string res = convert_xyz_to_point(obj3,arg4); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - return NULL; - } - } - else if (PySequence_Check(obj3)) { - std::string res = convert_seq_to_point(obj3,arg4); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError, res.c_str()); - } - } else { - std::string res="<"; - res+=pyrepr(obj3); - res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - } - } - { - try { - result = (arg1)->add(arg2,arg3,arg4); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - std::shared_ptr< cmf::atmosphere::RainfallStation > *smartresult = result ? new std::shared_ptr< cmf::atmosphere::RainfallStation >(result) : 0; - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__RainfallStation_t, SWIG_POINTER_OWN); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_RainfallStationList_remove(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::atmosphere::RainfallStationList *arg1 = (cmf::atmosphere::RainfallStationList *) 0 ; - ptrdiff_t arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "index", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:RainfallStationList_remove",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__atmosphere__RainfallStationList, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RainfallStationList_remove" "', argument " "1"" of type '" "cmf::atmosphere::RainfallStationList *""'"); - } - arg1 = reinterpret_cast< cmf::atmosphere::RainfallStationList * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RainfallStationList_remove" "', argument " "2"" of type '" "ptrdiff_t""'"); - } - arg2 = static_cast< ptrdiff_t >(val2); - { - try { - (arg1)->remove(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_RainfallStationList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::RainfallStationList *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args,"new_RainfallStationList",0,0,0)) SWIG_fail; - { - try { - result = (cmf::atmosphere::RainfallStationList *)new cmf::atmosphere::RainfallStationList(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__atmosphere__RainfallStationList, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_RainfallStationList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::RainfallStationList *arg1 = (cmf::atmosphere::RainfallStationList *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__atmosphere__RainfallStationList, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_RainfallStationList" "', argument " "1"" of type '" "cmf::atmosphere::RainfallStationList *""'"); - } - arg1 = reinterpret_cast< cmf::atmosphere::RainfallStationList * >(argp1); - { - try { - delete arg1; - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *RainfallStationList_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__atmosphere__RainfallStationList, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *RainfallStationList_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_RainfallStationReference_from_nearest_station(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::project *arg1 = 0 ; - cmf::geometry::point arg2 ; - double arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char * kwnames[] = { - (char *) "project",(char *) "position",(char *) "z_weight", NULL - }; - cmf::atmosphere::RainfallStationReference::ptr result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:RainfallStationReference_from_nearest_station",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_cmf__project, 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RainfallStationReference_from_nearest_station" "', argument " "1"" of type '" "cmf::project &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "RainfallStationReference_from_nearest_station" "', argument " "1"" of type '" "cmf::project &""'"); - } - arg1 = reinterpret_cast< cmf::project * >(argp1); - { - if (check_xy(obj1)) { - std::string res = convert_xyz_to_point(obj1,arg2); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - return NULL; - } - } - else if (PySequence_Check(obj1)) { - std::string res = convert_seq_to_point(obj1,arg2); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError, res.c_str()); - } - } else { - std::string res="<"; - res+=pyrepr(obj1); - res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - } - } - ecode3 = SWIG_AsVal_double(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RainfallStationReference_from_nearest_station" "', argument " "3"" of type '" "double""'"); - } - arg3 = static_cast< double >(val3); - { - try { - result = cmf::atmosphere::RainfallStationReference::from_nearest_station(*arg1,arg2,arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - std::shared_ptr< cmf::atmosphere::RainfallStationReference > *smartresult = result ? new std::shared_ptr< cmf::atmosphere::RainfallStationReference >(result) : 0; - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__RainfallStationReference_t, SWIG_POINTER_OWN); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_RainfallStationReference_from_station_id(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::project *arg1 = 0 ; - cmf::geometry::point arg2 ; - size_t arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - size_t val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char * kwnames[] = { - (char *) "project",(char *) "position",(char *) "id", NULL - }; - cmf::atmosphere::RainfallStationReference::ptr result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:RainfallStationReference_from_station_id",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_cmf__project, 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RainfallStationReference_from_station_id" "', argument " "1"" of type '" "cmf::project &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "RainfallStationReference_from_station_id" "', argument " "1"" of type '" "cmf::project &""'"); - } - arg1 = reinterpret_cast< cmf::project * >(argp1); - { - if (check_xy(obj1)) { - std::string res = convert_xyz_to_point(obj1,arg2); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - return NULL; - } - } - else if (PySequence_Check(obj1)) { - std::string res = convert_seq_to_point(obj1,arg2); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError, res.c_str()); - } - } else { - std::string res="<"; - res+=pyrepr(obj1); - res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - } - } - ecode3 = SWIG_AsVal_size_t(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RainfallStationReference_from_station_id" "', argument " "3"" of type '" "size_t""'"); - } - arg3 = static_cast< size_t >(val3); - { - try { - result = cmf::atmosphere::RainfallStationReference::from_station_id(*arg1,arg2,arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - std::shared_ptr< cmf::atmosphere::RainfallStationReference > *smartresult = result ? new std::shared_ptr< cmf::atmosphere::RainfallStationReference >(result) : 0; - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__RainfallStationReference_t, SWIG_POINTER_OWN); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_RainfallStationReference(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::RainfallStationReference *arg1 = (cmf::atmosphere::RainfallStationReference *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::atmosphere::RainfallStationReference > tempshared1 ; - std::shared_ptr< cmf::atmosphere::RainfallStationReference > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__RainfallStationReference_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_RainfallStationReference" "', argument " "1"" of type '" "cmf::atmosphere::RainfallStationReference *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::RainfallStationReference > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::RainfallStationReference > * >(argp1); - arg1 = const_cast< cmf::atmosphere::RainfallStationReference * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::RainfallStationReference > * >(argp1); - arg1 = const_cast< cmf::atmosphere::RainfallStationReference * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - try { - (void)arg1; delete smartarg1; - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *RainfallStationReference_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__RainfallStationReference_t, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *_wrap_IDWRainfall_create(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::project *arg1 = 0 ; - cmf::geometry::point arg2 ; - double arg3 ; - double arg4 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val3 ; - int ecode3 = 0 ; - double val4 ; - int ecode4 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - char * kwnames[] = { - (char *) "project",(char *) "position",(char *) "z_weight",(char *) "power", NULL - }; - cmf::atmosphere::RainSource::ptr result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO:IDWRainfall_create",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_cmf__project, 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDWRainfall_create" "', argument " "1"" of type '" "cmf::project &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IDWRainfall_create" "', argument " "1"" of type '" "cmf::project &""'"); - } - arg1 = reinterpret_cast< cmf::project * >(argp1); - { - if (check_xy(obj1)) { - std::string res = convert_xyz_to_point(obj1,arg2); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - return NULL; - } - } - else if (PySequence_Check(obj1)) { - std::string res = convert_seq_to_point(obj1,arg2); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError, res.c_str()); - } - } else { - std::string res="<"; - res+=pyrepr(obj1); - res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - } - } - ecode3 = SWIG_AsVal_double(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IDWRainfall_create" "', argument " "3"" of type '" "double""'"); - } - arg3 = static_cast< double >(val3); - ecode4 = SWIG_AsVal_double(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IDWRainfall_create" "', argument " "4"" of type '" "double""'"); - } - arg4 = static_cast< double >(val4); - { - try { - result = cmf::atmosphere::IDWRainfall::create(*arg1,arg2,arg3,arg4); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - std::shared_ptr< cmf::atmosphere::RainSource > *smartresult = result ? new std::shared_ptr< cmf::atmosphere::RainSource >(result) : 0; - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__RainSource_t, SWIG_POINTER_OWN); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_IDWRainfall(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::IDWRainfall *arg1 = (cmf::atmosphere::IDWRainfall *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::atmosphere::IDWRainfall > tempshared1 ; - std::shared_ptr< cmf::atmosphere::IDWRainfall > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__IDWRainfall_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IDWRainfall" "', argument " "1"" of type '" "cmf::atmosphere::IDWRainfall *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::IDWRainfall > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::IDWRainfall > * >(argp1); - arg1 = const_cast< cmf::atmosphere::IDWRainfall * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::IDWRainfall > * >(argp1); - arg1 = const_cast< cmf::atmosphere::IDWRainfall * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - try { - (void)arg1; delete smartarg1; - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *IDWRainfall_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__IDWRainfall_t, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *_wrap_Vegetation_LAI_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::vegetation::Vegetation *arg1 = (cmf::upslope::vegetation::Vegetation *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"Vegetation_LAI_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__vegetation__Vegetation, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vegetation_LAI_set" "', argument " "1"" of type '" "cmf::upslope::vegetation::Vegetation *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::vegetation::Vegetation * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vegetation_LAI_set" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - if (arg1) (arg1)->LAI = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Vegetation_LAI_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::vegetation::Vegetation *arg1 = (cmf::upslope::vegetation::Vegetation *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - double result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__vegetation__Vegetation, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vegetation_LAI_get" "', argument " "1"" of type '" "cmf::upslope::vegetation::Vegetation *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::vegetation::Vegetation * >(argp1); - result = (double) ((arg1)->LAI); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Vegetation_Height_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::vegetation::Vegetation *arg1 = (cmf::upslope::vegetation::Vegetation *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"Vegetation_Height_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__vegetation__Vegetation, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vegetation_Height_set" "', argument " "1"" of type '" "cmf::upslope::vegetation::Vegetation *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::vegetation::Vegetation * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vegetation_Height_set" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - if (arg1) (arg1)->Height = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Vegetation_Height_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::vegetation::Vegetation *arg1 = (cmf::upslope::vegetation::Vegetation *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - double result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__vegetation__Vegetation, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vegetation_Height_get" "', argument " "1"" of type '" "cmf::upslope::vegetation::Vegetation *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::vegetation::Vegetation * >(argp1); - result = (double) ((arg1)->Height); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Vegetation_albedo_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::vegetation::Vegetation *arg1 = (cmf::upslope::vegetation::Vegetation *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"Vegetation_albedo_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__vegetation__Vegetation, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vegetation_albedo_set" "', argument " "1"" of type '" "cmf::upslope::vegetation::Vegetation *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::vegetation::Vegetation * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vegetation_albedo_set" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - if (arg1) (arg1)->albedo = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Vegetation_albedo_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::vegetation::Vegetation *arg1 = (cmf::upslope::vegetation::Vegetation *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - double result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__vegetation__Vegetation, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vegetation_albedo_get" "', argument " "1"" of type '" "cmf::upslope::vegetation::Vegetation *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::vegetation::Vegetation * >(argp1); - result = (double) ((arg1)->albedo); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Vegetation_snow_albedo_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::vegetation::Vegetation *arg1 = (cmf::upslope::vegetation::Vegetation *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"Vegetation_snow_albedo_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__vegetation__Vegetation, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vegetation_snow_albedo_set" "', argument " "1"" of type '" "cmf::upslope::vegetation::Vegetation *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::vegetation::Vegetation * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vegetation_snow_albedo_set" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - if (arg1) (arg1)->snow_albedo = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Vegetation_snow_albedo_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::vegetation::Vegetation *arg1 = (cmf::upslope::vegetation::Vegetation *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - double result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__vegetation__Vegetation, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vegetation_snow_albedo_get" "', argument " "1"" of type '" "cmf::upslope::vegetation::Vegetation *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::vegetation::Vegetation * >(argp1); - result = (double) ((arg1)->snow_albedo); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Vegetation_CanopyCapacityPerLAI_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::vegetation::Vegetation *arg1 = (cmf::upslope::vegetation::Vegetation *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"Vegetation_CanopyCapacityPerLAI_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__vegetation__Vegetation, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vegetation_CanopyCapacityPerLAI_set" "', argument " "1"" of type '" "cmf::upslope::vegetation::Vegetation *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::vegetation::Vegetation * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vegetation_CanopyCapacityPerLAI_set" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - if (arg1) (arg1)->CanopyCapacityPerLAI = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Vegetation_CanopyCapacityPerLAI_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::vegetation::Vegetation *arg1 = (cmf::upslope::vegetation::Vegetation *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - double result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__vegetation__Vegetation, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vegetation_CanopyCapacityPerLAI_get" "', argument " "1"" of type '" "cmf::upslope::vegetation::Vegetation *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::vegetation::Vegetation * >(argp1); - result = (double) ((arg1)->CanopyCapacityPerLAI); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Vegetation_RootDepth_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::vegetation::Vegetation *arg1 = (cmf::upslope::vegetation::Vegetation *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"Vegetation_RootDepth_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__vegetation__Vegetation, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vegetation_RootDepth_set" "', argument " "1"" of type '" "cmf::upslope::vegetation::Vegetation *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::vegetation::Vegetation * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vegetation_RootDepth_set" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - if (arg1) (arg1)->RootDepth = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Vegetation_RootDepth_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::vegetation::Vegetation *arg1 = (cmf::upslope::vegetation::Vegetation *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - double result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__vegetation__Vegetation, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vegetation_RootDepth_get" "', argument " "1"" of type '" "cmf::upslope::vegetation::Vegetation *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::vegetation::Vegetation * >(argp1); - result = (double) ((arg1)->RootDepth); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Vegetation_RootContent_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::vegetation::Vegetation *arg1 = (cmf::upslope::vegetation::Vegetation *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"Vegetation_RootContent_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__vegetation__Vegetation, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vegetation_RootContent_set" "', argument " "1"" of type '" "cmf::upslope::vegetation::Vegetation *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::vegetation::Vegetation * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vegetation_RootContent_set" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - if (arg1) (arg1)->RootContent = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Vegetation_RootContent_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::vegetation::Vegetation *arg1 = (cmf::upslope::vegetation::Vegetation *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - double result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__vegetation__Vegetation, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vegetation_RootContent_get" "', argument " "1"" of type '" "cmf::upslope::vegetation::Vegetation *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::vegetation::Vegetation * >(argp1); - result = (double) ((arg1)->RootContent); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Vegetation_fraction_at_rootdepth_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::vegetation::Vegetation *arg1 = (cmf::upslope::vegetation::Vegetation *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"Vegetation_fraction_at_rootdepth_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__vegetation__Vegetation, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vegetation_fraction_at_rootdepth_set" "', argument " "1"" of type '" "cmf::upslope::vegetation::Vegetation *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::vegetation::Vegetation * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vegetation_fraction_at_rootdepth_set" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - if (arg1) (arg1)->fraction_at_rootdepth = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Vegetation_fraction_at_rootdepth_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::vegetation::Vegetation *arg1 = (cmf::upslope::vegetation::Vegetation *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - double result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__vegetation__Vegetation, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vegetation_fraction_at_rootdepth_get" "', argument " "1"" of type '" "cmf::upslope::vegetation::Vegetation *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::vegetation::Vegetation * >(argp1); - result = (double) ((arg1)->fraction_at_rootdepth); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Vegetation_StomatalResistance_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::vegetation::Vegetation *arg1 = (cmf::upslope::vegetation::Vegetation *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"Vegetation_StomatalResistance_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__vegetation__Vegetation, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vegetation_StomatalResistance_set" "', argument " "1"" of type '" "cmf::upslope::vegetation::Vegetation *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::vegetation::Vegetation * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vegetation_StomatalResistance_set" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - if (arg1) (arg1)->StomatalResistance = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Vegetation_StomatalResistance_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::vegetation::Vegetation *arg1 = (cmf::upslope::vegetation::Vegetation *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - double result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__vegetation__Vegetation, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vegetation_StomatalResistance_get" "', argument " "1"" of type '" "cmf::upslope::vegetation::Vegetation *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::vegetation::Vegetation * >(argp1); - result = (double) ((arg1)->StomatalResistance); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Vegetation_CanopyClosure_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::vegetation::Vegetation *arg1 = (cmf::upslope::vegetation::Vegetation *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"Vegetation_CanopyClosure_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__vegetation__Vegetation, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vegetation_CanopyClosure_set" "', argument " "1"" of type '" "cmf::upslope::vegetation::Vegetation *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::vegetation::Vegetation * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vegetation_CanopyClosure_set" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - if (arg1) (arg1)->CanopyClosure = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Vegetation_CanopyClosure_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::vegetation::Vegetation *arg1 = (cmf::upslope::vegetation::Vegetation *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - double result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__vegetation__Vegetation, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vegetation_CanopyClosure_get" "', argument " "1"" of type '" "cmf::upslope::vegetation::Vegetation *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::vegetation::Vegetation * >(argp1); - result = (double) ((arg1)->CanopyClosure); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Vegetation_CanopyPARExtinction_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::vegetation::Vegetation *arg1 = (cmf::upslope::vegetation::Vegetation *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"Vegetation_CanopyPARExtinction_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__vegetation__Vegetation, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vegetation_CanopyPARExtinction_set" "', argument " "1"" of type '" "cmf::upslope::vegetation::Vegetation *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::vegetation::Vegetation * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vegetation_CanopyPARExtinction_set" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - if (arg1) (arg1)->CanopyPARExtinction = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Vegetation_CanopyPARExtinction_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::vegetation::Vegetation *arg1 = (cmf::upslope::vegetation::Vegetation *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - double result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__vegetation__Vegetation, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vegetation_CanopyPARExtinction_get" "', argument " "1"" of type '" "cmf::upslope::vegetation::Vegetation *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::vegetation::Vegetation * >(argp1); - result = (double) ((arg1)->CanopyPARExtinction); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Vegetation_LeafWidth_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::vegetation::Vegetation *arg1 = (cmf::upslope::vegetation::Vegetation *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"Vegetation_LeafWidth_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__vegetation__Vegetation, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vegetation_LeafWidth_set" "', argument " "1"" of type '" "cmf::upslope::vegetation::Vegetation *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::vegetation::Vegetation * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vegetation_LeafWidth_set" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - if (arg1) (arg1)->LeafWidth = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Vegetation_LeafWidth_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::vegetation::Vegetation *arg1 = (cmf::upslope::vegetation::Vegetation *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - double result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__vegetation__Vegetation, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vegetation_LeafWidth_get" "', argument " "1"" of type '" "cmf::upslope::vegetation::Vegetation *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::vegetation::Vegetation * >(argp1); - result = (double) ((arg1)->LeafWidth); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Vegetation_RootLength(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::vegetation::Vegetation *arg1 = (cmf::upslope::vegetation::Vegetation *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - double result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__vegetation__Vegetation, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vegetation_RootLength" "', argument " "1"" of type '" "cmf::upslope::vegetation::Vegetation const *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::vegetation::Vegetation * >(argp1); - { - try { - result = (double)((cmf::upslope::vegetation::Vegetation const *)arg1)->RootLength(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Vegetation_RootFraction__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::upslope::vegetation::Vegetation *arg1 = (cmf::upslope::vegetation::Vegetation *) 0 ; - double arg2 ; - double arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - double val3 ; - int ecode3 = 0 ; - double result; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__vegetation__Vegetation, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vegetation_RootFraction" "', argument " "1"" of type '" "cmf::upslope::vegetation::Vegetation const *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::vegetation::Vegetation * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vegetation_RootFraction" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Vegetation_RootFraction" "', argument " "3"" of type '" "double""'"); - } - arg3 = static_cast< double >(val3); - { - try { - result = (double)((cmf::upslope::vegetation::Vegetation const *)arg1)->RootFraction(arg2,arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Vegetation_RootFraction__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::upslope::vegetation::Vegetation *arg1 = (cmf::upslope::vegetation::Vegetation *) 0 ; - cmf::math::num_array *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - cmf::math::num_array result; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__vegetation__Vegetation, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vegetation_RootFraction" "', argument " "1"" of type '" "cmf::upslope::vegetation::Vegetation const *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::vegetation::Vegetation * >(argp1); - { - // Convert a array_wrapper from numpy array - double * data=0; - ptrdiff_t size = from_npy_array(swig_obj[1],&data); - if (!data) { - SWIG_exception_fail(SWIG_TypeError,"Input data is not 'array-like' (in the sense of numpy arrays)"); - return NULL; - } - arg2 = new cmf::math::num_array(size,data); - } - { - try { - result = ((cmf::upslope::vegetation::Vegetation const *)arg1)->RootFraction((cmf::math::num_array const &)*arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - resultobj = as_npy_array(result); - } - { - delete arg2; - } - return resultobj; -fail: - { - delete arg2; - } - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Vegetation_RootFraction(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[4] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args,"Vegetation_RootFraction",0,3,argv))) SWIG_fail; - --argc; - { - unsigned long _index = 0; - SWIG_TypeRank _rank = 0; - if (argc == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__upslope__vegetation__Vegetation, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - _v = test_npy_array(argv[1]); - } - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 1; - if (_rank == _rankm) goto dispatch; - } - } - check_1: - - if (argc == 3) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__upslope__vegetation__Vegetation, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - int res = SWIG_AsVal_double(argv[2], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 2; - if (_rank == _rankm) goto dispatch; - } - } - check_2: - - dispatch: - switch(_index) { - case 1: - return _wrap_Vegetation_RootFraction__SWIG_1(self, argc, argv); - case 2: - return _wrap_Vegetation_RootFraction__SWIG_0(self, argc, argv); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'Vegetation_RootFraction'.\n" - " Possible C/C++ prototypes are:\n" - " cmf::upslope::vegetation::Vegetation::RootFraction(double,double) const\n" - " cmf::upslope::vegetation::Vegetation::RootFraction(cmf::math::num_array const &) const\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_new_Vegetation(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - double arg1 = (double) 2.88 ; - double arg2 = (double) 0.12 ; - double arg3 = (double) 0.25 ; - double arg4 = (double) 100 ; - double arg5 = (double) 0.23 ; - double arg6 = (double) 1 ; - double arg7 = (double) 0.1 ; - double arg8 = (double) 1.0 ; - double val1 ; - int ecode1 = 0 ; - double val2 ; - int ecode2 = 0 ; - double val3 ; - int ecode3 = 0 ; - double val4 ; - int ecode4 = 0 ; - double val5 ; - int ecode5 = 0 ; - double val6 ; - int ecode6 = 0 ; - double val7 ; - int ecode7 = 0 ; - double val8 ; - int ecode8 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - PyObject * obj6 = 0 ; - PyObject * obj7 = 0 ; - char * kwnames[] = { - (char *) "_LAI",(char *) "_Height",(char *) "_RootDepth",(char *) "_StomatalResistance",(char *) "_albedo",(char *) "_CanopyClosure",(char *) "_CanopyCapacityPerLAI",(char *) "_fraction_at_rootdepth", NULL - }; - cmf::upslope::vegetation::Vegetation *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|OOOOOOOO:new_Vegetation",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail; - if (obj0) { - ecode1 = SWIG_AsVal_double(obj0, &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vegetation" "', argument " "1"" of type '" "double""'"); - } - arg1 = static_cast< double >(val1); - } - if (obj1) { - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Vegetation" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - } - if (obj2) { - ecode3 = SWIG_AsVal_double(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Vegetation" "', argument " "3"" of type '" "double""'"); - } - arg3 = static_cast< double >(val3); - } - if (obj3) { - ecode4 = SWIG_AsVal_double(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_Vegetation" "', argument " "4"" of type '" "double""'"); - } - arg4 = static_cast< double >(val4); - } - if (obj4) { - ecode5 = SWIG_AsVal_double(obj4, &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_Vegetation" "', argument " "5"" of type '" "double""'"); - } - arg5 = static_cast< double >(val5); - } - if (obj5) { - ecode6 = SWIG_AsVal_double(obj5, &val6); - if (!SWIG_IsOK(ecode6)) { - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_Vegetation" "', argument " "6"" of type '" "double""'"); - } - arg6 = static_cast< double >(val6); - } - if (obj6) { - ecode7 = SWIG_AsVal_double(obj6, &val7); - if (!SWIG_IsOK(ecode7)) { - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_Vegetation" "', argument " "7"" of type '" "double""'"); - } - arg7 = static_cast< double >(val7); - } - if (obj7) { - ecode8 = SWIG_AsVal_double(obj7, &val8); - if (!SWIG_IsOK(ecode8)) { - SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_Vegetation" "', argument " "8"" of type '" "double""'"); - } - arg8 = static_cast< double >(val8); - } - { - try { - result = (cmf::upslope::vegetation::Vegetation *)new cmf::upslope::vegetation::Vegetation(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__vegetation__Vegetation, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Vegetation___repr__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::vegetation::Vegetation *arg1 = (cmf::upslope::vegetation::Vegetation *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::string result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__vegetation__Vegetation, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vegetation___repr__" "', argument " "1"" of type '" "cmf::upslope::vegetation::Vegetation *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::vegetation::Vegetation * >(argp1); - { - try { - result = cmf_upslope_vegetation_Vegetation___repr__(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_std_string(static_cast< std::string >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_Vegetation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::vegetation::Vegetation *arg1 = (cmf::upslope::vegetation::Vegetation *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__vegetation__Vegetation, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vegetation" "', argument " "1"" of type '" "cmf::upslope::vegetation::Vegetation *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::vegetation::Vegetation * >(argp1); - { - try { - delete arg1; - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *Vegetation_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__vegetation__Vegetation, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *Vegetation_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_new_CellConnector(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::connectorfunction arg1 = (cmf::upslope::connectorfunction) 0 ; - PyObject * obj0 = 0 ; - char * kwnames[] = { - (char *) "connector", NULL - }; - cmf::upslope::CellConnector *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:new_CellConnector",kwnames,&obj0)) SWIG_fail; - { - int res = SWIG_ConvertFunctionPtr(obj0, (void**)(&arg1), SWIGTYPE_p_f_r_cmf__upslope__Cell_r_cmf__upslope__Cell_ptrdiff_t__void); - if (!SWIG_IsOK(res)) { - SWIG_exception_fail(SWIG_ArgError(res), "in method '" "new_CellConnector" "', argument " "1"" of type '" "cmf::upslope::connectorfunction""'"); - } - } - { - try { - result = (cmf::upslope::CellConnector *)new cmf::upslope::CellConnector(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__CellConnector, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_CellConnector___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::CellConnector *arg1 = (cmf::upslope::CellConnector *) 0 ; - cmf::upslope::Cell *arg2 = 0 ; - cmf::upslope::Cell *arg3 = 0 ; - ptrdiff_t arg4 = (ptrdiff_t) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - ptrdiff_t val4 ; - int ecode4 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "cell1",(char *) "cell2",(char *) "start_at_layer", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|O:CellConnector___call__",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__CellConnector, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CellConnector___call__" "', argument " "1"" of type '" "cmf::upslope::CellConnector const *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::CellConnector * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_cmf__upslope__Cell, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CellConnector___call__" "', argument " "2"" of type '" "cmf::upslope::Cell &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CellConnector___call__" "', argument " "2"" of type '" "cmf::upslope::Cell &""'"); - } - arg2 = reinterpret_cast< cmf::upslope::Cell * >(argp2); - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_cmf__upslope__Cell, 0 ); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CellConnector___call__" "', argument " "3"" of type '" "cmf::upslope::Cell &""'"); - } - if (!argp3) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CellConnector___call__" "', argument " "3"" of type '" "cmf::upslope::Cell &""'"); - } - arg3 = reinterpret_cast< cmf::upslope::Cell * >(argp3); - if (obj3) { - ecode4 = SWIG_AsVal_ptrdiff_t(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CellConnector___call__" "', argument " "4"" of type '" "ptrdiff_t""'"); - } - arg4 = static_cast< ptrdiff_t >(val4); - } - { - try { - ((cmf::upslope::CellConnector const *)arg1)->operator ()(*arg2,*arg3,arg4); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_CellConnector_connect(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::CellConnector *arg1 = (cmf::upslope::CellConnector *) 0 ; - cmf::upslope::Cell *arg2 = 0 ; - cmf::upslope::Cell *arg3 = 0 ; - ptrdiff_t arg4 = (ptrdiff_t) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - ptrdiff_t val4 ; - int ecode4 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "cell1",(char *) "cell2",(char *) "start_at_layer", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|O:CellConnector_connect",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__CellConnector, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CellConnector_connect" "', argument " "1"" of type '" "cmf::upslope::CellConnector const *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::CellConnector * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_cmf__upslope__Cell, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CellConnector_connect" "', argument " "2"" of type '" "cmf::upslope::Cell &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CellConnector_connect" "', argument " "2"" of type '" "cmf::upslope::Cell &""'"); - } - arg2 = reinterpret_cast< cmf::upslope::Cell * >(argp2); - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_cmf__upslope__Cell, 0 ); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CellConnector_connect" "', argument " "3"" of type '" "cmf::upslope::Cell &""'"); - } - if (!argp3) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CellConnector_connect" "', argument " "3"" of type '" "cmf::upslope::Cell &""'"); - } - arg3 = reinterpret_cast< cmf::upslope::Cell * >(argp3); - if (obj3) { - ecode4 = SWIG_AsVal_ptrdiff_t(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CellConnector_connect" "', argument " "4"" of type '" "ptrdiff_t""'"); - } - arg4 = static_cast< ptrdiff_t >(val4); - } - { - try { - ((cmf::upslope::CellConnector const *)arg1)->connect(*arg2,*arg3,arg4); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_CellConnector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::CellConnector *arg1 = (cmf::upslope::CellConnector *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__CellConnector, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CellConnector" "', argument " "1"" of type '" "cmf::upslope::CellConnector *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::CellConnector * >(argp1); - { - try { - delete arg1; - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *CellConnector_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__CellConnector, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *CellConnector_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_Cell_x_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"Cell_x_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_x_set" "', argument " "1"" of type '" "cmf::upslope::Cell *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Cell_x_set" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - if (arg1) (arg1)->x = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Cell_x_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - double result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_x_get" "', argument " "1"" of type '" "cmf::upslope::Cell *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); - result = (double) ((arg1)->x); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Cell_y_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"Cell_y_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_y_set" "', argument " "1"" of type '" "cmf::upslope::Cell *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Cell_y_set" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - if (arg1) (arg1)->y = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Cell_y_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - double result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_y_get" "', argument " "1"" of type '" "cmf::upslope::Cell *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); - result = (double) ((arg1)->y); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Cell_z_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"Cell_z_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_z_set" "', argument " "1"" of type '" "cmf::upslope::Cell *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Cell_z_set" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - if (arg1) (arg1)->z = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Cell_z_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - double result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_z_get" "', argument " "1"" of type '" "cmf::upslope::Cell *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); - result = (double) ((arg1)->z); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Cell_get_position(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::geometry::point result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_get_position" "', argument " "1"" of type '" "cmf::upslope::Cell const *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); - { - try { - result = ((cmf::upslope::Cell const *)arg1)->get_position(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj((new cmf::geometry::point(static_cast< const cmf::geometry::point& >(result))), SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Cell_m3_to_mm(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "volume", NULL - }; - double result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Cell_m3_to_mm",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_m3_to_mm" "', argument " "1"" of type '" "cmf::upslope::Cell const *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Cell_m3_to_mm" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - { - try { - result = (double)((cmf::upslope::Cell const *)arg1)->m3_to_mm(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Cell_mm_to_m3(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "depth", NULL - }; - double result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Cell_mm_to_m3",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_mm_to_m3" "', argument " "1"" of type '" "cmf::upslope::Cell const *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Cell_mm_to_m3" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - { - try { - result = (double)((cmf::upslope::Cell const *)arg1)->mm_to_m3(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Cell_InvalidateSatDepth(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_InvalidateSatDepth" "', argument " "1"" of type '" "cmf::upslope::Cell const *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); - { - try { - ((cmf::upslope::Cell const *)arg1)->InvalidateSatDepth(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Cell_vegetation_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; - cmf::upslope::vegetation::Vegetation *arg2 = (cmf::upslope::vegetation::Vegetation *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"Cell_vegetation_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_vegetation_set" "', argument " "1"" of type '" "cmf::upslope::Cell *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_cmf__upslope__vegetation__Vegetation, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Cell_vegetation_set" "', argument " "2"" of type '" "cmf::upslope::vegetation::Vegetation *""'"); - } - arg2 = reinterpret_cast< cmf::upslope::vegetation::Vegetation * >(argp2); - if (arg1) (arg1)->vegetation = *arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Cell_vegetation_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::upslope::vegetation::Vegetation *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_vegetation_get" "', argument " "1"" of type '" "cmf::upslope::Cell *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); - result = (cmf::upslope::vegetation::Vegetation *)& ((arg1)->vegetation); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__vegetation__Vegetation, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Cell_set_aerodynamic_resistance(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; - SwigValueWrapper< std::shared_ptr< cmf::atmosphere::aerodynamic_resistance > > arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "Ra", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Cell_set_aerodynamic_resistance",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_set_aerodynamic_resistance" "', argument " "1"" of type '" "cmf::upslope::Cell *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); - { - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__aerodynamic_resistance_t, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Cell_set_aerodynamic_resistance" "', argument " "2"" of type '" "cmf::atmosphere::aerodynamic_resistance::ptr""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Cell_set_aerodynamic_resistance" "', argument " "2"" of type '" "cmf::atmosphere::aerodynamic_resistance::ptr""'"); - } else { - cmf::atmosphere::aerodynamic_resistance::ptr * temp = reinterpret_cast< cmf::atmosphere::aerodynamic_resistance::ptr * >(argp2); - arg2 = *temp; - if (SWIG_IsNewObj(res2)) delete temp; - } - } - { - try { - (arg1)->set_aerodynamic_resistance(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Cell_set_weather(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; - cmf::atmosphere::Weather *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "weather", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Cell_set_weather",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_set_weather" "', argument " "1"" of type '" "cmf::upslope::Cell *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_cmf__atmosphere__Weather, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Cell_set_weather" "', argument " "2"" of type '" "cmf::atmosphere::Weather const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Cell_set_weather" "', argument " "2"" of type '" "cmf::atmosphere::Weather const &""'"); - } - arg2 = reinterpret_cast< cmf::atmosphere::Weather * >(argp2); - { - try { - (arg1)->set_weather((cmf::atmosphere::Weather const &)*arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Cell_set_rainfall(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "rainfall", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Cell_set_rainfall",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_set_rainfall" "', argument " "1"" of type '" "cmf::upslope::Cell *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Cell_set_rainfall" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - { - try { - (arg1)->set_rainfall(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Cell_get_rainfall(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; - cmf::math::Time arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "t", NULL - }; - double result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Cell_get_rainfall",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_get_rainfall" "', argument " "1"" of type '" "cmf::upslope::Cell const *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); - { - arg2 = convert_datetime_to_cmftime(obj1); - if (arg2 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } - } - { - try { - result = (double)((cmf::upslope::Cell const *)arg1)->get_rainfall(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Cell___set_rain_source(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; - cmf::atmosphere::RainSource::ptr arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "new_source", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Cell___set_rain_source",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell___set_rain_source" "', argument " "1"" of type '" "cmf::upslope::Cell *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); - { - int newmem = 0; - res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__RainSource_t, 0 , &newmem); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Cell___set_rain_source" "', argument " "2"" of type '" "cmf::atmosphere::RainSource::ptr""'"); - } - if (argp2) arg2 = *(reinterpret_cast< cmf::atmosphere::RainSource::ptr * >(argp2)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::atmosphere::RainSource::ptr * >(argp2); - } - { - try { - (arg1)->set_rain_source(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Cell___get_rain_source(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::atmosphere::RainSource::ptr result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell___get_rain_source" "', argument " "1"" of type '" "cmf::upslope::Cell *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); - { - try { - result = (arg1)->get_rain_source(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - if (!(result)) resultobj = SWIG_NewPointerObj(0,SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, SWIG_POINTER_OWN); - int dcast = 0; - /*@SWIG:C:\Apps\swigwin-3.0.12\Lib\typemaps\swigmacros.swg,200,%formacro@*//*@SWIG:C:\Apps\swigwin-3.0.12\Lib\typemaps\swigmacros.swg,192,%_formacro_1@*//*@SWIG:cmf\cmf_core_src\cmf_swiglib.i,74,%_node_down_cast@*/ - if (dcast==0 && result) /*check for cmf::atmosphere::RainfallStationReference::ptr*/ { - std::shared_ptr output = std::dynamic_pointer_cast(result); - if (output) /*flux_node is cmf::atmosphere::RainfallStationReference::ptr */ { - dcast=1; - resultobj = SWIG_NewPointerObj(new std::shared_ptr(output),SWIGTYPE_p_std__shared_ptrT_std__shared_ptrT_cmf__atmosphere__RainfallStationReference_t_t, SWIG_POINTER_OWN); - } - } - /*@SWIG@*/ - - /*@SWIG:C:\Apps\swigwin-3.0.12\Lib\typemaps\swigmacros.swg,192,%_formacro_1@*//*@SWIG:cmf\cmf_core_src\cmf_swiglib.i,74,%_node_down_cast@*/ - if (dcast==0 && result) /*check for cmf::atmosphere::ConstantRainSource::ptr*/ { - std::shared_ptr output = std::dynamic_pointer_cast(result); - if (output) /*flux_node is cmf::atmosphere::ConstantRainSource::ptr */ { - dcast=1; - resultobj = SWIG_NewPointerObj(new std::shared_ptr(output),SWIGTYPE_p_std__shared_ptrT_std__shared_ptrT_cmf__atmosphere__ConstantRainSource_t_t, SWIG_POINTER_OWN); - } - } - /*@SWIG@*/ - - /*@SWIG:C:\Apps\swigwin-3.0.12\Lib\typemaps\swigmacros.swg,192,%_formacro_1@*//*@SWIG:cmf\cmf_core_src\cmf_swiglib.i,74,%_node_down_cast@*/ - if (dcast==0 && result) /*check for cmf::atmosphere::IDWRainfall*/ { - std::shared_ptr output = std::dynamic_pointer_cast(result); - if (output) /*flux_node is cmf::atmosphere::IDWRainfall */ { - dcast=1; - resultobj = SWIG_NewPointerObj(new std::shared_ptr(output),SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__IDWRainfall_t, SWIG_POINTER_OWN); - } - } - /*@SWIG@*/ - - - - /*@SWIG@*/ - - /*@SWIG@*/ - - /*@SWIG@*//*@SWIG@*/ - if (!dcast) resultobj = SWIG_NewPointerObj(new std::shared_ptr(result),SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, SWIG_POINTER_OWN); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Cell_set_uptakestress(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; - cmf::upslope::ET::RootUptakeStessFunction *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "stressfunction", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Cell_set_uptakestress",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_set_uptakestress" "', argument " "1"" of type '" "cmf::upslope::Cell *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_cmf__upslope__ET__RootUptakeStessFunction, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Cell_set_uptakestress" "', argument " "2"" of type '" "cmf::upslope::ET::RootUptakeStessFunction const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Cell_set_uptakestress" "', argument " "2"" of type '" "cmf::upslope::ET::RootUptakeStessFunction const &""'"); - } - arg2 = reinterpret_cast< cmf::upslope::ET::RootUptakeStessFunction * >(argp2); - { - try { - (arg1)->set_uptakestress((cmf::upslope::ET::RootUptakeStessFunction const &)*arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Cell___get_evaporation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::water::flux_node::ptr result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell___get_evaporation" "', argument " "1"" of type '" "cmf::upslope::Cell *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); - { - try { - result = (arg1)->get_evaporation(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - std::shared_ptr< cmf::water::flux_node > *smartresult = result ? new std::shared_ptr< cmf::water::flux_node >(result) : 0; - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, SWIG_POINTER_OWN); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Cell___get_transpiration(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::water::flux_node::ptr result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell___get_transpiration" "', argument " "1"" of type '" "cmf::upslope::Cell *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); - { - try { - result = (arg1)->get_transpiration(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - std::shared_ptr< cmf::water::flux_node > *smartresult = result ? new std::shared_ptr< cmf::water::flux_node >(result) : 0; - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, SWIG_POINTER_OWN); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Cell_get_surfacewater(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::water::flux_node::ptr result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_get_surfacewater" "', argument " "1"" of type '" "cmf::upslope::Cell *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); - { - try { - result = (arg1)->get_surfacewater(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - if (!(result)) resultobj = SWIG_NewPointerObj(0,SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, SWIG_POINTER_OWN); - int dcast = 0; - /*@SWIG:C:\Apps\swigwin-3.0.12\Lib\typemaps\swigmacros.swg,200,%formacro@*//*@SWIG:C:\Apps\swigwin-3.0.12\Lib\typemaps\swigmacros.swg,192,%_formacro_1@*//*@SWIG:cmf\cmf_core_src\cmf_swiglib.i,74,%_node_down_cast@*/ - if (dcast==0 && result) /*check for cmf::upslope::SurfaceWater*/ { - std::shared_ptr output = std::dynamic_pointer_cast(result); - if (output) /*flux_node is cmf::upslope::SurfaceWater */ { - dcast=1; - resultobj = SWIG_NewPointerObj(new std::shared_ptr(output),SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SurfaceWater_t, SWIG_POINTER_OWN); - } - } - /*@SWIG@*/ - - /*@SWIG:C:\Apps\swigwin-3.0.12\Lib\typemaps\swigmacros.swg,192,%_formacro_1@*//*@SWIG:cmf\cmf_core_src\cmf_swiglib.i,74,%_node_down_cast@*/ - if (dcast==0 && result) /*check for cmf::water::DirichletBoundary*/ { - std::shared_ptr output = std::dynamic_pointer_cast(result); - if (output) /*flux_node is cmf::water::DirichletBoundary */ { - dcast=1; - resultobj = SWIG_NewPointerObj(new std::shared_ptr(output),SWIGTYPE_p_std__shared_ptrT_cmf__water__DirichletBoundary_t, SWIG_POINTER_OWN); - } - } - /*@SWIG@*/ - - - - /*@SWIG@*/ - - /*@SWIG@*//*@SWIG@*/ - if (!dcast) resultobj = SWIG_NewPointerObj(new std::shared_ptr(result),SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, SWIG_POINTER_OWN); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Cell_surfacewater_as_storage(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_surfacewater_as_storage" "', argument " "1"" of type '" "cmf::upslope::Cell *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); - { - try { - (arg1)->surfacewater_as_storage(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Cell_add_storage__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; - std::string arg2 ; - char arg3 = (char) 'N' ; - bool arg4 = (bool) false ; - void *argp1 = 0 ; - int res1 = 0 ; - char val3 ; - int ecode3 = 0 ; - bool val4 ; - int ecode4 = 0 ; - cmf::water::WaterStorage::ptr result; - - if ((nobjs < 2) || (nobjs > 4)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_add_storage" "', argument " "1"" of type '" "cmf::upslope::Cell *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); - { - std::string *ptr = (std::string *)0; - int res = SWIG_AsPtr_std_string(swig_obj[1], &ptr); - if (!SWIG_IsOK(res) || !ptr) { - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "Cell_add_storage" "', argument " "2"" of type '" "std::string""'"); - } - arg2 = *ptr; - if (SWIG_IsNewObj(res)) delete ptr; - } - if (swig_obj[2]) { - ecode3 = SWIG_AsVal_char(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Cell_add_storage" "', argument " "3"" of type '" "char""'"); - } - arg3 = static_cast< char >(val3); - } - if (swig_obj[3]) { - ecode4 = SWIG_AsVal_bool(swig_obj[3], &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Cell_add_storage" "', argument " "4"" of type '" "bool""'"); - } - arg4 = static_cast< bool >(val4); - } - { - try { - result = (arg1)->add_storage(arg2,arg3,arg4); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - std::shared_ptr< cmf::water::WaterStorage > *smartresult = result ? new std::shared_ptr< cmf::water::WaterStorage >(result) : 0; - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, SWIG_POINTER_OWN); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Cell_add_storage__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; - cmf::water::WaterStorage::ptr arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 ; - int res2 = 0 ; - ptrdiff_t result; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_add_storage" "', argument " "1"" of type '" "cmf::upslope::Cell *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); - { - int newmem = 0; - res2 = SWIG_ConvertPtrAndOwn(swig_obj[1], &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0 , &newmem); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Cell_add_storage" "', argument " "2"" of type '" "cmf::water::WaterStorage::ptr""'"); - } - if (argp2) arg2 = *(reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp2)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp2); - } - { - try { - result = (arg1)->add_storage(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_ptrdiff_t(static_cast< ptrdiff_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Cell_add_storage(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[5] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args,"Cell_add_storage",0,4,argv))) SWIG_fail; - --argc; - { - unsigned long _index = 0; - SWIG_TypeRank _rank = 0; - if (argc == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__upslope__Cell, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 1; - if (_rank == _rankm) goto dispatch; - } - } - check_1: - - if ((argc >= 2) && (argc <= 4)) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__upslope__Cell, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0)); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (argc > 2) { - { - { - int res = SWIG_AsVal_char(argv[2], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (argc > 3) { - { - { - int res = SWIG_AsVal_bool(argv[3], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - } - } - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 2; - if (_rank == _rankm) goto dispatch; - } - } - check_2: - - dispatch: - switch(_index) { - case 1: - return _wrap_Cell_add_storage__SWIG_1(self, argc, argv); - case 2: - return _wrap_Cell_add_storage__SWIG_0(self, argc, argv); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'Cell_add_storage'.\n" - " Possible C/C++ prototypes are:\n" - " cmf::upslope::Cell::add_storage(std::string,char,bool)\n" - " cmf::upslope::Cell::add_storage(cmf::water::WaterStorage::ptr)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_Cell_remove_storage(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; - cmf::water::WaterStorage::ptr arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "storage", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Cell_remove_storage",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_remove_storage" "', argument " "1"" of type '" "cmf::upslope::Cell *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); - { - int newmem = 0; - res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0 , &newmem); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Cell_remove_storage" "', argument " "2"" of type '" "cmf::water::WaterStorage::ptr""'"); - } - if (argp2) arg2 = *(reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp2)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp2); - } - { - try { - (arg1)->remove_storage(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Cell_storage_count(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - size_t result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_storage_count" "', argument " "1"" of type '" "cmf::upslope::Cell const *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); - { - try { - result = ((cmf::upslope::Cell const *)arg1)->storage_count(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Cell_get_storage(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; - ptrdiff_t arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "index", NULL - }; - cmf::water::WaterStorage::ptr result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Cell_get_storage",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_get_storage" "', argument " "1"" of type '" "cmf::upslope::Cell const *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Cell_get_storage" "', argument " "2"" of type '" "ptrdiff_t""'"); - } - arg2 = static_cast< ptrdiff_t >(val2); - { - try { - result = ((cmf::upslope::Cell const *)arg1)->get_storage(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - if (!(result)) resultobj = SWIG_NewPointerObj(0,SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, SWIG_POINTER_OWN); - int dcast = 0; - /*@SWIG:C:\Apps\swigwin-3.0.12\Lib\typemaps\swigmacros.swg,200,%formacro@*//*@SWIG:C:\Apps\swigwin-3.0.12\Lib\typemaps\swigmacros.swg,192,%_formacro_1@*//*@SWIG:cmf\cmf_core_src\cmf_swiglib.i,74,%_node_down_cast@*/ - if (dcast==0 && result) /*check for cmf::river::OpenWaterStorage*/ { - std::shared_ptr output = std::dynamic_pointer_cast(result); - if (output) /*flux_node is cmf::river::OpenWaterStorage */ { - dcast=1; - resultobj = SWIG_NewPointerObj(new std::shared_ptr(output),SWIGTYPE_p_std__shared_ptrT_cmf__river__OpenWaterStorage_t, SWIG_POINTER_OWN); - } - } - /*@SWIG@*/ - - /*@SWIG:C:\Apps\swigwin-3.0.12\Lib\typemaps\swigmacros.swg,192,%_formacro_1@*//*@SWIG:cmf\cmf_core_src\cmf_swiglib.i,74,%_node_down_cast@*/ - if (dcast==0 && result) /*check for cmf::water::WaterStorage*/ { - std::shared_ptr output = std::dynamic_pointer_cast(result); - if (output) /*flux_node is cmf::water::WaterStorage */ { - dcast=1; - resultobj = SWIG_NewPointerObj(new std::shared_ptr(output),SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, SWIG_POINTER_OWN); - } - } - /*@SWIG@*/ - - - - /*@SWIG@*/ - - /*@SWIG@*//*@SWIG@*/ - if (!dcast) resultobj = SWIG_NewPointerObj(new std::shared_ptr(result),SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, SWIG_POINTER_OWN); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Cell_get_canopy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::water::WaterStorage::ptr result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_get_canopy" "', argument " "1"" of type '" "cmf::upslope::Cell const *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); - { - try { - result = ((cmf::upslope::Cell const *)arg1)->get_canopy(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - std::shared_ptr< cmf::water::WaterStorage > *smartresult = result ? new std::shared_ptr< cmf::water::WaterStorage >(result) : 0; - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, SWIG_POINTER_OWN); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Cell_get_snow(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::water::WaterStorage::ptr result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_get_snow" "', argument " "1"" of type '" "cmf::upslope::Cell const *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); - { - try { - result = ((cmf::upslope::Cell const *)arg1)->get_snow(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - std::shared_ptr< cmf::water::WaterStorage > *smartresult = result ? new std::shared_ptr< cmf::water::WaterStorage >(result) : 0; - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, SWIG_POINTER_OWN); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Cell_snow_coverage(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_snow_coverage" "', argument " "1"" of type '" "cmf::upslope::Cell const *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); - { - try { - result = (real)((cmf::upslope::Cell const *)arg1)->snow_coverage(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Cell_albedo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_albedo" "', argument " "1"" of type '" "cmf::upslope::Cell const *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); - { - try { - result = (real)((cmf::upslope::Cell const *)arg1)->albedo(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Cell_surface_amplitude_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"Cell_surface_amplitude_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_surface_amplitude_set" "', argument " "1"" of type '" "cmf::upslope::Cell *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Cell_surface_amplitude_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->surface_amplitude = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Cell_surface_amplitude_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_surface_amplitude_get" "', argument " "1"" of type '" "cmf::upslope::Cell *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); - result = (real) ((arg1)->surface_amplitude); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Cell_surface_water_coverage(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_surface_water_coverage" "', argument " "1"" of type '" "cmf::upslope::Cell const *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); - { - try { - result = (real)((cmf::upslope::Cell const *)arg1)->surface_water_coverage(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Cell_heat_flux(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; - cmf::math::Time arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "t", NULL - }; - real result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Cell_heat_flux",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_heat_flux" "', argument " "1"" of type '" "cmf::upslope::Cell const *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); - { - arg2 = convert_datetime_to_cmftime(obj1); - if (arg2 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } - } - { - try { - result = (real)((cmf::upslope::Cell const *)arg1)->heat_flux(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Cell_Tground_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"Cell_Tground_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_Tground_set" "', argument " "1"" of type '" "cmf::upslope::Cell *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Cell_Tground_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->Tground = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Cell_Tground_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_Tground_get" "', argument " "1"" of type '" "cmf::upslope::Cell *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); - result = (real) ((arg1)->Tground); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Cell_leave_wetness(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_leave_wetness" "', argument " "1"" of type '" "cmf::upslope::Cell const *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); - { - try { - result = (real)((cmf::upslope::Cell const *)arg1)->leave_wetness(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Cell_Id_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; - ptrdiff_t arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"Cell_Id_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_Id_set" "', argument " "1"" of type '" "cmf::upslope::Cell *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Cell_Id_set" "', argument " "2"" of type '" "ptrdiff_t""'"); - } - arg2 = static_cast< ptrdiff_t >(val2); - if (arg1) (arg1)->Id = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Cell_Id_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - ptrdiff_t result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_Id_get" "', argument " "1"" of type '" "cmf::upslope::Cell *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); - result = ((arg1)->Id); - resultobj = SWIG_From_ptrdiff_t(static_cast< ptrdiff_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Cell_get_WKB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::bytestring result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_get_WKB" "', argument " "1"" of type '" "cmf::upslope::Cell const *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); - { - try { - result = ((cmf::upslope::Cell const *)arg1)->get_WKB(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - // Converting cmf::bytestring to PyBytes - resultobj = PyBytes_FromStringAndSize((&result)->c_str(), (&result)->size()); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Cell_set_WKB(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; - cmf::bytestring arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "wkb", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Cell_set_WKB",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_set_WKB" "', argument " "1"" of type '" "cmf::upslope::Cell *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); - { - // Convert PyBytes to cmf::bytestring - if (PyBytes_Check(obj1)) { - Py_ssize_t size = PyBytes_Size(obj1); - arg2 = cmf::bytestring(PyBytes_AsString(obj1), size); - } else { - SWIG_exception_fail(SWIG_TypeError,"WKB expects byte string"); - } - } - { - try { - (arg1)->set_WKB(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Cell_get_weather(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; - cmf::math::Time arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "t", NULL - }; - cmf::atmosphere::Weather result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Cell_get_weather",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_get_weather" "', argument " "1"" of type '" "cmf::upslope::Cell const *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); - { - arg2 = convert_datetime_to_cmftime(obj1); - if (arg2 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } - } - { - try { - result = ((cmf::upslope::Cell const *)arg1)->get_weather(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj((new cmf::atmosphere::Weather(static_cast< const cmf::atmosphere::Weather& >(result))), SWIGTYPE_p_cmf__atmosphere__Weather, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Cell_layer_count(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - size_t result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_layer_count" "', argument " "1"" of type '" "cmf::upslope::Cell const *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); - { - try { - result = ((cmf::upslope::Cell const *)arg1)->layer_count(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Cell_get_layer(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; - ptrdiff_t arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "ndx", NULL - }; - cmf::upslope::SoilLayer::ptr result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Cell_get_layer",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_get_layer" "', argument " "1"" of type '" "cmf::upslope::Cell const *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Cell_get_layer" "', argument " "2"" of type '" "ptrdiff_t""'"); - } - arg2 = static_cast< ptrdiff_t >(val2); - { - try { - result = ((cmf::upslope::Cell const *)arg1)->get_layer(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj((new cmf::upslope::SoilLayer::ptr(static_cast< const cmf::upslope::SoilLayer::ptr& >(result))), SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Cell_add_layer__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; - real arg2 ; - cmf::upslope::RetentionCurve *arg3 = 0 ; - real arg4 = (real) 10 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - double val4 ; - int ecode4 = 0 ; - cmf::upslope::SoilLayer::ptr result; - - if ((nobjs < 3) || (nobjs > 4)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_add_layer" "', argument " "1"" of type '" "cmf::upslope::Cell *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Cell_add_layer" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - res3 = SWIG_ConvertPtr(swig_obj[2], &argp3, SWIGTYPE_p_cmf__upslope__RetentionCurve, 0 | 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Cell_add_layer" "', argument " "3"" of type '" "cmf::upslope::RetentionCurve const &""'"); - } - if (!argp3) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Cell_add_layer" "', argument " "3"" of type '" "cmf::upslope::RetentionCurve const &""'"); - } - arg3 = reinterpret_cast< cmf::upslope::RetentionCurve * >(argp3); - if (swig_obj[3]) { - ecode4 = SWIG_AsVal_double(swig_obj[3], &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Cell_add_layer" "', argument " "4"" of type '" "real""'"); - } - arg4 = static_cast< real >(val4); - } - { - try { - result = (arg1)->add_layer(arg2,(cmf::upslope::RetentionCurve const &)*arg3,arg4); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj((new cmf::upslope::SoilLayer::ptr(static_cast< const cmf::upslope::SoilLayer::ptr& >(result))), SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Cell_add_layer__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - cmf::upslope::SoilLayer::ptr result; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_add_layer" "', argument " "1"" of type '" "cmf::upslope::Cell *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Cell_add_layer" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - { - try { - result = (arg1)->add_layer(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj((new cmf::upslope::SoilLayer::ptr(static_cast< const cmf::upslope::SoilLayer::ptr& >(result))), SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Cell_add_layer(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[5] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args,"Cell_add_layer",0,4,argv))) SWIG_fail; - --argc; - { - unsigned long _index = 0; - SWIG_TypeRank _rank = 0; - if (argc == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__upslope__Cell, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 1; - if (_rank == _rankm) goto dispatch; - } - } - check_1: - - if ((argc >= 3) && (argc <= 4)) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__upslope__Cell, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_cmf__upslope__RetentionCurve, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (argc > 3) { - { - { - int res = SWIG_AsVal_double(argv[3], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - } - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 2; - if (_rank == _rankm) goto dispatch; - } - } - check_2: - - dispatch: - switch(_index) { - case 1: - return _wrap_Cell_add_layer__SWIG_1(self, argc, argv); - case 2: - return _wrap_Cell_add_layer__SWIG_0(self, argc, argv); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'Cell_add_layer'.\n" - " Possible C/C++ prototypes are:\n" - " cmf::upslope::Cell::add_layer(real,cmf::upslope::RetentionCurve const &,real)\n" - " cmf::upslope::Cell::add_layer(real)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_Cell_remove_last_layer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_remove_last_layer" "', argument " "1"" of type '" "cmf::upslope::Cell *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); - { - try { - (arg1)->remove_last_layer(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Cell_remove_layers(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_remove_layers" "', argument " "1"" of type '" "cmf::upslope::Cell *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); - { - try { - (arg1)->remove_layers(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_Cell(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Cell, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Cell" "', argument " "1"" of type '" "cmf::upslope::Cell *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); - { - try { - delete arg1; - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_Cell(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - double arg1 ; - double arg2 ; - double arg3 ; - double arg4 ; - cmf::project *arg5 = 0 ; - double val1 ; - int ecode1 = 0 ; - double val2 ; - int ecode2 = 0 ; - double val3 ; - int ecode3 = 0 ; - double val4 ; - int ecode4 = 0 ; - void *argp5 = 0 ; - int res5 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - char * kwnames[] = { - (char *) "x",(char *) "y",(char *) "z",(char *) "area",(char *) "_project", NULL - }; - cmf::upslope::Cell *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOO:new_Cell",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; - ecode1 = SWIG_AsVal_double(obj0, &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Cell" "', argument " "1"" of type '" "double""'"); - } - arg1 = static_cast< double >(val1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Cell" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - ecode3 = SWIG_AsVal_double(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Cell" "', argument " "3"" of type '" "double""'"); - } - arg3 = static_cast< double >(val3); - ecode4 = SWIG_AsVal_double(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_Cell" "', argument " "4"" of type '" "double""'"); - } - arg4 = static_cast< double >(val4); - res5 = SWIG_ConvertPtr(obj4, &argp5, SWIGTYPE_p_cmf__project, 0 ); - if (!SWIG_IsOK(res5)) { - SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_Cell" "', argument " "5"" of type '" "cmf::project &""'"); - } - if (!argp5) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Cell" "', argument " "5"" of type '" "cmf::project &""'"); - } - arg5 = reinterpret_cast< cmf::project * >(argp5); - { - try { - result = (cmf::upslope::Cell *)new cmf::upslope::Cell(arg1,arg2,arg3,arg4,*arg5); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__Cell, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Cell_to_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::string result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_to_string" "', argument " "1"" of type '" "cmf::upslope::Cell const *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); - { - try { - result = ((cmf::upslope::Cell const *)arg1)->to_string(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_std_string(static_cast< std::string >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Cell_topology_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::upslope::Topology *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_topology_get" "', argument " "1"" of type '" "cmf::upslope::Cell *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); - { - try { - result = (cmf::upslope::Topology *)cmf_upslope_Cell_topology_get(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__Topology, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Cell_meteorology_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; - cmf::atmosphere::Meteorology *arg2 = (cmf::atmosphere::Meteorology *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"Cell_meteorology_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_meteorology_set" "', argument " "1"" of type '" "cmf::upslope::Cell *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_cmf__atmosphere__Meteorology, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Cell_meteorology_set" "', argument " "2"" of type '" "cmf::atmosphere::Meteorology *""'"); - } - arg2 = reinterpret_cast< cmf::atmosphere::Meteorology * >(argp2); - { - try { - cmf_upslope_Cell_meteorology_set(arg1,arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Cell_meteorology_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::atmosphere::Meteorology *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_meteorology_get" "', argument " "1"" of type '" "cmf::upslope::Cell *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); - { - try { - result = (cmf::atmosphere::Meteorology *)cmf_upslope_Cell_meteorology_get(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__atmosphere__Meteorology, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Cell_layers_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::upslope::layer_list *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_layers_get" "', argument " "1"" of type '" "cmf::upslope::Cell *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); - { - try { - result = (cmf::upslope::layer_list *)cmf_upslope_Cell_layers_get(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__layer_list, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Cell_project_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::project *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_project_get" "', argument " "1"" of type '" "cmf::upslope::Cell *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); - { - try { - result = (cmf::project *)cmf_upslope_Cell_project_get(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__project, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Cell_saturated_depth_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"Cell_saturated_depth_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_saturated_depth_set" "', argument " "1"" of type '" "cmf::upslope::Cell *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Cell_saturated_depth_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - { - try { - cmf_upslope_Cell_saturated_depth_set(arg1,arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Cell_saturated_depth_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_saturated_depth_get" "', argument " "1"" of type '" "cmf::upslope::Cell *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); - { - try { - result = (real)cmf_upslope_Cell_saturated_depth_get(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Cell_area_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_area_get" "', argument " "1"" of type '" "cmf::upslope::Cell *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); - { - try { - result = (real)cmf_upslope_Cell_area_get(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Cell_soildepth_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_soildepth_get" "', argument " "1"" of type '" "cmf::upslope::Cell *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); - { - try { - result = (real)cmf_upslope_Cell_soildepth_get(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *Cell_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__Cell, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *Cell_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_Topology_cell_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::Topology *arg1 = (cmf::upslope::Topology *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::upslope::Cell *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Topology, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Topology_cell_get" "', argument " "1"" of type '" "cmf::upslope::Topology *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Topology * >(argp1); - result = (cmf::upslope::Cell *)(cmf::upslope::Cell *) ((arg1)->cell); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Topology_x_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::Topology *arg1 = (cmf::upslope::Topology *) 0 ; - double *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"Topology_x_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Topology, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Topology_x_set" "', argument " "1"" of type '" "cmf::upslope::Topology *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Topology * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_double, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Topology_x_set" "', argument " "2"" of type '" "double &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Topology_x_set" "', argument " "2"" of type '" "double &""'"); - } - arg2 = reinterpret_cast< double * >(argp2); - if (arg1) (arg1)->x = *arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Topology_x_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::Topology *arg1 = (cmf::upslope::Topology *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - double *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Topology, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Topology_x_get" "', argument " "1"" of type '" "cmf::upslope::Topology *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Topology * >(argp1); - result = (double *) &(double &) ((arg1)->x); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Topology_y_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::Topology *arg1 = (cmf::upslope::Topology *) 0 ; - double *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"Topology_y_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Topology, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Topology_y_set" "', argument " "1"" of type '" "cmf::upslope::Topology *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Topology * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_double, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Topology_y_set" "', argument " "2"" of type '" "double &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Topology_y_set" "', argument " "2"" of type '" "double &""'"); - } - arg2 = reinterpret_cast< double * >(argp2); - if (arg1) (arg1)->y = *arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Topology_y_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::Topology *arg1 = (cmf::upslope::Topology *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - double *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Topology, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Topology_y_get" "', argument " "1"" of type '" "cmf::upslope::Topology *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Topology * >(argp1); - result = (double *) &(double &) ((arg1)->y); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Topology_z_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::Topology *arg1 = (cmf::upslope::Topology *) 0 ; - double *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"Topology_z_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Topology, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Topology_z_set" "', argument " "1"" of type '" "cmf::upslope::Topology *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Topology * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_double, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Topology_z_set" "', argument " "2"" of type '" "double &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Topology_z_set" "', argument " "2"" of type '" "double &""'"); - } - arg2 = reinterpret_cast< double * >(argp2); - if (arg1) (arg1)->z = *arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Topology_z_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::Topology *arg1 = (cmf::upslope::Topology *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - double *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Topology, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Topology_z_get" "', argument " "1"" of type '" "cmf::upslope::Topology *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Topology * >(argp1); - result = (double *) &(double &) ((arg1)->z); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Topology_get_position(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::Topology *arg1 = (cmf::upslope::Topology *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::geometry::point result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Topology, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Topology_get_position" "', argument " "1"" of type '" "cmf::upslope::Topology const *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Topology * >(argp1); - { - try { - result = ((cmf::upslope::Topology const *)arg1)->get_position(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj((new cmf::geometry::point(static_cast< const cmf::geometry::point& >(result))), SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Topology_flowwidth__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::upslope::Topology *arg1 = (cmf::upslope::Topology *) 0 ; - cmf::upslope::Cell *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - double result; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Topology, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Topology_flowwidth" "', argument " "1"" of type '" "cmf::upslope::Topology *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Topology * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_cmf__upslope__Cell, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Topology_flowwidth" "', argument " "2"" of type '" "cmf::upslope::Cell &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Topology_flowwidth" "', argument " "2"" of type '" "cmf::upslope::Cell &""'"); - } - arg2 = reinterpret_cast< cmf::upslope::Cell * >(argp2); - { - try { - result = (double)(arg1)->flowwidth(*arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Topology_flowwidth__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::upslope::Topology *arg1 = (cmf::upslope::Topology *) 0 ; - cmf::upslope::Topology *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - double result; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Topology, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Topology_flowwidth" "', argument " "1"" of type '" "cmf::upslope::Topology *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Topology * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_cmf__upslope__Topology, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Topology_flowwidth" "', argument " "2"" of type '" "cmf::upslope::Topology &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Topology_flowwidth" "', argument " "2"" of type '" "cmf::upslope::Topology &""'"); - } - arg2 = reinterpret_cast< cmf::upslope::Topology * >(argp2); - { - try { - result = (double)(arg1)->flowwidth(*arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Topology_flowwidth(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args,"Topology_flowwidth",0,2,argv))) SWIG_fail; - --argc; - { - unsigned long _index = 0; - SWIG_TypeRank _rank = 0; - if (argc == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__upslope__Topology, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_cmf__upslope__Cell, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 1; - if (_rank == _rankm) goto dispatch; - } - } - check_1: - - if (argc == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__upslope__Topology, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_cmf__upslope__Topology, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 2; - if (_rank == _rankm) goto dispatch; - } - } - check_2: - - dispatch: - switch(_index) { - case 1: - return _wrap_Topology_flowwidth__SWIG_0(self, argc, argv); - case 2: - return _wrap_Topology_flowwidth__SWIG_1(self, argc, argv); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'Topology_flowwidth'.\n" - " Possible C/C++ prototypes are:\n" - " cmf::upslope::Topology::flowwidth(cmf::upslope::Cell &)\n" - " cmf::upslope::Topology::flowwidth(cmf::upslope::Topology &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_Topology_AddNeighbor__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::upslope::Topology *arg1 = (cmf::upslope::Topology *) 0 ; - cmf::upslope::Cell *arg2 = 0 ; - double arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - double val3 ; - int ecode3 = 0 ; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Topology, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Topology_AddNeighbor" "', argument " "1"" of type '" "cmf::upslope::Topology *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Topology * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_cmf__upslope__Cell, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Topology_AddNeighbor" "', argument " "2"" of type '" "cmf::upslope::Cell &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Topology_AddNeighbor" "', argument " "2"" of type '" "cmf::upslope::Cell &""'"); - } - arg2 = reinterpret_cast< cmf::upslope::Cell * >(argp2); - ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Topology_AddNeighbor" "', argument " "3"" of type '" "double""'"); - } - arg3 = static_cast< double >(val3); - { - try { - (arg1)->AddNeighbor(*arg2,arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Topology_AddNeighbor__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::upslope::Topology *arg1 = (cmf::upslope::Topology *) 0 ; - cmf::upslope::Topology *arg2 = 0 ; - double arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - double val3 ; - int ecode3 = 0 ; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Topology, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Topology_AddNeighbor" "', argument " "1"" of type '" "cmf::upslope::Topology *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Topology * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_cmf__upslope__Topology, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Topology_AddNeighbor" "', argument " "2"" of type '" "cmf::upslope::Topology &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Topology_AddNeighbor" "', argument " "2"" of type '" "cmf::upslope::Topology &""'"); - } - arg2 = reinterpret_cast< cmf::upslope::Topology * >(argp2); - ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Topology_AddNeighbor" "', argument " "3"" of type '" "double""'"); - } - arg3 = static_cast< double >(val3); - { - try { - (arg1)->AddNeighbor(*arg2,arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Topology_AddNeighbor(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[4] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args,"Topology_AddNeighbor",0,3,argv))) SWIG_fail; - --argc; - { - unsigned long _index = 0; - SWIG_TypeRank _rank = 0; - if (argc == 3) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__upslope__Topology, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_cmf__upslope__Cell, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - int res = SWIG_AsVal_double(argv[2], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 1; - if (_rank == _rankm) goto dispatch; - } - } - check_1: - - if (argc == 3) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__upslope__Topology, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_cmf__upslope__Topology, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - int res = SWIG_AsVal_double(argv[2], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 2; - if (_rank == _rankm) goto dispatch; - } - } - check_2: - - dispatch: - switch(_index) { - case 1: - return _wrap_Topology_AddNeighbor__SWIG_0(self, argc, argv); - case 2: - return _wrap_Topology_AddNeighbor__SWIG_1(self, argc, argv); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'Topology_AddNeighbor'.\n" - " Possible C/C++ prototypes are:\n" - " cmf::upslope::Topology::AddNeighbor(cmf::upslope::Cell &,double)\n" - " cmf::upslope::Topology::AddNeighbor(cmf::upslope::Topology &,double)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_Topology_RemoveNeighbor(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::Topology *arg1 = (cmf::upslope::Topology *) 0 ; - cmf::upslope::Topology *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "target", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Topology_RemoveNeighbor",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__Topology, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Topology_RemoveNeighbor" "', argument " "1"" of type '" "cmf::upslope::Topology *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Topology * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_cmf__upslope__Topology, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Topology_RemoveNeighbor" "', argument " "2"" of type '" "cmf::upslope::Topology &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Topology_RemoveNeighbor" "', argument " "2"" of type '" "cmf::upslope::Topology &""'"); - } - arg2 = reinterpret_cast< cmf::upslope::Topology * >(argp2); - { - try { - (arg1)->RemoveNeighbor(*arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Topology_neighbor_count(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::Topology *arg1 = (cmf::upslope::Topology *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - size_t result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Topology, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Topology_neighbor_count" "', argument " "1"" of type '" "cmf::upslope::Topology const *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Topology * >(argp1); - { - try { - result = ((cmf::upslope::Topology const *)arg1)->neighbor_count(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Topology_MainOutlet(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::Topology *arg1 = (cmf::upslope::Topology *) 0 ; - bool arg2 = (bool) false ; - void *argp1 = 0 ; - int res1 = 0 ; - bool val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "forceRecalc", NULL - }; - cmf::upslope::Cell *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Topology_MainOutlet",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__Topology, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Topology_MainOutlet" "', argument " "1"" of type '" "cmf::upslope::Topology *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Topology * >(argp1); - if (obj1) { - ecode2 = SWIG_AsVal_bool(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Topology_MainOutlet" "', argument " "2"" of type '" "bool""'"); - } - arg2 = static_cast< bool >(val2); - } - { - try { - result = (cmf::upslope::Cell *)(arg1)->MainOutlet(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Topology_ContributingArea(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::Topology *arg1 = (cmf::upslope::Topology *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - double result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Topology, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Topology_ContributingArea" "', argument " "1"" of type '" "cmf::upslope::Topology const *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Topology * >(argp1); - { - try { - result = (double)((cmf::upslope::Topology const *)arg1)->ContributingArea(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Topology_calculate_contributing_area(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::cell_vector *arg1 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - char * kwnames[] = { - (char *) "arg1", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:Topology_calculate_contributing_area",kwnames,&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_cmf__upslope__cell_vector, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Topology_calculate_contributing_area" "', argument " "1"" of type '" "cmf::upslope::cell_vector const &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Topology_calculate_contributing_area" "', argument " "1"" of type '" "cmf::upslope::cell_vector const &""'"); - } - arg1 = reinterpret_cast< cmf::upslope::cell_vector * >(argp1); - { - try { - cmf::upslope::Topology::calculate_contributing_area((cmf::upslope::cell_vector const &)*arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Topology___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::Topology *arg1 = (cmf::upslope::Topology *) 0 ; - cmf::upslope::Topology *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "cmp", NULL - }; - bool result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Topology___eq__",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__Topology, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Topology___eq__" "', argument " "1"" of type '" "cmf::upslope::Topology *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Topology * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_cmf__upslope__Topology, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Topology___eq__" "', argument " "2"" of type '" "cmf::upslope::Topology const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Topology___eq__" "', argument " "2"" of type '" "cmf::upslope::Topology const &""'"); - } - arg2 = reinterpret_cast< cmf::upslope::Topology * >(argp2); - { - try { - result = (bool)(arg1)->operator ==((cmf::upslope::Topology const &)*arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_Topology(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::Topology *arg1 = (cmf::upslope::Topology *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Topology, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Topology" "', argument " "1"" of type '" "cmf::upslope::Topology *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Topology * >(argp1); - { - try { - delete arg1; - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *Topology_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__Topology, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *_wrap_new_neighbor_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - char * kwnames[] = { - (char *) "cell", NULL - }; - cmf::upslope::neighbor_iterator *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:new_neighbor_iterator",kwnames,&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_neighbor_iterator" "', argument " "1"" of type '" "cmf::upslope::Cell *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); - { - try { - result = (cmf::upslope::neighbor_iterator *)new cmf::upslope::neighbor_iterator(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__neighbor_iterator, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_neighbor_iterator_cell(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::neighbor_iterator *arg1 = (cmf::upslope::neighbor_iterator *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::upslope::Cell *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__neighbor_iterator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "neighbor_iterator_cell" "', argument " "1"" of type '" "cmf::upslope::neighbor_iterator *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::neighbor_iterator * >(argp1); - { - try { - result = (cmf::upslope::Cell *) &(arg1)->cell(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_neighbor_iterator_flowwidth(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::neighbor_iterator *arg1 = (cmf::upslope::neighbor_iterator *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - double result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__neighbor_iterator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "neighbor_iterator_flowwidth" "', argument " "1"" of type '" "cmf::upslope::neighbor_iterator *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::neighbor_iterator * >(argp1); - { - try { - result = (double)(arg1)->flowwidth(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_neighbor_iterator_valid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::neighbor_iterator *arg1 = (cmf::upslope::neighbor_iterator *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - bool result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__neighbor_iterator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "neighbor_iterator_valid" "', argument " "1"" of type '" "cmf::upslope::neighbor_iterator const *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::neighbor_iterator * >(argp1); - { - try { - result = (bool)((cmf::upslope::neighbor_iterator const *)arg1)->valid(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_neighbor_iterator_next(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::neighbor_iterator *arg1 = (cmf::upslope::neighbor_iterator *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::upslope::neighbor_iterator *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__neighbor_iterator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "neighbor_iterator_next" "', argument " "1"" of type '" "cmf::upslope::neighbor_iterator *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::neighbor_iterator * >(argp1); - { - try { - result = (cmf::upslope::neighbor_iterator *) &(arg1)->next(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__neighbor_iterator, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_neighbor_iterator___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::neighbor_iterator *arg1 = (cmf::upslope::neighbor_iterator *) 0 ; - cmf::upslope::neighbor_iterator *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "cmp", NULL - }; - bool result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:neighbor_iterator___eq__",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__neighbor_iterator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "neighbor_iterator___eq__" "', argument " "1"" of type '" "cmf::upslope::neighbor_iterator *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::neighbor_iterator * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_cmf__upslope__neighbor_iterator, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "neighbor_iterator___eq__" "', argument " "2"" of type '" "cmf::upslope::neighbor_iterator const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "neighbor_iterator___eq__" "', argument " "2"" of type '" "cmf::upslope::neighbor_iterator const &""'"); - } - arg2 = reinterpret_cast< cmf::upslope::neighbor_iterator * >(argp2); - { - try { - result = (bool)cmf_upslope_neighbor_iterator___eq__(arg1,(cmf::upslope::neighbor_iterator const &)*arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_neighbor_iterator___neq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::neighbor_iterator *arg1 = (cmf::upslope::neighbor_iterator *) 0 ; - cmf::upslope::neighbor_iterator *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "cmp", NULL - }; - bool result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:neighbor_iterator___neq__",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__neighbor_iterator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "neighbor_iterator___neq__" "', argument " "1"" of type '" "cmf::upslope::neighbor_iterator *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::neighbor_iterator * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_cmf__upslope__neighbor_iterator, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "neighbor_iterator___neq__" "', argument " "2"" of type '" "cmf::upslope::neighbor_iterator const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "neighbor_iterator___neq__" "', argument " "2"" of type '" "cmf::upslope::neighbor_iterator const &""'"); - } - arg2 = reinterpret_cast< cmf::upslope::neighbor_iterator * >(argp2); - { - try { - result = (bool)cmf_upslope_neighbor_iterator___neq__(arg1,(cmf::upslope::neighbor_iterator const &)*arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_neighbor_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::neighbor_iterator *arg1 = (cmf::upslope::neighbor_iterator *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__neighbor_iterator, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_neighbor_iterator" "', argument " "1"" of type '" "cmf::upslope::neighbor_iterator *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::neighbor_iterator * >(argp1); - { - try { - delete arg1; - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *neighbor_iterator_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__neighbor_iterator, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *neighbor_iterator_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_cell_vector___getitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::upslope::cell_vector *arg1 = (cmf::upslope::cell_vector *) 0 ; - ptrdiff_t arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - cmf::upslope::Cell *result = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__cell_vector, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cell_vector___getitem__" "', argument " "1"" of type '" "cmf::upslope::cell_vector const *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::cell_vector * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cell_vector___getitem__" "', argument " "2"" of type '" "ptrdiff_t""'"); - } - arg2 = static_cast< ptrdiff_t >(val2); - { - try { - result = (cmf::upslope::Cell *) &((cmf::upslope::cell_vector const *)arg1)->operator [](arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_cell_vector__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) { - PyObject *resultobj = 0; - cmf::upslope::cell_vector *result = 0 ; - - if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; - { - try { - result = (cmf::upslope::cell_vector *)new cmf::upslope::cell_vector(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__cell_vector, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_cell_vector__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::upslope::cell_vector *arg1 = 0 ; - cmf::upslope::cell_vector temp_list1 ; - cmf::upslope::cell_vector *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - { - if (SWIG_ConvertPtr(swig_obj[0], (void **) &arg1, SWIGTYPE_p_cmf__upslope__cell_vector, SWIG_POINTER_EXCEPTION) == -1) { - int res = iterable_to_list(swig_obj[0],SWIGTYPE_p_cmf__upslope__Cell, temp_list1); - if (SWIG_IsOK(res)) { - arg1 = &temp_list1; - } else { - SWIG_exception_fail(SWIG_TypeError,"Only iterables can be converted to cmf::upslope::cell_vector"); - } - } - } - { - try { - result = (cmf::upslope::cell_vector *)new cmf::upslope::cell_vector((cmf::upslope::cell_vector const &)*arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__cell_vector, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_cell_vector(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[2] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args,"new_cell_vector",0,1,argv))) SWIG_fail; - --argc; - { - unsigned long _index = 0; - SWIG_TypeRank _rank = 0; - if (argc == 0) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 1; - if (_rank == _rankm) goto dispatch; - } - } - if (argc == 1) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - { - _v = is_listtype_or_iterable(argv[0],SWIGTYPE_p_cmf__upslope__cell_vector); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 2; - if (_rank == _rankm) goto dispatch; - } - } - check_2: - - dispatch: - switch(_index) { - case 1: - return _wrap_new_cell_vector__SWIG_0(self, argc, argv); - case 2: - return _wrap_new_cell_vector__SWIG_1(self, argc, argv); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_cell_vector'.\n" - " Possible C/C++ prototypes are:\n" - " cmf::upslope::cell_vector::cell_vector()\n" - " cmf::upslope::cell_vector::cell_vector(cmf::upslope::cell_vector const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_cell_vector___getitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::upslope::cell_vector *arg1 = (cmf::upslope::cell_vector *) 0 ; - ptrdiff_t arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - cmf::upslope::Cell *result = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__cell_vector, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cell_vector___getitem__" "', argument " "1"" of type '" "cmf::upslope::cell_vector *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::cell_vector * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cell_vector___getitem__" "', argument " "2"" of type '" "ptrdiff_t""'"); - } - arg2 = static_cast< ptrdiff_t >(val2); - { - try { - result = (cmf::upslope::Cell *) &(arg1)->operator [](arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_cell_vector___getitem__(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args,"cell_vector___getitem__",0,2,argv))) SWIG_fail; - --argc; - { - unsigned long _index = 0; - SWIG_TypeRank _rank = 0; - if (argc == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__upslope__cell_vector, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 1; - if (_rank == _rankm) goto dispatch; - } - } - check_1: - - if (argc == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__upslope__cell_vector, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 2; - if (_rank == _rankm) goto dispatch; - } - } - check_2: - - dispatch: - switch(_index) { - case 1: - return _wrap_cell_vector___getitem____SWIG_1(self, argc, argv); - case 2: - return _wrap_cell_vector___getitem____SWIG_0(self, argc, argv); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'cell_vector___getitem__'.\n" - " Possible C/C++ prototypes are:\n" - " cmf::upslope::cell_vector::operator [](ptrdiff_t) const\n" - " cmf::upslope::cell_vector::operator [](ptrdiff_t)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_cell_vector_append(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::cell_vector *arg1 = (cmf::upslope::cell_vector *) 0 ; - cmf::upslope::Cell *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "cell", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:cell_vector_append",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__cell_vector, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cell_vector_append" "', argument " "1"" of type '" "cmf::upslope::cell_vector *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::cell_vector * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_cmf__upslope__Cell, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cell_vector_append" "', argument " "2"" of type '" "cmf::upslope::Cell &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "cell_vector_append" "', argument " "2"" of type '" "cmf::upslope::Cell &""'"); - } - arg2 = reinterpret_cast< cmf::upslope::Cell * >(argp2); - { - try { - (arg1)->append(*arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_cell_vector_remove__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::upslope::cell_vector *arg1 = (cmf::upslope::cell_vector *) 0 ; - ptrdiff_t arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__cell_vector, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cell_vector_remove" "', argument " "1"" of type '" "cmf::upslope::cell_vector *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::cell_vector * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cell_vector_remove" "', argument " "2"" of type '" "ptrdiff_t""'"); - } - arg2 = static_cast< ptrdiff_t >(val2); - { - try { - (arg1)->remove(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_cell_vector_remove__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::upslope::cell_vector *arg1 = (cmf::upslope::cell_vector *) 0 ; - cmf::upslope::Cell *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__cell_vector, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cell_vector_remove" "', argument " "1"" of type '" "cmf::upslope::cell_vector *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::cell_vector * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_cmf__upslope__Cell, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cell_vector_remove" "', argument " "2"" of type '" "cmf::upslope::Cell const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "cell_vector_remove" "', argument " "2"" of type '" "cmf::upslope::Cell const &""'"); - } - arg2 = reinterpret_cast< cmf::upslope::Cell * >(argp2); - { - try { - (arg1)->remove((cmf::upslope::Cell const &)*arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_cell_vector_remove(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args,"cell_vector_remove",0,2,argv))) SWIG_fail; - --argc; - { - unsigned long _index = 0; - SWIG_TypeRank _rank = 0; - if (argc == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__upslope__cell_vector, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_cmf__upslope__Cell, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 1; - if (_rank == _rankm) goto dispatch; - } - } - check_1: - - if (argc == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__upslope__cell_vector, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 2; - if (_rank == _rankm) goto dispatch; - } - } - check_2: - - dispatch: - switch(_index) { - case 1: - return _wrap_cell_vector_remove__SWIG_1(self, argc, argv); - case 2: - return _wrap_cell_vector_remove__SWIG_0(self, argc, argv); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'cell_vector_remove'.\n" - " Possible C/C++ prototypes are:\n" - " cmf::upslope::cell_vector::remove(ptrdiff_t)\n" - " cmf::upslope::cell_vector::remove(cmf::upslope::Cell const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_cell_vector_pop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::cell_vector *arg1 = (cmf::upslope::cell_vector *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::upslope::Cell *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__cell_vector, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cell_vector_pop" "', argument " "1"" of type '" "cmf::upslope::cell_vector *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::cell_vector * >(argp1); - { - try { - result = (cmf::upslope::Cell *) &(arg1)->pop(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_cell_vector___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::cell_vector *arg1 = (cmf::upslope::cell_vector *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - size_t result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__cell_vector, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cell_vector___len__" "', argument " "1"" of type '" "cmf::upslope::cell_vector const *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::cell_vector * >(argp1); - { - try { - result = ((cmf::upslope::cell_vector const *)arg1)->size(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_cell_vector___getslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::cell_vector *arg1 = (cmf::upslope::cell_vector *) 0 ; - ptrdiff_t arg2 ; - ptrdiff_t arg3 ; - ptrdiff_t arg4 = (ptrdiff_t) 1 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - ptrdiff_t val3 ; - int ecode3 = 0 ; - ptrdiff_t val4 ; - int ecode4 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "start",(char *) "end",(char *) "step", NULL - }; - cmf::upslope::cell_vector result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|O:cell_vector___getslice__",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__cell_vector, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cell_vector___getslice__" "', argument " "1"" of type '" "cmf::upslope::cell_vector *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::cell_vector * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cell_vector___getslice__" "', argument " "2"" of type '" "ptrdiff_t""'"); - } - arg2 = static_cast< ptrdiff_t >(val2); - ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cell_vector___getslice__" "', argument " "3"" of type '" "ptrdiff_t""'"); - } - arg3 = static_cast< ptrdiff_t >(val3); - if (obj3) { - ecode4 = SWIG_AsVal_ptrdiff_t(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "cell_vector___getslice__" "', argument " "4"" of type '" "ptrdiff_t""'"); - } - arg4 = static_cast< ptrdiff_t >(val4); - } - { - try { - result = (arg1)->get_slice(arg2,arg3,arg4); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj((new cmf::upslope::cell_vector(static_cast< const cmf::upslope::cell_vector& >(result))), SWIGTYPE_p_cmf__upslope__cell_vector, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_cell_vector_get_area(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::cell_vector *arg1 = (cmf::upslope::cell_vector *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - double result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__cell_vector, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cell_vector_get_area" "', argument " "1"" of type '" "cmf::upslope::cell_vector const *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::cell_vector * >(argp1); - { - try { - result = (double)((cmf::upslope::cell_vector const *)arg1)->get_area(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_cell_vector___contains__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::cell_vector *arg1 = (cmf::upslope::cell_vector *) 0 ; - cmf::upslope::Cell *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "cell", NULL - }; - bool result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:cell_vector___contains__",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__cell_vector, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cell_vector___contains__" "', argument " "1"" of type '" "cmf::upslope::cell_vector const *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::cell_vector * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_cmf__upslope__Cell, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cell_vector___contains__" "', argument " "2"" of type '" "cmf::upslope::Cell const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "cell_vector___contains__" "', argument " "2"" of type '" "cmf::upslope::Cell const &""'"); - } - arg2 = reinterpret_cast< cmf::upslope::Cell * >(argp2); - { - try { - result = (bool)((cmf::upslope::cell_vector const *)arg1)->contains((cmf::upslope::Cell const &)*arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_cell_vector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::cell_vector *arg1 = (cmf::upslope::cell_vector *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__cell_vector, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_cell_vector" "', argument " "1"" of type '" "cmf::upslope::cell_vector *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::cell_vector * >(argp1); - { - try { - delete arg1; - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_cell_vector_lowest_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::cell_vector *arg1 = (cmf::upslope::cell_vector *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::upslope::Cell *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__cell_vector, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cell_vector_lowest_get" "', argument " "1"" of type '" "cmf::upslope::cell_vector *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::cell_vector * >(argp1); - { - try { - result = (cmf::upslope::Cell *)cmf_upslope_cell_vector_lowest_get(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_cell_vector_highest_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::cell_vector *arg1 = (cmf::upslope::cell_vector *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::upslope::Cell *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__cell_vector, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cell_vector_highest_get" "', argument " "1"" of type '" "cmf::upslope::cell_vector *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::cell_vector * >(argp1); - { - try { - result = (cmf::upslope::Cell *)cmf_upslope_cell_vector_highest_get(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *cell_vector_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__cell_vector, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *cell_vector_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_find_cell(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::cell_vector *arg1 = 0 ; - cmf::geometry::point arg2 ; - double arg3 = (double) 1e20 ; - cmf::upslope::cell_vector temp_list1 ; - double val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char * kwnames[] = { - (char *) "arg1",(char *) "p",(char *) "max_dist", NULL - }; - cmf::upslope::Cell *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:find_cell",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; - { - if (SWIG_ConvertPtr(obj0, (void **) &arg1, SWIGTYPE_p_cmf__upslope__cell_vector, SWIG_POINTER_EXCEPTION) == -1) { - int res = iterable_to_list(obj0,SWIGTYPE_p_cmf__upslope__Cell, temp_list1); - if (SWIG_IsOK(res)) { - arg1 = &temp_list1; - } else { - SWIG_exception_fail(SWIG_TypeError,"Only iterables can be converted to cmf::upslope::cell_vector"); - } - } - } - { - if (check_xy(obj1)) { - std::string res = convert_xyz_to_point(obj1,arg2); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - return NULL; - } - } - else if (PySequence_Check(obj1)) { - std::string res = convert_seq_to_point(obj1,arg2); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError, res.c_str()); - } - } else { - std::string res="<"; - res+=pyrepr(obj1); - res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - } - } - if (obj2) { - ecode3 = SWIG_AsVal_double(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "find_cell" "', argument " "3"" of type '" "double""'"); - } - arg3 = static_cast< double >(val3); - } - { - try { - result = (cmf::upslope::Cell *)cmf::upslope::find_cell(*arg1,arg2,arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_get_boundary_cells(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::cell_vector *arg1 = 0 ; - cmf::upslope::cell_vector temp_list1 ; - PyObject * obj0 = 0 ; - char * kwnames[] = { - (char *) "cells", NULL - }; - cmf::upslope::cell_vector result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:get_boundary_cells",kwnames,&obj0)) SWIG_fail; - { - if (SWIG_ConvertPtr(obj0, (void **) &arg1, SWIGTYPE_p_cmf__upslope__cell_vector, SWIG_POINTER_EXCEPTION) == -1) { - int res = iterable_to_list(obj0,SWIGTYPE_p_cmf__upslope__Cell, temp_list1); - if (SWIG_IsOK(res)) { - arg1 = &temp_list1; - } else { - SWIG_exception_fail(SWIG_TypeError,"Only iterables can be converted to cmf::upslope::cell_vector"); - } - } - } - { - try { - result = cmf::upslope::get_boundary_cells(*arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj((new cmf::upslope::cell_vector(static_cast< const cmf::upslope::cell_vector& >(result))), SWIGTYPE_p_cmf__upslope__cell_vector, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_get_connections(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::cell_vector *arg1 = 0 ; - cmf::upslope::cell_vector temp_list1 ; - PyObject * obj0 = 0 ; - char * kwnames[] = { - (char *) "cells", NULL - }; - cmf::water::connection_list result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:get_connections",kwnames,&obj0)) SWIG_fail; - { - if (SWIG_ConvertPtr(obj0, (void **) &arg1, SWIGTYPE_p_cmf__upslope__cell_vector, SWIG_POINTER_EXCEPTION) == -1) { - int res = iterable_to_list(obj0,SWIGTYPE_p_cmf__upslope__Cell, temp_list1); - if (SWIG_IsOK(res)) { - arg1 = &temp_list1; - } else { - SWIG_exception_fail(SWIG_TypeError,"Only iterables can be converted to cmf::upslope::cell_vector"); - } - } - } - { - try { - result = cmf::upslope::get_connections(*arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj((new cmf::water::connection_list(static_cast< const cmf::water::connection_list& >(result))), SWIGTYPE_p_cmf__water__connection_list, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_connect_cells_with_flux(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::cell_vector *arg1 = 0 ; - cmf::upslope::CellConnector *arg2 = 0 ; - int arg3 = (int) 0 ; - cmf::upslope::cell_vector temp_list1 ; - void *argp2 = 0 ; - int res2 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char * kwnames[] = { - (char *) "cells",(char *) "connect",(char *) "start_at_layer", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:connect_cells_with_flux",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; - { - if (SWIG_ConvertPtr(obj0, (void **) &arg1, SWIGTYPE_p_cmf__upslope__cell_vector, SWIG_POINTER_EXCEPTION) == -1) { - int res = iterable_to_list(obj0,SWIGTYPE_p_cmf__upslope__Cell, temp_list1); - if (SWIG_IsOK(res)) { - arg1 = &temp_list1; - } else { - SWIG_exception_fail(SWIG_TypeError,"Only iterables can be converted to cmf::upslope::cell_vector"); - } - } - } - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_cmf__upslope__CellConnector, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "connect_cells_with_flux" "', argument " "2"" of type '" "cmf::upslope::CellConnector const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "connect_cells_with_flux" "', argument " "2"" of type '" "cmf::upslope::CellConnector const &""'"); - } - arg2 = reinterpret_cast< cmf::upslope::CellConnector * >(argp2); - if (obj2) { - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "connect_cells_with_flux" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - } - { - try { - cmf::upslope::connect_cells_with_flux(*arg1,(cmf::upslope::CellConnector const &)*arg2,arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_fill_sinks(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::cell_vector *arg1 = 0 ; - double arg2 = (double) 0.001 ; - cmf::upslope::cell_vector temp_list1 ; - double val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "cells",(char *) "min_difference", NULL - }; - int result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:fill_sinks",kwnames,&obj0,&obj1)) SWIG_fail; - { - if (SWIG_ConvertPtr(obj0, (void **) &arg1, SWIGTYPE_p_cmf__upslope__cell_vector, SWIG_POINTER_EXCEPTION) == -1) { - int res = iterable_to_list(obj0,SWIGTYPE_p_cmf__upslope__Cell, temp_list1); - if (SWIG_IsOK(res)) { - arg1 = &temp_list1; - } else { - SWIG_exception_fail(SWIG_TypeError,"Only iterables can be converted to cmf::upslope::cell_vector"); - } - } - } - if (obj1) { - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fill_sinks" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - } - { - try { - result = (int)cmf::upslope::fill_sinks(*arg1,arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_get_area(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::cell_vector *arg1 = 0 ; - cmf::upslope::cell_vector temp_list1 ; - PyObject * obj0 = 0 ; - char * kwnames[] = { - (char *) "cells", NULL - }; - double result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:get_area",kwnames,&obj0)) SWIG_fail; - { - if (SWIG_ConvertPtr(obj0, (void **) &arg1, SWIGTYPE_p_cmf__upslope__cell_vector, SWIG_POINTER_EXCEPTION) == -1) { - int res = iterable_to_list(obj0,SWIGTYPE_p_cmf__upslope__Cell, temp_list1); - if (SWIG_IsOK(res)) { - arg1 = &temp_list1; - } else { - SWIG_exception_fail(SWIG_TypeError,"Only iterables can be converted to cmf::upslope::cell_vector"); - } - } - } - { - try { - result = (double)cmf::upslope::get_area(*arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_get_center(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::cell_vector *arg1 = 0 ; - cmf::upslope::cell_vector temp_list1 ; - PyObject * obj0 = 0 ; - char * kwnames[] = { - (char *) "cells", NULL - }; - cmf::geometry::point result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:get_center",kwnames,&obj0)) SWIG_fail; - { - if (SWIG_ConvertPtr(obj0, (void **) &arg1, SWIGTYPE_p_cmf__upslope__cell_vector, SWIG_POINTER_EXCEPTION) == -1) { - int res = iterable_to_list(obj0,SWIGTYPE_p_cmf__upslope__Cell, temp_list1); - if (SWIG_IsOK(res)) { - arg1 = &temp_list1; - } else { - SWIG_exception_fail(SWIG_TypeError,"Only iterables can be converted to cmf::upslope::cell_vector"); - } - } - } - { - try { - result = cmf::upslope::get_center(*arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj((new cmf::geometry::point(static_cast< const cmf::geometry::point& >(result))), SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_cell_positions(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::cell_vector *arg1 = 0 ; - cmf::upslope::cell_vector temp_list1 ; - PyObject * obj0 = 0 ; - char * kwnames[] = { - (char *) "cells", NULL - }; - SwigValueWrapper< cmf::geometry::point_vector > result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:cell_positions",kwnames,&obj0)) SWIG_fail; - { - if (SWIG_ConvertPtr(obj0, (void **) &arg1, SWIGTYPE_p_cmf__upslope__cell_vector, SWIG_POINTER_EXCEPTION) == -1) { - int res = iterable_to_list(obj0,SWIGTYPE_p_cmf__upslope__Cell, temp_list1); - if (SWIG_IsOK(res)) { - arg1 = &temp_list1; - } else { - SWIG_exception_fail(SWIG_TypeError,"Only iterables can be converted to cmf::upslope::cell_vector"); - } - } - } - { - try { - result = cmf::upslope::cell_positions(*arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj((new cmf::geometry::point_vector(static_cast< const cmf::geometry::point_vector& >(result))), SWIGTYPE_p_cmf__geometry__point_vector, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_cell_flux_directions(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::cell_vector *arg1 = 0 ; - cmf::math::Time arg2 ; - cmf::upslope::cell_vector temp_list1 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "cells",(char *) "arg2", NULL - }; - SwigValueWrapper< cmf::geometry::point_vector > result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:cell_flux_directions",kwnames,&obj0,&obj1)) SWIG_fail; - { - if (SWIG_ConvertPtr(obj0, (void **) &arg1, SWIGTYPE_p_cmf__upslope__cell_vector, SWIG_POINTER_EXCEPTION) == -1) { - int res = iterable_to_list(obj0,SWIGTYPE_p_cmf__upslope__Cell, temp_list1); - if (SWIG_IsOK(res)) { - arg1 = &temp_list1; - } else { - SWIG_exception_fail(SWIG_TypeError,"Only iterables can be converted to cmf::upslope::cell_vector"); - } - } - } - { - arg2 = convert_datetime_to_cmftime(obj1); - if (arg2 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } - } - { - try { - result = cmf::upslope::cell_flux_directions(*arg1,arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj((new cmf::geometry::point_vector(static_cast< const cmf::geometry::point_vector& >(result))), SWIGTYPE_p_cmf__geometry__point_vector, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_cell2cellflux(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::Cell *arg1 = 0 ; - cmf::upslope::Cell *arg2 = 0 ; - cmf::math::Time arg3 ; - bool arg4 = (bool) false ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - bool val4 ; - int ecode4 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - char * kwnames[] = { - (char *) "source",(char *) "target",(char *) "t",(char *) "subsurface_only", NULL - }; - cmf::math::num_array result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|O:cell2cellflux",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_cmf__upslope__Cell, 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cell2cellflux" "', argument " "1"" of type '" "cmf::upslope::Cell &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "cell2cellflux" "', argument " "1"" of type '" "cmf::upslope::Cell &""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_cmf__upslope__Cell, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cell2cellflux" "', argument " "2"" of type '" "cmf::upslope::Cell &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "cell2cellflux" "', argument " "2"" of type '" "cmf::upslope::Cell &""'"); - } - arg2 = reinterpret_cast< cmf::upslope::Cell * >(argp2); - { - arg3 = convert_datetime_to_cmftime(obj2); - if (arg3 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } - } - if (obj3) { - ecode4 = SWIG_AsVal_bool(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "cell2cellflux" "', argument " "4"" of type '" "bool""'"); - } - arg4 = static_cast< bool >(val4); - } - { - try { - result = cmf::upslope::cell2cellflux(*arg1,*arg2,arg3,arg4); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - resultobj = as_npy_array(result); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_cell_distance(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::Cell *arg1 = 0 ; - cmf::upslope::Cell *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "c1",(char *) "c2", NULL - }; - double result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:cell_distance",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_cmf__upslope__Cell, 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cell_distance" "', argument " "1"" of type '" "cmf::upslope::Cell &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "cell_distance" "', argument " "1"" of type '" "cmf::upslope::Cell &""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_cmf__upslope__Cell, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cell_distance" "', argument " "2"" of type '" "cmf::upslope::Cell &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "cell_distance" "', argument " "2"" of type '" "cmf::upslope::Cell &""'"); - } - arg2 = reinterpret_cast< cmf::upslope::Cell * >(argp2); - { - try { - result = (double)cmf::upslope::cell_distance(*arg1,*arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_subcatchment_pourpoint_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::subcatchment *arg1 = (cmf::upslope::subcatchment *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::upslope::Cell *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__subcatchment, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "subcatchment_pourpoint_get" "', argument " "1"" of type '" "cmf::upslope::subcatchment *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::subcatchment * >(argp1); - result = (cmf::upslope::Cell *) &(cmf::upslope::Cell const &) ((arg1)->pourpoint); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_subcatchment_inflowcells_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::subcatchment *arg1 = (cmf::upslope::subcatchment *) 0 ; - cmf::upslope::cell_vector *arg2 = (cmf::upslope::cell_vector *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"subcatchment_inflowcells_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__subcatchment, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "subcatchment_inflowcells_set" "', argument " "1"" of type '" "cmf::upslope::subcatchment *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::subcatchment * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_cmf__upslope__cell_vector, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "subcatchment_inflowcells_set" "', argument " "2"" of type '" "cmf::upslope::cell_vector *""'"); - } - arg2 = reinterpret_cast< cmf::upslope::cell_vector * >(argp2); - if (arg1) (arg1)->inflowcells = *arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_subcatchment_inflowcells_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::subcatchment *arg1 = (cmf::upslope::subcatchment *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::upslope::cell_vector *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__subcatchment, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "subcatchment_inflowcells_get" "', argument " "1"" of type '" "cmf::upslope::subcatchment *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::subcatchment * >(argp1); - result = (cmf::upslope::cell_vector *)& ((arg1)->inflowcells); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__cell_vector, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_subcatchment_cells_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::subcatchment *arg1 = (cmf::upslope::subcatchment *) 0 ; - cmf::upslope::cell_vector *arg2 = (cmf::upslope::cell_vector *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"subcatchment_cells_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__subcatchment, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "subcatchment_cells_set" "', argument " "1"" of type '" "cmf::upslope::subcatchment *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::subcatchment * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_cmf__upslope__cell_vector, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "subcatchment_cells_set" "', argument " "2"" of type '" "cmf::upslope::cell_vector *""'"); - } - arg2 = reinterpret_cast< cmf::upslope::cell_vector * >(argp2); - if (arg1) (arg1)->cells = *arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_subcatchment_cells_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::subcatchment *arg1 = (cmf::upslope::subcatchment *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::upslope::cell_vector *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__subcatchment, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "subcatchment_cells_get" "', argument " "1"" of type '" "cmf::upslope::subcatchment *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::subcatchment * >(argp1); - result = (cmf::upslope::cell_vector *)& ((arg1)->cells); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__cell_vector, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_subcatchment(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::Cell *arg1 = 0 ; - double arg2 = (double) 1e308 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "pourpoint",(char *) "area_threshold", NULL - }; - cmf::upslope::subcatchment *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:new_subcatchment",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_cmf__upslope__Cell, 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_subcatchment" "', argument " "1"" of type '" "cmf::upslope::Cell &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_subcatchment" "', argument " "1"" of type '" "cmf::upslope::Cell &""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); - if (obj1) { - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_subcatchment" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - } - { - try { - result = (cmf::upslope::subcatchment *)new cmf::upslope::subcatchment(*arg1,arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__subcatchment, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_subcatchment(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::subcatchment *arg1 = (cmf::upslope::subcatchment *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__subcatchment, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_subcatchment" "', argument " "1"" of type '" "cmf::upslope::subcatchment *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::subcatchment * >(argp1); - { - try { - delete arg1; - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *subcatchment_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__subcatchment, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *subcatchment_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN int Swig_var_rho_wg_set(PyObject *) { - SWIG_Error(SWIG_AttributeError,"Variable rho_wg is read-only."); - return 1; -} - - -SWIGINTERN PyObject *Swig_var_rho_wg_get(void) { - PyObject *pyobj = 0; - - pyobj = SWIG_From_double(static_cast< double >(cmf::upslope::rho_wg)); - return pyobj; -} - - -SWIGINTERN PyObject *_wrap_pressure_to_waterhead(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - double arg1 ; - double val1 ; - int ecode1 = 0 ; - PyObject * obj0 = 0 ; - char * kwnames[] = { - (char *) "Pressure", NULL - }; - double result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:pressure_to_waterhead",kwnames,&obj0)) SWIG_fail; - ecode1 = SWIG_AsVal_double(obj0, &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pressure_to_waterhead" "', argument " "1"" of type '" "double""'"); - } - arg1 = static_cast< double >(val1); - { - try { - result = (double)cmf::upslope::pressure_to_waterhead(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_waterhead_to_pressure(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - double arg1 ; - double val1 ; - int ecode1 = 0 ; - PyObject * obj0 = 0 ; - char * kwnames[] = { - (char *) "waterhead", NULL - }; - double result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:waterhead_to_pressure",kwnames,&obj0)) SWIG_fail; - ecode1 = SWIG_AsVal_double(obj0, &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "waterhead_to_pressure" "', argument " "1"" of type '" "double""'"); - } - arg1 = static_cast< double >(val1); - { - try { - result = (double)cmf::upslope::waterhead_to_pressure(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_pF_to_waterhead(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - double arg1 ; - double val1 ; - int ecode1 = 0 ; - PyObject * obj0 = 0 ; - char * kwnames[] = { - (char *) "pF", NULL - }; - double result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:pF_to_waterhead",kwnames,&obj0)) SWIG_fail; - ecode1 = SWIG_AsVal_double(obj0, &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pF_to_waterhead" "', argument " "1"" of type '" "double""'"); - } - arg1 = static_cast< double >(val1); - { - try { - result = (double)cmf::upslope::pF_to_waterhead(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_waterhead_to_pF(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - double arg1 ; - double val1 ; - int ecode1 = 0 ; - PyObject * obj0 = 0 ; - char * kwnames[] = { - (char *) "waterhead", NULL - }; - double result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:waterhead_to_pF",kwnames,&obj0)) SWIG_fail; - ecode1 = SWIG_AsVal_double(obj0, &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "waterhead_to_pF" "', argument " "1"" of type '" "double""'"); - } - arg1 = static_cast< double >(val1); - { - try { - result = (double)cmf::upslope::waterhead_to_pF(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_RetentionCurve_K__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::upslope::RetentionCurve *arg1 = (cmf::upslope::RetentionCurve *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - real result; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__RetentionCurve, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RetentionCurve_K" "', argument " "1"" of type '" "cmf::upslope::RetentionCurve const *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::RetentionCurve * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RetentionCurve_K" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - { - try { - result = (real)((cmf::upslope::RetentionCurve const *)arg1)->K(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_RetentionCurve_K__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::upslope::RetentionCurve *arg1 = (cmf::upslope::RetentionCurve *) 0 ; - cmf::math::num_array *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - cmf::math::num_array result; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__RetentionCurve, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RetentionCurve_K" "', argument " "1"" of type '" "cmf::upslope::RetentionCurve const *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::RetentionCurve * >(argp1); - { - // Convert a array_wrapper from numpy array - double * data=0; - ptrdiff_t size = from_npy_array(swig_obj[1],&data); - if (!data) { - SWIG_exception_fail(SWIG_TypeError,"Input data is not 'array-like' (in the sense of numpy arrays)"); - return NULL; - } - arg2 = new cmf::math::num_array(size,data); - } - { - try { - result = ((cmf::upslope::RetentionCurve const *)arg1)->K((cmf::math::num_array const &)*arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - resultobj = as_npy_array(result); - } - { - delete arg2; - } - return resultobj; -fail: - { - delete arg2; - } - return NULL; -} - - -SWIGINTERN PyObject *_wrap_RetentionCurve_K(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args,"RetentionCurve_K",0,2,argv))) SWIG_fail; - --argc; - { - unsigned long _index = 0; - SWIG_TypeRank _rank = 0; - if (argc == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__upslope__RetentionCurve, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - _v = test_npy_array(argv[1]); - } - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 1; - if (_rank == _rankm) goto dispatch; - } - } - check_1: - - if (argc == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__upslope__RetentionCurve, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 2; - if (_rank == _rankm) goto dispatch; - } - } - check_2: - - dispatch: - switch(_index) { - case 1: - return _wrap_RetentionCurve_K__SWIG_1(self, argc, argv); - case 2: - return _wrap_RetentionCurve_K__SWIG_0(self, argc, argv); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'RetentionCurve_K'.\n" - " Possible C/C++ prototypes are:\n" - " cmf::upslope::RetentionCurve::K(real) const\n" - " cmf::upslope::RetentionCurve::K(cmf::math::num_array const &) const\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_RetentionCurve_Wetness_eff(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::RetentionCurve *arg1 = (cmf::upslope::RetentionCurve *) 0 ; - real arg2 ; - real arg3 = (real) 4.2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - double val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "wetness",(char *) "pF_r", NULL - }; - real result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:RetentionCurve_Wetness_eff",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__RetentionCurve, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RetentionCurve_Wetness_eff" "', argument " "1"" of type '" "cmf::upslope::RetentionCurve const *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::RetentionCurve * >(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RetentionCurve_Wetness_eff" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (obj2) { - ecode3 = SWIG_AsVal_double(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RetentionCurve_Wetness_eff" "', argument " "3"" of type '" "real""'"); - } - arg3 = static_cast< real >(val3); - } - { - try { - result = (real)((cmf::upslope::RetentionCurve const *)arg1)->Wetness_eff(arg2,arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_RetentionCurve_Porosity(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::RetentionCurve *arg1 = (cmf::upslope::RetentionCurve *) 0 ; - real arg2 = (real) 0.0 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "depth", NULL - }; - real result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:RetentionCurve_Porosity",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__RetentionCurve, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RetentionCurve_Porosity" "', argument " "1"" of type '" "cmf::upslope::RetentionCurve const *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::RetentionCurve * >(argp1); - if (obj1) { - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RetentionCurve_Porosity" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - } - { - try { - result = (real)((cmf::upslope::RetentionCurve const *)arg1)->Porosity(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_RetentionCurve_VoidVolume(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::RetentionCurve *arg1 = (cmf::upslope::RetentionCurve *) 0 ; - real arg2 ; - real arg3 ; - real arg4 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - double val3 ; - int ecode3 = 0 ; - double val4 ; - int ecode4 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "upperDepth",(char *) "lowerDepth",(char *) "Area", NULL - }; - real result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO:RetentionCurve_VoidVolume",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__RetentionCurve, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RetentionCurve_VoidVolume" "', argument " "1"" of type '" "cmf::upslope::RetentionCurve const *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::RetentionCurve * >(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RetentionCurve_VoidVolume" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - ecode3 = SWIG_AsVal_double(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RetentionCurve_VoidVolume" "', argument " "3"" of type '" "real""'"); - } - arg3 = static_cast< real >(val3); - ecode4 = SWIG_AsVal_double(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "RetentionCurve_VoidVolume" "', argument " "4"" of type '" "real""'"); - } - arg4 = static_cast< real >(val4); - { - try { - result = (real)((cmf::upslope::RetentionCurve const *)arg1)->VoidVolume(arg2,arg3,arg4); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_RetentionCurve_FillHeight(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::RetentionCurve *arg1 = (cmf::upslope::RetentionCurve *) 0 ; - real arg2 ; - real arg3 ; - real arg4 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - double val3 ; - int ecode3 = 0 ; - double val4 ; - int ecode4 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "lowerDepth",(char *) "Area",(char *) "Volume", NULL - }; - real result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO:RetentionCurve_FillHeight",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__RetentionCurve, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RetentionCurve_FillHeight" "', argument " "1"" of type '" "cmf::upslope::RetentionCurve const *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::RetentionCurve * >(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RetentionCurve_FillHeight" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - ecode3 = SWIG_AsVal_double(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RetentionCurve_FillHeight" "', argument " "3"" of type '" "real""'"); - } - arg3 = static_cast< real >(val3); - ecode4 = SWIG_AsVal_double(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "RetentionCurve_FillHeight" "', argument " "4"" of type '" "real""'"); - } - arg4 = static_cast< real >(val4); - { - try { - result = (real)((cmf::upslope::RetentionCurve const *)arg1)->FillHeight(arg2,arg3,arg4); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_RetentionCurve_Wetness__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::upslope::RetentionCurve *arg1 = (cmf::upslope::RetentionCurve *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - real result; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__RetentionCurve, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RetentionCurve_Wetness" "', argument " "1"" of type '" "cmf::upslope::RetentionCurve const *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::RetentionCurve * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RetentionCurve_Wetness" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - { - try { - result = (real)((cmf::upslope::RetentionCurve const *)arg1)->Wetness(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_RetentionCurve_theta__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::upslope::RetentionCurve *arg1 = (cmf::upslope::RetentionCurve *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - real result; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__RetentionCurve, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RetentionCurve_theta" "', argument " "1"" of type '" "cmf::upslope::RetentionCurve const *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::RetentionCurve * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RetentionCurve_theta" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - { - try { - result = (real)((cmf::upslope::RetentionCurve const *)arg1)->theta(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_RetentionCurve_Diffusivity__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::upslope::RetentionCurve *arg1 = (cmf::upslope::RetentionCurve *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - real result; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__RetentionCurve, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RetentionCurve_Diffusivity" "', argument " "1"" of type '" "cmf::upslope::RetentionCurve const *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::RetentionCurve * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RetentionCurve_Diffusivity" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - { - try { - result = (real)((cmf::upslope::RetentionCurve const *)arg1)->Diffusivity(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_RetentionCurve_Diffusivity__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::upslope::RetentionCurve *arg1 = (cmf::upslope::RetentionCurve *) 0 ; - cmf::math::num_array *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - cmf::math::num_array result; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__RetentionCurve, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RetentionCurve_Diffusivity" "', argument " "1"" of type '" "cmf::upslope::RetentionCurve *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::RetentionCurve * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_cmf__math__num_array, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "RetentionCurve_Diffusivity" "', argument " "2"" of type '" "cmf::math::num_array &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "RetentionCurve_Diffusivity" "', argument " "2"" of type '" "cmf::math::num_array &""'"); - } - arg2 = reinterpret_cast< cmf::math::num_array * >(argp2); - { - try { - result = (arg1)->Diffusivity(*arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - resultobj = as_npy_array(result); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_RetentionCurve_Diffusivity(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args,"RetentionCurve_Diffusivity",0,2,argv))) SWIG_fail; - --argc; - { - unsigned long _index = 0; - SWIG_TypeRank _rank = 0; - if (argc == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__upslope__RetentionCurve, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - _v = test_npy_array(argv[1]); - } - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 1; - if (_rank == _rankm) goto dispatch; - } - } - check_1: - - if (argc == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__upslope__RetentionCurve, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 2; - if (_rank == _rankm) goto dispatch; - } - } - check_2: - - dispatch: - switch(_index) { - case 1: - return _wrap_RetentionCurve_Diffusivity__SWIG_1(self, argc, argv); - case 2: - return _wrap_RetentionCurve_Diffusivity__SWIG_0(self, argc, argv); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'RetentionCurve_Diffusivity'.\n" - " Possible C/C++ prototypes are:\n" - " cmf::upslope::RetentionCurve::Diffusivity(real) const\n" - " cmf::upslope::RetentionCurve::Diffusivity(cmf::math::num_array &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_RetentionCurve_Wetness__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::upslope::RetentionCurve *arg1 = (cmf::upslope::RetentionCurve *) 0 ; - cmf::math::num_array *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - cmf::math::num_array result; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__RetentionCurve, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RetentionCurve_Wetness" "', argument " "1"" of type '" "cmf::upslope::RetentionCurve const *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::RetentionCurve * >(argp1); - { - // Convert a array_wrapper from numpy array - double * data=0; - ptrdiff_t size = from_npy_array(swig_obj[1],&data); - if (!data) { - SWIG_exception_fail(SWIG_TypeError,"Input data is not 'array-like' (in the sense of numpy arrays)"); - return NULL; - } - arg2 = new cmf::math::num_array(size,data); - } - { - try { - result = ((cmf::upslope::RetentionCurve const *)arg1)->Wetness((cmf::math::num_array const &)*arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - resultobj = as_npy_array(result); - } - { - delete arg2; - } - return resultobj; -fail: - { - delete arg2; - } - return NULL; -} - - -SWIGINTERN PyObject *_wrap_RetentionCurve_Wetness(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args,"RetentionCurve_Wetness",0,2,argv))) SWIG_fail; - --argc; - { - unsigned long _index = 0; - SWIG_TypeRank _rank = 0; - if (argc == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__upslope__RetentionCurve, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - _v = test_npy_array(argv[1]); - } - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 1; - if (_rank == _rankm) goto dispatch; - } - } - check_1: - - if (argc == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__upslope__RetentionCurve, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 2; - if (_rank == _rankm) goto dispatch; - } - } - check_2: - - dispatch: - switch(_index) { - case 1: - return _wrap_RetentionCurve_Wetness__SWIG_1(self, argc, argv); - case 2: - return _wrap_RetentionCurve_Wetness__SWIG_0(self, argc, argv); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'RetentionCurve_Wetness'.\n" - " Possible C/C++ prototypes are:\n" - " cmf::upslope::RetentionCurve::Wetness(real) const\n" - " cmf::upslope::RetentionCurve::Wetness(cmf::math::num_array const &) const\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_RetentionCurve_theta__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::upslope::RetentionCurve *arg1 = (cmf::upslope::RetentionCurve *) 0 ; - cmf::math::num_array *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - cmf::math::num_array result; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__RetentionCurve, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RetentionCurve_theta" "', argument " "1"" of type '" "cmf::upslope::RetentionCurve const *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::RetentionCurve * >(argp1); - { - // Convert a array_wrapper from numpy array - double * data=0; - ptrdiff_t size = from_npy_array(swig_obj[1],&data); - if (!data) { - SWIG_exception_fail(SWIG_TypeError,"Input data is not 'array-like' (in the sense of numpy arrays)"); - return NULL; - } - arg2 = new cmf::math::num_array(size,data); - } - { - try { - result = ((cmf::upslope::RetentionCurve const *)arg1)->theta((cmf::math::num_array const &)*arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - resultobj = as_npy_array(result); - } - { - delete arg2; - } - return resultobj; -fail: - { - delete arg2; - } - return NULL; -} - - -SWIGINTERN PyObject *_wrap_RetentionCurve_theta(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args,"RetentionCurve_theta",0,2,argv))) SWIG_fail; - --argc; - { - unsigned long _index = 0; - SWIG_TypeRank _rank = 0; - if (argc == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__upslope__RetentionCurve, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - _v = test_npy_array(argv[1]); - } - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 1; - if (_rank == _rankm) goto dispatch; - } - } - check_1: - - if (argc == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__upslope__RetentionCurve, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 2; - if (_rank == _rankm) goto dispatch; - } - } - check_2: - - dispatch: - switch(_index) { - case 1: - return _wrap_RetentionCurve_theta__SWIG_1(self, argc, argv); - case 2: - return _wrap_RetentionCurve_theta__SWIG_0(self, argc, argv); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'RetentionCurve_theta'.\n" - " Possible C/C++ prototypes are:\n" - " cmf::upslope::RetentionCurve::theta(real) const\n" - " cmf::upslope::RetentionCurve::theta(cmf::math::num_array const &) const\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_RetentionCurve_dPsiM_dW__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::upslope::RetentionCurve *arg1 = (cmf::upslope::RetentionCurve *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - real result; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__RetentionCurve, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RetentionCurve_dPsiM_dW" "', argument " "1"" of type '" "cmf::upslope::RetentionCurve const *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::RetentionCurve * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RetentionCurve_dPsiM_dW" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - { - try { - result = (real)((cmf::upslope::RetentionCurve const *)arg1)->dPsiM_dW(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_RetentionCurve_dPsiM_dW__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::upslope::RetentionCurve *arg1 = (cmf::upslope::RetentionCurve *) 0 ; - cmf::math::num_array *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - cmf::math::num_array result; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__RetentionCurve, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RetentionCurve_dPsiM_dW" "', argument " "1"" of type '" "cmf::upslope::RetentionCurve const *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::RetentionCurve * >(argp1); - { - // Convert a array_wrapper from numpy array - double * data=0; - ptrdiff_t size = from_npy_array(swig_obj[1],&data); - if (!data) { - SWIG_exception_fail(SWIG_TypeError,"Input data is not 'array-like' (in the sense of numpy arrays)"); - return NULL; - } - arg2 = new cmf::math::num_array(size,data); - } - { - try { - result = ((cmf::upslope::RetentionCurve const *)arg1)->dPsiM_dW((cmf::math::num_array const &)*arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - resultobj = as_npy_array(result); - } - { - delete arg2; - } - return resultobj; -fail: - { - delete arg2; - } - return NULL; -} - - -SWIGINTERN PyObject *_wrap_RetentionCurve_dPsiM_dW(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args,"RetentionCurve_dPsiM_dW",0,2,argv))) SWIG_fail; - --argc; - { - unsigned long _index = 0; - SWIG_TypeRank _rank = 0; - if (argc == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__upslope__RetentionCurve, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - _v = test_npy_array(argv[1]); - } - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 1; - if (_rank == _rankm) goto dispatch; - } - } - check_1: - - if (argc == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__upslope__RetentionCurve, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 2; - if (_rank == _rankm) goto dispatch; - } - } - check_2: - - dispatch: - switch(_index) { - case 1: - return _wrap_RetentionCurve_dPsiM_dW__SWIG_1(self, argc, argv); - case 2: - return _wrap_RetentionCurve_dPsiM_dW__SWIG_0(self, argc, argv); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'RetentionCurve_dPsiM_dW'.\n" - " Possible C/C++ prototypes are:\n" - " cmf::upslope::RetentionCurve::dPsiM_dW(real) const\n" - " cmf::upslope::RetentionCurve::dPsiM_dW(cmf::math::num_array const &) const\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_RetentionCurve_Wetness_pF__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::upslope::RetentionCurve *arg1 = (cmf::upslope::RetentionCurve *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - real result; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__RetentionCurve, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RetentionCurve_Wetness_pF" "', argument " "1"" of type '" "cmf::upslope::RetentionCurve const *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::RetentionCurve * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RetentionCurve_Wetness_pF" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - { - try { - result = (real)((cmf::upslope::RetentionCurve const *)arg1)->Wetness_pF(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_RetentionCurve_Wetness_pF__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::upslope::RetentionCurve *arg1 = (cmf::upslope::RetentionCurve *) 0 ; - cmf::math::num_array *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - cmf::math::num_array result; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__RetentionCurve, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RetentionCurve_Wetness_pF" "', argument " "1"" of type '" "cmf::upslope::RetentionCurve const *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::RetentionCurve * >(argp1); - { - // Convert a array_wrapper from numpy array - double * data=0; - ptrdiff_t size = from_npy_array(swig_obj[1],&data); - if (!data) { - SWIG_exception_fail(SWIG_TypeError,"Input data is not 'array-like' (in the sense of numpy arrays)"); - return NULL; - } - arg2 = new cmf::math::num_array(size,data); - } - { - try { - result = ((cmf::upslope::RetentionCurve const *)arg1)->Wetness_pF((cmf::math::num_array const &)*arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - resultobj = as_npy_array(result); - } - { - delete arg2; - } - return resultobj; -fail: - { - delete arg2; - } - return NULL; -} - - -SWIGINTERN PyObject *_wrap_RetentionCurve_Wetness_pF(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args,"RetentionCurve_Wetness_pF",0,2,argv))) SWIG_fail; - --argc; - { - unsigned long _index = 0; - SWIG_TypeRank _rank = 0; - if (argc == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__upslope__RetentionCurve, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - _v = test_npy_array(argv[1]); - } - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 1; - if (_rank == _rankm) goto dispatch; - } - } - check_1: - - if (argc == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__upslope__RetentionCurve, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 2; - if (_rank == _rankm) goto dispatch; - } - } - check_2: - - dispatch: - switch(_index) { - case 1: - return _wrap_RetentionCurve_Wetness_pF__SWIG_1(self, argc, argv); - case 2: - return _wrap_RetentionCurve_Wetness_pF__SWIG_0(self, argc, argv); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'RetentionCurve_Wetness_pF'.\n" - " Possible C/C++ prototypes are:\n" - " cmf::upslope::RetentionCurve::Wetness_pF(real) const\n" - " cmf::upslope::RetentionCurve::Wetness_pF(cmf::math::num_array const &) const\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_RetentionCurve_MatricPotential__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::upslope::RetentionCurve *arg1 = (cmf::upslope::RetentionCurve *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - real result; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__RetentionCurve, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RetentionCurve_MatricPotential" "', argument " "1"" of type '" "cmf::upslope::RetentionCurve const *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::RetentionCurve * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RetentionCurve_MatricPotential" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - { - try { - result = (real)((cmf::upslope::RetentionCurve const *)arg1)->MatricPotential(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_RetentionCurve_MatricPotential__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::upslope::RetentionCurve *arg1 = (cmf::upslope::RetentionCurve *) 0 ; - cmf::math::num_array *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - cmf::math::num_array result; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__RetentionCurve, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RetentionCurve_MatricPotential" "', argument " "1"" of type '" "cmf::upslope::RetentionCurve const *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::RetentionCurve * >(argp1); - { - // Convert a array_wrapper from numpy array - double * data=0; - ptrdiff_t size = from_npy_array(swig_obj[1],&data); - if (!data) { - SWIG_exception_fail(SWIG_TypeError,"Input data is not 'array-like' (in the sense of numpy arrays)"); - return NULL; - } - arg2 = new cmf::math::num_array(size,data); - } - { - try { - result = ((cmf::upslope::RetentionCurve const *)arg1)->MatricPotential((cmf::math::num_array const &)*arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - resultobj = as_npy_array(result); - } - { - delete arg2; - } - return resultobj; -fail: - { - delete arg2; - } - return NULL; -} - - -SWIGINTERN PyObject *_wrap_RetentionCurve_MatricPotential(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args,"RetentionCurve_MatricPotential",0,2,argv))) SWIG_fail; - --argc; - { - unsigned long _index = 0; - SWIG_TypeRank _rank = 0; - if (argc == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__upslope__RetentionCurve, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - _v = test_npy_array(argv[1]); - } - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 1; - if (_rank == _rankm) goto dispatch; - } - } - check_1: - - if (argc == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__upslope__RetentionCurve, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 2; - if (_rank == _rankm) goto dispatch; - } - } - check_2: - - dispatch: - switch(_index) { - case 1: - return _wrap_RetentionCurve_MatricPotential__SWIG_1(self, argc, argv); - case 2: - return _wrap_RetentionCurve_MatricPotential__SWIG_0(self, argc, argv); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'RetentionCurve_MatricPotential'.\n" - " Possible C/C++ prototypes are:\n" - " cmf::upslope::RetentionCurve::MatricPotential(real) const\n" - " cmf::upslope::RetentionCurve::MatricPotential(cmf::math::num_array const &) const\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_RetentionCurve_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::RetentionCurve *arg1 = (cmf::upslope::RetentionCurve *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::upslope::RetentionCurve *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__RetentionCurve, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RetentionCurve_copy" "', argument " "1"" of type '" "cmf::upslope::RetentionCurve const *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::RetentionCurve * >(argp1); - { - try { - result = (cmf::upslope::RetentionCurve *)((cmf::upslope::RetentionCurve const *)arg1)->copy(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__RetentionCurve, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_RetentionCurve(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::RetentionCurve *arg1 = (cmf::upslope::RetentionCurve *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__RetentionCurve, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_RetentionCurve" "', argument " "1"" of type '" "cmf::upslope::RetentionCurve *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::RetentionCurve * >(argp1); - { - try { - delete arg1; - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *RetentionCurve_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__RetentionCurve, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *_wrap_BrooksCoreyRetentionCurve_Ksat_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::BrooksCoreyRetentionCurve *arg1 = (cmf::upslope::BrooksCoreyRetentionCurve *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"BrooksCoreyRetentionCurve_Ksat_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__BrooksCoreyRetentionCurve, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BrooksCoreyRetentionCurve_Ksat_set" "', argument " "1"" of type '" "cmf::upslope::BrooksCoreyRetentionCurve *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::BrooksCoreyRetentionCurve * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BrooksCoreyRetentionCurve_Ksat_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->Ksat = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BrooksCoreyRetentionCurve_Ksat_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::BrooksCoreyRetentionCurve *arg1 = (cmf::upslope::BrooksCoreyRetentionCurve *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__BrooksCoreyRetentionCurve, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BrooksCoreyRetentionCurve_Ksat_get" "', argument " "1"" of type '" "cmf::upslope::BrooksCoreyRetentionCurve *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::BrooksCoreyRetentionCurve * >(argp1); - result = (real) ((arg1)->Ksat); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BrooksCoreyRetentionCurve_SetPorosity(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::BrooksCoreyRetentionCurve *arg1 = (cmf::upslope::BrooksCoreyRetentionCurve *) 0 ; - real arg2 ; - real arg3 = (real) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - double val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "porosity",(char *) "porosity_decay", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:BrooksCoreyRetentionCurve_SetPorosity",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__BrooksCoreyRetentionCurve, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BrooksCoreyRetentionCurve_SetPorosity" "', argument " "1"" of type '" "cmf::upslope::BrooksCoreyRetentionCurve *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::BrooksCoreyRetentionCurve * >(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BrooksCoreyRetentionCurve_SetPorosity" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (obj2) { - ecode3 = SWIG_AsVal_double(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "BrooksCoreyRetentionCurve_SetPorosity" "', argument " "3"" of type '" "real""'"); - } - arg3 = static_cast< real >(val3); - } - { - try { - (arg1)->SetPorosity(arg2,arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BrooksCoreyRetentionCurve_Transmissivity(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::BrooksCoreyRetentionCurve *arg1 = (cmf::upslope::BrooksCoreyRetentionCurve *) 0 ; - real arg2 ; - real arg3 ; - real arg4 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - double val3 ; - int ecode3 = 0 ; - double val4 ; - int ecode4 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "upperDepth",(char *) "lowerDepth",(char *) "theta", NULL - }; - real result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO:BrooksCoreyRetentionCurve_Transmissivity",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__BrooksCoreyRetentionCurve, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BrooksCoreyRetentionCurve_Transmissivity" "', argument " "1"" of type '" "cmf::upslope::BrooksCoreyRetentionCurve const *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::BrooksCoreyRetentionCurve * >(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BrooksCoreyRetentionCurve_Transmissivity" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - ecode3 = SWIG_AsVal_double(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "BrooksCoreyRetentionCurve_Transmissivity" "', argument " "3"" of type '" "real""'"); - } - arg3 = static_cast< real >(val3); - ecode4 = SWIG_AsVal_double(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "BrooksCoreyRetentionCurve_Transmissivity" "', argument " "4"" of type '" "real""'"); - } - arg4 = static_cast< real >(val4); - { - try { - result = (real)((cmf::upslope::BrooksCoreyRetentionCurve const *)arg1)->Transmissivity(arg2,arg3,arg4); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BrooksCoreyRetentionCurve_wetness_X_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::BrooksCoreyRetentionCurve *arg1 = (cmf::upslope::BrooksCoreyRetentionCurve *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"BrooksCoreyRetentionCurve_wetness_X_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__BrooksCoreyRetentionCurve, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BrooksCoreyRetentionCurve_wetness_X_set" "', argument " "1"" of type '" "cmf::upslope::BrooksCoreyRetentionCurve *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::BrooksCoreyRetentionCurve * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BrooksCoreyRetentionCurve_wetness_X_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->wetness_X = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BrooksCoreyRetentionCurve_wetness_X_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::BrooksCoreyRetentionCurve *arg1 = (cmf::upslope::BrooksCoreyRetentionCurve *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__BrooksCoreyRetentionCurve, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BrooksCoreyRetentionCurve_wetness_X_get" "', argument " "1"" of type '" "cmf::upslope::BrooksCoreyRetentionCurve *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::BrooksCoreyRetentionCurve * >(argp1); - result = (real) ((arg1)->wetness_X); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BrooksCoreyRetentionCurve_Psi_X_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::BrooksCoreyRetentionCurve *arg1 = (cmf::upslope::BrooksCoreyRetentionCurve *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"BrooksCoreyRetentionCurve_Psi_X_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__BrooksCoreyRetentionCurve, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BrooksCoreyRetentionCurve_Psi_X_set" "', argument " "1"" of type '" "cmf::upslope::BrooksCoreyRetentionCurve *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::BrooksCoreyRetentionCurve * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BrooksCoreyRetentionCurve_Psi_X_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->Psi_X = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BrooksCoreyRetentionCurve_Psi_X_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::BrooksCoreyRetentionCurve *arg1 = (cmf::upslope::BrooksCoreyRetentionCurve *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__BrooksCoreyRetentionCurve, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BrooksCoreyRetentionCurve_Psi_X_get" "', argument " "1"" of type '" "cmf::upslope::BrooksCoreyRetentionCurve *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::BrooksCoreyRetentionCurve * >(argp1); - result = (real) ((arg1)->Psi_X); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BrooksCoreyRetentionCurve_residual_theta_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::BrooksCoreyRetentionCurve *arg1 = (cmf::upslope::BrooksCoreyRetentionCurve *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"BrooksCoreyRetentionCurve_residual_theta_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__BrooksCoreyRetentionCurve, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BrooksCoreyRetentionCurve_residual_theta_set" "', argument " "1"" of type '" "cmf::upslope::BrooksCoreyRetentionCurve *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::BrooksCoreyRetentionCurve * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BrooksCoreyRetentionCurve_residual_theta_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->residual_theta = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BrooksCoreyRetentionCurve_residual_theta_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::BrooksCoreyRetentionCurve *arg1 = (cmf::upslope::BrooksCoreyRetentionCurve *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__BrooksCoreyRetentionCurve, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BrooksCoreyRetentionCurve_residual_theta_get" "', argument " "1"" of type '" "cmf::upslope::BrooksCoreyRetentionCurve *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::BrooksCoreyRetentionCurve * >(argp1); - result = (real) ((arg1)->residual_theta); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_BrooksCoreyRetentionCurve(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - real arg1 = (real) 15 ; - real arg2 = (real) 0.5 ; - real arg3 = (real) 5 ; - real arg4 = (real) 0.2 ; - real arg5 = (real) cmf::upslope::pF_to_waterhead(2.5) ; - real arg6 = (real) 0 ; - double val1 ; - int ecode1 = 0 ; - double val2 ; - int ecode2 = 0 ; - double val3 ; - int ecode3 = 0 ; - double val4 ; - int ecode4 = 0 ; - double val5 ; - int ecode5 = 0 ; - double val6 ; - int ecode6 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - char * kwnames[] = { - (char *) "ksat",(char *) "porosity",(char *) "_b",(char *) "theta_x",(char *) "psi_x",(char *) "porosity_decay", NULL - }; - cmf::upslope::BrooksCoreyRetentionCurve *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|OOOOOO:new_BrooksCoreyRetentionCurve",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail; - if (obj0) { - ecode1 = SWIG_AsVal_double(obj0, &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_BrooksCoreyRetentionCurve" "', argument " "1"" of type '" "real""'"); - } - arg1 = static_cast< real >(val1); - } - if (obj1) { - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_BrooksCoreyRetentionCurve" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - } - if (obj2) { - ecode3 = SWIG_AsVal_double(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_BrooksCoreyRetentionCurve" "', argument " "3"" of type '" "real""'"); - } - arg3 = static_cast< real >(val3); - } - if (obj3) { - ecode4 = SWIG_AsVal_double(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_BrooksCoreyRetentionCurve" "', argument " "4"" of type '" "real""'"); - } - arg4 = static_cast< real >(val4); - } - if (obj4) { - ecode5 = SWIG_AsVal_double(obj4, &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_BrooksCoreyRetentionCurve" "', argument " "5"" of type '" "real""'"); - } - arg5 = static_cast< real >(val5); - } - if (obj5) { - ecode6 = SWIG_AsVal_double(obj5, &val6); - if (!SWIG_IsOK(ecode6)) { - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_BrooksCoreyRetentionCurve" "', argument " "6"" of type '" "real""'"); - } - arg6 = static_cast< real >(val6); - } - { - try { - result = (cmf::upslope::BrooksCoreyRetentionCurve *)new cmf::upslope::BrooksCoreyRetentionCurve(arg1,arg2,arg3,arg4,arg5,arg6); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__BrooksCoreyRetentionCurve, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BrooksCoreyRetentionCurve_CreateFrom2Points(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - real arg1 ; - real arg2 ; - real arg3 ; - real arg4 ; - real arg5 = (real) cmf::upslope::pF_to_waterhead(2.5) ; - real arg6 = (real) cmf::upslope::pF_to_waterhead(4.2) ; - double val1 ; - int ecode1 = 0 ; - double val2 ; - int ecode2 = 0 ; - double val3 ; - int ecode3 = 0 ; - double val4 ; - int ecode4 = 0 ; - double val5 ; - int ecode5 = 0 ; - double val6 ; - int ecode6 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - char * kwnames[] = { - (char *) "ksat",(char *) "porosity",(char *) "theta1",(char *) "theta2",(char *) "psi_1",(char *) "psi_2", NULL - }; - cmf::upslope::BrooksCoreyRetentionCurve result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO|OO:BrooksCoreyRetentionCurve_CreateFrom2Points",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail; - ecode1 = SWIG_AsVal_double(obj0, &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "BrooksCoreyRetentionCurve_CreateFrom2Points" "', argument " "1"" of type '" "real""'"); - } - arg1 = static_cast< real >(val1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BrooksCoreyRetentionCurve_CreateFrom2Points" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - ecode3 = SWIG_AsVal_double(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "BrooksCoreyRetentionCurve_CreateFrom2Points" "', argument " "3"" of type '" "real""'"); - } - arg3 = static_cast< real >(val3); - ecode4 = SWIG_AsVal_double(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "BrooksCoreyRetentionCurve_CreateFrom2Points" "', argument " "4"" of type '" "real""'"); - } - arg4 = static_cast< real >(val4); - if (obj4) { - ecode5 = SWIG_AsVal_double(obj4, &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "BrooksCoreyRetentionCurve_CreateFrom2Points" "', argument " "5"" of type '" "real""'"); - } - arg5 = static_cast< real >(val5); - } - if (obj5) { - ecode6 = SWIG_AsVal_double(obj5, &val6); - if (!SWIG_IsOK(ecode6)) { - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "BrooksCoreyRetentionCurve_CreateFrom2Points" "', argument " "6"" of type '" "real""'"); - } - arg6 = static_cast< real >(val6); - } - { - try { - result = cmf::upslope::BrooksCoreyRetentionCurve::CreateFrom2Points(arg1,arg2,arg3,arg4,arg5,arg6); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj((new cmf::upslope::BrooksCoreyRetentionCurve(static_cast< const cmf::upslope::BrooksCoreyRetentionCurve& >(result))), SWIGTYPE_p_cmf__upslope__BrooksCoreyRetentionCurve, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BrooksCoreyRetentionCurve_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::BrooksCoreyRetentionCurve *arg1 = (cmf::upslope::BrooksCoreyRetentionCurve *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::upslope::BrooksCoreyRetentionCurve *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__BrooksCoreyRetentionCurve, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BrooksCoreyRetentionCurve_copy" "', argument " "1"" of type '" "cmf::upslope::BrooksCoreyRetentionCurve const *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::BrooksCoreyRetentionCurve * >(argp1); - { - try { - result = (cmf::upslope::BrooksCoreyRetentionCurve *)((cmf::upslope::BrooksCoreyRetentionCurve const *)arg1)->copy(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__BrooksCoreyRetentionCurve, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_BrooksCoreyRetentionCurve(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::BrooksCoreyRetentionCurve *arg1 = (cmf::upslope::BrooksCoreyRetentionCurve *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__BrooksCoreyRetentionCurve, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_BrooksCoreyRetentionCurve" "', argument " "1"" of type '" "cmf::upslope::BrooksCoreyRetentionCurve *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::BrooksCoreyRetentionCurve * >(argp1); - { - try { - delete arg1; - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BrooksCoreyRetentionCurve_b_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::BrooksCoreyRetentionCurve *arg1 = (cmf::upslope::BrooksCoreyRetentionCurve *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"BrooksCoreyRetentionCurve_b_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__BrooksCoreyRetentionCurve, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BrooksCoreyRetentionCurve_b_set" "', argument " "1"" of type '" "cmf::upslope::BrooksCoreyRetentionCurve *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::BrooksCoreyRetentionCurve * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BrooksCoreyRetentionCurve_b_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - { - try { - cmf_upslope_BrooksCoreyRetentionCurve_b_set(arg1,arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BrooksCoreyRetentionCurve_b_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::BrooksCoreyRetentionCurve *arg1 = (cmf::upslope::BrooksCoreyRetentionCurve *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__BrooksCoreyRetentionCurve, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BrooksCoreyRetentionCurve_b_get" "', argument " "1"" of type '" "cmf::upslope::BrooksCoreyRetentionCurve *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::BrooksCoreyRetentionCurve * >(argp1); - { - try { - result = (real)cmf_upslope_BrooksCoreyRetentionCurve_b_get(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *BrooksCoreyRetentionCurve_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__BrooksCoreyRetentionCurve, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *BrooksCoreyRetentionCurve_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_VanGenuchtenMualem_alpha_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::VanGenuchtenMualem *arg1 = (cmf::upslope::VanGenuchtenMualem *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"VanGenuchtenMualem_alpha_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__VanGenuchtenMualem, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VanGenuchtenMualem_alpha_set" "', argument " "1"" of type '" "cmf::upslope::VanGenuchtenMualem *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::VanGenuchtenMualem * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VanGenuchtenMualem_alpha_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->alpha = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_VanGenuchtenMualem_alpha_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::VanGenuchtenMualem *arg1 = (cmf::upslope::VanGenuchtenMualem *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__VanGenuchtenMualem, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VanGenuchtenMualem_alpha_get" "', argument " "1"" of type '" "cmf::upslope::VanGenuchtenMualem *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::VanGenuchtenMualem * >(argp1); - result = (real) ((arg1)->alpha); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_VanGenuchtenMualem_n_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::VanGenuchtenMualem *arg1 = (cmf::upslope::VanGenuchtenMualem *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"VanGenuchtenMualem_n_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__VanGenuchtenMualem, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VanGenuchtenMualem_n_set" "', argument " "1"" of type '" "cmf::upslope::VanGenuchtenMualem *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::VanGenuchtenMualem * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VanGenuchtenMualem_n_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->n = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_VanGenuchtenMualem_n_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::VanGenuchtenMualem *arg1 = (cmf::upslope::VanGenuchtenMualem *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__VanGenuchtenMualem, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VanGenuchtenMualem_n_get" "', argument " "1"" of type '" "cmf::upslope::VanGenuchtenMualem *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::VanGenuchtenMualem * >(argp1); - result = (real) ((arg1)->n); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_VanGenuchtenMualem_Ksat_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::VanGenuchtenMualem *arg1 = (cmf::upslope::VanGenuchtenMualem *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"VanGenuchtenMualem_Ksat_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__VanGenuchtenMualem, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VanGenuchtenMualem_Ksat_set" "', argument " "1"" of type '" "cmf::upslope::VanGenuchtenMualem *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::VanGenuchtenMualem * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VanGenuchtenMualem_Ksat_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->Ksat = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_VanGenuchtenMualem_Ksat_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::VanGenuchtenMualem *arg1 = (cmf::upslope::VanGenuchtenMualem *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__VanGenuchtenMualem, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VanGenuchtenMualem_Ksat_get" "', argument " "1"" of type '" "cmf::upslope::VanGenuchtenMualem *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::VanGenuchtenMualem * >(argp1); - result = (real) ((arg1)->Ksat); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_VanGenuchtenMualem_Phi_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::VanGenuchtenMualem *arg1 = (cmf::upslope::VanGenuchtenMualem *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"VanGenuchtenMualem_Phi_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__VanGenuchtenMualem, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VanGenuchtenMualem_Phi_set" "', argument " "1"" of type '" "cmf::upslope::VanGenuchtenMualem *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::VanGenuchtenMualem * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VanGenuchtenMualem_Phi_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->Phi = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_VanGenuchtenMualem_Phi_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::VanGenuchtenMualem *arg1 = (cmf::upslope::VanGenuchtenMualem *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__VanGenuchtenMualem, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VanGenuchtenMualem_Phi_get" "', argument " "1"" of type '" "cmf::upslope::VanGenuchtenMualem *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::VanGenuchtenMualem * >(argp1); - result = (real) ((arg1)->Phi); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_VanGenuchtenMualem_m_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::VanGenuchtenMualem *arg1 = (cmf::upslope::VanGenuchtenMualem *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"VanGenuchtenMualem_m_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__VanGenuchtenMualem, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VanGenuchtenMualem_m_set" "', argument " "1"" of type '" "cmf::upslope::VanGenuchtenMualem *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::VanGenuchtenMualem * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VanGenuchtenMualem_m_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->m = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_VanGenuchtenMualem_m_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::VanGenuchtenMualem *arg1 = (cmf::upslope::VanGenuchtenMualem *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__VanGenuchtenMualem, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VanGenuchtenMualem_m_get" "', argument " "1"" of type '" "cmf::upslope::VanGenuchtenMualem *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::VanGenuchtenMualem * >(argp1); - result = (real) ((arg1)->m); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_VanGenuchtenMualem_l_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::VanGenuchtenMualem *arg1 = (cmf::upslope::VanGenuchtenMualem *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"VanGenuchtenMualem_l_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__VanGenuchtenMualem, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VanGenuchtenMualem_l_set" "', argument " "1"" of type '" "cmf::upslope::VanGenuchtenMualem *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::VanGenuchtenMualem * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VanGenuchtenMualem_l_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->l = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_VanGenuchtenMualem_l_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::VanGenuchtenMualem *arg1 = (cmf::upslope::VanGenuchtenMualem *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__VanGenuchtenMualem, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VanGenuchtenMualem_l_get" "', argument " "1"" of type '" "cmf::upslope::VanGenuchtenMualem *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::VanGenuchtenMualem * >(argp1); - result = (real) ((arg1)->l); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_VanGenuchtenMualem_theta_r_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::VanGenuchtenMualem *arg1 = (cmf::upslope::VanGenuchtenMualem *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"VanGenuchtenMualem_theta_r_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__VanGenuchtenMualem, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VanGenuchtenMualem_theta_r_set" "', argument " "1"" of type '" "cmf::upslope::VanGenuchtenMualem *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::VanGenuchtenMualem * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VanGenuchtenMualem_theta_r_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->theta_r = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_VanGenuchtenMualem_theta_r_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::VanGenuchtenMualem *arg1 = (cmf::upslope::VanGenuchtenMualem *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__VanGenuchtenMualem, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VanGenuchtenMualem_theta_r_get" "', argument " "1"" of type '" "cmf::upslope::VanGenuchtenMualem *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::VanGenuchtenMualem * >(argp1); - result = (real) ((arg1)->theta_r); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_VanGenuchtenMualem_w0_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::VanGenuchtenMualem *arg1 = (cmf::upslope::VanGenuchtenMualem *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"VanGenuchtenMualem_w0_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__VanGenuchtenMualem, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VanGenuchtenMualem_w0_set" "', argument " "1"" of type '" "cmf::upslope::VanGenuchtenMualem *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::VanGenuchtenMualem * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VanGenuchtenMualem_w0_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->w0 = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_VanGenuchtenMualem_w0_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::VanGenuchtenMualem *arg1 = (cmf::upslope::VanGenuchtenMualem *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__VanGenuchtenMualem, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VanGenuchtenMualem_w0_get" "', argument " "1"" of type '" "cmf::upslope::VanGenuchtenMualem *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::VanGenuchtenMualem * >(argp1); - result = (real) ((arg1)->w0); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_VanGenuchtenMualem_Transmissivity(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::VanGenuchtenMualem *arg1 = (cmf::upslope::VanGenuchtenMualem *) 0 ; - real arg2 ; - real arg3 ; - real arg4 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - double val3 ; - int ecode3 = 0 ; - double val4 ; - int ecode4 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "upperDepth",(char *) "lowerDepth",(char *) "wetness", NULL - }; - real result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO:VanGenuchtenMualem_Transmissivity",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__VanGenuchtenMualem, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VanGenuchtenMualem_Transmissivity" "', argument " "1"" of type '" "cmf::upslope::VanGenuchtenMualem const *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::VanGenuchtenMualem * >(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VanGenuchtenMualem_Transmissivity" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - ecode3 = SWIG_AsVal_double(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VanGenuchtenMualem_Transmissivity" "', argument " "3"" of type '" "real""'"); - } - arg3 = static_cast< real >(val3); - ecode4 = SWIG_AsVal_double(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VanGenuchtenMualem_Transmissivity" "', argument " "4"" of type '" "real""'"); - } - arg4 = static_cast< real >(val4); - { - try { - result = (real)((cmf::upslope::VanGenuchtenMualem const *)arg1)->Transmissivity(arg2,arg3,arg4); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_VanGenuchtenMualem_fit_w0(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::VanGenuchtenMualem *arg1 = (cmf::upslope::VanGenuchtenMualem *) 0 ; - real arg2 = (real) 1.01 ; - real arg3 = (real) 1.0 ; - real arg4 = (real) 0.05 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - double val3 ; - int ecode3 = 0 ; - double val4 ; - int ecode4 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "w1",(char *) "Psi_p",(char *) "tolerance", NULL - }; - real result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOO:VanGenuchtenMualem_fit_w0",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__VanGenuchtenMualem, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VanGenuchtenMualem_fit_w0" "', argument " "1"" of type '" "cmf::upslope::VanGenuchtenMualem *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::VanGenuchtenMualem * >(argp1); - if (obj1) { - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VanGenuchtenMualem_fit_w0" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - } - if (obj2) { - ecode3 = SWIG_AsVal_double(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VanGenuchtenMualem_fit_w0" "', argument " "3"" of type '" "real""'"); - } - arg3 = static_cast< real >(val3); - } - if (obj3) { - ecode4 = SWIG_AsVal_double(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VanGenuchtenMualem_fit_w0" "', argument " "4"" of type '" "real""'"); - } - arg4 = static_cast< real >(val4); - } - { - try { - result = (real)(arg1)->fit_w0(arg2,arg3,arg4); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_VanGenuchtenMualem_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::VanGenuchtenMualem *arg1 = (cmf::upslope::VanGenuchtenMualem *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::upslope::VanGenuchtenMualem *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__VanGenuchtenMualem, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VanGenuchtenMualem_copy" "', argument " "1"" of type '" "cmf::upslope::VanGenuchtenMualem const *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::VanGenuchtenMualem * >(argp1); - { - try { - result = (cmf::upslope::VanGenuchtenMualem *)((cmf::upslope::VanGenuchtenMualem const *)arg1)->copy(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__VanGenuchtenMualem, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_VanGenuchtenMualem(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - real arg1 = (real) 15 ; - real arg2 = (real) 0.5 ; - real arg3 = (real) 0.2178 ; - real arg4 = (real) 1.211 ; - real arg5 = (real) -1 ; - double val1 ; - int ecode1 = 0 ; - double val2 ; - int ecode2 = 0 ; - double val3 ; - int ecode3 = 0 ; - double val4 ; - int ecode4 = 0 ; - double val5 ; - int ecode5 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - char * kwnames[] = { - (char *) "Ksat",(char *) "phi",(char *) "alpha",(char *) "n",(char *) "m", NULL - }; - cmf::upslope::VanGenuchtenMualem *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|OOOOO:new_VanGenuchtenMualem",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; - if (obj0) { - ecode1 = SWIG_AsVal_double(obj0, &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_VanGenuchtenMualem" "', argument " "1"" of type '" "real""'"); - } - arg1 = static_cast< real >(val1); - } - if (obj1) { - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_VanGenuchtenMualem" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - } - if (obj2) { - ecode3 = SWIG_AsVal_double(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_VanGenuchtenMualem" "', argument " "3"" of type '" "real""'"); - } - arg3 = static_cast< real >(val3); - } - if (obj3) { - ecode4 = SWIG_AsVal_double(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_VanGenuchtenMualem" "', argument " "4"" of type '" "real""'"); - } - arg4 = static_cast< real >(val4); - } - if (obj4) { - ecode5 = SWIG_AsVal_double(obj4, &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_VanGenuchtenMualem" "', argument " "5"" of type '" "real""'"); - } - arg5 = static_cast< real >(val5); - } - { - try { - result = (cmf::upslope::VanGenuchtenMualem *)new cmf::upslope::VanGenuchtenMualem(arg1,arg2,arg3,arg4,arg5); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__VanGenuchtenMualem, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_VanGenuchtenMualem(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::VanGenuchtenMualem *arg1 = (cmf::upslope::VanGenuchtenMualem *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__VanGenuchtenMualem, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_VanGenuchtenMualem" "', argument " "1"" of type '" "cmf::upslope::VanGenuchtenMualem *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::VanGenuchtenMualem * >(argp1); - { - try { - delete arg1; - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *VanGenuchtenMualem_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__VanGenuchtenMualem, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *VanGenuchtenMualem_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_LinearRetention_Ksat_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::LinearRetention *arg1 = (cmf::upslope::LinearRetention *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"LinearRetention_Ksat_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__LinearRetention, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LinearRetention_Ksat_set" "', argument " "1"" of type '" "cmf::upslope::LinearRetention *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::LinearRetention * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LinearRetention_Ksat_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->Ksat = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_LinearRetention_Ksat_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::LinearRetention *arg1 = (cmf::upslope::LinearRetention *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__LinearRetention, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LinearRetention_Ksat_get" "', argument " "1"" of type '" "cmf::upslope::LinearRetention *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::LinearRetention * >(argp1); - result = (real) ((arg1)->Ksat); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_LinearRetention_porosity_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::LinearRetention *arg1 = (cmf::upslope::LinearRetention *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"LinearRetention_porosity_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__LinearRetention, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LinearRetention_porosity_set" "', argument " "1"" of type '" "cmf::upslope::LinearRetention *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::LinearRetention * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LinearRetention_porosity_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->porosity = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_LinearRetention_porosity_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::LinearRetention *arg1 = (cmf::upslope::LinearRetention *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__LinearRetention, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LinearRetention_porosity_get" "', argument " "1"" of type '" "cmf::upslope::LinearRetention *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::LinearRetention * >(argp1); - result = (real) ((arg1)->porosity); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_LinearRetention_thickness_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::LinearRetention *arg1 = (cmf::upslope::LinearRetention *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"LinearRetention_thickness_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__LinearRetention, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LinearRetention_thickness_set" "', argument " "1"" of type '" "cmf::upslope::LinearRetention *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::LinearRetention * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LinearRetention_thickness_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->thickness = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_LinearRetention_thickness_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::LinearRetention *arg1 = (cmf::upslope::LinearRetention *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__LinearRetention, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LinearRetention_thickness_get" "', argument " "1"" of type '" "cmf::upslope::LinearRetention *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::LinearRetention * >(argp1); - result = (real) ((arg1)->thickness); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_LinearRetention_residual_wetness_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::LinearRetention *arg1 = (cmf::upslope::LinearRetention *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"LinearRetention_residual_wetness_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__LinearRetention, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LinearRetention_residual_wetness_set" "', argument " "1"" of type '" "cmf::upslope::LinearRetention *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::LinearRetention * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LinearRetention_residual_wetness_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->residual_wetness = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_LinearRetention_residual_wetness_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::LinearRetention *arg1 = (cmf::upslope::LinearRetention *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__LinearRetention, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LinearRetention_residual_wetness_get" "', argument " "1"" of type '" "cmf::upslope::LinearRetention *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::LinearRetention * >(argp1); - result = (real) ((arg1)->residual_wetness); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_LinearRetention_porosity_decay_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::LinearRetention *arg1 = (cmf::upslope::LinearRetention *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"LinearRetention_porosity_decay_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__LinearRetention, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LinearRetention_porosity_decay_set" "', argument " "1"" of type '" "cmf::upslope::LinearRetention *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::LinearRetention * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LinearRetention_porosity_decay_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->porosity_decay = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_LinearRetention_porosity_decay_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::LinearRetention *arg1 = (cmf::upslope::LinearRetention *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__LinearRetention, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LinearRetention_porosity_decay_get" "', argument " "1"" of type '" "cmf::upslope::LinearRetention *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::LinearRetention * >(argp1); - result = (real) ((arg1)->porosity_decay); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_LinearRetention_beta_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::LinearRetention *arg1 = (cmf::upslope::LinearRetention *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"LinearRetention_beta_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__LinearRetention, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LinearRetention_beta_set" "', argument " "1"" of type '" "cmf::upslope::LinearRetention *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::LinearRetention * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LinearRetention_beta_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->beta = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_LinearRetention_beta_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::LinearRetention *arg1 = (cmf::upslope::LinearRetention *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__LinearRetention, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LinearRetention_beta_get" "', argument " "1"" of type '" "cmf::upslope::LinearRetention *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::LinearRetention * >(argp1); - result = (real) ((arg1)->beta); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_LinearRetention_Transmissivity(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::LinearRetention *arg1 = (cmf::upslope::LinearRetention *) 0 ; - real arg2 ; - real arg3 ; - real arg4 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - double val3 ; - int ecode3 = 0 ; - double val4 ; - int ecode4 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "upperDepth",(char *) "lowerDepth",(char *) "wetness", NULL - }; - real result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO:LinearRetention_Transmissivity",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__LinearRetention, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LinearRetention_Transmissivity" "', argument " "1"" of type '" "cmf::upslope::LinearRetention const *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::LinearRetention * >(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LinearRetention_Transmissivity" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - ecode3 = SWIG_AsVal_double(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "LinearRetention_Transmissivity" "', argument " "3"" of type '" "real""'"); - } - arg3 = static_cast< real >(val3); - ecode4 = SWIG_AsVal_double(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "LinearRetention_Transmissivity" "', argument " "4"" of type '" "real""'"); - } - arg4 = static_cast< real >(val4); - { - try { - result = (real)((cmf::upslope::LinearRetention const *)arg1)->Transmissivity(arg2,arg3,arg4); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_LinearRetention_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::LinearRetention *arg1 = (cmf::upslope::LinearRetention *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::upslope::LinearRetention *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__LinearRetention, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LinearRetention_copy" "', argument " "1"" of type '" "cmf::upslope::LinearRetention const *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::LinearRetention * >(argp1); - { - try { - result = (cmf::upslope::LinearRetention *)((cmf::upslope::LinearRetention const *)arg1)->copy(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__LinearRetention, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_LinearRetention(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - real arg1 ; - real arg2 ; - real arg3 ; - real arg4 = (real) 0.1 ; - double val1 ; - int ecode1 = 0 ; - double val2 ; - int ecode2 = 0 ; - double val3 ; - int ecode3 = 0 ; - double val4 ; - int ecode4 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - char * kwnames[] = { - (char *) "ksat",(char *) "phi",(char *) "thickness",(char *) "residual_wetness", NULL - }; - cmf::upslope::LinearRetention *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|O:new_LinearRetention",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - ecode1 = SWIG_AsVal_double(obj0, &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_LinearRetention" "', argument " "1"" of type '" "real""'"); - } - arg1 = static_cast< real >(val1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_LinearRetention" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - ecode3 = SWIG_AsVal_double(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_LinearRetention" "', argument " "3"" of type '" "real""'"); - } - arg3 = static_cast< real >(val3); - if (obj3) { - ecode4 = SWIG_AsVal_double(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_LinearRetention" "', argument " "4"" of type '" "real""'"); - } - arg4 = static_cast< real >(val4); - } - { - try { - result = (cmf::upslope::LinearRetention *)new cmf::upslope::LinearRetention(arg1,arg2,arg3,arg4); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__LinearRetention, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_LinearRetention(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::LinearRetention *arg1 = (cmf::upslope::LinearRetention *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__LinearRetention, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_LinearRetention" "', argument " "1"" of type '" "cmf::upslope::LinearRetention *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::LinearRetention * >(argp1); - { - try { - delete arg1; - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *LinearRetention_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__LinearRetention, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *LinearRetention_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_SoilLayer_Position_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::SoilLayer *arg1 = (cmf::upslope::SoilLayer *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::upslope::SoilLayer > tempshared1 ; - std::shared_ptr< cmf::upslope::SoilLayer > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - ptrdiff_t result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SoilLayer_Position_get" "', argument " "1"" of type '" "cmf::upslope::SoilLayer *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); - arg1 = const_cast< cmf::upslope::SoilLayer * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); - arg1 = const_cast< cmf::upslope::SoilLayer * >((smartarg1 ? smartarg1->get() : 0)); - } - } - result = (ptrdiff_t) ((arg1)->Position); - resultobj = SWIG_From_ptrdiff_t(static_cast< ptrdiff_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SoilLayer_cell_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::SoilLayer *arg1 = (cmf::upslope::SoilLayer *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::upslope::SoilLayer > tempshared1 ; - std::shared_ptr< cmf::upslope::SoilLayer > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - cmf::upslope::Cell *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SoilLayer_cell_get" "', argument " "1"" of type '" "cmf::upslope::SoilLayer *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); - arg1 = const_cast< cmf::upslope::SoilLayer * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); - arg1 = const_cast< cmf::upslope::SoilLayer * >((smartarg1 ? smartarg1->get() : 0)); - } - } - result = (cmf::upslope::Cell *) &(cmf::upslope::Cell &) ((arg1)->cell); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SoilLayer___get_upper(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::SoilLayer *arg1 = (cmf::upslope::SoilLayer *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::upslope::SoilLayer const > tempshared1 ; - std::shared_ptr< cmf::upslope::SoilLayer const > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - cmf::upslope::SoilLayer::ptr result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SoilLayer___get_upper" "', argument " "1"" of type '" "cmf::upslope::SoilLayer const *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::upslope::SoilLayer > * >(argp1); - delete reinterpret_cast< std::shared_ptr< const cmf::upslope::SoilLayer > * >(argp1); - arg1 = const_cast< cmf::upslope::SoilLayer * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::upslope::SoilLayer > * >(argp1); - arg1 = const_cast< cmf::upslope::SoilLayer * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - try { - result = ((cmf::upslope::SoilLayer const *)arg1)->get_upper(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - std::shared_ptr< cmf::upslope::SoilLayer > *smartresult = result ? new std::shared_ptr< cmf::upslope::SoilLayer >(result) : 0; - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, SWIG_POINTER_OWN); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SoilLayer___get_lower(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::SoilLayer *arg1 = (cmf::upslope::SoilLayer *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::upslope::SoilLayer const > tempshared1 ; - std::shared_ptr< cmf::upslope::SoilLayer const > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - cmf::upslope::SoilLayer::ptr result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SoilLayer___get_lower" "', argument " "1"" of type '" "cmf::upslope::SoilLayer const *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::upslope::SoilLayer > * >(argp1); - delete reinterpret_cast< std::shared_ptr< const cmf::upslope::SoilLayer > * >(argp1); - arg1 = const_cast< cmf::upslope::SoilLayer * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::upslope::SoilLayer > * >(argp1); - arg1 = const_cast< cmf::upslope::SoilLayer * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - try { - result = ((cmf::upslope::SoilLayer const *)arg1)->get_lower(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - std::shared_ptr< cmf::upslope::SoilLayer > *smartresult = result ? new std::shared_ptr< cmf::upslope::SoilLayer >(result) : 0; - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, SWIG_POINTER_OWN); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SoilLayer_get_soil(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::SoilLayer *arg1 = (cmf::upslope::SoilLayer *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::upslope::SoilLayer const > tempshared1 ; - std::shared_ptr< cmf::upslope::SoilLayer const > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - cmf::upslope::RetentionCurve *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SoilLayer_get_soil" "', argument " "1"" of type '" "cmf::upslope::SoilLayer const *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::upslope::SoilLayer > * >(argp1); - delete reinterpret_cast< std::shared_ptr< const cmf::upslope::SoilLayer > * >(argp1); - arg1 = const_cast< cmf::upslope::SoilLayer * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::upslope::SoilLayer > * >(argp1); - arg1 = const_cast< cmf::upslope::SoilLayer * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - try { - result = (cmf::upslope::RetentionCurve *) &((cmf::upslope::SoilLayer const *)arg1)->get_soil(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - int dcast = 0; - /*@SWIG:C:\Apps\swigwin-3.0.12\Lib\typemaps\swigmacros.swg,200,%formacro@*//*@SWIG:C:\Apps\swigwin-3.0.12\Lib\typemaps\swigmacros.swg,192,%_formacro_1@*//*@SWIG:C:\Apps\swigwin-3.0.12\Lib\typemaps\factory.swg,72,%_factory_dispatch@*/ - if (!dcast) { - cmf::upslope::BrooksCoreyRetentionCurve *dobj = dynamic_cast(result); - if (dobj) { - dcast = 1; - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(dobj),SWIGTYPE_p_cmf__upslope__BrooksCoreyRetentionCurve, 0 | 0 ); - } - }/*@SWIG@*/ - - /*@SWIG:C:\Apps\swigwin-3.0.12\Lib\typemaps\swigmacros.swg,192,%_formacro_1@*//*@SWIG:C:\Apps\swigwin-3.0.12\Lib\typemaps\factory.swg,72,%_factory_dispatch@*/ - if (!dcast) { - cmf::upslope::VanGenuchtenMualem *dobj = dynamic_cast(result); - if (dobj) { - dcast = 1; - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(dobj),SWIGTYPE_p_cmf__upslope__VanGenuchtenMualem, 0 | 0 ); - } - }/*@SWIG@*/ - - /*@SWIG:C:\Apps\swigwin-3.0.12\Lib\typemaps\swigmacros.swg,192,%_formacro_1@*//*@SWIG:C:\Apps\swigwin-3.0.12\Lib\typemaps\factory.swg,72,%_factory_dispatch@*/ - if (!dcast) { - cmf::upslope::LinearRetention *dobj = dynamic_cast(result); - if (dobj) { - dcast = 1; - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(dobj),SWIGTYPE_p_cmf__upslope__LinearRetention, 0 | 0 ); - } - }/*@SWIG@*/ - - - - /*@SWIG@*/ - - /*@SWIG@*/ - - /*@SWIG@*//*@SWIG@*/ - if (!dcast) { - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result),SWIGTYPE_p_cmf__upslope__RetentionCurve, 0 | 0 ); - } - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SoilLayer_set_soil(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::SoilLayer *arg1 = (cmf::upslope::SoilLayer *) 0 ; - cmf::upslope::RetentionCurve *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::upslope::SoilLayer > tempshared1 ; - std::shared_ptr< cmf::upslope::SoilLayer > *smartarg1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "r_curve", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:SoilLayer_set_soil",kwnames,&obj0,&obj1)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SoilLayer_set_soil" "', argument " "1"" of type '" "cmf::upslope::SoilLayer *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); - arg1 = const_cast< cmf::upslope::SoilLayer * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); - arg1 = const_cast< cmf::upslope::SoilLayer * >((smartarg1 ? smartarg1->get() : 0)); - } - } - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_cmf__upslope__RetentionCurve, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SoilLayer_set_soil" "', argument " "2"" of type '" "cmf::upslope::RetentionCurve const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SoilLayer_set_soil" "', argument " "2"" of type '" "cmf::upslope::RetentionCurve const &""'"); - } - arg2 = reinterpret_cast< cmf::upslope::RetentionCurve * >(argp2); - { - try { - (arg1)->set_soil((cmf::upslope::RetentionCurve const &)*arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SoilLayer_get_K(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::SoilLayer *arg1 = (cmf::upslope::SoilLayer *) 0 ; - cmf::geometry::point arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::upslope::SoilLayer const > tempshared1 ; - std::shared_ptr< cmf::upslope::SoilLayer const > *smartarg1 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "direction", NULL - }; - real result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:SoilLayer_get_K",kwnames,&obj0,&obj1)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SoilLayer_get_K" "', argument " "1"" of type '" "cmf::upslope::SoilLayer const *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::upslope::SoilLayer > * >(argp1); - delete reinterpret_cast< std::shared_ptr< const cmf::upslope::SoilLayer > * >(argp1); - arg1 = const_cast< cmf::upslope::SoilLayer * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::upslope::SoilLayer > * >(argp1); - arg1 = const_cast< cmf::upslope::SoilLayer * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - if (check_xy(obj1)) { - std::string res = convert_xyz_to_point(obj1,arg2); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - return NULL; - } - } - else if (PySequence_Check(obj1)) { - std::string res = convert_seq_to_point(obj1,arg2); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError, res.c_str()); - } - } else { - std::string res="<"; - res+=pyrepr(obj1); - res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - } - } - { - try { - result = (real)((cmf::upslope::SoilLayer const *)arg1)->get_K(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SoilLayer_anisotropic_kf_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::SoilLayer *arg1 = (cmf::upslope::SoilLayer *) 0 ; - cmf::geometry::point *arg2 = (cmf::geometry::point *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::upslope::SoilLayer > tempshared1 ; - std::shared_ptr< cmf::upslope::SoilLayer > *smartarg1 = 0 ; - cmf::geometry::point p2 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"SoilLayer_anisotropic_kf_set",2,2,swig_obj)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SoilLayer_anisotropic_kf_set" "', argument " "1"" of type '" "cmf::upslope::SoilLayer *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); - arg1 = const_cast< cmf::upslope::SoilLayer * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); - arg1 = const_cast< cmf::upslope::SoilLayer * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - if (SWIG_ConvertPtr(swig_obj[1], (void **) &arg2, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { - if (check_xy(swig_obj[1])) { - std::string res = convert_xyz_to_point(swig_obj[1],p2); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - return NULL; - } - } - else if (PySequence_Check(swig_obj[1])) { - std::string res = convert_seq_to_point(swig_obj[1],p2); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError, res.c_str()); - } - } else { - std::string res="<"; - res+=pyrepr(swig_obj[1]); - res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - } - arg2 = &p2; - } - } - if (arg1) (arg1)->anisotropic_kf = *arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SoilLayer_anisotropic_kf_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::SoilLayer *arg1 = (cmf::upslope::SoilLayer *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::upslope::SoilLayer > tempshared1 ; - std::shared_ptr< cmf::upslope::SoilLayer > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - cmf::geometry::point *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SoilLayer_anisotropic_kf_get" "', argument " "1"" of type '" "cmf::upslope::SoilLayer *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); - arg1 = const_cast< cmf::upslope::SoilLayer * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); - arg1 = const_cast< cmf::upslope::SoilLayer * >((smartarg1 ? smartarg1->get() : 0)); - } - } - result = (cmf::geometry::point *)& ((arg1)->anisotropic_kf); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__geometry__point, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SoilLayer_get_capacity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::SoilLayer *arg1 = (cmf::upslope::SoilLayer *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::upslope::SoilLayer const > tempshared1 ; - std::shared_ptr< cmf::upslope::SoilLayer const > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SoilLayer_get_capacity" "', argument " "1"" of type '" "cmf::upslope::SoilLayer const *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::upslope::SoilLayer > * >(argp1); - delete reinterpret_cast< std::shared_ptr< const cmf::upslope::SoilLayer > * >(argp1); - arg1 = const_cast< cmf::upslope::SoilLayer * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::upslope::SoilLayer > * >(argp1); - arg1 = const_cast< cmf::upslope::SoilLayer * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - try { - result = (real)((cmf::upslope::SoilLayer const *)arg1)->get_capacity(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SoilLayer_get_saturated_depth(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::SoilLayer *arg1 = (cmf::upslope::SoilLayer *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::upslope::SoilLayer const > tempshared1 ; - std::shared_ptr< cmf::upslope::SoilLayer const > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SoilLayer_get_saturated_depth" "', argument " "1"" of type '" "cmf::upslope::SoilLayer const *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::upslope::SoilLayer > * >(argp1); - delete reinterpret_cast< std::shared_ptr< const cmf::upslope::SoilLayer > * >(argp1); - arg1 = const_cast< cmf::upslope::SoilLayer * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::upslope::SoilLayer > * >(argp1); - arg1 = const_cast< cmf::upslope::SoilLayer * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - try { - result = (real)((cmf::upslope::SoilLayer const *)arg1)->get_saturated_depth(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SoilLayer_get_flow_crosssection(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::SoilLayer *arg1 = (cmf::upslope::SoilLayer *) 0 ; - cmf::upslope::SoilLayer *arg2 = 0 ; - bool arg3 = (bool) false ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::upslope::SoilLayer const > tempshared1 ; - std::shared_ptr< cmf::upslope::SoilLayer const > *smartarg1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - std::shared_ptr< cmf::upslope::SoilLayer const > tempshared2 ; - bool val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "target",(char *) "HorizontalLayers", NULL - }; - real result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:SoilLayer_get_flow_crosssection",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SoilLayer_get_flow_crosssection" "', argument " "1"" of type '" "cmf::upslope::SoilLayer const *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::upslope::SoilLayer > * >(argp1); - delete reinterpret_cast< std::shared_ptr< const cmf::upslope::SoilLayer > * >(argp1); - arg1 = const_cast< cmf::upslope::SoilLayer * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::upslope::SoilLayer > * >(argp1); - arg1 = const_cast< cmf::upslope::SoilLayer * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - int newmem = 0; - res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 , &newmem); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SoilLayer_get_flow_crosssection" "', argument " "2"" of type '" "cmf::upslope::SoilLayer const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SoilLayer_get_flow_crosssection" "', argument " "2"" of type '" "cmf::upslope::SoilLayer const &""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared2 = *reinterpret_cast< std::shared_ptr< const cmf::upslope::SoilLayer > * >(argp2); - delete reinterpret_cast< std::shared_ptr< const cmf::upslope::SoilLayer > * >(argp2); - arg2 = const_cast< cmf::upslope::SoilLayer * >(tempshared2.get()); - } else { - arg2 = const_cast< cmf::upslope::SoilLayer * >(reinterpret_cast< std::shared_ptr< const cmf::upslope::SoilLayer > * >(argp2)->get()); - } - } - if (obj2) { - ecode3 = SWIG_AsVal_bool(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SoilLayer_get_flow_crosssection" "', argument " "3"" of type '" "bool""'"); - } - arg3 = static_cast< bool >(val3); - } - { - try { - result = (real)((cmf::upslope::SoilLayer const *)arg1)->get_flow_crosssection((cmf::upslope::SoilLayer const &)*arg2,arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SoilLayer_cast(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::flux_node::ptr arg1 ; - void *argp1 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - char * kwnames[] = { - (char *) "node", NULL - }; - cmf::upslope::SoilLayer::ptr result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:SoilLayer_cast",kwnames,&obj0)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SoilLayer_cast" "', argument " "1"" of type '" "cmf::water::flux_node::ptr""'"); - } - if (argp1) arg1 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp1)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp1); - } - { - try { - result = cmf::upslope::SoilLayer::cast(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - std::shared_ptr< cmf::upslope::SoilLayer > *smartresult = result ? new std::shared_ptr< cmf::upslope::SoilLayer >(result) : 0; - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, SWIG_POINTER_OWN); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SoilLayer_gravitational_potential_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::SoilLayer *arg1 = (cmf::upslope::SoilLayer *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::upslope::SoilLayer > tempshared1 ; - std::shared_ptr< cmf::upslope::SoilLayer > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SoilLayer_gravitational_potential_get" "', argument " "1"" of type '" "cmf::upslope::SoilLayer *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); - arg1 = const_cast< cmf::upslope::SoilLayer * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); - arg1 = const_cast< cmf::upslope::SoilLayer * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - try { - result = (real)cmf_upslope_SoilLayer_gravitational_potential_get(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SoilLayer_matrix_potential_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::SoilLayer *arg1 = (cmf::upslope::SoilLayer *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::upslope::SoilLayer > tempshared1 ; - std::shared_ptr< cmf::upslope::SoilLayer > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SoilLayer_matrix_potential_get" "', argument " "1"" of type '" "cmf::upslope::SoilLayer *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); - arg1 = const_cast< cmf::upslope::SoilLayer * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); - arg1 = const_cast< cmf::upslope::SoilLayer * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - try { - result = (real)cmf_upslope_SoilLayer_matrix_potential_get(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SoilLayer_wetness_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::SoilLayer *arg1 = (cmf::upslope::SoilLayer *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::upslope::SoilLayer > tempshared1 ; - std::shared_ptr< cmf::upslope::SoilLayer > *smartarg1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"SoilLayer_wetness_set",2,2,swig_obj)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SoilLayer_wetness_set" "', argument " "1"" of type '" "cmf::upslope::SoilLayer *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); - arg1 = const_cast< cmf::upslope::SoilLayer * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); - arg1 = const_cast< cmf::upslope::SoilLayer * >((smartarg1 ? smartarg1->get() : 0)); - } - } - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SoilLayer_wetness_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - { - try { - cmf_upslope_SoilLayer_wetness_set(arg1,arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SoilLayer_wetness_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::SoilLayer *arg1 = (cmf::upslope::SoilLayer *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::upslope::SoilLayer > tempshared1 ; - std::shared_ptr< cmf::upslope::SoilLayer > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SoilLayer_wetness_get" "', argument " "1"" of type '" "cmf::upslope::SoilLayer *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); - arg1 = const_cast< cmf::upslope::SoilLayer * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); - arg1 = const_cast< cmf::upslope::SoilLayer * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - try { - result = (real)cmf_upslope_SoilLayer_wetness_get(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SoilLayer_theta_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::SoilLayer *arg1 = (cmf::upslope::SoilLayer *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::upslope::SoilLayer > tempshared1 ; - std::shared_ptr< cmf::upslope::SoilLayer > *smartarg1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"SoilLayer_theta_set",2,2,swig_obj)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SoilLayer_theta_set" "', argument " "1"" of type '" "cmf::upslope::SoilLayer *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); - arg1 = const_cast< cmf::upslope::SoilLayer * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); - arg1 = const_cast< cmf::upslope::SoilLayer * >((smartarg1 ? smartarg1->get() : 0)); - } - } - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SoilLayer_theta_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - { - try { - cmf_upslope_SoilLayer_theta_set(arg1,arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SoilLayer_theta_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::SoilLayer *arg1 = (cmf::upslope::SoilLayer *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::upslope::SoilLayer > tempshared1 ; - std::shared_ptr< cmf::upslope::SoilLayer > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SoilLayer_theta_get" "', argument " "1"" of type '" "cmf::upslope::SoilLayer *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); - arg1 = const_cast< cmf::upslope::SoilLayer * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); - arg1 = const_cast< cmf::upslope::SoilLayer * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - try { - result = (real)cmf_upslope_SoilLayer_theta_get(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SoilLayer_K_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::SoilLayer *arg1 = (cmf::upslope::SoilLayer *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::upslope::SoilLayer > tempshared1 ; - std::shared_ptr< cmf::upslope::SoilLayer > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SoilLayer_K_get" "', argument " "1"" of type '" "cmf::upslope::SoilLayer *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); - arg1 = const_cast< cmf::upslope::SoilLayer * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); - arg1 = const_cast< cmf::upslope::SoilLayer * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - try { - result = (real)cmf_upslope_SoilLayer_K_get(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SoilLayer_Ksat_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::SoilLayer *arg1 = (cmf::upslope::SoilLayer *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::upslope::SoilLayer > tempshared1 ; - std::shared_ptr< cmf::upslope::SoilLayer > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SoilLayer_Ksat_get" "', argument " "1"" of type '" "cmf::upslope::SoilLayer *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); - arg1 = const_cast< cmf::upslope::SoilLayer * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); - arg1 = const_cast< cmf::upslope::SoilLayer * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - try { - result = (real)cmf_upslope_SoilLayer_Ksat_get(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SoilLayer_thickness_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::SoilLayer *arg1 = (cmf::upslope::SoilLayer *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::upslope::SoilLayer > tempshared1 ; - std::shared_ptr< cmf::upslope::SoilLayer > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SoilLayer_thickness_get" "', argument " "1"" of type '" "cmf::upslope::SoilLayer *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); - arg1 = const_cast< cmf::upslope::SoilLayer * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); - arg1 = const_cast< cmf::upslope::SoilLayer * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - try { - result = (real)cmf_upslope_SoilLayer_thickness_get(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SoilLayer_lower_boundary_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::SoilLayer *arg1 = (cmf::upslope::SoilLayer *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::upslope::SoilLayer > tempshared1 ; - std::shared_ptr< cmf::upslope::SoilLayer > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SoilLayer_lower_boundary_get" "', argument " "1"" of type '" "cmf::upslope::SoilLayer *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); - arg1 = const_cast< cmf::upslope::SoilLayer * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); - arg1 = const_cast< cmf::upslope::SoilLayer * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - try { - result = (real)cmf_upslope_SoilLayer_lower_boundary_get(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SoilLayer_upper_boundary_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::SoilLayer *arg1 = (cmf::upslope::SoilLayer *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::upslope::SoilLayer > tempshared1 ; - std::shared_ptr< cmf::upslope::SoilLayer > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SoilLayer_upper_boundary_get" "', argument " "1"" of type '" "cmf::upslope::SoilLayer *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); - arg1 = const_cast< cmf::upslope::SoilLayer * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); - arg1 = const_cast< cmf::upslope::SoilLayer * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - try { - result = (real)cmf_upslope_SoilLayer_upper_boundary_get(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SoilLayer_porosity_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::SoilLayer *arg1 = (cmf::upslope::SoilLayer *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::upslope::SoilLayer > tempshared1 ; - std::shared_ptr< cmf::upslope::SoilLayer > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SoilLayer_porosity_get" "', argument " "1"" of type '" "cmf::upslope::SoilLayer *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); - arg1 = const_cast< cmf::upslope::SoilLayer * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); - arg1 = const_cast< cmf::upslope::SoilLayer * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - try { - result = (real)cmf_upslope_SoilLayer_porosity_get(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SoilLayer_ice_fraction_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::SoilLayer *arg1 = (cmf::upslope::SoilLayer *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::upslope::SoilLayer > tempshared1 ; - std::shared_ptr< cmf::upslope::SoilLayer > *smartarg1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"SoilLayer_ice_fraction_set",2,2,swig_obj)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SoilLayer_ice_fraction_set" "', argument " "1"" of type '" "cmf::upslope::SoilLayer *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); - arg1 = const_cast< cmf::upslope::SoilLayer * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); - arg1 = const_cast< cmf::upslope::SoilLayer * >((smartarg1 ? smartarg1->get() : 0)); - } - } - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SoilLayer_ice_fraction_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - { - try { - cmf_upslope_SoilLayer_ice_fraction_set(arg1,arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SoilLayer_ice_fraction_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::SoilLayer *arg1 = (cmf::upslope::SoilLayer *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::upslope::SoilLayer > tempshared1 ; - std::shared_ptr< cmf::upslope::SoilLayer > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SoilLayer_ice_fraction_get" "', argument " "1"" of type '" "cmf::upslope::SoilLayer *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); - arg1 = const_cast< cmf::upslope::SoilLayer * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); - arg1 = const_cast< cmf::upslope::SoilLayer * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - try { - result = (real)cmf_upslope_SoilLayer_ice_fraction_get(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SoilLayer_rootfraction_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::SoilLayer *arg1 = (cmf::upslope::SoilLayer *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::upslope::SoilLayer > tempshared1 ; - std::shared_ptr< cmf::upslope::SoilLayer > *smartarg1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"SoilLayer_rootfraction_set",2,2,swig_obj)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SoilLayer_rootfraction_set" "', argument " "1"" of type '" "cmf::upslope::SoilLayer *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); - arg1 = const_cast< cmf::upslope::SoilLayer * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); - arg1 = const_cast< cmf::upslope::SoilLayer * >((smartarg1 ? smartarg1->get() : 0)); - } - } - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SoilLayer_rootfraction_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - { - try { - cmf_upslope_SoilLayer_rootfraction_set(arg1,arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SoilLayer_rootfraction_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::SoilLayer *arg1 = (cmf::upslope::SoilLayer *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::upslope::SoilLayer > tempshared1 ; - std::shared_ptr< cmf::upslope::SoilLayer > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SoilLayer_rootfraction_get" "', argument " "1"" of type '" "cmf::upslope::SoilLayer *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); - arg1 = const_cast< cmf::upslope::SoilLayer * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); - arg1 = const_cast< cmf::upslope::SoilLayer * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - try { - result = (real)cmf_upslope_SoilLayer_rootfraction_get(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_SoilLayer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::SoilLayer *arg1 = (cmf::upslope::SoilLayer *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::upslope::SoilLayer > tempshared1 ; - std::shared_ptr< cmf::upslope::SoilLayer > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SoilLayer" "', argument " "1"" of type '" "cmf::upslope::SoilLayer *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); - arg1 = const_cast< cmf::upslope::SoilLayer * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); - arg1 = const_cast< cmf::upslope::SoilLayer * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - try { - (void)arg1; delete smartarg1; - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *SoilLayer_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *_wrap_new_layer_list__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::upslope::layer_list *arg1 = 0 ; - cmf::upslope::layer_list temp_list1 ; - cmf::upslope::layer_list *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - { - if (SWIG_ConvertPtr(swig_obj[0], (void **) &arg1, SWIGTYPE_p_cmf__upslope__layer_list, SWIG_POINTER_EXCEPTION) == -1) { - int res = iterable_to_list(swig_obj[0],SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, temp_list1); - if (SWIG_IsOK(res)) { - arg1 = &temp_list1; - } else { - SWIG_exception_fail(SWIG_TypeError,"Only iterables can be converted to cmf::upslope::layer_list"); - } - } - } - { - try { - result = (cmf::upslope::layer_list *)new cmf::upslope::layer_list((cmf::upslope::layer_list const &)*arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__layer_list, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_layer_list__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) { - PyObject *resultobj = 0; - cmf::upslope::layer_list *result = 0 ; - - if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; - { - try { - result = (cmf::upslope::layer_list *)new cmf::upslope::layer_list(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__layer_list, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_layer_list__SWIG_2(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::water::node_list *arg1 = 0 ; - cmf::water::node_list temp_list1 ; - cmf::upslope::layer_list *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - { - if (SWIG_ConvertPtr(swig_obj[0], (void **) &arg1, SWIGTYPE_p_cmf__water__node_list, SWIG_POINTER_EXCEPTION) == -1) { - int res = iterable_to_list(swig_obj[0],SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, temp_list1); - if (SWIG_IsOK(res)) { - arg1 = &temp_list1; - } else { - SWIG_exception_fail(SWIG_TypeError,"Only iterables can be converted to cmf::water::node_list"); - } - } - } - { - try { - result = (cmf::upslope::layer_list *)new cmf::upslope::layer_list((cmf::water::node_list const &)*arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__layer_list, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_layer_list(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[2] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args,"new_layer_list",0,1,argv))) SWIG_fail; - --argc; - { - unsigned long _index = 0; - SWIG_TypeRank _rank = 0; - if (argc == 0) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 1; - if (_rank == _rankm) goto dispatch; - } - } - if (argc == 1) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - { - _v = is_listtype_or_iterable(argv[0],SWIGTYPE_p_cmf__upslope__layer_list); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 2; - if (_rank == _rankm) goto dispatch; - } - } - check_2: - - if (argc == 1) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - { - _v = is_listtype_or_iterable(argv[0],SWIGTYPE_p_cmf__water__node_list); - } - } - if (!_v) goto check_3; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 3; - if (_rank == _rankm) goto dispatch; - } - } - check_3: - - dispatch: - switch(_index) { - case 1: - return _wrap_new_layer_list__SWIG_1(self, argc, argv); - case 2: - return _wrap_new_layer_list__SWIG_0(self, argc, argv); - case 3: - return _wrap_new_layer_list__SWIG_2(self, argc, argv); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_layer_list'.\n" - " Possible C/C++ prototypes are:\n" - " cmf::upslope::layer_list::layer_list(cmf::upslope::layer_list const &)\n" - " cmf::upslope::layer_list::layer_list()\n" - " cmf::upslope::layer_list::layer_list(cmf::water::node_list const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_layer_list_pop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::layer_list *arg1 = (cmf::upslope::layer_list *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::upslope::SoilLayer::ptr result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__layer_list, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "layer_list_pop" "', argument " "1"" of type '" "cmf::upslope::layer_list *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::layer_list * >(argp1); - { - try { - result = (arg1)->pop(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - std::shared_ptr< cmf::upslope::SoilLayer > *smartresult = result ? new std::shared_ptr< cmf::upslope::SoilLayer >(result) : 0; - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, SWIG_POINTER_OWN); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_layer_list_append(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::layer_list *arg1 = (cmf::upslope::layer_list *) 0 ; - cmf::upslope::SoilLayer::ptr arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "l", NULL - }; - cmf::upslope::layer_list *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:layer_list_append",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__layer_list, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "layer_list_append" "', argument " "1"" of type '" "cmf::upslope::layer_list *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::layer_list * >(argp1); - { - int newmem = 0; - res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 , &newmem); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "layer_list_append" "', argument " "2"" of type '" "cmf::upslope::SoilLayer::ptr""'"); - } - if (argp2) arg2 = *(reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp2)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp2); - } - { - try { - result = (cmf::upslope::layer_list *) &(arg1)->append(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__layer_list, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_layer_list_extend__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::upslope::layer_list *arg1 = (cmf::upslope::layer_list *) 0 ; - cmf::upslope::layer_list *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - cmf::upslope::layer_list temp_list2 ; - cmf::upslope::layer_list *result = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__layer_list, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "layer_list_extend" "', argument " "1"" of type '" "cmf::upslope::layer_list *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::layer_list * >(argp1); - { - if (SWIG_ConvertPtr(swig_obj[1], (void **) &arg2, SWIGTYPE_p_cmf__upslope__layer_list, SWIG_POINTER_EXCEPTION) == -1) { - int res = iterable_to_list(swig_obj[1],SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, temp_list2); - if (SWIG_IsOK(res)) { - arg2 = &temp_list2; - } else { - SWIG_exception_fail(SWIG_TypeError,"Only iterables can be converted to cmf::upslope::layer_list"); - } - } - } - { - try { - result = (cmf::upslope::layer_list *) &(arg1)->extend((cmf::upslope::layer_list const &)*arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__layer_list, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_layer_list_extend__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::upslope::layer_list *arg1 = (cmf::upslope::layer_list *) 0 ; - cmf::water::node_list *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - cmf::water::node_list temp_list2 ; - cmf::upslope::layer_list *result = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__layer_list, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "layer_list_extend" "', argument " "1"" of type '" "cmf::upslope::layer_list *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::layer_list * >(argp1); - { - if (SWIG_ConvertPtr(swig_obj[1], (void **) &arg2, SWIGTYPE_p_cmf__water__node_list, SWIG_POINTER_EXCEPTION) == -1) { - int res = iterable_to_list(swig_obj[1],SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, temp_list2); - if (SWIG_IsOK(res)) { - arg2 = &temp_list2; - } else { - SWIG_exception_fail(SWIG_TypeError,"Only iterables can be converted to cmf::water::node_list"); - } - } - } - { - try { - result = (cmf::upslope::layer_list *) &(arg1)->extend((cmf::water::node_list const &)*arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__layer_list, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_layer_list_extend(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args,"layer_list_extend",0,2,argv))) SWIG_fail; - --argc; - { - unsigned long _index = 0; - SWIG_TypeRank _rank = 0; - if (argc == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__upslope__layer_list, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - _v = is_listtype_or_iterable(argv[1],SWIGTYPE_p_cmf__upslope__layer_list); - } - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 1; - if (_rank == _rankm) goto dispatch; - } - } - check_1: - - if (argc == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__upslope__layer_list, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - _v = is_listtype_or_iterable(argv[1],SWIGTYPE_p_cmf__water__node_list); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 2; - if (_rank == _rankm) goto dispatch; - } - } - check_2: - - dispatch: - switch(_index) { - case 1: - return _wrap_layer_list_extend__SWIG_0(self, argc, argv); - case 2: - return _wrap_layer_list_extend__SWIG_1(self, argc, argv); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'layer_list_extend'.\n" - " Possible C/C++ prototypes are:\n" - " cmf::upslope::layer_list::extend(cmf::upslope::layer_list const &)\n" - " cmf::upslope::layer_list::extend(cmf::water::node_list const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_layer_list_get_slice(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::layer_list *arg1 = (cmf::upslope::layer_list *) 0 ; - size_t arg2 = (size_t) 0 ; - size_t arg3 = (size_t) 1000000 ; - size_t arg4 = (size_t) 1 ; - void *argp1 = 0 ; - int res1 = 0 ; - size_t val2 ; - int ecode2 = 0 ; - size_t val3 ; - int ecode3 = 0 ; - size_t val4 ; - int ecode4 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "first",(char *) "last",(char *) "step", NULL - }; - cmf::upslope::layer_list result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOO:layer_list_get_slice",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__layer_list, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "layer_list_get_slice" "', argument " "1"" of type '" "cmf::upslope::layer_list *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::layer_list * >(argp1); - if (obj1) { - ecode2 = SWIG_AsVal_size_t(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "layer_list_get_slice" "', argument " "2"" of type '" "size_t""'"); - } - arg2 = static_cast< size_t >(val2); - } - if (obj2) { - ecode3 = SWIG_AsVal_size_t(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "layer_list_get_slice" "', argument " "3"" of type '" "size_t""'"); - } - arg3 = static_cast< size_t >(val3); - } - if (obj3) { - ecode4 = SWIG_AsVal_size_t(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "layer_list_get_slice" "', argument " "4"" of type '" "size_t""'"); - } - arg4 = static_cast< size_t >(val4); - } - { - try { - result = (arg1)->get_slice(arg2,arg3,arg4); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj((new cmf::upslope::layer_list(static_cast< const cmf::upslope::layer_list& >(result))), SWIGTYPE_p_cmf__upslope__layer_list, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_layer_list_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::layer_list *arg1 = (cmf::upslope::layer_list *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__layer_list, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "layer_list_clear" "', argument " "1"" of type '" "cmf::upslope::layer_list *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::layer_list * >(argp1); - { - try { - (arg1)->clear(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_layer_list_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::layer_list *arg1 = (cmf::upslope::layer_list *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - size_t result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__layer_list, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "layer_list_size" "', argument " "1"" of type '" "cmf::upslope::layer_list const *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::layer_list * >(argp1); - { - try { - result = ((cmf::upslope::layer_list const *)arg1)->size(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_layer_list_set_wetness(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::layer_list *arg1 = (cmf::upslope::layer_list *) 0 ; - cmf::math::num_array *arg2 = 0 ; - size_t arg3 = (size_t) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - size_t val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "Value",(char *) "offset", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:layer_list_set_wetness",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__layer_list, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "layer_list_set_wetness" "', argument " "1"" of type '" "cmf::upslope::layer_list *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::layer_list * >(argp1); - { - // Convert a array_wrapper from numpy array - double * data=0; - ptrdiff_t size = from_npy_array(obj1,&data); - if (!data) { - SWIG_exception_fail(SWIG_TypeError,"Input data is not 'array-like' (in the sense of numpy arrays)"); - return NULL; - } - arg2 = new cmf::math::num_array(size,data); - } - if (obj2) { - ecode3 = SWIG_AsVal_size_t(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "layer_list_set_wetness" "', argument " "3"" of type '" "size_t""'"); - } - arg3 = static_cast< size_t >(val3); - } - { - try { - (arg1)->set_wetness((cmf::math::num_array const &)*arg2,arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - { - delete arg2; - } - return resultobj; -fail: - { - delete arg2; - } - return NULL; -} - - -SWIGINTERN PyObject *_wrap_layer_list_set_potential(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::layer_list *arg1 = (cmf::upslope::layer_list *) 0 ; - cmf::math::num_array *arg2 = 0 ; - size_t arg3 = (size_t) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - size_t val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "Value",(char *) "offset", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:layer_list_set_potential",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__layer_list, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "layer_list_set_potential" "', argument " "1"" of type '" "cmf::upslope::layer_list *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::layer_list * >(argp1); - { - // Convert a array_wrapper from numpy array - double * data=0; - ptrdiff_t size = from_npy_array(obj1,&data); - if (!data) { - SWIG_exception_fail(SWIG_TypeError,"Input data is not 'array-like' (in the sense of numpy arrays)"); - return NULL; - } - arg2 = new cmf::math::num_array(size,data); - } - if (obj2) { - ecode3 = SWIG_AsVal_size_t(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "layer_list_set_potential" "', argument " "3"" of type '" "size_t""'"); - } - arg3 = static_cast< size_t >(val3); - } - { - try { - (arg1)->set_potential((cmf::math::num_array const &)*arg2,arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - { - delete arg2; - } - return resultobj; -fail: - { - delete arg2; - } - return NULL; -} - - -SWIGINTERN PyObject *_wrap_layer_list_set_volume(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::layer_list *arg1 = (cmf::upslope::layer_list *) 0 ; - cmf::math::num_array *arg2 = 0 ; - size_t arg3 = (size_t) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - size_t val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "Value",(char *) "offset", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:layer_list_set_volume",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__layer_list, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "layer_list_set_volume" "', argument " "1"" of type '" "cmf::upslope::layer_list *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::layer_list * >(argp1); - { - // Convert a array_wrapper from numpy array - double * data=0; - ptrdiff_t size = from_npy_array(obj1,&data); - if (!data) { - SWIG_exception_fail(SWIG_TypeError,"Input data is not 'array-like' (in the sense of numpy arrays)"); - return NULL; - } - arg2 = new cmf::math::num_array(size,data); - } - if (obj2) { - ecode3 = SWIG_AsVal_size_t(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "layer_list_set_volume" "', argument " "3"" of type '" "size_t""'"); - } - arg3 = static_cast< size_t >(val3); - } - { - try { - (arg1)->set_volume((cmf::math::num_array const &)*arg2,arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - { - delete arg2; - } - return resultobj; -fail: - { - delete arg2; - } - return NULL; -} - - -SWIGINTERN PyObject *_wrap_layer_list_get_percolation(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::layer_list *arg1 = (cmf::upslope::layer_list *) 0 ; - cmf::math::Time arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "t", NULL - }; - cmf::math::num_array result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:layer_list_get_percolation",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__layer_list, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "layer_list_get_percolation" "', argument " "1"" of type '" "cmf::upslope::layer_list const *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::layer_list * >(argp1); - { - arg2 = convert_datetime_to_cmftime(obj1); - if (arg2 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } - } - { - try { - result = ((cmf::upslope::layer_list const *)arg1)->get_percolation(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - resultobj = as_npy_array(result); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_layer_list_set_theta(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::layer_list *arg1 = (cmf::upslope::layer_list *) 0 ; - cmf::math::num_array *arg2 = 0 ; - size_t arg3 = (size_t) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - size_t val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "Value",(char *) "offset", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:layer_list_set_theta",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__layer_list, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "layer_list_set_theta" "', argument " "1"" of type '" "cmf::upslope::layer_list *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::layer_list * >(argp1); - { - // Convert a array_wrapper from numpy array - double * data=0; - ptrdiff_t size = from_npy_array(obj1,&data); - if (!data) { - SWIG_exception_fail(SWIG_TypeError,"Input data is not 'array-like' (in the sense of numpy arrays)"); - return NULL; - } - arg2 = new cmf::math::num_array(size,data); - } - if (obj2) { - ecode3 = SWIG_AsVal_size_t(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "layer_list_set_theta" "', argument " "3"" of type '" "size_t""'"); - } - arg3 = static_cast< size_t >(val3); - } - { - try { - (arg1)->set_theta((cmf::math::num_array const &)*arg2,arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - { - delete arg2; - } - return resultobj; -fail: - { - delete arg2; - } - return NULL; -} - - -SWIGINTERN PyObject *_wrap_layer_list_set_ice_fraction(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::layer_list *arg1 = (cmf::upslope::layer_list *) 0 ; - cmf::math::num_array *arg2 = 0 ; - size_t arg3 = (size_t) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - size_t val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "Value",(char *) "offset", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:layer_list_set_ice_fraction",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__layer_list, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "layer_list_set_ice_fraction" "', argument " "1"" of type '" "cmf::upslope::layer_list *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::layer_list * >(argp1); - { - // Convert a array_wrapper from numpy array - double * data=0; - ptrdiff_t size = from_npy_array(obj1,&data); - if (!data) { - SWIG_exception_fail(SWIG_TypeError,"Input data is not 'array-like' (in the sense of numpy arrays)"); - return NULL; - } - arg2 = new cmf::math::num_array(size,data); - } - if (obj2) { - ecode3 = SWIG_AsVal_size_t(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "layer_list_set_ice_fraction" "', argument " "3"" of type '" "size_t""'"); - } - arg3 = static_cast< size_t >(val3); - } - { - try { - (arg1)->set_ice_fraction((cmf::math::num_array const &)*arg2,arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - { - delete arg2; - } - return resultobj; -fail: - { - delete arg2; - } - return NULL; -} - - -SWIGINTERN PyObject *_wrap_layer_list_set_rootfraction(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::layer_list *arg1 = (cmf::upslope::layer_list *) 0 ; - cmf::math::num_array *arg2 = 0 ; - size_t arg3 = (size_t) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - size_t val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "Value",(char *) "offset", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:layer_list_set_rootfraction",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__layer_list, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "layer_list_set_rootfraction" "', argument " "1"" of type '" "cmf::upslope::layer_list *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::layer_list * >(argp1); - { - // Convert a array_wrapper from numpy array - double * data=0; - ptrdiff_t size = from_npy_array(obj1,&data); - if (!data) { - SWIG_exception_fail(SWIG_TypeError,"Input data is not 'array-like' (in the sense of numpy arrays)"); - return NULL; - } - arg2 = new cmf::math::num_array(size,data); - } - if (obj2) { - ecode3 = SWIG_AsVal_size_t(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "layer_list_set_rootfraction" "', argument " "3"" of type '" "size_t""'"); - } - arg3 = static_cast< size_t >(val3); - } - { - try { - (arg1)->set_rootfraction((cmf::math::num_array const &)*arg2,arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - { - delete arg2; - } - return resultobj; -fail: - { - delete arg2; - } - return NULL; -} - - -SWIGINTERN PyObject *_wrap_layer_list_gravitational_potential_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::layer_list *arg1 = (cmf::upslope::layer_list *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::math::num_array result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__layer_list, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "layer_list_gravitational_potential_get" "', argument " "1"" of type '" "cmf::upslope::layer_list *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::layer_list * >(argp1); - { - try { - result = cmf_upslope_layer_list_gravitational_potential_get(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - resultobj = as_npy_array(result); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_layer_list_matrix_potential_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::layer_list *arg1 = (cmf::upslope::layer_list *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::math::num_array result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__layer_list, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "layer_list_matrix_potential_get" "', argument " "1"" of type '" "cmf::upslope::layer_list *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::layer_list * >(argp1); - { - try { - result = cmf_upslope_layer_list_matrix_potential_get(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - resultobj = as_npy_array(result); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_layer_list_wetness_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::layer_list *arg1 = (cmf::upslope::layer_list *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::math::num_array result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__layer_list, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "layer_list_wetness_get" "', argument " "1"" of type '" "cmf::upslope::layer_list *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::layer_list * >(argp1); - { - try { - result = cmf_upslope_layer_list_wetness_get(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - resultobj = as_npy_array(result); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_layer_list_volume_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::layer_list *arg1 = (cmf::upslope::layer_list *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::math::num_array result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__layer_list, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "layer_list_volume_get" "', argument " "1"" of type '" "cmf::upslope::layer_list *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::layer_list * >(argp1); - { - try { - result = cmf_upslope_layer_list_volume_get(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - resultobj = as_npy_array(result); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_layer_list_potential_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::layer_list *arg1 = (cmf::upslope::layer_list *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::math::num_array result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__layer_list, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "layer_list_potential_get" "', argument " "1"" of type '" "cmf::upslope::layer_list *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::layer_list * >(argp1); - { - try { - result = cmf_upslope_layer_list_potential_get(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - resultobj = as_npy_array(result); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_layer_list_K_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::layer_list *arg1 = (cmf::upslope::layer_list *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::math::num_array result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__layer_list, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "layer_list_K_get" "', argument " "1"" of type '" "cmf::upslope::layer_list *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::layer_list * >(argp1); - { - try { - result = cmf_upslope_layer_list_K_get(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - resultobj = as_npy_array(result); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_layer_list_Ksat_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::layer_list *arg1 = (cmf::upslope::layer_list *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::math::num_array result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__layer_list, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "layer_list_Ksat_get" "', argument " "1"" of type '" "cmf::upslope::layer_list *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::layer_list * >(argp1); - { - try { - result = cmf_upslope_layer_list_Ksat_get(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - resultobj = as_npy_array(result); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_layer_list_thickness_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::layer_list *arg1 = (cmf::upslope::layer_list *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::math::num_array result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__layer_list, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "layer_list_thickness_get" "', argument " "1"" of type '" "cmf::upslope::layer_list *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::layer_list * >(argp1); - { - try { - result = cmf_upslope_layer_list_thickness_get(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - resultobj = as_npy_array(result); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_layer_list_lower_boundary_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::layer_list *arg1 = (cmf::upslope::layer_list *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::math::num_array result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__layer_list, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "layer_list_lower_boundary_get" "', argument " "1"" of type '" "cmf::upslope::layer_list *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::layer_list * >(argp1); - { - try { - result = cmf_upslope_layer_list_lower_boundary_get(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - resultobj = as_npy_array(result); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_layer_list_upper_boundary_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::layer_list *arg1 = (cmf::upslope::layer_list *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::math::num_array result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__layer_list, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "layer_list_upper_boundary_get" "', argument " "1"" of type '" "cmf::upslope::layer_list *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::layer_list * >(argp1); - { - try { - result = cmf_upslope_layer_list_upper_boundary_get(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - resultobj = as_npy_array(result); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_layer_list_porosity_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::layer_list *arg1 = (cmf::upslope::layer_list *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::math::num_array result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__layer_list, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "layer_list_porosity_get" "', argument " "1"" of type '" "cmf::upslope::layer_list *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::layer_list * >(argp1); - { - try { - result = cmf_upslope_layer_list_porosity_get(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - resultobj = as_npy_array(result); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_layer_list_ice_fraction_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::layer_list *arg1 = (cmf::upslope::layer_list *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::math::num_array result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__layer_list, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "layer_list_ice_fraction_get" "', argument " "1"" of type '" "cmf::upslope::layer_list *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::layer_list * >(argp1); - { - try { - result = cmf_upslope_layer_list_ice_fraction_get(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - resultobj = as_npy_array(result); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_layer_list_theta_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::layer_list *arg1 = (cmf::upslope::layer_list *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::math::num_array result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__layer_list, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "layer_list_theta_get" "', argument " "1"" of type '" "cmf::upslope::layer_list *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::layer_list * >(argp1); - { - try { - result = cmf_upslope_layer_list_theta_get(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - resultobj = as_npy_array(result); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_layer_list_root_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::layer_list *arg1 = (cmf::upslope::layer_list *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::math::num_array result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__layer_list, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "layer_list_root_get" "', argument " "1"" of type '" "cmf::upslope::layer_list *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::layer_list * >(argp1); - { - try { - result = cmf_upslope_layer_list_root_get(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - resultobj = as_npy_array(result); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_layer_list___get(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::layer_list *arg1 = (cmf::upslope::layer_list *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "index", NULL - }; - cmf::upslope::SoilLayer::ptr result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:layer_list___get",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__layer_list, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "layer_list___get" "', argument " "1"" of type '" "cmf::upslope::layer_list *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::layer_list * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "layer_list___get" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - { - try { - result = cmf_upslope_layer_list___get(arg1,arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - std::shared_ptr< cmf::upslope::SoilLayer > *smartresult = result ? new std::shared_ptr< cmf::upslope::SoilLayer >(result) : 0; - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, SWIG_POINTER_OWN); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_layer_list(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::layer_list *arg1 = (cmf::upslope::layer_list *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__layer_list, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_layer_list" "', argument " "1"" of type '" "cmf::upslope::layer_list *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::layer_list * >(argp1); - { - try { - delete arg1; - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *layer_list_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__layer_list, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *layer_list_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_MacroPore_porefraction_min_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::MacroPore *arg1 = (cmf::upslope::MacroPore *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::upslope::MacroPore > tempshared1 ; - std::shared_ptr< cmf::upslope::MacroPore > *smartarg1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"MacroPore_porefraction_min_set",2,2,swig_obj)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__MacroPore_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MacroPore_porefraction_min_set" "', argument " "1"" of type '" "cmf::upslope::MacroPore *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); - arg1 = const_cast< cmf::upslope::MacroPore * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); - arg1 = const_cast< cmf::upslope::MacroPore * >((smartarg1 ? smartarg1->get() : 0)); - } - } - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MacroPore_porefraction_min_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->porefraction_min = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MacroPore_porefraction_min_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::MacroPore *arg1 = (cmf::upslope::MacroPore *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::upslope::MacroPore > tempshared1 ; - std::shared_ptr< cmf::upslope::MacroPore > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__MacroPore_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MacroPore_porefraction_min_get" "', argument " "1"" of type '" "cmf::upslope::MacroPore *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); - arg1 = const_cast< cmf::upslope::MacroPore * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); - arg1 = const_cast< cmf::upslope::MacroPore * >((smartarg1 ? smartarg1->get() : 0)); - } - } - result = (real) ((arg1)->porefraction_min); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MacroPore_porefraction_max_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::MacroPore *arg1 = (cmf::upslope::MacroPore *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::upslope::MacroPore > tempshared1 ; - std::shared_ptr< cmf::upslope::MacroPore > *smartarg1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"MacroPore_porefraction_max_set",2,2,swig_obj)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__MacroPore_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MacroPore_porefraction_max_set" "', argument " "1"" of type '" "cmf::upslope::MacroPore *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); - arg1 = const_cast< cmf::upslope::MacroPore * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); - arg1 = const_cast< cmf::upslope::MacroPore * >((smartarg1 ? smartarg1->get() : 0)); - } - } - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MacroPore_porefraction_max_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->porefraction_max = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MacroPore_porefraction_max_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::MacroPore *arg1 = (cmf::upslope::MacroPore *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::upslope::MacroPore > tempshared1 ; - std::shared_ptr< cmf::upslope::MacroPore > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__MacroPore_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MacroPore_porefraction_max_get" "', argument " "1"" of type '" "cmf::upslope::MacroPore *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); - arg1 = const_cast< cmf::upslope::MacroPore * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); - arg1 = const_cast< cmf::upslope::MacroPore * >((smartarg1 ? smartarg1->get() : 0)); - } - } - result = (real) ((arg1)->porefraction_max); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MacroPore___get_layer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::MacroPore *arg1 = (cmf::upslope::MacroPore *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::upslope::MacroPore const > tempshared1 ; - std::shared_ptr< cmf::upslope::MacroPore const > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - cmf::upslope::SoilLayer::ptr result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__MacroPore_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MacroPore___get_layer" "', argument " "1"" of type '" "cmf::upslope::MacroPore const *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::upslope::MacroPore > * >(argp1); - delete reinterpret_cast< std::shared_ptr< const cmf::upslope::MacroPore > * >(argp1); - arg1 = const_cast< cmf::upslope::MacroPore * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::upslope::MacroPore > * >(argp1); - arg1 = const_cast< cmf::upslope::MacroPore * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - try { - result = ((cmf::upslope::MacroPore const *)arg1)->get_layer(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - std::shared_ptr< cmf::upslope::SoilLayer > *smartresult = result ? new std::shared_ptr< cmf::upslope::SoilLayer >(result) : 0; - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, SWIG_POINTER_OWN); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MacroPore_get_porefraction(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::MacroPore *arg1 = (cmf::upslope::MacroPore *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::upslope::MacroPore const > tempshared1 ; - std::shared_ptr< cmf::upslope::MacroPore const > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__MacroPore_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MacroPore_get_porefraction" "', argument " "1"" of type '" "cmf::upslope::MacroPore const *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::upslope::MacroPore > * >(argp1); - delete reinterpret_cast< std::shared_ptr< const cmf::upslope::MacroPore > * >(argp1); - arg1 = const_cast< cmf::upslope::MacroPore * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::upslope::MacroPore > * >(argp1); - arg1 = const_cast< cmf::upslope::MacroPore * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - try { - result = (real)((cmf::upslope::MacroPore const *)arg1)->get_porefraction(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MacroPore_density_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::MacroPore *arg1 = (cmf::upslope::MacroPore *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::upslope::MacroPore > tempshared1 ; - std::shared_ptr< cmf::upslope::MacroPore > *smartarg1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"MacroPore_density_set",2,2,swig_obj)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__MacroPore_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MacroPore_density_set" "', argument " "1"" of type '" "cmf::upslope::MacroPore *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); - arg1 = const_cast< cmf::upslope::MacroPore * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); - arg1 = const_cast< cmf::upslope::MacroPore * >((smartarg1 ? smartarg1->get() : 0)); - } - } - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MacroPore_density_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->density = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MacroPore_density_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::MacroPore *arg1 = (cmf::upslope::MacroPore *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::upslope::MacroPore > tempshared1 ; - std::shared_ptr< cmf::upslope::MacroPore > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__MacroPore_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MacroPore_density_get" "', argument " "1"" of type '" "cmf::upslope::MacroPore *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); - arg1 = const_cast< cmf::upslope::MacroPore * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); - arg1 = const_cast< cmf::upslope::MacroPore * >((smartarg1 ? smartarg1->get() : 0)); - } - } - result = (real) ((arg1)->density); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MacroPore_Ksat_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::MacroPore *arg1 = (cmf::upslope::MacroPore *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::upslope::MacroPore > tempshared1 ; - std::shared_ptr< cmf::upslope::MacroPore > *smartarg1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"MacroPore_Ksat_set",2,2,swig_obj)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__MacroPore_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MacroPore_Ksat_set" "', argument " "1"" of type '" "cmf::upslope::MacroPore *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); - arg1 = const_cast< cmf::upslope::MacroPore * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); - arg1 = const_cast< cmf::upslope::MacroPore * >((smartarg1 ? smartarg1->get() : 0)); - } - } - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MacroPore_Ksat_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->Ksat = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MacroPore_Ksat_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::MacroPore *arg1 = (cmf::upslope::MacroPore *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::upslope::MacroPore > tempshared1 ; - std::shared_ptr< cmf::upslope::MacroPore > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__MacroPore_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MacroPore_Ksat_get" "', argument " "1"" of type '" "cmf::upslope::MacroPore *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); - arg1 = const_cast< cmf::upslope::MacroPore * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); - arg1 = const_cast< cmf::upslope::MacroPore * >((smartarg1 ? smartarg1->get() : 0)); - } - } - result = (real) ((arg1)->Ksat); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MacroPore_crack_wetness_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::MacroPore *arg1 = (cmf::upslope::MacroPore *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::upslope::MacroPore > tempshared1 ; - std::shared_ptr< cmf::upslope::MacroPore > *smartarg1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"MacroPore_crack_wetness_set",2,2,swig_obj)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__MacroPore_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MacroPore_crack_wetness_set" "', argument " "1"" of type '" "cmf::upslope::MacroPore *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); - arg1 = const_cast< cmf::upslope::MacroPore * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); - arg1 = const_cast< cmf::upslope::MacroPore * >((smartarg1 ? smartarg1->get() : 0)); - } - } - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MacroPore_crack_wetness_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->crack_wetness = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MacroPore_crack_wetness_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::MacroPore *arg1 = (cmf::upslope::MacroPore *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::upslope::MacroPore > tempshared1 ; - std::shared_ptr< cmf::upslope::MacroPore > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__MacroPore_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MacroPore_crack_wetness_get" "', argument " "1"" of type '" "cmf::upslope::MacroPore *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); - arg1 = const_cast< cmf::upslope::MacroPore * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); - arg1 = const_cast< cmf::upslope::MacroPore * >((smartarg1 ? smartarg1->get() : 0)); - } - } - result = (real) ((arg1)->crack_wetness); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MacroPore_get_K(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::MacroPore *arg1 = (cmf::upslope::MacroPore *) 0 ; - cmf::geometry::point arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::upslope::MacroPore const > tempshared1 ; - std::shared_ptr< cmf::upslope::MacroPore const > *smartarg1 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "direction", NULL - }; - real result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:MacroPore_get_K",kwnames,&obj0,&obj1)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__MacroPore_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MacroPore_get_K" "', argument " "1"" of type '" "cmf::upslope::MacroPore const *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::upslope::MacroPore > * >(argp1); - delete reinterpret_cast< std::shared_ptr< const cmf::upslope::MacroPore > * >(argp1); - arg1 = const_cast< cmf::upslope::MacroPore * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::upslope::MacroPore > * >(argp1); - arg1 = const_cast< cmf::upslope::MacroPore * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - if (check_xy(obj1)) { - std::string res = convert_xyz_to_point(obj1,arg2); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - return NULL; - } - } - else if (PySequence_Check(obj1)) { - std::string res = convert_seq_to_point(obj1,arg2); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError, res.c_str()); - } - } else { - std::string res="<"; - res+=pyrepr(obj1); - res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - } - } - { - try { - result = (real)((cmf::upslope::MacroPore const *)arg1)->get_K(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MacroPore_get_crackwidth(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::MacroPore *arg1 = (cmf::upslope::MacroPore *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::upslope::MacroPore const > tempshared1 ; - std::shared_ptr< cmf::upslope::MacroPore const > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__MacroPore_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MacroPore_get_crackwidth" "', argument " "1"" of type '" "cmf::upslope::MacroPore const *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::upslope::MacroPore > * >(argp1); - delete reinterpret_cast< std::shared_ptr< const cmf::upslope::MacroPore > * >(argp1); - arg1 = const_cast< cmf::upslope::MacroPore * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::upslope::MacroPore > * >(argp1); - arg1 = const_cast< cmf::upslope::MacroPore * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - try { - result = (real)((cmf::upslope::MacroPore const *)arg1)->get_crackwidth(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MacroPore_get_flowwidth(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::MacroPore *arg1 = (cmf::upslope::MacroPore *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::upslope::MacroPore const > tempshared1 ; - std::shared_ptr< cmf::upslope::MacroPore const > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__MacroPore_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MacroPore_get_flowwidth" "', argument " "1"" of type '" "cmf::upslope::MacroPore const *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::upslope::MacroPore > * >(argp1); - delete reinterpret_cast< std::shared_ptr< const cmf::upslope::MacroPore > * >(argp1); - arg1 = const_cast< cmf::upslope::MacroPore * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::upslope::MacroPore > * >(argp1); - arg1 = const_cast< cmf::upslope::MacroPore * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - try { - result = (real)((cmf::upslope::MacroPore const *)arg1)->get_flowwidth(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MacroPore_K_shape_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::MacroPore *arg1 = (cmf::upslope::MacroPore *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::upslope::MacroPore > tempshared1 ; - std::shared_ptr< cmf::upslope::MacroPore > *smartarg1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"MacroPore_K_shape_set",2,2,swig_obj)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__MacroPore_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MacroPore_K_shape_set" "', argument " "1"" of type '" "cmf::upslope::MacroPore *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); - arg1 = const_cast< cmf::upslope::MacroPore * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); - arg1 = const_cast< cmf::upslope::MacroPore * >((smartarg1 ? smartarg1->get() : 0)); - } - } - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MacroPore_K_shape_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->K_shape = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MacroPore_K_shape_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::MacroPore *arg1 = (cmf::upslope::MacroPore *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::upslope::MacroPore > tempshared1 ; - std::shared_ptr< cmf::upslope::MacroPore > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__MacroPore_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MacroPore_K_shape_get" "', argument " "1"" of type '" "cmf::upslope::MacroPore *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); - arg1 = const_cast< cmf::upslope::MacroPore * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); - arg1 = const_cast< cmf::upslope::MacroPore * >((smartarg1 ? smartarg1->get() : 0)); - } - } - result = (real) ((arg1)->K_shape); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MacroPore_create(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::SoilLayer::ptr arg1 ; - real arg2 = (real) 0.05 ; - real arg3 = (real) 10 ; - real arg4 = (real) 0.05 ; - real arg5 = (real) -1. ; - real arg6 = (real) 0.0 ; - void *argp1 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - double val3 ; - int ecode3 = 0 ; - double val4 ; - int ecode4 = 0 ; - double val5 ; - int ecode5 = 0 ; - double val6 ; - int ecode6 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - char * kwnames[] = { - (char *) "layer",(char *) "porefraction",(char *) "Ksat",(char *) "density",(char *) "porefraction_wilt",(char *) "K_shape", NULL - }; - cmf::upslope::MacroPore::ptr result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOOOO:MacroPore_create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MacroPore_create" "', argument " "1"" of type '" "cmf::upslope::SoilLayer::ptr""'"); - } - if (argp1) arg1 = *(reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp1)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp1); - } - if (obj1) { - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MacroPore_create" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - } - if (obj2) { - ecode3 = SWIG_AsVal_double(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MacroPore_create" "', argument " "3"" of type '" "real""'"); - } - arg3 = static_cast< real >(val3); - } - if (obj3) { - ecode4 = SWIG_AsVal_double(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "MacroPore_create" "', argument " "4"" of type '" "real""'"); - } - arg4 = static_cast< real >(val4); - } - if (obj4) { - ecode5 = SWIG_AsVal_double(obj4, &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "MacroPore_create" "', argument " "5"" of type '" "real""'"); - } - arg5 = static_cast< real >(val5); - } - if (obj5) { - ecode6 = SWIG_AsVal_double(obj5, &val6); - if (!SWIG_IsOK(ecode6)) { - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "MacroPore_create" "', argument " "6"" of type '" "real""'"); - } - arg6 = static_cast< real >(val6); - } - { - try { - result = cmf::upslope::MacroPore::create(arg1,arg2,arg3,arg4,arg5,arg6); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - std::shared_ptr< cmf::upslope::MacroPore > *smartresult = result ? new std::shared_ptr< cmf::upslope::MacroPore >(result) : 0; - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__upslope__MacroPore_t, SWIG_POINTER_OWN); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MacroPore_cast(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::flux_node::ptr arg1 ; - void *argp1 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - char * kwnames[] = { - (char *) "node", NULL - }; - cmf::upslope::MacroPore::ptr result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:MacroPore_cast",kwnames,&obj0)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MacroPore_cast" "', argument " "1"" of type '" "cmf::water::flux_node::ptr""'"); - } - if (argp1) arg1 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp1)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp1); - } - { - try { - result = cmf::upslope::MacroPore::cast(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - std::shared_ptr< cmf::upslope::MacroPore > *smartresult = result ? new std::shared_ptr< cmf::upslope::MacroPore >(result) : 0; - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__upslope__MacroPore_t, SWIG_POINTER_OWN); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MacroPore_filled_fraction_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::MacroPore *arg1 = (cmf::upslope::MacroPore *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::upslope::MacroPore > tempshared1 ; - std::shared_ptr< cmf::upslope::MacroPore > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__MacroPore_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MacroPore_filled_fraction_get" "', argument " "1"" of type '" "cmf::upslope::MacroPore *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); - arg1 = const_cast< cmf::upslope::MacroPore * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); - arg1 = const_cast< cmf::upslope::MacroPore * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - try { - result = (real)cmf_upslope_MacroPore_filled_fraction_get(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MacroPore_K_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::MacroPore *arg1 = (cmf::upslope::MacroPore *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::upslope::MacroPore > tempshared1 ; - std::shared_ptr< cmf::upslope::MacroPore > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__MacroPore_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MacroPore_K_get" "', argument " "1"" of type '" "cmf::upslope::MacroPore *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); - arg1 = const_cast< cmf::upslope::MacroPore * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); - arg1 = const_cast< cmf::upslope::MacroPore * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - try { - result = (real)cmf_upslope_MacroPore_K_get(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MacroPore_capacity_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::MacroPore *arg1 = (cmf::upslope::MacroPore *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::upslope::MacroPore > tempshared1 ; - std::shared_ptr< cmf::upslope::MacroPore > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__MacroPore_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MacroPore_capacity_get" "', argument " "1"" of type '" "cmf::upslope::MacroPore *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); - arg1 = const_cast< cmf::upslope::MacroPore * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); - arg1 = const_cast< cmf::upslope::MacroPore * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - try { - result = (real)cmf_upslope_MacroPore_capacity_get(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MacroPore_cell_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::MacroPore *arg1 = (cmf::upslope::MacroPore *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::upslope::MacroPore > tempshared1 ; - std::shared_ptr< cmf::upslope::MacroPore > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - cmf::upslope::Cell *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__MacroPore_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MacroPore_cell_get" "', argument " "1"" of type '" "cmf::upslope::MacroPore *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); - arg1 = const_cast< cmf::upslope::MacroPore * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); - arg1 = const_cast< cmf::upslope::MacroPore * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - try { - result = (cmf::upslope::Cell *) &cmf_upslope_MacroPore_cell_get(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_MacroPore(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::MacroPore *arg1 = (cmf::upslope::MacroPore *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::upslope::MacroPore > tempshared1 ; - std::shared_ptr< cmf::upslope::MacroPore > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__MacroPore_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MacroPore" "', argument " "1"" of type '" "cmf::upslope::MacroPore *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); - arg1 = const_cast< cmf::upslope::MacroPore * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); - arg1 = const_cast< cmf::upslope::MacroPore * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - try { - (void)arg1; delete smartarg1; - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *MacroPore_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_cmf__upslope__MacroPore_t, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *_wrap_delete_BaseMacroFlow(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::connections::BaseMacroFlow *arg1 = (cmf::upslope::connections::BaseMacroFlow *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__BaseMacroFlow, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_BaseMacroFlow" "', argument " "1"" of type '" "cmf::upslope::connections::BaseMacroFlow *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::connections::BaseMacroFlow * >(argp1); - { - try { - - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *BaseMacroFlow_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__connections__BaseMacroFlow, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *_wrap_new_GradientMacroFlow(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::MacroPore::ptr arg1 ; - cmf::water::flux_node::ptr arg2 ; - void *argp1 ; - int res1 = 0 ; - void *argp2 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "left",(char *) "right", NULL - }; - cmf::upslope::connections::GradientMacroFlow *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:new_GradientMacroFlow",kwnames,&obj0,&obj1)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__MacroPore_t, 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_GradientMacroFlow" "', argument " "1"" of type '" "cmf::upslope::MacroPore::ptr""'"); - } - if (argp1) arg1 = *(reinterpret_cast< cmf::upslope::MacroPore::ptr * >(argp1)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::upslope::MacroPore::ptr * >(argp1); - } - { - int newmem = 0; - res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_GradientMacroFlow" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); - } - if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); - } - { - try { - result = (cmf::upslope::connections::GradientMacroFlow *)new cmf::upslope::connections::GradientMacroFlow(arg1,arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__connections__GradientMacroFlow, SWIG_POINTER_NEW | 0 ); - - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_GradientMacroFlow(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::connections::GradientMacroFlow *arg1 = (cmf::upslope::connections::GradientMacroFlow *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__GradientMacroFlow, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GradientMacroFlow" "', argument " "1"" of type '" "cmf::upslope::connections::GradientMacroFlow *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::connections::GradientMacroFlow * >(argp1); - { - try { - - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *GradientMacroFlow_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__connections__GradientMacroFlow, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *GradientMacroFlow_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_new_KinematicMacroFlow(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::WaterStorage::ptr arg1 ; - cmf::water::flux_node::ptr arg2 ; - real arg3 = (real) 1. ; - void *argp1 ; - int res1 = 0 ; - void *argp2 ; - int res2 = 0 ; - double val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char * kwnames[] = { - (char *) "left",(char *) "right",(char *) "beta", NULL - }; - cmf::upslope::connections::KinematicMacroFlow *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:new_KinematicMacroFlow",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_KinematicMacroFlow" "', argument " "1"" of type '" "cmf::water::WaterStorage::ptr""'"); - } - if (argp1) arg1 = *(reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp1)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp1); - } - { - int newmem = 0; - res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_KinematicMacroFlow" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); - } - if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); - } - if (obj2) { - ecode3 = SWIG_AsVal_double(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_KinematicMacroFlow" "', argument " "3"" of type '" "real""'"); - } - arg3 = static_cast< real >(val3); - } - { - try { - result = (cmf::upslope::connections::KinematicMacroFlow *)new cmf::upslope::connections::KinematicMacroFlow(arg1,arg2,arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__connections__KinematicMacroFlow, SWIG_POINTER_NEW | 0 ); - - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_KinematicMacroFlow(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::connections::KinematicMacroFlow *arg1 = (cmf::upslope::connections::KinematicMacroFlow *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__KinematicMacroFlow, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_KinematicMacroFlow" "', argument " "1"" of type '" "cmf::upslope::connections::KinematicMacroFlow *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::connections::KinematicMacroFlow * >(argp1); - { - try { - - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *KinematicMacroFlow_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__connections__KinematicMacroFlow, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *KinematicMacroFlow_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_JarvisMacroFlow_beta_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::connections::JarvisMacroFlow *arg1 = (cmf::upslope::connections::JarvisMacroFlow *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"JarvisMacroFlow_beta_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__JarvisMacroFlow, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "JarvisMacroFlow_beta_set" "', argument " "1"" of type '" "cmf::upslope::connections::JarvisMacroFlow *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::connections::JarvisMacroFlow * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "JarvisMacroFlow_beta_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->beta = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_JarvisMacroFlow_beta_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::connections::JarvisMacroFlow *arg1 = (cmf::upslope::connections::JarvisMacroFlow *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__JarvisMacroFlow, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "JarvisMacroFlow_beta_get" "', argument " "1"" of type '" "cmf::upslope::connections::JarvisMacroFlow *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::connections::JarvisMacroFlow * >(argp1); - result = (real) ((arg1)->beta); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_JarvisMacroFlow_porefraction_r_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::connections::JarvisMacroFlow *arg1 = (cmf::upslope::connections::JarvisMacroFlow *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"JarvisMacroFlow_porefraction_r_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__JarvisMacroFlow, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "JarvisMacroFlow_porefraction_r_set" "', argument " "1"" of type '" "cmf::upslope::connections::JarvisMacroFlow *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::connections::JarvisMacroFlow * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "JarvisMacroFlow_porefraction_r_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->porefraction_r = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_JarvisMacroFlow_porefraction_r_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::connections::JarvisMacroFlow *arg1 = (cmf::upslope::connections::JarvisMacroFlow *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__JarvisMacroFlow, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "JarvisMacroFlow_porefraction_r_get" "', argument " "1"" of type '" "cmf::upslope::connections::JarvisMacroFlow *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::connections::JarvisMacroFlow * >(argp1); - result = (real) ((arg1)->porefraction_r); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_JarvisMacroFlow(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::WaterStorage::ptr arg1 ; - cmf::water::flux_node::ptr arg2 ; - real arg3 = (real) 1. ; - real arg4 = (real) 0.0 ; - void *argp1 ; - int res1 = 0 ; - void *argp2 ; - int res2 = 0 ; - double val3 ; - int ecode3 = 0 ; - double val4 ; - int ecode4 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - char * kwnames[] = { - (char *) "left",(char *) "right",(char *) "beta",(char *) "porefraction_r", NULL - }; - cmf::upslope::connections::JarvisMacroFlow *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OO:new_JarvisMacroFlow",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_JarvisMacroFlow" "', argument " "1"" of type '" "cmf::water::WaterStorage::ptr""'"); - } - if (argp1) arg1 = *(reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp1)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp1); - } - { - int newmem = 0; - res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_JarvisMacroFlow" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); - } - if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); - } - if (obj2) { - ecode3 = SWIG_AsVal_double(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_JarvisMacroFlow" "', argument " "3"" of type '" "real""'"); - } - arg3 = static_cast< real >(val3); - } - if (obj3) { - ecode4 = SWIG_AsVal_double(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_JarvisMacroFlow" "', argument " "4"" of type '" "real""'"); - } - arg4 = static_cast< real >(val4); - } - { - try { - result = (cmf::upslope::connections::JarvisMacroFlow *)new cmf::upslope::connections::JarvisMacroFlow(arg1,arg2,arg3,arg4); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__connections__JarvisMacroFlow, SWIG_POINTER_NEW | 0 ); - - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_JarvisMacroFlow(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::connections::JarvisMacroFlow *arg1 = (cmf::upslope::connections::JarvisMacroFlow *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__JarvisMacroFlow, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_JarvisMacroFlow" "', argument " "1"" of type '" "cmf::upslope::connections::JarvisMacroFlow *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::connections::JarvisMacroFlow * >(argp1); - { - try { - - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *JarvisMacroFlow_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__connections__JarvisMacroFlow, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *JarvisMacroFlow_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_new_GradientMacroMicroExchange(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::SoilLayer::ptr arg1 ; - cmf::upslope::MacroPore::ptr arg2 ; - void *argp1 ; - int res1 = 0 ; - void *argp2 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "left",(char *) "right", NULL - }; - cmf::upslope::connections::GradientMacroMicroExchange *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:new_GradientMacroMicroExchange",kwnames,&obj0,&obj1)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_GradientMacroMicroExchange" "', argument " "1"" of type '" "cmf::upslope::SoilLayer::ptr""'"); - } - if (argp1) arg1 = *(reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp1)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp1); - } - { - int newmem = 0; - res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__MacroPore_t, 0 , &newmem); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_GradientMacroMicroExchange" "', argument " "2"" of type '" "cmf::upslope::MacroPore::ptr""'"); - } - if (argp2) arg2 = *(reinterpret_cast< cmf::upslope::MacroPore::ptr * >(argp2)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::upslope::MacroPore::ptr * >(argp2); - } - { - try { - result = (cmf::upslope::connections::GradientMacroMicroExchange *)new cmf::upslope::connections::GradientMacroMicroExchange(arg1,arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__connections__GradientMacroMicroExchange, SWIG_POINTER_NEW | 0 ); - - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_GradientMacroMicroExchange(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::connections::GradientMacroMicroExchange *arg1 = (cmf::upslope::connections::GradientMacroMicroExchange *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__GradientMacroMicroExchange, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GradientMacroMicroExchange" "', argument " "1"" of type '" "cmf::upslope::connections::GradientMacroMicroExchange *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::connections::GradientMacroMicroExchange * >(argp1); - { - try { - - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *GradientMacroMicroExchange_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__connections__GradientMacroMicroExchange, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *GradientMacroMicroExchange_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_DiffusiveMacroMicroExchange_omega_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::connections::DiffusiveMacroMicroExchange *arg1 = (cmf::upslope::connections::DiffusiveMacroMicroExchange *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"DiffusiveMacroMicroExchange_omega_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__DiffusiveMacroMicroExchange, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DiffusiveMacroMicroExchange_omega_set" "', argument " "1"" of type '" "cmf::upslope::connections::DiffusiveMacroMicroExchange *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::connections::DiffusiveMacroMicroExchange * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DiffusiveMacroMicroExchange_omega_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->omega = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_DiffusiveMacroMicroExchange_omega_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::connections::DiffusiveMacroMicroExchange *arg1 = (cmf::upslope::connections::DiffusiveMacroMicroExchange *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__DiffusiveMacroMicroExchange, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DiffusiveMacroMicroExchange_omega_get" "', argument " "1"" of type '" "cmf::upslope::connections::DiffusiveMacroMicroExchange *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::connections::DiffusiveMacroMicroExchange * >(argp1); - result = (real) ((arg1)->omega); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_DiffusiveMacroMicroExchange_pFrmi_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::connections::DiffusiveMacroMicroExchange *arg1 = (cmf::upslope::connections::DiffusiveMacroMicroExchange *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"DiffusiveMacroMicroExchange_pFrmi_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__DiffusiveMacroMicroExchange, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DiffusiveMacroMicroExchange_pFrmi_set" "', argument " "1"" of type '" "cmf::upslope::connections::DiffusiveMacroMicroExchange *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::connections::DiffusiveMacroMicroExchange * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DiffusiveMacroMicroExchange_pFrmi_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->pFrmi = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_DiffusiveMacroMicroExchange_pFrmi_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::connections::DiffusiveMacroMicroExchange *arg1 = (cmf::upslope::connections::DiffusiveMacroMicroExchange *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__DiffusiveMacroMicroExchange, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DiffusiveMacroMicroExchange_pFrmi_get" "', argument " "1"" of type '" "cmf::upslope::connections::DiffusiveMacroMicroExchange *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::connections::DiffusiveMacroMicroExchange * >(argp1); - result = (real) ((arg1)->pFrmi); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_DiffusiveMacroMicroExchange(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::MacroPore::ptr arg1 ; - cmf::upslope::SoilLayer::ptr arg2 ; - real arg3 ; - real arg4 = (real) 4.2 ; - void *argp1 ; - int res1 = 0 ; - void *argp2 ; - int res2 = 0 ; - double val3 ; - int ecode3 = 0 ; - double val4 ; - int ecode4 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - char * kwnames[] = { - (char *) "left",(char *) "right",(char *) "omega",(char *) "pFrmi", NULL - }; - cmf::upslope::connections::DiffusiveMacroMicroExchange *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|O:new_DiffusiveMacroMicroExchange",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__MacroPore_t, 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DiffusiveMacroMicroExchange" "', argument " "1"" of type '" "cmf::upslope::MacroPore::ptr""'"); - } - if (argp1) arg1 = *(reinterpret_cast< cmf::upslope::MacroPore::ptr * >(argp1)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::upslope::MacroPore::ptr * >(argp1); - } - { - int newmem = 0; - res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 , &newmem); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_DiffusiveMacroMicroExchange" "', argument " "2"" of type '" "cmf::upslope::SoilLayer::ptr""'"); - } - if (argp2) arg2 = *(reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp2)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp2); - } - ecode3 = SWIG_AsVal_double(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_DiffusiveMacroMicroExchange" "', argument " "3"" of type '" "real""'"); - } - arg3 = static_cast< real >(val3); - if (obj3) { - ecode4 = SWIG_AsVal_double(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_DiffusiveMacroMicroExchange" "', argument " "4"" of type '" "real""'"); - } - arg4 = static_cast< real >(val4); - } - { - try { - result = (cmf::upslope::connections::DiffusiveMacroMicroExchange *)new cmf::upslope::connections::DiffusiveMacroMicroExchange(arg1,arg2,arg3,arg4); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__connections__DiffusiveMacroMicroExchange, SWIG_POINTER_NEW | 0 ); - - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_DiffusiveMacroMicroExchange(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::connections::DiffusiveMacroMicroExchange *arg1 = (cmf::upslope::connections::DiffusiveMacroMicroExchange *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__DiffusiveMacroMicroExchange, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DiffusiveMacroMicroExchange" "', argument " "1"" of type '" "cmf::upslope::connections::DiffusiveMacroMicroExchange *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::connections::DiffusiveMacroMicroExchange * >(argp1); - { - try { - - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *DiffusiveMacroMicroExchange_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__connections__DiffusiveMacroMicroExchange, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *DiffusiveMacroMicroExchange_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_MACROlikeMacroMicroExchange_Gf_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::connections::MACROlikeMacroMicroExchange *arg1 = (cmf::upslope::connections::MACROlikeMacroMicroExchange *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"MACROlikeMacroMicroExchange_Gf_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__MACROlikeMacroMicroExchange, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MACROlikeMacroMicroExchange_Gf_set" "', argument " "1"" of type '" "cmf::upslope::connections::MACROlikeMacroMicroExchange *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::connections::MACROlikeMacroMicroExchange * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MACROlikeMacroMicroExchange_Gf_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->Gf = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MACROlikeMacroMicroExchange_Gf_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::connections::MACROlikeMacroMicroExchange *arg1 = (cmf::upslope::connections::MACROlikeMacroMicroExchange *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__MACROlikeMacroMicroExchange, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MACROlikeMacroMicroExchange_Gf_get" "', argument " "1"" of type '" "cmf::upslope::connections::MACROlikeMacroMicroExchange *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::connections::MACROlikeMacroMicroExchange * >(argp1); - result = (real) ((arg1)->Gf); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MACROlikeMacroMicroExchange_gamma_w_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::connections::MACROlikeMacroMicroExchange *arg1 = (cmf::upslope::connections::MACROlikeMacroMicroExchange *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"MACROlikeMacroMicroExchange_gamma_w_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__MACROlikeMacroMicroExchange, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MACROlikeMacroMicroExchange_gamma_w_set" "', argument " "1"" of type '" "cmf::upslope::connections::MACROlikeMacroMicroExchange *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::connections::MACROlikeMacroMicroExchange * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MACROlikeMacroMicroExchange_gamma_w_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->gamma_w = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MACROlikeMacroMicroExchange_gamma_w_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::connections::MACROlikeMacroMicroExchange *arg1 = (cmf::upslope::connections::MACROlikeMacroMicroExchange *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__MACROlikeMacroMicroExchange, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MACROlikeMacroMicroExchange_gamma_w_get" "', argument " "1"" of type '" "cmf::upslope::connections::MACROlikeMacroMicroExchange *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::connections::MACROlikeMacroMicroExchange * >(argp1); - result = (real) ((arg1)->gamma_w); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_MACROlikeMacroMicroExchange(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::SoilLayer::ptr arg1 ; - cmf::upslope::MacroPore::ptr arg2 ; - real arg3 = (real) 0.4 ; - real arg4 = (real) 3 ; - void *argp1 ; - int res1 = 0 ; - void *argp2 ; - int res2 = 0 ; - double val3 ; - int ecode3 = 0 ; - double val4 ; - int ecode4 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - char * kwnames[] = { - (char *) "left",(char *) "right",(char *) "_gamma_w",(char *) "_Gf", NULL - }; - cmf::upslope::connections::MACROlikeMacroMicroExchange *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OO:new_MACROlikeMacroMicroExchange",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MACROlikeMacroMicroExchange" "', argument " "1"" of type '" "cmf::upslope::SoilLayer::ptr""'"); - } - if (argp1) arg1 = *(reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp1)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp1); - } - { - int newmem = 0; - res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__MacroPore_t, 0 , &newmem); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MACROlikeMacroMicroExchange" "', argument " "2"" of type '" "cmf::upslope::MacroPore::ptr""'"); - } - if (argp2) arg2 = *(reinterpret_cast< cmf::upslope::MacroPore::ptr * >(argp2)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::upslope::MacroPore::ptr * >(argp2); - } - if (obj2) { - ecode3 = SWIG_AsVal_double(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_MACROlikeMacroMicroExchange" "', argument " "3"" of type '" "real""'"); - } - arg3 = static_cast< real >(val3); - } - if (obj3) { - ecode4 = SWIG_AsVal_double(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_MACROlikeMacroMicroExchange" "', argument " "4"" of type '" "real""'"); - } - arg4 = static_cast< real >(val4); - } - { - try { - result = (cmf::upslope::connections::MACROlikeMacroMicroExchange *)new cmf::upslope::connections::MACROlikeMacroMicroExchange(arg1,arg2,arg3,arg4); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__connections__MACROlikeMacroMicroExchange, SWIG_POINTER_NEW | 0 ); - - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_MACROlikeMacroMicroExchange(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::connections::MACROlikeMacroMicroExchange *arg1 = (cmf::upslope::connections::MACROlikeMacroMicroExchange *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__MACROlikeMacroMicroExchange, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MACROlikeMacroMicroExchange" "', argument " "1"" of type '" "cmf::upslope::connections::MACROlikeMacroMicroExchange *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::connections::MACROlikeMacroMicroExchange * >(argp1); - { - try { - - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *MACROlikeMacroMicroExchange_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__connections__MACROlikeMacroMicroExchange, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *MACROlikeMacroMicroExchange_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_IVolumeHeightFunction_h(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::river::IVolumeHeightFunction *arg1 = (cmf::river::IVolumeHeightFunction *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "V", NULL - }; - double result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:IVolumeHeightFunction_h",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__river__IVolumeHeightFunction, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IVolumeHeightFunction_h" "', argument " "1"" of type '" "cmf::river::IVolumeHeightFunction const *""'"); - } - arg1 = reinterpret_cast< cmf::river::IVolumeHeightFunction * >(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IVolumeHeightFunction_h" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - { - try { - result = (double)((cmf::river::IVolumeHeightFunction const *)arg1)->h(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_IVolumeHeightFunction_A(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::river::IVolumeHeightFunction *arg1 = (cmf::river::IVolumeHeightFunction *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "V", NULL - }; - double result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:IVolumeHeightFunction_A",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__river__IVolumeHeightFunction, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IVolumeHeightFunction_A" "', argument " "1"" of type '" "cmf::river::IVolumeHeightFunction const *""'"); - } - arg1 = reinterpret_cast< cmf::river::IVolumeHeightFunction * >(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IVolumeHeightFunction_A" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - { - try { - result = (double)((cmf::river::IVolumeHeightFunction const *)arg1)->A(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_IVolumeHeightFunction_V(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::river::IVolumeHeightFunction *arg1 = (cmf::river::IVolumeHeightFunction *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "h", NULL - }; - double result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:IVolumeHeightFunction_V",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__river__IVolumeHeightFunction, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IVolumeHeightFunction_V" "', argument " "1"" of type '" "cmf::river::IVolumeHeightFunction const *""'"); - } - arg1 = reinterpret_cast< cmf::river::IVolumeHeightFunction * >(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IVolumeHeightFunction_V" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - { - try { - result = (double)((cmf::river::IVolumeHeightFunction const *)arg1)->V(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_IVolumeHeightFunction_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::river::IVolumeHeightFunction *arg1 = (cmf::river::IVolumeHeightFunction *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::river::IVolumeHeightFunction *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__IVolumeHeightFunction, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IVolumeHeightFunction_copy" "', argument " "1"" of type '" "cmf::river::IVolumeHeightFunction const *""'"); - } - arg1 = reinterpret_cast< cmf::river::IVolumeHeightFunction * >(argp1); - { - try { - result = (cmf::river::IVolumeHeightFunction *)((cmf::river::IVolumeHeightFunction const *)arg1)->copy(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__river__IVolumeHeightFunction, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_IVolumeHeightFunction_q(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::river::IVolumeHeightFunction *arg1 = (cmf::river::IVolumeHeightFunction *) 0 ; - double arg2 ; - double arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - double val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "h",(char *) "slope", NULL - }; - double result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:IVolumeHeightFunction_q",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__river__IVolumeHeightFunction, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IVolumeHeightFunction_q" "', argument " "1"" of type '" "cmf::river::IVolumeHeightFunction const *""'"); - } - arg1 = reinterpret_cast< cmf::river::IVolumeHeightFunction * >(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IVolumeHeightFunction_q" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - ecode3 = SWIG_AsVal_double(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IVolumeHeightFunction_q" "', argument " "3"" of type '" "double""'"); - } - arg3 = static_cast< double >(val3); - { - try { - result = (double)((cmf::river::IVolumeHeightFunction const *)arg1)->q(arg2,arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_IVolumeHeightFunction(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::river::IVolumeHeightFunction *arg1 = (cmf::river::IVolumeHeightFunction *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__IVolumeHeightFunction, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IVolumeHeightFunction" "', argument " "1"" of type '" "cmf::river::IVolumeHeightFunction *""'"); - } - arg1 = reinterpret_cast< cmf::river::IVolumeHeightFunction * >(argp1); - { - try { - delete arg1; - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *IVolumeHeightFunction_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__river__IVolumeHeightFunction, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *_wrap_Prism_Area_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::river::Prism *arg1 = (cmf::river::Prism *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"Prism_Area_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__Prism, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Prism_Area_set" "', argument " "1"" of type '" "cmf::river::Prism *""'"); - } - arg1 = reinterpret_cast< cmf::river::Prism * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Prism_Area_set" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - if (arg1) (arg1)->Area = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Prism_Area_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::river::Prism *arg1 = (cmf::river::Prism *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - double result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__Prism, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Prism_Area_get" "', argument " "1"" of type '" "cmf::river::Prism *""'"); - } - arg1 = reinterpret_cast< cmf::river::Prism * >(argp1); - result = (double) ((arg1)->Area); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Prism_RoughThickness_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::river::Prism *arg1 = (cmf::river::Prism *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"Prism_RoughThickness_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__Prism, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Prism_RoughThickness_set" "', argument " "1"" of type '" "cmf::river::Prism *""'"); - } - arg1 = reinterpret_cast< cmf::river::Prism * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Prism_RoughThickness_set" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - if (arg1) (arg1)->RoughThickness = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Prism_RoughThickness_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::river::Prism *arg1 = (cmf::river::Prism *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - double result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__Prism, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Prism_RoughThickness_get" "', argument " "1"" of type '" "cmf::river::Prism *""'"); - } - arg1 = reinterpret_cast< cmf::river::Prism * >(argp1); - result = (double) ((arg1)->RoughThickness); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_Prism(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - double arg1 ; - double arg2 = (double) 0.01 ; - double val1 ; - int ecode1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "base_area",(char *) "thickness_of_rough_ground", NULL - }; - cmf::river::Prism *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:new_Prism",kwnames,&obj0,&obj1)) SWIG_fail; - ecode1 = SWIG_AsVal_double(obj0, &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Prism" "', argument " "1"" of type '" "double""'"); - } - arg1 = static_cast< double >(val1); - if (obj1) { - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Prism" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - } - { - try { - result = (cmf::river::Prism *)new cmf::river::Prism(arg1,arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__river__Prism, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Prism_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::river::Prism *arg1 = (cmf::river::Prism *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::river::Prism *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__Prism, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Prism_copy" "', argument " "1"" of type '" "cmf::river::Prism const *""'"); - } - arg1 = reinterpret_cast< cmf::river::Prism * >(argp1); - { - try { - result = (cmf::river::Prism *)((cmf::river::Prism const *)arg1)->copy(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__river__Prism, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_Prism(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::river::Prism *arg1 = (cmf::river::Prism *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__Prism, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Prism" "', argument " "1"" of type '" "cmf::river::Prism *""'"); - } - arg1 = reinterpret_cast< cmf::river::Prism * >(argp1); - { - try { - delete arg1; - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *Prism_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__river__Prism, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *Prism_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_new_volume_height_function__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::river::volume_height_function *arg1 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - cmf::river::volume_height_function *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_cmf__river__volume_height_function, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_volume_height_function" "', argument " "1"" of type '" "cmf::river::volume_height_function const &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_volume_height_function" "', argument " "1"" of type '" "cmf::river::volume_height_function const &""'"); - } - arg1 = reinterpret_cast< cmf::river::volume_height_function * >(argp1); - { - try { - result = (cmf::river::volume_height_function *)new cmf::river::volume_height_function((cmf::river::volume_height_function const &)*arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__river__volume_height_function, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_volume_height_function__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::river::IVolumeHeightFunction *arg1 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - cmf::river::volume_height_function *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_cmf__river__IVolumeHeightFunction, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_volume_height_function" "', argument " "1"" of type '" "cmf::river::IVolumeHeightFunction const &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_volume_height_function" "', argument " "1"" of type '" "cmf::river::IVolumeHeightFunction const &""'"); - } - arg1 = reinterpret_cast< cmf::river::IVolumeHeightFunction * >(argp1); - { - try { - result = (cmf::river::volume_height_function *)new cmf::river::volume_height_function((cmf::river::IVolumeHeightFunction const &)*arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__river__volume_height_function, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_volume_height_function(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[2] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args,"new_volume_height_function",0,1,argv))) SWIG_fail; - --argc; - { - unsigned long _index = 0; - SWIG_TypeRank _rank = 0; - if (argc == 1) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_cmf__river__volume_height_function, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 1; - if (_rank == _rankm) goto dispatch; - } - } - check_1: - - if (argc == 1) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_cmf__river__IVolumeHeightFunction, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 2; - if (_rank == _rankm) goto dispatch; - } - } - check_2: - - dispatch: - switch(_index) { - case 1: - return _wrap_new_volume_height_function__SWIG_0(self, argc, argv); - case 2: - return _wrap_new_volume_height_function__SWIG_1(self, argc, argv); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_volume_height_function'.\n" - " Possible C/C++ prototypes are:\n" - " cmf::river::volume_height_function::volume_height_function(cmf::river::volume_height_function const &)\n" - " cmf::river::volume_height_function::volume_height_function(cmf::river::IVolumeHeightFunction const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_volume_height_function_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::river::volume_height_function *arg1 = (cmf::river::volume_height_function *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::river::volume_height_function *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__volume_height_function, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "volume_height_function_copy" "', argument " "1"" of type '" "cmf::river::volume_height_function const *""'"); - } - arg1 = reinterpret_cast< cmf::river::volume_height_function * >(argp1); - { - try { - result = (cmf::river::volume_height_function *)((cmf::river::volume_height_function const *)arg1)->copy(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__river__volume_height_function, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_volume_height_function(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::river::volume_height_function *arg1 = (cmf::river::volume_height_function *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__volume_height_function, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_volume_height_function" "', argument " "1"" of type '" "cmf::river::volume_height_function *""'"); - } - arg1 = reinterpret_cast< cmf::river::volume_height_function * >(argp1); - { - try { - delete arg1; - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *volume_height_function_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__river__volume_height_function, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *volume_height_function_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_IChannel_get_nManning(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::river::IChannel *arg1 = (cmf::river::IChannel *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - double result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__IChannel, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IChannel_get_nManning" "', argument " "1"" of type '" "cmf::river::IChannel const *""'"); - } - arg1 = reinterpret_cast< cmf::river::IChannel * >(argp1); - { - try { - result = (double)((cmf::river::IChannel const *)arg1)->get_nManning(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_IChannel_set_nManning(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::river::IChannel *arg1 = (cmf::river::IChannel *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "val", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:IChannel_set_nManning",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__river__IChannel, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IChannel_set_nManning" "', argument " "1"" of type '" "cmf::river::IChannel *""'"); - } - arg1 = reinterpret_cast< cmf::river::IChannel * >(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IChannel_set_nManning" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - { - try { - (arg1)->set_nManning(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_IChannel_get_length(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::river::IChannel *arg1 = (cmf::river::IChannel *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - double result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__IChannel, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IChannel_get_length" "', argument " "1"" of type '" "cmf::river::IChannel const *""'"); - } - arg1 = reinterpret_cast< cmf::river::IChannel * >(argp1); - { - try { - result = (double)((cmf::river::IChannel const *)arg1)->get_length(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_IChannel_typecode(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::river::IChannel *arg1 = (cmf::river::IChannel *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - char result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__IChannel, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IChannel_typecode" "', argument " "1"" of type '" "cmf::river::IChannel const *""'"); - } - arg1 = reinterpret_cast< cmf::river::IChannel * >(argp1); - { - try { - result = (char)((cmf::river::IChannel const *)arg1)->typecode(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_char(static_cast< char >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_IChannel_get_channel_width(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::river::IChannel *arg1 = (cmf::river::IChannel *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "depth", NULL - }; - double result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:IChannel_get_channel_width",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__river__IChannel, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IChannel_get_channel_width" "', argument " "1"" of type '" "cmf::river::IChannel const *""'"); - } - arg1 = reinterpret_cast< cmf::river::IChannel * >(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IChannel_get_channel_width" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - { - try { - result = (double)((cmf::river::IChannel const *)arg1)->get_channel_width(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_IChannel_get_wetted_perimeter(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::river::IChannel *arg1 = (cmf::river::IChannel *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "depth", NULL - }; - double result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:IChannel_get_wetted_perimeter",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__river__IChannel, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IChannel_get_wetted_perimeter" "', argument " "1"" of type '" "cmf::river::IChannel const *""'"); - } - arg1 = reinterpret_cast< cmf::river::IChannel * >(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IChannel_get_wetted_perimeter" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - { - try { - result = (double)((cmf::river::IChannel const *)arg1)->get_wetted_perimeter(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_IChannel_get_depth(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::river::IChannel *arg1 = (cmf::river::IChannel *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "area", NULL - }; - double result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:IChannel_get_depth",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__river__IChannel, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IChannel_get_depth" "', argument " "1"" of type '" "cmf::river::IChannel const *""'"); - } - arg1 = reinterpret_cast< cmf::river::IChannel * >(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IChannel_get_depth" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - { - try { - result = (double)((cmf::river::IChannel const *)arg1)->get_depth(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_IChannel_get_flux_crossection(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::river::IChannel *arg1 = (cmf::river::IChannel *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "depth", NULL - }; - double result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:IChannel_get_flux_crossection",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__river__IChannel, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IChannel_get_flux_crossection" "', argument " "1"" of type '" "cmf::river::IChannel const *""'"); - } - arg1 = reinterpret_cast< cmf::river::IChannel * >(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IChannel_get_flux_crossection" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - { - try { - result = (double)((cmf::river::IChannel const *)arg1)->get_flux_crossection(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_IChannel_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::river::IChannel *arg1 = (cmf::river::IChannel *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::river::IChannel *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__IChannel, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IChannel_copy" "', argument " "1"" of type '" "cmf::river::IChannel const *""'"); - } - arg1 = reinterpret_cast< cmf::river::IChannel * >(argp1); - { - try { - result = (cmf::river::IChannel *)((cmf::river::IChannel const *)arg1)->copy(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__river__IChannel, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_IChannel_qManning(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::river::IChannel *arg1 = (cmf::river::IChannel *) 0 ; - double arg2 ; - double arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - double val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "A",(char *) "slope", NULL - }; - double result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:IChannel_qManning",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__river__IChannel, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IChannel_qManning" "', argument " "1"" of type '" "cmf::river::IChannel const *""'"); - } - arg1 = reinterpret_cast< cmf::river::IChannel * >(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IChannel_qManning" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - ecode3 = SWIG_AsVal_double(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IChannel_qManning" "', argument " "3"" of type '" "double""'"); - } - arg3 = static_cast< double >(val3); - { - try { - result = (double)((cmf::river::IChannel const *)arg1)->qManning(arg2,arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_IChannel(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::river::IChannel *arg1 = (cmf::river::IChannel *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__IChannel, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IChannel" "', argument " "1"" of type '" "cmf::river::IChannel *""'"); - } - arg1 = reinterpret_cast< cmf::river::IChannel * >(argp1); - { - try { - delete arg1; - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *IChannel_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__river__IChannel, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *_wrap_SWATReachType_BottomWidth_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::river::SWATReachType *arg1 = (cmf::river::SWATReachType *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"SWATReachType_BottomWidth_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__SWATReachType, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SWATReachType_BottomWidth_set" "', argument " "1"" of type '" "cmf::river::SWATReachType *""'"); - } - arg1 = reinterpret_cast< cmf::river::SWATReachType * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SWATReachType_BottomWidth_set" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - if (arg1) (arg1)->BottomWidth = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SWATReachType_BottomWidth_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::river::SWATReachType *arg1 = (cmf::river::SWATReachType *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - double result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__SWATReachType, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SWATReachType_BottomWidth_get" "', argument " "1"" of type '" "cmf::river::SWATReachType *""'"); - } - arg1 = reinterpret_cast< cmf::river::SWATReachType * >(argp1); - result = (double) ((arg1)->BottomWidth); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SWATReachType_ChannelDepth_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::river::SWATReachType *arg1 = (cmf::river::SWATReachType *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"SWATReachType_ChannelDepth_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__SWATReachType, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SWATReachType_ChannelDepth_set" "', argument " "1"" of type '" "cmf::river::SWATReachType *""'"); - } - arg1 = reinterpret_cast< cmf::river::SWATReachType * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SWATReachType_ChannelDepth_set" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - if (arg1) (arg1)->ChannelDepth = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SWATReachType_ChannelDepth_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::river::SWATReachType *arg1 = (cmf::river::SWATReachType *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - double result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__SWATReachType, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SWATReachType_ChannelDepth_get" "', argument " "1"" of type '" "cmf::river::SWATReachType *""'"); - } - arg1 = reinterpret_cast< cmf::river::SWATReachType * >(argp1); - result = (double) ((arg1)->ChannelDepth); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SWATReachType_BankSlope_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::river::SWATReachType *arg1 = (cmf::river::SWATReachType *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"SWATReachType_BankSlope_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__SWATReachType, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SWATReachType_BankSlope_set" "', argument " "1"" of type '" "cmf::river::SWATReachType *""'"); - } - arg1 = reinterpret_cast< cmf::river::SWATReachType * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SWATReachType_BankSlope_set" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - if (arg1) (arg1)->BankSlope = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SWATReachType_BankSlope_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::river::SWATReachType *arg1 = (cmf::river::SWATReachType *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - double result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__SWATReachType, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SWATReachType_BankSlope_get" "', argument " "1"" of type '" "cmf::river::SWATReachType *""'"); - } - arg1 = reinterpret_cast< cmf::river::SWATReachType * >(argp1); - result = (double) ((arg1)->BankSlope); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SWATReachType_FloodPlainSlope_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::river::SWATReachType *arg1 = (cmf::river::SWATReachType *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"SWATReachType_FloodPlainSlope_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__SWATReachType, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SWATReachType_FloodPlainSlope_set" "', argument " "1"" of type '" "cmf::river::SWATReachType *""'"); - } - arg1 = reinterpret_cast< cmf::river::SWATReachType * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SWATReachType_FloodPlainSlope_set" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - if (arg1) (arg1)->FloodPlainSlope = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SWATReachType_FloodPlainSlope_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::river::SWATReachType *arg1 = (cmf::river::SWATReachType *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - double result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__SWATReachType, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SWATReachType_FloodPlainSlope_get" "', argument " "1"" of type '" "cmf::river::SWATReachType *""'"); - } - arg1 = reinterpret_cast< cmf::river::SWATReachType * >(argp1); - result = (double) ((arg1)->FloodPlainSlope); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_SWATReachType__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::river::SWATReachType *arg1 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - cmf::river::SWATReachType *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_cmf__river__SWATReachType, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SWATReachType" "', argument " "1"" of type '" "cmf::river::SWATReachType const &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SWATReachType" "', argument " "1"" of type '" "cmf::river::SWATReachType const &""'"); - } - arg1 = reinterpret_cast< cmf::river::SWATReachType * >(argp1); - { - try { - result = (cmf::river::SWATReachType *)new cmf::river::SWATReachType((cmf::river::SWATReachType const &)*arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__river__SWATReachType, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_SWATReachType__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - double arg1 ; - double val1 ; - int ecode1 = 0 ; - cmf::river::SWATReachType *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - ecode1 = SWIG_AsVal_double(swig_obj[0], &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_SWATReachType" "', argument " "1"" of type '" "double""'"); - } - arg1 = static_cast< double >(val1); - { - try { - result = (cmf::river::SWATReachType *)new cmf::river::SWATReachType(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__river__SWATReachType, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_SWATReachType__SWIG_2(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - double arg1 ; - double arg2 ; - double arg3 ; - double val1 ; - int ecode1 = 0 ; - double val2 ; - int ecode2 = 0 ; - double val3 ; - int ecode3 = 0 ; - cmf::river::SWATReachType *result = 0 ; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - ecode1 = SWIG_AsVal_double(swig_obj[0], &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_SWATReachType" "', argument " "1"" of type '" "double""'"); - } - arg1 = static_cast< double >(val1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_SWATReachType" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_SWATReachType" "', argument " "3"" of type '" "double""'"); - } - arg3 = static_cast< double >(val3); - { - try { - result = (cmf::river::SWATReachType *)new cmf::river::SWATReachType(arg1,arg2,arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__river__SWATReachType, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_SWATReachType(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[4] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args,"new_SWATReachType",0,3,argv))) SWIG_fail; - --argc; - { - unsigned long _index = 0; - SWIG_TypeRank _rank = 0; - if (argc == 1) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_cmf__river__SWATReachType, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 1; - if (_rank == _rankm) goto dispatch; - } - } - check_1: - - if (argc == 1) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - { - int res = SWIG_AsVal_double(argv[0], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 2; - if (_rank == _rankm) goto dispatch; - } - } - check_2: - - if (argc == 3) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - { - int res = SWIG_AsVal_double(argv[0], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_3; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_3; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - int res = SWIG_AsVal_double(argv[2], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_3; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 3; - if (_rank == _rankm) goto dispatch; - } - } - check_3: - - dispatch: - switch(_index) { - case 1: - return _wrap_new_SWATReachType__SWIG_0(self, argc, argv); - case 2: - return _wrap_new_SWATReachType__SWIG_1(self, argc, argv); - case 3: - return _wrap_new_SWATReachType__SWIG_2(self, argc, argv); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_SWATReachType'.\n" - " Possible C/C++ prototypes are:\n" - " cmf::river::SWATReachType::SWATReachType(cmf::river::SWATReachType const &)\n" - " cmf::river::SWATReachType::SWATReachType(double)\n" - " cmf::river::SWATReachType::SWATReachType(double,double,double)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_SWATReachType_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::river::SWATReachType *arg1 = (cmf::river::SWATReachType *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::river::SWATReachType *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__SWATReachType, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SWATReachType_copy" "', argument " "1"" of type '" "cmf::river::SWATReachType const *""'"); - } - arg1 = reinterpret_cast< cmf::river::SWATReachType * >(argp1); - { - try { - result = (cmf::river::SWATReachType *)((cmf::river::SWATReachType const *)arg1)->copy(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__river__SWATReachType, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_SWATReachType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::river::SWATReachType *arg1 = (cmf::river::SWATReachType *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__SWATReachType, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SWATReachType" "', argument " "1"" of type '" "cmf::river::SWATReachType *""'"); - } - arg1 = reinterpret_cast< cmf::river::SWATReachType * >(argp1); - { - try { - delete arg1; - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *SWATReachType_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__river__SWATReachType, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *SWATReachType_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_TriangularReach_BankSlope_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::river::TriangularReach *arg1 = (cmf::river::TriangularReach *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"TriangularReach_BankSlope_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__TriangularReach, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TriangularReach_BankSlope_set" "', argument " "1"" of type '" "cmf::river::TriangularReach *""'"); - } - arg1 = reinterpret_cast< cmf::river::TriangularReach * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "TriangularReach_BankSlope_set" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - if (arg1) (arg1)->BankSlope = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_TriangularReach_BankSlope_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::river::TriangularReach *arg1 = (cmf::river::TriangularReach *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - double result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__TriangularReach, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TriangularReach_BankSlope_get" "', argument " "1"" of type '" "cmf::river::TriangularReach *""'"); - } - arg1 = reinterpret_cast< cmf::river::TriangularReach * >(argp1); - result = (double) ((arg1)->BankSlope); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_TriangularReach__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - double arg1 ; - double arg2 = (double) 2 ; - double val1 ; - int ecode1 = 0 ; - double val2 ; - int ecode2 = 0 ; - cmf::river::TriangularReach *result = 0 ; - - if ((nobjs < 1) || (nobjs > 2)) SWIG_fail; - ecode1 = SWIG_AsVal_double(swig_obj[0], &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_TriangularReach" "', argument " "1"" of type '" "double""'"); - } - arg1 = static_cast< double >(val1); - if (swig_obj[1]) { - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_TriangularReach" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - } - { - try { - result = (cmf::river::TriangularReach *)new cmf::river::TriangularReach(arg1,arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__river__TriangularReach, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_TriangularReach__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::river::TriangularReach *arg1 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - cmf::river::TriangularReach *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_cmf__river__TriangularReach, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_TriangularReach" "', argument " "1"" of type '" "cmf::river::TriangularReach const &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_TriangularReach" "', argument " "1"" of type '" "cmf::river::TriangularReach const &""'"); - } - arg1 = reinterpret_cast< cmf::river::TriangularReach * >(argp1); - { - try { - result = (cmf::river::TriangularReach *)new cmf::river::TriangularReach((cmf::river::TriangularReach const &)*arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__river__TriangularReach, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_TriangularReach(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args,"new_TriangularReach",0,2,argv))) SWIG_fail; - --argc; - { - unsigned long _index = 0; - SWIG_TypeRank _rank = 0; - if (argc == 1) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_cmf__river__TriangularReach, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 1; - if (_rank == _rankm) goto dispatch; - } - } - check_1: - - if ((argc >= 1) && (argc <= 2)) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - { - int res = SWIG_AsVal_double(argv[0], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (argc > 1) { - { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - } - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 2; - if (_rank == _rankm) goto dispatch; - } - } - check_2: - - dispatch: - switch(_index) { - case 1: - return _wrap_new_TriangularReach__SWIG_1(self, argc, argv); - case 2: - return _wrap_new_TriangularReach__SWIG_0(self, argc, argv); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_TriangularReach'.\n" - " Possible C/C++ prototypes are:\n" - " cmf::river::TriangularReach::TriangularReach(double,double)\n" - " cmf::river::TriangularReach::TriangularReach(cmf::river::TriangularReach const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_TriangularReach_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::river::TriangularReach *arg1 = (cmf::river::TriangularReach *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::river::TriangularReach *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__TriangularReach, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TriangularReach_copy" "', argument " "1"" of type '" "cmf::river::TriangularReach const *""'"); - } - arg1 = reinterpret_cast< cmf::river::TriangularReach * >(argp1); - { - try { - result = (cmf::river::TriangularReach *)((cmf::river::TriangularReach const *)arg1)->copy(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__river__TriangularReach, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_TriangularReach(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::river::TriangularReach *arg1 = (cmf::river::TriangularReach *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__TriangularReach, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_TriangularReach" "', argument " "1"" of type '" "cmf::river::TriangularReach *""'"); - } - arg1 = reinterpret_cast< cmf::river::TriangularReach * >(argp1); - { - try { - delete arg1; - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *TriangularReach_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__river__TriangularReach, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *TriangularReach_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_new_RectangularReach__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - double arg1 ; - double arg2 ; - double val1 ; - int ecode1 = 0 ; - double val2 ; - int ecode2 = 0 ; - cmf::river::RectangularReach *result = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - ecode1 = SWIG_AsVal_double(swig_obj[0], &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_RectangularReach" "', argument " "1"" of type '" "double""'"); - } - arg1 = static_cast< double >(val1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_RectangularReach" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - { - try { - result = (cmf::river::RectangularReach *)new cmf::river::RectangularReach(arg1,arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__river__RectangularReach, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_RectangularReach__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::river::RectangularReach *arg1 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - cmf::river::RectangularReach *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_cmf__river__RectangularReach, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_RectangularReach" "', argument " "1"" of type '" "cmf::river::RectangularReach const &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_RectangularReach" "', argument " "1"" of type '" "cmf::river::RectangularReach const &""'"); - } - arg1 = reinterpret_cast< cmf::river::RectangularReach * >(argp1); - { - try { - result = (cmf::river::RectangularReach *)new cmf::river::RectangularReach((cmf::river::RectangularReach const &)*arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__river__RectangularReach, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_RectangularReach(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args,"new_RectangularReach",0,2,argv))) SWIG_fail; - --argc; - { - unsigned long _index = 0; - SWIG_TypeRank _rank = 0; - if (argc == 1) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_cmf__river__RectangularReach, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 1; - if (_rank == _rankm) goto dispatch; - } - } - check_1: - - if (argc == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - { - int res = SWIG_AsVal_double(argv[0], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 2; - if (_rank == _rankm) goto dispatch; - } - } - check_2: - - dispatch: - switch(_index) { - case 1: - return _wrap_new_RectangularReach__SWIG_1(self, argc, argv); - case 2: - return _wrap_new_RectangularReach__SWIG_0(self, argc, argv); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_RectangularReach'.\n" - " Possible C/C++ prototypes are:\n" - " cmf::river::RectangularReach::RectangularReach(double,double)\n" - " cmf::river::RectangularReach::RectangularReach(cmf::river::RectangularReach const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_RectangularReach_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::river::RectangularReach *arg1 = (cmf::river::RectangularReach *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::river::RectangularReach *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__RectangularReach, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RectangularReach_copy" "', argument " "1"" of type '" "cmf::river::RectangularReach const *""'"); - } - arg1 = reinterpret_cast< cmf::river::RectangularReach * >(argp1); - { - try { - result = (cmf::river::RectangularReach *)((cmf::river::RectangularReach const *)arg1)->copy(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__river__RectangularReach, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_RectangularReach(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::river::RectangularReach *arg1 = (cmf::river::RectangularReach *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__RectangularReach, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_RectangularReach" "', argument " "1"" of type '" "cmf::river::RectangularReach *""'"); - } - arg1 = reinterpret_cast< cmf::river::RectangularReach * >(argp1); - { - try { - delete arg1; - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *RectangularReach_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__river__RectangularReach, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *RectangularReach_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_PipeReach_radius_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::river::PipeReach *arg1 = (cmf::river::PipeReach *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"PipeReach_radius_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__PipeReach, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PipeReach_radius_set" "', argument " "1"" of type '" "cmf::river::PipeReach *""'"); - } - arg1 = reinterpret_cast< cmf::river::PipeReach * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "PipeReach_radius_set" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - if (arg1) (arg1)->radius = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_PipeReach_radius_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::river::PipeReach *arg1 = (cmf::river::PipeReach *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - double result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__PipeReach, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PipeReach_radius_get" "', argument " "1"" of type '" "cmf::river::PipeReach *""'"); - } - arg1 = reinterpret_cast< cmf::river::PipeReach * >(argp1); - result = (double) ((arg1)->radius); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_PipeReach__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - double arg1 ; - double arg2 ; - double val1 ; - int ecode1 = 0 ; - double val2 ; - int ecode2 = 0 ; - cmf::river::PipeReach *result = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - ecode1 = SWIG_AsVal_double(swig_obj[0], &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_PipeReach" "', argument " "1"" of type '" "double""'"); - } - arg1 = static_cast< double >(val1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_PipeReach" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - { - try { - result = (cmf::river::PipeReach *)new cmf::river::PipeReach(arg1,arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__river__PipeReach, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_PipeReach__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::river::PipeReach *arg1 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - cmf::river::PipeReach *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_cmf__river__PipeReach, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_PipeReach" "', argument " "1"" of type '" "cmf::river::PipeReach const &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PipeReach" "', argument " "1"" of type '" "cmf::river::PipeReach const &""'"); - } - arg1 = reinterpret_cast< cmf::river::PipeReach * >(argp1); - { - try { - result = (cmf::river::PipeReach *)new cmf::river::PipeReach((cmf::river::PipeReach const &)*arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__river__PipeReach, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_PipeReach(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args,"new_PipeReach",0,2,argv))) SWIG_fail; - --argc; - { - unsigned long _index = 0; - SWIG_TypeRank _rank = 0; - if (argc == 1) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_cmf__river__PipeReach, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 1; - if (_rank == _rankm) goto dispatch; - } - } - check_1: - - if (argc == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - { - int res = SWIG_AsVal_double(argv[0], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 2; - if (_rank == _rankm) goto dispatch; - } - } - check_2: - - dispatch: - switch(_index) { - case 1: - return _wrap_new_PipeReach__SWIG_1(self, argc, argv); - case 2: - return _wrap_new_PipeReach__SWIG_0(self, argc, argv); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_PipeReach'.\n" - " Possible C/C++ prototypes are:\n" - " cmf::river::PipeReach::PipeReach(double,double)\n" - " cmf::river::PipeReach::PipeReach(cmf::river::PipeReach const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_PipeReach_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::river::PipeReach *arg1 = (cmf::river::PipeReach *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::river::PipeReach *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__PipeReach, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PipeReach_copy" "', argument " "1"" of type '" "cmf::river::PipeReach const *""'"); - } - arg1 = reinterpret_cast< cmf::river::PipeReach * >(argp1); - { - try { - result = (cmf::river::PipeReach *)((cmf::river::PipeReach const *)arg1)->copy(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__river__PipeReach, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_PipeReach(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::river::PipeReach *arg1 = (cmf::river::PipeReach *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__PipeReach, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_PipeReach" "', argument " "1"" of type '" "cmf::river::PipeReach *""'"); - } - arg1 = reinterpret_cast< cmf::river::PipeReach * >(argp1); - { - try { - delete arg1; - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *PipeReach_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__river__PipeReach, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *PipeReach_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_new_Channel__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) { - PyObject *resultobj = 0; - cmf::river::Channel *result = 0 ; - - if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; - { - try { - result = (cmf::river::Channel *)new cmf::river::Channel(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__river__Channel, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_Channel__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - double arg1 ; - double val1 ; - int ecode1 = 0 ; - cmf::river::Channel *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - ecode1 = SWIG_AsVal_double(swig_obj[0], &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Channel" "', argument " "1"" of type '" "double""'"); - } - arg1 = static_cast< double >(val1); - { - try { - result = (cmf::river::Channel *)new cmf::river::Channel(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__river__Channel, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_Channel__SWIG_2(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::river::IChannel *arg1 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - cmf::river::Channel *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_cmf__river__IChannel, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Channel" "', argument " "1"" of type '" "cmf::river::IChannel const &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Channel" "', argument " "1"" of type '" "cmf::river::IChannel const &""'"); - } - arg1 = reinterpret_cast< cmf::river::IChannel * >(argp1); - { - try { - result = (cmf::river::Channel *)new cmf::river::Channel((cmf::river::IChannel const &)*arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__river__Channel, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_Channel__SWIG_3(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::river::IVolumeHeightFunction *arg1 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - cmf::river::Channel *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_cmf__river__IVolumeHeightFunction, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Channel" "', argument " "1"" of type '" "cmf::river::IVolumeHeightFunction const &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Channel" "', argument " "1"" of type '" "cmf::river::IVolumeHeightFunction const &""'"); - } - arg1 = reinterpret_cast< cmf::river::IVolumeHeightFunction * >(argp1); - { - try { - result = (cmf::river::Channel *)new cmf::river::Channel((cmf::river::IVolumeHeightFunction const &)*arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__river__Channel, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_Channel__SWIG_4(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::river::Channel *arg1 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - cmf::river::Channel *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_cmf__river__Channel, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Channel" "', argument " "1"" of type '" "cmf::river::Channel const &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Channel" "', argument " "1"" of type '" "cmf::river::Channel const &""'"); - } - arg1 = reinterpret_cast< cmf::river::Channel * >(argp1); - { - try { - result = (cmf::river::Channel *)new cmf::river::Channel((cmf::river::Channel const &)*arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__river__Channel, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_Channel__SWIG_5(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - char arg1 ; - double arg2 ; - double arg3 = (double) 1. ; - double arg4 = (double) 0.25 ; - char val1 ; - int ecode1 = 0 ; - double val2 ; - int ecode2 = 0 ; - double val3 ; - int ecode3 = 0 ; - double val4 ; - int ecode4 = 0 ; - cmf::river::Channel *result = 0 ; - - if ((nobjs < 2) || (nobjs > 4)) SWIG_fail; - ecode1 = SWIG_AsVal_char(swig_obj[0], &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Channel" "', argument " "1"" of type '" "char""'"); - } - arg1 = static_cast< char >(val1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Channel" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - if (swig_obj[2]) { - ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Channel" "', argument " "3"" of type '" "double""'"); - } - arg3 = static_cast< double >(val3); - } - if (swig_obj[3]) { - ecode4 = SWIG_AsVal_double(swig_obj[3], &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_Channel" "', argument " "4"" of type '" "double""'"); - } - arg4 = static_cast< double >(val4); - } - { - try { - result = (cmf::river::Channel *)new cmf::river::Channel(arg1,arg2,arg3,arg4); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__river__Channel, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_Channel(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[5] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args,"new_Channel",0,4,argv))) SWIG_fail; - --argc; - { - unsigned long _index = 0; - SWIG_TypeRank _rank = 0; - if (argc == 0) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 1; - if (_rank == _rankm) goto dispatch; - } - } - if (argc == 1) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_cmf__river__Channel, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 2; - if (_rank == _rankm) goto dispatch; - } - } - check_2: - - if (argc == 1) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_cmf__river__IChannel, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_3; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 3; - if (_rank == _rankm) goto dispatch; - } - } - check_3: - - if (argc == 1) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_cmf__river__IVolumeHeightFunction, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_4; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 4; - if (_rank == _rankm) goto dispatch; - } - } - check_4: - - if (argc == 1) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - { - int res = SWIG_AsVal_double(argv[0], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_5; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 5; - if (_rank == _rankm) goto dispatch; - } - } - check_5: - - if ((argc >= 2) && (argc <= 4)) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - { - int res = SWIG_AsVal_char(argv[0], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_6; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_6; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (argc > 2) { - { - { - int res = SWIG_AsVal_double(argv[2], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_6; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (argc > 3) { - { - { - int res = SWIG_AsVal_double(argv[3], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_6; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - } - } - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 6; - if (_rank == _rankm) goto dispatch; - } - } - check_6: - - dispatch: - switch(_index) { - case 1: - return _wrap_new_Channel__SWIG_0(self, argc, argv); - case 2: - return _wrap_new_Channel__SWIG_4(self, argc, argv); - case 3: - return _wrap_new_Channel__SWIG_2(self, argc, argv); - case 4: - return _wrap_new_Channel__SWIG_3(self, argc, argv); - case 5: - return _wrap_new_Channel__SWIG_1(self, argc, argv); - case 6: - return _wrap_new_Channel__SWIG_5(self, argc, argv); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_Channel'.\n" - " Possible C/C++ prototypes are:\n" - " cmf::river::Channel::Channel()\n" - " cmf::river::Channel::Channel(double)\n" - " cmf::river::Channel::Channel(cmf::river::IChannel const &)\n" - " cmf::river::Channel::Channel(cmf::river::IVolumeHeightFunction const &)\n" - " cmf::river::Channel::Channel(cmf::river::Channel const &)\n" - " cmf::river::Channel::Channel(char,double,double,double)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_Channel_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::river::Channel *arg1 = (cmf::river::Channel *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::river::Channel *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__Channel, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Channel_copy" "', argument " "1"" of type '" "cmf::river::Channel const *""'"); - } - arg1 = reinterpret_cast< cmf::river::Channel * >(argp1); - { - try { - result = (cmf::river::Channel *)((cmf::river::Channel const *)arg1)->copy(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__river__Channel, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_Channel(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::river::Channel *arg1 = (cmf::river::Channel *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__Channel, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Channel" "', argument " "1"" of type '" "cmf::river::Channel *""'"); - } - arg1 = reinterpret_cast< cmf::river::Channel * >(argp1); - { - try { - delete arg1; - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *Channel_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__river__Channel, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *Channel_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_new_MeanChannel__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::river::IChannel *arg1 = 0 ; - cmf::river::IChannel *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - cmf::river::MeanChannel *result = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_cmf__river__IChannel, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MeanChannel" "', argument " "1"" of type '" "cmf::river::IChannel const &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MeanChannel" "', argument " "1"" of type '" "cmf::river::IChannel const &""'"); - } - arg1 = reinterpret_cast< cmf::river::IChannel * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_cmf__river__IChannel, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MeanChannel" "', argument " "2"" of type '" "cmf::river::IChannel const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MeanChannel" "', argument " "2"" of type '" "cmf::river::IChannel const &""'"); - } - arg2 = reinterpret_cast< cmf::river::IChannel * >(argp2); - { - try { - result = (cmf::river::MeanChannel *)new cmf::river::MeanChannel((cmf::river::IChannel const &)*arg1,(cmf::river::IChannel const &)*arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__river__MeanChannel, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_MeanChannel__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::river::MeanChannel *arg1 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - cmf::river::MeanChannel *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_cmf__river__MeanChannel, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MeanChannel" "', argument " "1"" of type '" "cmf::river::MeanChannel const &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MeanChannel" "', argument " "1"" of type '" "cmf::river::MeanChannel const &""'"); - } - arg1 = reinterpret_cast< cmf::river::MeanChannel * >(argp1); - { - try { - result = (cmf::river::MeanChannel *)new cmf::river::MeanChannel((cmf::river::MeanChannel const &)*arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__river__MeanChannel, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_MeanChannel(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args,"new_MeanChannel",0,2,argv))) SWIG_fail; - --argc; - { - unsigned long _index = 0; - SWIG_TypeRank _rank = 0; - if (argc == 1) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_cmf__river__MeanChannel, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 1; - if (_rank == _rankm) goto dispatch; - } - } - check_1: - - if (argc == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_cmf__river__IChannel, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_cmf__river__IChannel, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 2; - if (_rank == _rankm) goto dispatch; - } - } - check_2: - - dispatch: - switch(_index) { - case 1: - return _wrap_new_MeanChannel__SWIG_1(self, argc, argv); - case 2: - return _wrap_new_MeanChannel__SWIG_0(self, argc, argv); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_MeanChannel'.\n" - " Possible C/C++ prototypes are:\n" - " cmf::river::MeanChannel::MeanChannel(cmf::river::IChannel const &,cmf::river::IChannel const &)\n" - " cmf::river::MeanChannel::MeanChannel(cmf::river::MeanChannel const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_MeanChannel_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::river::MeanChannel *arg1 = (cmf::river::MeanChannel *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::river::MeanChannel *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__MeanChannel, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeanChannel_copy" "', argument " "1"" of type '" "cmf::river::MeanChannel const *""'"); - } - arg1 = reinterpret_cast< cmf::river::MeanChannel * >(argp1); - { - try { - result = (cmf::river::MeanChannel *)((cmf::river::MeanChannel const *)arg1)->copy(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__river__MeanChannel, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_MeanChannel(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::river::MeanChannel *arg1 = (cmf::river::MeanChannel *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__MeanChannel, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MeanChannel" "', argument " "1"" of type '" "cmf::river::MeanChannel *""'"); - } - arg1 = reinterpret_cast< cmf::river::MeanChannel * >(argp1); - { - try { - delete arg1; - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *MeanChannel_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__river__MeanChannel, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *MeanChannel_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_OpenWaterStorage_get_height_function(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::river::OpenWaterStorage *arg1 = (cmf::river::OpenWaterStorage *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::river::OpenWaterStorage const > tempshared1 ; - std::shared_ptr< cmf::river::OpenWaterStorage const > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - cmf::river::IVolumeHeightFunction *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__river__OpenWaterStorage_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OpenWaterStorage_get_height_function" "', argument " "1"" of type '" "cmf::river::OpenWaterStorage const *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::river::OpenWaterStorage > * >(argp1); - delete reinterpret_cast< std::shared_ptr< const cmf::river::OpenWaterStorage > * >(argp1); - arg1 = const_cast< cmf::river::OpenWaterStorage * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::river::OpenWaterStorage > * >(argp1); - arg1 = const_cast< cmf::river::OpenWaterStorage * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - try { - result = (cmf::river::IVolumeHeightFunction *) &((cmf::river::OpenWaterStorage const *)arg1)->get_height_function(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__river__IVolumeHeightFunction, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_OpenWaterStorage_set_height_function(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::river::OpenWaterStorage *arg1 = (cmf::river::OpenWaterStorage *) 0 ; - cmf::river::IVolumeHeightFunction *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::river::OpenWaterStorage > tempshared1 ; - std::shared_ptr< cmf::river::OpenWaterStorage > *smartarg1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "val", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:OpenWaterStorage_set_height_function",kwnames,&obj0,&obj1)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__river__OpenWaterStorage_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OpenWaterStorage_set_height_function" "', argument " "1"" of type '" "cmf::river::OpenWaterStorage *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::river::OpenWaterStorage > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::river::OpenWaterStorage > * >(argp1); - arg1 = const_cast< cmf::river::OpenWaterStorage * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::river::OpenWaterStorage > * >(argp1); - arg1 = const_cast< cmf::river::OpenWaterStorage * >((smartarg1 ? smartarg1->get() : 0)); - } - } - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_cmf__river__IVolumeHeightFunction, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "OpenWaterStorage_set_height_function" "', argument " "2"" of type '" "cmf::river::IVolumeHeightFunction const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "OpenWaterStorage_set_height_function" "', argument " "2"" of type '" "cmf::river::IVolumeHeightFunction const &""'"); - } - arg2 = reinterpret_cast< cmf::river::IVolumeHeightFunction * >(argp2); - { - try { - (arg1)->set_height_function((cmf::river::IVolumeHeightFunction const &)*arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_OpenWaterStorage_wet_area(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::river::OpenWaterStorage *arg1 = (cmf::river::OpenWaterStorage *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::river::OpenWaterStorage const > tempshared1 ; - std::shared_ptr< cmf::river::OpenWaterStorage const > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__river__OpenWaterStorage_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OpenWaterStorage_wet_area" "', argument " "1"" of type '" "cmf::river::OpenWaterStorage const *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::river::OpenWaterStorage > * >(argp1); - delete reinterpret_cast< std::shared_ptr< const cmf::river::OpenWaterStorage > * >(argp1); - arg1 = const_cast< cmf::river::OpenWaterStorage * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::river::OpenWaterStorage > * >(argp1); - arg1 = const_cast< cmf::river::OpenWaterStorage * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - try { - result = (real)((cmf::river::OpenWaterStorage const *)arg1)->wet_area(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_OpenWaterStorage_create__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::project *arg1 = 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - cmf::river::OpenWaterStorage::ptr result; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_cmf__project, 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OpenWaterStorage_create" "', argument " "1"" of type '" "cmf::project &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "OpenWaterStorage_create" "', argument " "1"" of type '" "cmf::project &""'"); - } - arg1 = reinterpret_cast< cmf::project * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OpenWaterStorage_create" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - { - try { - result = cmf::river::OpenWaterStorage::create(*arg1,arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - std::shared_ptr< cmf::river::OpenWaterStorage > *smartresult = result ? new std::shared_ptr< cmf::river::OpenWaterStorage >(result) : 0; - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__river__OpenWaterStorage_t, SWIG_POINTER_OWN); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_OpenWaterStorage_create__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::project *arg1 = 0 ; - cmf::river::IVolumeHeightFunction *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - cmf::river::OpenWaterStorage::ptr result; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_cmf__project, 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OpenWaterStorage_create" "', argument " "1"" of type '" "cmf::project &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "OpenWaterStorage_create" "', argument " "1"" of type '" "cmf::project &""'"); - } - arg1 = reinterpret_cast< cmf::project * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_cmf__river__IVolumeHeightFunction, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "OpenWaterStorage_create" "', argument " "2"" of type '" "cmf::river::IVolumeHeightFunction const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "OpenWaterStorage_create" "', argument " "2"" of type '" "cmf::river::IVolumeHeightFunction const &""'"); - } - arg2 = reinterpret_cast< cmf::river::IVolumeHeightFunction * >(argp2); - { - try { - result = cmf::river::OpenWaterStorage::create(*arg1,(cmf::river::IVolumeHeightFunction const &)*arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - std::shared_ptr< cmf::river::OpenWaterStorage > *smartresult = result ? new std::shared_ptr< cmf::river::OpenWaterStorage >(result) : 0; - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__river__OpenWaterStorage_t, SWIG_POINTER_OWN); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_OpenWaterStorage_create(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args,"OpenWaterStorage_create",0,2,argv))) SWIG_fail; - --argc; - { - unsigned long _index = 0; - SWIG_TypeRank _rank = 0; - if (argc == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__project, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_cmf__river__IVolumeHeightFunction, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 1; - if (_rank == _rankm) goto dispatch; - } - } - check_1: - - if (argc == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__project, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 2; - if (_rank == _rankm) goto dispatch; - } - } - check_2: - - dispatch: - switch(_index) { - case 1: - return _wrap_OpenWaterStorage_create__SWIG_1(self, argc, argv); - case 2: - return _wrap_OpenWaterStorage_create__SWIG_0(self, argc, argv); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'OpenWaterStorage_create'.\n" - " Possible C/C++ prototypes are:\n" - " cmf::river::OpenWaterStorage::create(cmf::project &,real)\n" - " cmf::river::OpenWaterStorage::create(cmf::project &,cmf::river::IVolumeHeightFunction const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_OpenWaterStorage_cast(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::flux_node::ptr arg1 ; - void *argp1 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - char * kwnames[] = { - (char *) "node", NULL - }; - cmf::river::OpenWaterStorage::ptr result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:OpenWaterStorage_cast",kwnames,&obj0)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OpenWaterStorage_cast" "', argument " "1"" of type '" "cmf::water::flux_node::ptr""'"); - } - if (argp1) arg1 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp1)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp1); - } - { - try { - result = cmf::river::OpenWaterStorage::cast(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - std::shared_ptr< cmf::river::OpenWaterStorage > *smartresult = result ? new std::shared_ptr< cmf::river::OpenWaterStorage >(result) : 0; - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__river__OpenWaterStorage_t, SWIG_POINTER_OWN); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_OpenWaterStorage_depth_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::river::OpenWaterStorage *arg1 = (cmf::river::OpenWaterStorage *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::river::OpenWaterStorage > tempshared1 ; - std::shared_ptr< cmf::river::OpenWaterStorage > *smartarg1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"OpenWaterStorage_depth_set",2,2,swig_obj)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__river__OpenWaterStorage_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OpenWaterStorage_depth_set" "', argument " "1"" of type '" "cmf::river::OpenWaterStorage *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::river::OpenWaterStorage > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::river::OpenWaterStorage > * >(argp1); - arg1 = const_cast< cmf::river::OpenWaterStorage * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::river::OpenWaterStorage > * >(argp1); - arg1 = const_cast< cmf::river::OpenWaterStorage * >((smartarg1 ? smartarg1->get() : 0)); - } - } - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OpenWaterStorage_depth_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - { - try { - cmf_river_OpenWaterStorage_depth_set(arg1,arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_OpenWaterStorage_depth_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::river::OpenWaterStorage *arg1 = (cmf::river::OpenWaterStorage *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::river::OpenWaterStorage > tempshared1 ; - std::shared_ptr< cmf::river::OpenWaterStorage > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__river__OpenWaterStorage_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OpenWaterStorage_depth_get" "', argument " "1"" of type '" "cmf::river::OpenWaterStorage *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::river::OpenWaterStorage > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::river::OpenWaterStorage > * >(argp1); - arg1 = const_cast< cmf::river::OpenWaterStorage * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::river::OpenWaterStorage > * >(argp1); - arg1 = const_cast< cmf::river::OpenWaterStorage * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - try { - result = (real)cmf_river_OpenWaterStorage_depth_get(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_OpenWaterStorage(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::river::OpenWaterStorage *arg1 = (cmf::river::OpenWaterStorage *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::river::OpenWaterStorage > tempshared1 ; - std::shared_ptr< cmf::river::OpenWaterStorage > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__river__OpenWaterStorage_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_OpenWaterStorage" "', argument " "1"" of type '" "cmf::river::OpenWaterStorage *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::river::OpenWaterStorage > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::river::OpenWaterStorage > * >(argp1); - arg1 = const_cast< cmf::river::OpenWaterStorage * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::river::OpenWaterStorage > * >(argp1); - arg1 = const_cast< cmf::river::OpenWaterStorage * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - try { - (void)arg1; delete smartarg1; - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *OpenWaterStorage_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_cmf__river__OpenWaterStorage_t, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *_wrap_Reach_get_reachtype(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::river::Reach *arg1 = (cmf::river::Reach *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::river::Reach const > tempshared1 ; - std::shared_ptr< cmf::river::Reach const > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - cmf::river::Channel result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__river__Reach_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Reach_get_reachtype" "', argument " "1"" of type '" "cmf::river::Reach const *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::river::Reach > * >(argp1); - delete reinterpret_cast< std::shared_ptr< const cmf::river::Reach > * >(argp1); - arg1 = const_cast< cmf::river::Reach * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::river::Reach > * >(argp1); - arg1 = const_cast< cmf::river::Reach * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - try { - result = ((cmf::river::Reach const *)arg1)->get_reachtype(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj((new cmf::river::Channel(static_cast< const cmf::river::Channel& >(result))), SWIGTYPE_p_cmf__river__Channel, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Reach_set_height_function(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::river::Reach *arg1 = (cmf::river::Reach *) 0 ; - cmf::river::IChannel *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::river::Reach > tempshared1 ; - std::shared_ptr< cmf::river::Reach > *smartarg1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "val", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Reach_set_height_function",kwnames,&obj0,&obj1)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__river__Reach_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Reach_set_height_function" "', argument " "1"" of type '" "cmf::river::Reach *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::river::Reach > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::river::Reach > * >(argp1); - arg1 = const_cast< cmf::river::Reach * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::river::Reach > * >(argp1); - arg1 = const_cast< cmf::river::Reach * >((smartarg1 ? smartarg1->get() : 0)); - } - } - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_cmf__river__IChannel, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Reach_set_height_function" "', argument " "2"" of type '" "cmf::river::IChannel const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Reach_set_height_function" "', argument " "2"" of type '" "cmf::river::IChannel const &""'"); - } - arg2 = reinterpret_cast< cmf::river::IChannel * >(argp2); - { - try { - (arg1)->set_height_function((cmf::river::IChannel const &)*arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Reach_set_outlet(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::river::Reach *arg1 = (cmf::river::Reach *) 0 ; - cmf::water::flux_node::ptr arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::river::Reach > tempshared1 ; - std::shared_ptr< cmf::river::Reach > *smartarg1 = 0 ; - void *argp2 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "outlet", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Reach_set_outlet",kwnames,&obj0,&obj1)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__river__Reach_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Reach_set_outlet" "', argument " "1"" of type '" "cmf::river::Reach *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::river::Reach > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::river::Reach > * >(argp1); - arg1 = const_cast< cmf::river::Reach * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::river::Reach > * >(argp1); - arg1 = const_cast< cmf::river::Reach * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - int newmem = 0; - res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Reach_set_outlet" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); - } - if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); - } - { - try { - (arg1)->set_outlet(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Reach_set_dead_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::river::Reach *arg1 = (cmf::river::Reach *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::river::Reach > tempshared1 ; - std::shared_ptr< cmf::river::Reach > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__river__Reach_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Reach_set_dead_end" "', argument " "1"" of type '" "cmf::river::Reach *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::river::Reach > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::river::Reach > * >(argp1); - arg1 = const_cast< cmf::river::Reach * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::river::Reach > * >(argp1); - arg1 = const_cast< cmf::river::Reach * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - try { - (arg1)->set_dead_end(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Reach_set_downstream(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::river::Reach *arg1 = (cmf::river::Reach *) 0 ; - cmf::river::Reach::ptr arg2 ; - bool arg3 = (bool) false ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::river::Reach > tempshared1 ; - std::shared_ptr< cmf::river::Reach > *smartarg1 = 0 ; - void *argp2 ; - int res2 = 0 ; - bool val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "new_downstream",(char *) "use_meanchannel", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:Reach_set_downstream",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__river__Reach_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Reach_set_downstream" "', argument " "1"" of type '" "cmf::river::Reach *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::river::Reach > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::river::Reach > * >(argp1); - arg1 = const_cast< cmf::river::Reach * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::river::Reach > * >(argp1); - arg1 = const_cast< cmf::river::Reach * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - int newmem = 0; - res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__river__Reach_t, 0 , &newmem); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Reach_set_downstream" "', argument " "2"" of type '" "cmf::river::Reach::ptr""'"); - } - if (argp2) arg2 = *(reinterpret_cast< cmf::river::Reach::ptr * >(argp2)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::river::Reach::ptr * >(argp2); - } - if (obj2) { - ecode3 = SWIG_AsVal_bool(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Reach_set_downstream" "', argument " "3"" of type '" "bool""'"); - } - arg3 = static_cast< bool >(val3); - } - { - try { - (arg1)->set_downstream(arg2,arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Reach___get_downstream(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::river::Reach *arg1 = (cmf::river::Reach *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::river::Reach const > tempshared1 ; - std::shared_ptr< cmf::river::Reach const > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - cmf::water::flux_node::ptr result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__river__Reach_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Reach___get_downstream" "', argument " "1"" of type '" "cmf::river::Reach const *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::river::Reach > * >(argp1); - delete reinterpret_cast< std::shared_ptr< const cmf::river::Reach > * >(argp1); - arg1 = const_cast< cmf::river::Reach * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::river::Reach > * >(argp1); - arg1 = const_cast< cmf::river::Reach * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - try { - result = ((cmf::river::Reach const *)arg1)->get_downstream(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - std::shared_ptr< cmf::water::flux_node > *smartresult = result ? new std::shared_ptr< cmf::water::flux_node >(result) : 0; - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, SWIG_POINTER_OWN); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Reach_get_upstream(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::river::Reach *arg1 = (cmf::river::Reach *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::river::Reach const > tempshared1 ; - std::shared_ptr< cmf::river::Reach const > *smartarg1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "index", NULL - }; - cmf::river::Reach::ptr result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Reach_get_upstream",kwnames,&obj0,&obj1)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__river__Reach_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Reach_get_upstream" "', argument " "1"" of type '" "cmf::river::Reach const *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::river::Reach > * >(argp1); - delete reinterpret_cast< std::shared_ptr< const cmf::river::Reach > * >(argp1); - arg1 = const_cast< cmf::river::Reach * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::river::Reach > * >(argp1); - arg1 = const_cast< cmf::river::Reach * >((smartarg1 ? smartarg1->get() : 0)); - } - } - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Reach_get_upstream" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - { - try { - result = ((cmf::river::Reach const *)arg1)->get_upstream(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - std::shared_ptr< cmf::river::Reach > *smartresult = result ? new std::shared_ptr< cmf::river::Reach >(result) : 0; - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__river__Reach_t, SWIG_POINTER_OWN); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Reach_connect_to_surfacewater(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::river::Reach *arg1 = (cmf::river::Reach *) 0 ; - cmf::upslope::Cell *arg2 = (cmf::upslope::Cell *) 0 ; - real arg3 ; - bool arg4 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::river::Reach > tempshared1 ; - std::shared_ptr< cmf::river::Reach > *smartarg1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - double val3 ; - int ecode3 = 0 ; - bool val4 ; - int ecode4 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "cell",(char *) "width",(char *) "diffusive", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO:Reach_connect_to_surfacewater",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__river__Reach_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Reach_connect_to_surfacewater" "', argument " "1"" of type '" "cmf::river::Reach *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::river::Reach > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::river::Reach > * >(argp1); - arg1 = const_cast< cmf::river::Reach * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::river::Reach > * >(argp1); - arg1 = const_cast< cmf::river::Reach * >((smartarg1 ? smartarg1->get() : 0)); - } - } - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Reach_connect_to_surfacewater" "', argument " "2"" of type '" "cmf::upslope::Cell *""'"); - } - arg2 = reinterpret_cast< cmf::upslope::Cell * >(argp2); - ecode3 = SWIG_AsVal_double(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Reach_connect_to_surfacewater" "', argument " "3"" of type '" "real""'"); - } - arg3 = static_cast< real >(val3); - ecode4 = SWIG_AsVal_bool(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Reach_connect_to_surfacewater" "', argument " "4"" of type '" "bool""'"); - } - arg4 = static_cast< bool >(val4); - { - try { - (arg1)->connect_to_surfacewater(arg2,arg3,arg4); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Reach_distance_to_cell(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::river::Reach *arg1 = (cmf::river::Reach *) 0 ; - cmf::upslope::Cell *arg2 = (cmf::upslope::Cell *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::river::Reach const > tempshared1 ; - std::shared_ptr< cmf::river::Reach const > *smartarg1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "cell", NULL - }; - double result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Reach_distance_to_cell",kwnames,&obj0,&obj1)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__river__Reach_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Reach_distance_to_cell" "', argument " "1"" of type '" "cmf::river::Reach const *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::river::Reach > * >(argp1); - delete reinterpret_cast< std::shared_ptr< const cmf::river::Reach > * >(argp1); - arg1 = const_cast< cmf::river::Reach * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::river::Reach > * >(argp1); - arg1 = const_cast< cmf::river::Reach * >((smartarg1 ? smartarg1->get() : 0)); - } - } - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Reach_distance_to_cell" "', argument " "2"" of type '" "cmf::upslope::Cell *""'"); - } - arg2 = reinterpret_cast< cmf::upslope::Cell * >(argp2); - { - try { - result = (double)((cmf::river::Reach const *)arg1)->distance_to_cell(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Reach___get_root(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::river::Reach *arg1 = (cmf::river::Reach *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::river::Reach > tempshared1 ; - std::shared_ptr< cmf::river::Reach > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - cmf::river::Reach::ptr result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__river__Reach_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Reach___get_root" "', argument " "1"" of type '" "cmf::river::Reach *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::river::Reach > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::river::Reach > * >(argp1); - arg1 = const_cast< cmf::river::Reach * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::river::Reach > * >(argp1); - arg1 = const_cast< cmf::river::Reach * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - try { - result = (arg1)->get_root(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - std::shared_ptr< cmf::river::Reach > *smartresult = result ? new std::shared_ptr< cmf::river::Reach >(result) : 0; - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__river__Reach_t, SWIG_POINTER_OWN); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_Reach(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::river::Reach *arg1 = (cmf::river::Reach *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::river::Reach > tempshared1 ; - std::shared_ptr< cmf::river::Reach > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__river__Reach_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Reach" "', argument " "1"" of type '" "cmf::river::Reach *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::river::Reach > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::river::Reach > * >(argp1); - arg1 = const_cast< cmf::river::Reach * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::river::Reach > * >(argp1); - arg1 = const_cast< cmf::river::Reach * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - try { - (void)arg1; delete smartarg1; - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Reach_create(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::project *arg1 = 0 ; - cmf::river::IChannel *arg2 = 0 ; - bool arg3 = (bool) false ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - bool val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char * kwnames[] = { - (char *) "project",(char *) "shape",(char *) "diffusive", NULL - }; - cmf::river::Reach::ptr result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:Reach_create",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_cmf__project, 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Reach_create" "', argument " "1"" of type '" "cmf::project &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Reach_create" "', argument " "1"" of type '" "cmf::project &""'"); - } - arg1 = reinterpret_cast< cmf::project * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_cmf__river__IChannel, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Reach_create" "', argument " "2"" of type '" "cmf::river::IChannel const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Reach_create" "', argument " "2"" of type '" "cmf::river::IChannel const &""'"); - } - arg2 = reinterpret_cast< cmf::river::IChannel * >(argp2); - if (obj2) { - ecode3 = SWIG_AsVal_bool(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Reach_create" "', argument " "3"" of type '" "bool""'"); - } - arg3 = static_cast< bool >(val3); - } - { - try { - result = cmf::river::Reach::create(*arg1,(cmf::river::IChannel const &)*arg2,arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - std::shared_ptr< cmf::river::Reach > *smartresult = result ? new std::shared_ptr< cmf::river::Reach >(result) : 0; - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__river__Reach_t, SWIG_POINTER_OWN); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Reach_length_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::river::Reach *arg1 = (cmf::river::Reach *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::river::Reach > tempshared1 ; - std::shared_ptr< cmf::river::Reach > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__river__Reach_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Reach_length_get" "', argument " "1"" of type '" "cmf::river::Reach *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::river::Reach > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::river::Reach > * >(argp1); - arg1 = const_cast< cmf::river::Reach * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::river::Reach > * >(argp1); - arg1 = const_cast< cmf::river::Reach * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - try { - result = (real)cmf_river_Reach_length_get(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Reach_width_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::river::Reach *arg1 = (cmf::river::Reach *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::river::Reach > tempshared1 ; - std::shared_ptr< cmf::river::Reach > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__river__Reach_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Reach_width_get" "', argument " "1"" of type '" "cmf::river::Reach *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::river::Reach > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::river::Reach > * >(argp1); - arg1 = const_cast< cmf::river::Reach * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::river::Reach > * >(argp1); - arg1 = const_cast< cmf::river::Reach * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - try { - result = (real)cmf_river_Reach_width_get(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Reach_channel_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::river::Reach *arg1 = (cmf::river::Reach *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::river::Reach > tempshared1 ; - std::shared_ptr< cmf::river::Reach > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - cmf::river::IChannel *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__river__Reach_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Reach_channel_get" "', argument " "1"" of type '" "cmf::river::Reach *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::river::Reach > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::river::Reach > * >(argp1); - arg1 = const_cast< cmf::river::Reach * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::river::Reach > * >(argp1); - arg1 = const_cast< cmf::river::Reach * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - try { - result = (cmf::river::IChannel *)cmf_river_Reach_channel_get(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__river__IChannel, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Reach_upstream_count_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::river::Reach *arg1 = (cmf::river::Reach *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::river::Reach > tempshared1 ; - std::shared_ptr< cmf::river::Reach > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - int result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__river__Reach_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Reach_upstream_count_get" "', argument " "1"" of type '" "cmf::river::Reach *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::river::Reach > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::river::Reach > * >(argp1); - arg1 = const_cast< cmf::river::Reach * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::river::Reach > * >(argp1); - arg1 = const_cast< cmf::river::Reach * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - try { - result = (int)cmf_river_Reach_upstream_count_get(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Reach_diffusive_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::river::Reach *arg1 = (cmf::river::Reach *) 0 ; - bool arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::river::Reach > tempshared1 ; - std::shared_ptr< cmf::river::Reach > *smartarg1 = 0 ; - bool val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"Reach_diffusive_set",2,2,swig_obj)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__river__Reach_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Reach_diffusive_set" "', argument " "1"" of type '" "cmf::river::Reach *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::river::Reach > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::river::Reach > * >(argp1); - arg1 = const_cast< cmf::river::Reach * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::river::Reach > * >(argp1); - arg1 = const_cast< cmf::river::Reach * >((smartarg1 ? smartarg1->get() : 0)); - } - } - ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Reach_diffusive_set" "', argument " "2"" of type '" "bool""'"); - } - arg2 = static_cast< bool >(val2); - { - try { - cmf_river_Reach_diffusive_set(arg1,arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Reach_diffusive_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::river::Reach *arg1 = (cmf::river::Reach *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::river::Reach > tempshared1 ; - std::shared_ptr< cmf::river::Reach > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - bool result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__river__Reach_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Reach_diffusive_get" "', argument " "1"" of type '" "cmf::river::Reach *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::river::Reach > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::river::Reach > * >(argp1); - arg1 = const_cast< cmf::river::Reach * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::river::Reach > * >(argp1); - arg1 = const_cast< cmf::river::Reach * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - try { - result = (bool)cmf_river_Reach_diffusive_get(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *Reach_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_cmf__river__Reach_t, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *_wrap_ReachIterator_next(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::river::ReachIterator *arg1 = (cmf::river::ReachIterator *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::river::Reach::ptr result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__ReachIterator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReachIterator_next" "', argument " "1"" of type '" "cmf::river::ReachIterator *""'"); - } - arg1 = reinterpret_cast< cmf::river::ReachIterator * >(argp1); - { - try { - result = (arg1)->next(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - std::shared_ptr< cmf::river::Reach > *smartresult = result ? new std::shared_ptr< cmf::river::Reach >(result) : 0; - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__river__Reach_t, SWIG_POINTER_OWN); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ReachIterator_valid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::river::ReachIterator *arg1 = (cmf::river::ReachIterator *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - bool result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__ReachIterator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReachIterator_valid" "', argument " "1"" of type '" "cmf::river::ReachIterator const *""'"); - } - arg1 = reinterpret_cast< cmf::river::ReachIterator * >(argp1); - { - try { - result = (bool)((cmf::river::ReachIterator const *)arg1)->valid(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_ReachIterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::river::Reach::ptr arg1 ; - void *argp1 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - char * kwnames[] = { - (char *) "first", NULL - }; - cmf::river::ReachIterator *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:new_ReachIterator",kwnames,&obj0)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__river__Reach_t, 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ReachIterator" "', argument " "1"" of type '" "cmf::river::Reach::ptr""'"); - } - if (argp1) arg1 = *(reinterpret_cast< cmf::river::Reach::ptr * >(argp1)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::river::Reach::ptr * >(argp1); - } - { - try { - result = (cmf::river::ReachIterator *)new cmf::river::ReachIterator(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__river__ReachIterator, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ReachIterator___reach(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::river::ReachIterator *arg1 = (cmf::river::ReachIterator *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::river::Reach::ptr result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__ReachIterator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReachIterator___reach" "', argument " "1"" of type '" "cmf::river::ReachIterator const *""'"); - } - arg1 = reinterpret_cast< cmf::river::ReachIterator * >(argp1); - { - try { - result = ((cmf::river::ReachIterator const *)arg1)->reach(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - std::shared_ptr< cmf::river::Reach > *smartresult = result ? new std::shared_ptr< cmf::river::Reach >(result) : 0; - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__river__Reach_t, SWIG_POINTER_OWN); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ReachIterator_position_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::river::ReachIterator *arg1 = (cmf::river::ReachIterator *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - double result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__ReachIterator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReachIterator_position_get" "', argument " "1"" of type '" "cmf::river::ReachIterator *""'"); - } - arg1 = reinterpret_cast< cmf::river::ReachIterator * >(argp1); - { - try { - result = (double)cmf_river_ReachIterator_position_get(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_ReachIterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::river::ReachIterator *arg1 = (cmf::river::ReachIterator *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__ReachIterator, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ReachIterator" "', argument " "1"" of type '" "cmf::river::ReachIterator *""'"); - } - arg1 = reinterpret_cast< cmf::river::ReachIterator * >(argp1); - { - try { - delete arg1; - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *ReachIterator_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__river__ReachIterator, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *ReachIterator_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_make_river_gap(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::river::Reach::ptr arg1 ; - void *argp1 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - char * kwnames[] = { - (char *) "root_reach", NULL - }; - double result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:make_river_gap",kwnames,&obj0)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__river__Reach_t, 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "make_river_gap" "', argument " "1"" of type '" "cmf::river::Reach::ptr""'"); - } - if (argp1) arg1 = *(reinterpret_cast< cmf::river::Reach::ptr * >(argp1)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::river::Reach::ptr * >(argp1); - } - { - try { - result = (double)cmf::river::make_river_gap(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SurfaceWater_get_height_function(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::SurfaceWater *arg1 = (cmf::upslope::SurfaceWater *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::upslope::SurfaceWater const > tempshared1 ; - std::shared_ptr< cmf::upslope::SurfaceWater const > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - cmf::river::Prism *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SurfaceWater_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SurfaceWater_get_height_function" "', argument " "1"" of type '" "cmf::upslope::SurfaceWater const *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::upslope::SurfaceWater > * >(argp1); - delete reinterpret_cast< std::shared_ptr< const cmf::upslope::SurfaceWater > * >(argp1); - arg1 = const_cast< cmf::upslope::SurfaceWater * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::upslope::SurfaceWater > * >(argp1); - arg1 = const_cast< cmf::upslope::SurfaceWater * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - try { - result = (cmf::river::Prism *) &((cmf::upslope::SurfaceWater const *)arg1)->get_height_function(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__river__Prism, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SurfaceWater_get_cell(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::SurfaceWater *arg1 = (cmf::upslope::SurfaceWater *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::upslope::SurfaceWater const > tempshared1 ; - std::shared_ptr< cmf::upslope::SurfaceWater const > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - cmf::upslope::Cell *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SurfaceWater_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SurfaceWater_get_cell" "', argument " "1"" of type '" "cmf::upslope::SurfaceWater const *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::upslope::SurfaceWater > * >(argp1); - delete reinterpret_cast< std::shared_ptr< const cmf::upslope::SurfaceWater > * >(argp1); - arg1 = const_cast< cmf::upslope::SurfaceWater * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::upslope::SurfaceWater > * >(argp1); - arg1 = const_cast< cmf::upslope::SurfaceWater * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - try { - result = (cmf::upslope::Cell *) &((cmf::upslope::SurfaceWater const *)arg1)->get_cell(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SurfaceWater_cast(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::flux_node::ptr arg1 ; - void *argp1 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - char * kwnames[] = { - (char *) "node", NULL - }; - cmf::upslope::SurfaceWater::ptr result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:SurfaceWater_cast",kwnames,&obj0)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SurfaceWater_cast" "', argument " "1"" of type '" "cmf::water::flux_node::ptr""'"); - } - if (argp1) arg1 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp1)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp1); - } - { - try { - result = cmf::upslope::SurfaceWater::cast(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - std::shared_ptr< cmf::upslope::SurfaceWater > *smartresult = result ? new std::shared_ptr< cmf::upslope::SurfaceWater >(result) : 0; - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SurfaceWater_t, SWIG_POINTER_OWN); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SurfaceWater_puddledepth_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::SurfaceWater *arg1 = (cmf::upslope::SurfaceWater *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::upslope::SurfaceWater > tempshared1 ; - std::shared_ptr< cmf::upslope::SurfaceWater > *smartarg1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"SurfaceWater_puddledepth_set",2,2,swig_obj)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SurfaceWater_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SurfaceWater_puddledepth_set" "', argument " "1"" of type '" "cmf::upslope::SurfaceWater *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::SurfaceWater > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::upslope::SurfaceWater > * >(argp1); - arg1 = const_cast< cmf::upslope::SurfaceWater * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::SurfaceWater > * >(argp1); - arg1 = const_cast< cmf::upslope::SurfaceWater * >((smartarg1 ? smartarg1->get() : 0)); - } - } - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SurfaceWater_puddledepth_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - { - try { - cmf_upslope_SurfaceWater_puddledepth_set(arg1,arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SurfaceWater_puddledepth_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::SurfaceWater *arg1 = (cmf::upslope::SurfaceWater *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::upslope::SurfaceWater > tempshared1 ; - std::shared_ptr< cmf::upslope::SurfaceWater > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SurfaceWater_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SurfaceWater_puddledepth_get" "', argument " "1"" of type '" "cmf::upslope::SurfaceWater *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::SurfaceWater > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::upslope::SurfaceWater > * >(argp1); - arg1 = const_cast< cmf::upslope::SurfaceWater * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::SurfaceWater > * >(argp1); - arg1 = const_cast< cmf::upslope::SurfaceWater * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - try { - result = (real)cmf_upslope_SurfaceWater_puddledepth_get(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SurfaceWater_nManning_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::SurfaceWater *arg1 = (cmf::upslope::SurfaceWater *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::upslope::SurfaceWater > tempshared1 ; - std::shared_ptr< cmf::upslope::SurfaceWater > *smartarg1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"SurfaceWater_nManning_set",2,2,swig_obj)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SurfaceWater_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SurfaceWater_nManning_set" "', argument " "1"" of type '" "cmf::upslope::SurfaceWater *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::SurfaceWater > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::upslope::SurfaceWater > * >(argp1); - arg1 = const_cast< cmf::upslope::SurfaceWater * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::SurfaceWater > * >(argp1); - arg1 = const_cast< cmf::upslope::SurfaceWater * >((smartarg1 ? smartarg1->get() : 0)); - } - } - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SurfaceWater_nManning_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - { - try { - cmf_upslope_SurfaceWater_nManning_set(arg1,arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SurfaceWater_nManning_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::SurfaceWater *arg1 = (cmf::upslope::SurfaceWater *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::upslope::SurfaceWater > tempshared1 ; - std::shared_ptr< cmf::upslope::SurfaceWater > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SurfaceWater_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SurfaceWater_nManning_get" "', argument " "1"" of type '" "cmf::upslope::SurfaceWater *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::SurfaceWater > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::upslope::SurfaceWater > * >(argp1); - arg1 = const_cast< cmf::upslope::SurfaceWater * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::SurfaceWater > * >(argp1); - arg1 = const_cast< cmf::upslope::SurfaceWater * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - try { - result = (real)cmf_upslope_SurfaceWater_nManning_get(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_SurfaceWater(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::SurfaceWater *arg1 = (cmf::upslope::SurfaceWater *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::upslope::SurfaceWater > tempshared1 ; - std::shared_ptr< cmf::upslope::SurfaceWater > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SurfaceWater_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SurfaceWater" "', argument " "1"" of type '" "cmf::upslope::SurfaceWater *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::SurfaceWater > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::upslope::SurfaceWater > * >(argp1); - arg1 = const_cast< cmf::upslope::SurfaceWater * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::SurfaceWater > * >(argp1); - arg1 = const_cast< cmf::upslope::SurfaceWater * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - try { - (void)arg1; delete smartarg1; - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *SurfaceWater_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SurfaceWater_t, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *_wrap_new_KinematicSurfaceRunoff(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::SurfaceWater::ptr arg1 ; - cmf::water::flux_node::ptr arg2 ; - real arg3 ; - real arg4 = (real) -1 ; - void *argp1 ; - int res1 = 0 ; - void *argp2 ; - int res2 = 0 ; - double val3 ; - int ecode3 = 0 ; - double val4 ; - int ecode4 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - char * kwnames[] = { - (char *) "left",(char *) "right",(char *) "flowwidth",(char *) "distance", NULL - }; - cmf::upslope::connections::KinematicSurfaceRunoff *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|O:new_KinematicSurfaceRunoff",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SurfaceWater_t, 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_KinematicSurfaceRunoff" "', argument " "1"" of type '" "cmf::upslope::SurfaceWater::ptr""'"); - } - if (argp1) arg1 = *(reinterpret_cast< cmf::upslope::SurfaceWater::ptr * >(argp1)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::upslope::SurfaceWater::ptr * >(argp1); - } - { - int newmem = 0; - res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_KinematicSurfaceRunoff" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); - } - if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); - } - ecode3 = SWIG_AsVal_double(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_KinematicSurfaceRunoff" "', argument " "3"" of type '" "real""'"); - } - arg3 = static_cast< real >(val3); - if (obj3) { - ecode4 = SWIG_AsVal_double(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_KinematicSurfaceRunoff" "', argument " "4"" of type '" "real""'"); - } - arg4 = static_cast< real >(val4); - } - { - try { - result = (cmf::upslope::connections::KinematicSurfaceRunoff *)new cmf::upslope::connections::KinematicSurfaceRunoff(arg1,arg2,arg3,arg4); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__connections__KinematicSurfaceRunoff, SWIG_POINTER_NEW | 0 ); - - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN int Swig_var_KinematicSurfaceRunoff_cell_connector_set(PyObject *) { - SWIG_Error(SWIG_AttributeError,"Variable KinematicSurfaceRunoff_cell_connector is read-only."); - return 1; -} - - -SWIGINTERN PyObject *Swig_var_KinematicSurfaceRunoff_cell_connector_get(void) { - PyObject *pyobj = 0; - - pyobj = SWIG_NewPointerObj(SWIG_as_voidptr(&cmf::upslope::connections::KinematicSurfaceRunoff::cell_connector), SWIGTYPE_p_cmf__upslope__CellConnector, 0 ); - return pyobj; -} - - -SWIGINTERN PyObject *_wrap_delete_KinematicSurfaceRunoff(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::connections::KinematicSurfaceRunoff *arg1 = (cmf::upslope::connections::KinematicSurfaceRunoff *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__KinematicSurfaceRunoff, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_KinematicSurfaceRunoff" "', argument " "1"" of type '" "cmf::upslope::connections::KinematicSurfaceRunoff *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::connections::KinematicSurfaceRunoff * >(argp1); - { - try { - - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *KinematicSurfaceRunoff_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__connections__KinematicSurfaceRunoff, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *KinematicSurfaceRunoff_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_DiffusiveSurfaceRunoff_set_linear_slope(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - real arg1 ; - double val1 ; - int ecode1 = 0 ; - PyObject * obj0 = 0 ; - char * kwnames[] = { - (char *) "width", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:DiffusiveSurfaceRunoff_set_linear_slope",kwnames,&obj0)) SWIG_fail; - ecode1 = SWIG_AsVal_double(obj0, &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "DiffusiveSurfaceRunoff_set_linear_slope" "', argument " "1"" of type '" "real""'"); - } - arg1 = static_cast< real >(val1); - { - try { - cmf::upslope::connections::DiffusiveSurfaceRunoff::set_linear_slope(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_DiffusiveSurfaceRunoff_get_linear_slope(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - real result; - - if (!SWIG_Python_UnpackTuple(args,"DiffusiveSurfaceRunoff_get_linear_slope",0,0,0)) SWIG_fail; - { - try { - result = (real)cmf::upslope::connections::DiffusiveSurfaceRunoff::get_linear_slope(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_DiffusiveSurfaceRunoff(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::SurfaceWater::ptr arg1 ; - cmf::water::flux_node::ptr arg2 ; - real arg3 ; - real arg4 = (real) -1 ; - void *argp1 ; - int res1 = 0 ; - void *argp2 ; - int res2 = 0 ; - double val3 ; - int ecode3 = 0 ; - double val4 ; - int ecode4 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - char * kwnames[] = { - (char *) "left",(char *) "right",(char *) "flowwidth",(char *) "distance", NULL - }; - cmf::upslope::connections::DiffusiveSurfaceRunoff *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|O:new_DiffusiveSurfaceRunoff",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SurfaceWater_t, 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DiffusiveSurfaceRunoff" "', argument " "1"" of type '" "cmf::upslope::SurfaceWater::ptr""'"); - } - if (argp1) arg1 = *(reinterpret_cast< cmf::upslope::SurfaceWater::ptr * >(argp1)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::upslope::SurfaceWater::ptr * >(argp1); - } - { - int newmem = 0; - res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_DiffusiveSurfaceRunoff" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); - } - if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); - } - ecode3 = SWIG_AsVal_double(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_DiffusiveSurfaceRunoff" "', argument " "3"" of type '" "real""'"); - } - arg3 = static_cast< real >(val3); - if (obj3) { - ecode4 = SWIG_AsVal_double(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_DiffusiveSurfaceRunoff" "', argument " "4"" of type '" "real""'"); - } - arg4 = static_cast< real >(val4); - } - { - try { - result = (cmf::upslope::connections::DiffusiveSurfaceRunoff *)new cmf::upslope::connections::DiffusiveSurfaceRunoff(arg1,arg2,arg3,arg4); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__connections__DiffusiveSurfaceRunoff, SWIG_POINTER_NEW | 0 ); - - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN int Swig_var_DiffusiveSurfaceRunoff_cell_connector_set(PyObject *) { - SWIG_Error(SWIG_AttributeError,"Variable DiffusiveSurfaceRunoff_cell_connector is read-only."); - return 1; -} - - -SWIGINTERN PyObject *Swig_var_DiffusiveSurfaceRunoff_cell_connector_get(void) { - PyObject *pyobj = 0; - - pyobj = SWIG_NewPointerObj(SWIG_as_voidptr(&cmf::upslope::connections::DiffusiveSurfaceRunoff::cell_connector), SWIGTYPE_p_cmf__upslope__CellConnector, 0 ); - return pyobj; -} - - -SWIGINTERN PyObject *_wrap_delete_DiffusiveSurfaceRunoff(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::connections::DiffusiveSurfaceRunoff *arg1 = (cmf::upslope::connections::DiffusiveSurfaceRunoff *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__DiffusiveSurfaceRunoff, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DiffusiveSurfaceRunoff" "', argument " "1"" of type '" "cmf::upslope::connections::DiffusiveSurfaceRunoff *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::connections::DiffusiveSurfaceRunoff * >(argp1); - { - try { - - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *DiffusiveSurfaceRunoff_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__connections__DiffusiveSurfaceRunoff, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *DiffusiveSurfaceRunoff_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_aquifer_area_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::aquifer *arg1 = (cmf::upslope::aquifer *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::upslope::aquifer > tempshared1 ; - std::shared_ptr< cmf::upslope::aquifer > *smartarg1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"aquifer_area_set",2,2,swig_obj)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__aquifer_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "aquifer_area_set" "', argument " "1"" of type '" "cmf::upslope::aquifer *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::aquifer > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::upslope::aquifer > * >(argp1); - arg1 = const_cast< cmf::upslope::aquifer * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::aquifer > * >(argp1); - arg1 = const_cast< cmf::upslope::aquifer * >((smartarg1 ? smartarg1->get() : 0)); - } - } - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "aquifer_area_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->area = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_aquifer_area_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::aquifer *arg1 = (cmf::upslope::aquifer *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::upslope::aquifer > tempshared1 ; - std::shared_ptr< cmf::upslope::aquifer > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__aquifer_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "aquifer_area_get" "', argument " "1"" of type '" "cmf::upslope::aquifer *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::aquifer > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::upslope::aquifer > * >(argp1); - arg1 = const_cast< cmf::upslope::aquifer * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::aquifer > * >(argp1); - arg1 = const_cast< cmf::upslope::aquifer * >((smartarg1 ? smartarg1->get() : 0)); - } - } - result = (real) ((arg1)->area); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_aquifer_thickness_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::aquifer *arg1 = (cmf::upslope::aquifer *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::upslope::aquifer > tempshared1 ; - std::shared_ptr< cmf::upslope::aquifer > *smartarg1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"aquifer_thickness_set",2,2,swig_obj)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__aquifer_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "aquifer_thickness_set" "', argument " "1"" of type '" "cmf::upslope::aquifer *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::aquifer > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::upslope::aquifer > * >(argp1); - arg1 = const_cast< cmf::upslope::aquifer * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::aquifer > * >(argp1); - arg1 = const_cast< cmf::upslope::aquifer * >((smartarg1 ? smartarg1->get() : 0)); - } - } - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "aquifer_thickness_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->thickness = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_aquifer_thickness_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::aquifer *arg1 = (cmf::upslope::aquifer *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::upslope::aquifer > tempshared1 ; - std::shared_ptr< cmf::upslope::aquifer > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__aquifer_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "aquifer_thickness_get" "', argument " "1"" of type '" "cmf::upslope::aquifer *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::aquifer > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::upslope::aquifer > * >(argp1); - arg1 = const_cast< cmf::upslope::aquifer * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::aquifer > * >(argp1); - arg1 = const_cast< cmf::upslope::aquifer * >((smartarg1 ? smartarg1->get() : 0)); - } - } - result = (real) ((arg1)->thickness); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_aquifer_porosity_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::aquifer *arg1 = (cmf::upslope::aquifer *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::upslope::aquifer > tempshared1 ; - std::shared_ptr< cmf::upslope::aquifer > *smartarg1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"aquifer_porosity_set",2,2,swig_obj)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__aquifer_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "aquifer_porosity_set" "', argument " "1"" of type '" "cmf::upslope::aquifer *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::aquifer > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::upslope::aquifer > * >(argp1); - arg1 = const_cast< cmf::upslope::aquifer * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::aquifer > * >(argp1); - arg1 = const_cast< cmf::upslope::aquifer * >((smartarg1 ? smartarg1->get() : 0)); - } - } - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "aquifer_porosity_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->porosity = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_aquifer_porosity_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::aquifer *arg1 = (cmf::upslope::aquifer *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::upslope::aquifer > tempshared1 ; - std::shared_ptr< cmf::upslope::aquifer > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__aquifer_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "aquifer_porosity_get" "', argument " "1"" of type '" "cmf::upslope::aquifer *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::aquifer > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::upslope::aquifer > * >(argp1); - arg1 = const_cast< cmf::upslope::aquifer * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::aquifer > * >(argp1); - arg1 = const_cast< cmf::upslope::aquifer * >((smartarg1 ? smartarg1->get() : 0)); - } - } - result = (real) ((arg1)->porosity); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_aquifer_K_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::aquifer *arg1 = (cmf::upslope::aquifer *) 0 ; - cmf::geometry::point *arg2 = (cmf::geometry::point *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::upslope::aquifer > tempshared1 ; - std::shared_ptr< cmf::upslope::aquifer > *smartarg1 = 0 ; - cmf::geometry::point p2 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"aquifer_K_set",2,2,swig_obj)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__aquifer_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "aquifer_K_set" "', argument " "1"" of type '" "cmf::upslope::aquifer *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::aquifer > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::upslope::aquifer > * >(argp1); - arg1 = const_cast< cmf::upslope::aquifer * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::aquifer > * >(argp1); - arg1 = const_cast< cmf::upslope::aquifer * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - if (SWIG_ConvertPtr(swig_obj[1], (void **) &arg2, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { - if (check_xy(swig_obj[1])) { - std::string res = convert_xyz_to_point(swig_obj[1],p2); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - return NULL; - } - } - else if (PySequence_Check(swig_obj[1])) { - std::string res = convert_seq_to_point(swig_obj[1],p2); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError, res.c_str()); - } - } else { - std::string res="<"; - res+=pyrepr(swig_obj[1]); - res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - } - arg2 = &p2; - } - } - if (arg1) (arg1)->K = *arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_aquifer_K_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::aquifer *arg1 = (cmf::upslope::aquifer *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::upslope::aquifer > tempshared1 ; - std::shared_ptr< cmf::upslope::aquifer > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - cmf::geometry::point *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__aquifer_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "aquifer_K_get" "', argument " "1"" of type '" "cmf::upslope::aquifer *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::aquifer > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::upslope::aquifer > * >(argp1); - arg1 = const_cast< cmf::upslope::aquifer * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::aquifer > * >(argp1); - arg1 = const_cast< cmf::upslope::aquifer * >((smartarg1 ? smartarg1->get() : 0)); - } - } - result = (cmf::geometry::point *)& ((arg1)->K); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__geometry__point, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_aquifer_get_K(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::aquifer *arg1 = (cmf::upslope::aquifer *) 0 ; - cmf::geometry::point arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::upslope::aquifer const > tempshared1 ; - std::shared_ptr< cmf::upslope::aquifer const > *smartarg1 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "direction", NULL - }; - real result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:aquifer_get_K",kwnames,&obj0,&obj1)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__aquifer_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "aquifer_get_K" "', argument " "1"" of type '" "cmf::upslope::aquifer const *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::upslope::aquifer > * >(argp1); - delete reinterpret_cast< std::shared_ptr< const cmf::upslope::aquifer > * >(argp1); - arg1 = const_cast< cmf::upslope::aquifer * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::upslope::aquifer > * >(argp1); - arg1 = const_cast< cmf::upslope::aquifer * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - if (check_xy(obj1)) { - std::string res = convert_xyz_to_point(obj1,arg2); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - return NULL; - } - } - else if (PySequence_Check(obj1)) { - std::string res = convert_seq_to_point(obj1,arg2); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError, res.c_str()); - } - } else { - std::string res="<"; - res+=pyrepr(obj1); - res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - } - } - { - try { - result = (real)((cmf::upslope::aquifer const *)arg1)->get_K(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_aquifer_get_abs_errtol(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::aquifer *arg1 = (cmf::upslope::aquifer *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::upslope::aquifer > tempshared1 ; - std::shared_ptr< cmf::upslope::aquifer > *smartarg1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "rel_errtol", NULL - }; - real result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:aquifer_get_abs_errtol",kwnames,&obj0,&obj1)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__aquifer_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "aquifer_get_abs_errtol" "', argument " "1"" of type '" "cmf::upslope::aquifer *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::aquifer > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::upslope::aquifer > * >(argp1); - arg1 = const_cast< cmf::upslope::aquifer * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::aquifer > * >(argp1); - arg1 = const_cast< cmf::upslope::aquifer * >((smartarg1 ? smartarg1->get() : 0)); - } - } - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "aquifer_get_abs_errtol" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - { - try { - result = (real)(arg1)->get_abs_errtol(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_aquifer__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::project *arg1 = 0 ; - cmf::geometry::point arg2 ; - real arg3 ; - real arg4 ; - real arg5 ; - real arg6 = (real) 1e-4 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val3 ; - int ecode3 = 0 ; - double val4 ; - int ecode4 = 0 ; - double val5 ; - int ecode5 = 0 ; - double val6 ; - int ecode6 = 0 ; - cmf::upslope::aquifer *result = 0 ; - - if ((nobjs < 5) || (nobjs > 6)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_cmf__project, 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_aquifer" "', argument " "1"" of type '" "cmf::project &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_aquifer" "', argument " "1"" of type '" "cmf::project &""'"); - } - arg1 = reinterpret_cast< cmf::project * >(argp1); - { - if (check_xy(swig_obj[1])) { - std::string res = convert_xyz_to_point(swig_obj[1],arg2); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - return NULL; - } - } - else if (PySequence_Check(swig_obj[1])) { - std::string res = convert_seq_to_point(swig_obj[1],arg2); - if (res.size()) { - SWIG_exception_fail(SWIG_ValueError, res.c_str()); - } - } else { - std::string res="<"; - res+=pyrepr(swig_obj[1]); - res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; - SWIG_exception_fail(SWIG_ValueError,res.c_str()); - } - } - ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_aquifer" "', argument " "3"" of type '" "real""'"); - } - arg3 = static_cast< real >(val3); - ecode4 = SWIG_AsVal_double(swig_obj[3], &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_aquifer" "', argument " "4"" of type '" "real""'"); - } - arg4 = static_cast< real >(val4); - ecode5 = SWIG_AsVal_double(swig_obj[4], &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_aquifer" "', argument " "5"" of type '" "real""'"); - } - arg5 = static_cast< real >(val5); - if (swig_obj[5]) { - ecode6 = SWIG_AsVal_double(swig_obj[5], &val6); - if (!SWIG_IsOK(ecode6)) { - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_aquifer" "', argument " "6"" of type '" "real""'"); - } - arg6 = static_cast< real >(val6); - } - { - try { - result = (cmf::upslope::aquifer *)new cmf::upslope::aquifer(*arg1,arg2,arg3,arg4,arg5,arg6); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - std::shared_ptr< cmf::upslope::aquifer > *smartresult = result ? new std::shared_ptr< cmf::upslope::aquifer >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0; - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__upslope__aquifer_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_aquifer__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::upslope::cell_vector *arg1 = 0 ; - real arg2 ; - real arg3 ; - real arg4 = (real) 1e-4 ; - cmf::upslope::cell_vector temp_list1 ; - double val2 ; - int ecode2 = 0 ; - double val3 ; - int ecode3 = 0 ; - double val4 ; - int ecode4 = 0 ; - cmf::upslope::aquifer *result = 0 ; - - if ((nobjs < 3) || (nobjs > 4)) SWIG_fail; - { - if (SWIG_ConvertPtr(swig_obj[0], (void **) &arg1, SWIGTYPE_p_cmf__upslope__cell_vector, SWIG_POINTER_EXCEPTION) == -1) { - int res = iterable_to_list(swig_obj[0],SWIGTYPE_p_cmf__upslope__Cell, temp_list1); - if (SWIG_IsOK(res)) { - arg1 = &temp_list1; - } else { - SWIG_exception_fail(SWIG_TypeError,"Only iterables can be converted to cmf::upslope::cell_vector"); - } - } - } - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_aquifer" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_aquifer" "', argument " "3"" of type '" "real""'"); - } - arg3 = static_cast< real >(val3); - if (swig_obj[3]) { - ecode4 = SWIG_AsVal_double(swig_obj[3], &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_aquifer" "', argument " "4"" of type '" "real""'"); - } - arg4 = static_cast< real >(val4); - } - { - try { - result = (cmf::upslope::aquifer *)new cmf::upslope::aquifer(*arg1,arg2,arg3,arg4); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - std::shared_ptr< cmf::upslope::aquifer > *smartresult = result ? new std::shared_ptr< cmf::upslope::aquifer >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0; - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__upslope__aquifer_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_aquifer(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[7] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args,"new_aquifer",0,6,argv))) SWIG_fail; - --argc; - { - unsigned long _index = 0; - SWIG_TypeRank _rank = 0; - if ((argc >= 3) && (argc <= 4)) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - { - _v = is_listtype_or_iterable(argv[0],SWIGTYPE_p_cmf__upslope__cell_vector); - } - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - int res = SWIG_AsVal_double(argv[2], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (argc > 3) { - { - { - int res = SWIG_AsVal_double(argv[3], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - } - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 1; - if (_rank == _rankm) goto dispatch; - } - } - check_1: - - if ((argc >= 5) && (argc <= 6)) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__project, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - cmf::geometry::point p; - _v=check_xy(argv[1]) || check_seq_point(argv[1]); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - int res = SWIG_AsVal_double(argv[2], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - int res = SWIG_AsVal_double(argv[3], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - int res = SWIG_AsVal_double(argv[4], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (argc > 5) { - { - { - int res = SWIG_AsVal_double(argv[5], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - } - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 2; - if (_rank == _rankm) goto dispatch; - } - } - check_2: - - dispatch: - switch(_index) { - case 1: - return _wrap_new_aquifer__SWIG_1(self, argc, argv); - case 2: - return _wrap_new_aquifer__SWIG_0(self, argc, argv); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_aquifer'.\n" - " Possible C/C++ prototypes are:\n" - " cmf::upslope::aquifer::aquifer(cmf::project &,cmf::geometry::point,real,real,real,real)\n" - " cmf::upslope::aquifer::aquifer(cmf::upslope::cell_vector &,real,real,real)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_aquifer_cast(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::flux_node::ptr arg1 ; - void *argp1 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - char * kwnames[] = { - (char *) "for_cast", NULL - }; - cmf::upslope::aquifer::ptr result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:aquifer_cast",kwnames,&obj0)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "aquifer_cast" "', argument " "1"" of type '" "cmf::water::flux_node::ptr""'"); - } - if (argp1) arg1 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp1)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp1); - } - { - try { - result = cmf::upslope::aquifer::cast(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - std::shared_ptr< cmf::upslope::aquifer > *smartresult = result ? new std::shared_ptr< cmf::upslope::aquifer >(result) : 0; - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__upslope__aquifer_t, SWIG_POINTER_OWN); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_aquifer_base_height_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::aquifer *arg1 = (cmf::upslope::aquifer *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::upslope::aquifer > tempshared1 ; - std::shared_ptr< cmf::upslope::aquifer > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - double result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__aquifer_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "aquifer_base_height_get" "', argument " "1"" of type '" "cmf::upslope::aquifer *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::aquifer > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::upslope::aquifer > * >(argp1); - arg1 = const_cast< cmf::upslope::aquifer * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::aquifer > * >(argp1); - arg1 = const_cast< cmf::upslope::aquifer * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - try { - result = (double)cmf_upslope_aquifer_base_height_get(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_aquifer_top_height_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::aquifer *arg1 = (cmf::upslope::aquifer *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::upslope::aquifer > tempshared1 ; - std::shared_ptr< cmf::upslope::aquifer > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - double result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__aquifer_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "aquifer_top_height_get" "', argument " "1"" of type '" "cmf::upslope::aquifer *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::aquifer > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::upslope::aquifer > * >(argp1); - arg1 = const_cast< cmf::upslope::aquifer * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::aquifer > * >(argp1); - arg1 = const_cast< cmf::upslope::aquifer * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - try { - result = (double)cmf_upslope_aquifer_top_height_get(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_aquifer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::aquifer *arg1 = (cmf::upslope::aquifer *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< cmf::upslope::aquifer > tempshared1 ; - std::shared_ptr< cmf::upslope::aquifer > *smartarg1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__aquifer_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_aquifer" "', argument " "1"" of type '" "cmf::upslope::aquifer *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::aquifer > * >(argp1); - delete reinterpret_cast< std::shared_ptr< cmf::upslope::aquifer > * >(argp1); - arg1 = const_cast< cmf::upslope::aquifer * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::aquifer > * >(argp1); - arg1 = const_cast< cmf::upslope::aquifer * >((smartarg1 ? smartarg1->get() : 0)); - } - } - { - try { - (void)arg1; delete smartarg1; - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *aquifer_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_cmf__upslope__aquifer_t, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *aquifer_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_aquifer_Darcy_flux_width_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::aquifer_Darcy *arg1 = (cmf::upslope::aquifer_Darcy *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"aquifer_Darcy_flux_width_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__aquifer_Darcy, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "aquifer_Darcy_flux_width_set" "', argument " "1"" of type '" "cmf::upslope::aquifer_Darcy *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::aquifer_Darcy * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "aquifer_Darcy_flux_width_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->flux_width = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_aquifer_Darcy_flux_width_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::aquifer_Darcy *arg1 = (cmf::upslope::aquifer_Darcy *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__aquifer_Darcy, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "aquifer_Darcy_flux_width_get" "', argument " "1"" of type '" "cmf::upslope::aquifer_Darcy *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::aquifer_Darcy * >(argp1); - result = (real) ((arg1)->flux_width); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_aquifer_Darcy(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::aquifer::ptr arg1 ; - cmf::water::flux_node::ptr arg2 ; - real arg3 ; - void *argp1 ; - int res1 = 0 ; - void *argp2 ; - int res2 = 0 ; - double val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char * kwnames[] = { - (char *) "left",(char *) "right",(char *) "width", NULL - }; - cmf::upslope::aquifer_Darcy *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:new_aquifer_Darcy",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__aquifer_t, 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_aquifer_Darcy" "', argument " "1"" of type '" "cmf::upslope::aquifer::ptr""'"); - } - if (argp1) arg1 = *(reinterpret_cast< cmf::upslope::aquifer::ptr * >(argp1)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::upslope::aquifer::ptr * >(argp1); - } - { - int newmem = 0; - res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_aquifer_Darcy" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); - } - if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); - } - ecode3 = SWIG_AsVal_double(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_aquifer_Darcy" "', argument " "3"" of type '" "real""'"); - } - arg3 = static_cast< real >(val3); - { - try { - result = (cmf::upslope::aquifer_Darcy *)new cmf::upslope::aquifer_Darcy(arg1,arg2,arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__aquifer_Darcy, SWIG_POINTER_NEW | 0 ); - - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_aquifer_Darcy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::aquifer_Darcy *arg1 = (cmf::upslope::aquifer_Darcy *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__aquifer_Darcy, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_aquifer_Darcy" "', argument " "1"" of type '" "cmf::upslope::aquifer_Darcy *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::aquifer_Darcy * >(argp1); - { - try { - - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *aquifer_Darcy_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__aquifer_Darcy, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *aquifer_Darcy_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_delete_lateral_sub_surface_flux(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::connections::lateral_sub_surface_flux *arg1 = (cmf::upslope::connections::lateral_sub_surface_flux *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__lateral_sub_surface_flux, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_lateral_sub_surface_flux" "', argument " "1"" of type '" "cmf::upslope::connections::lateral_sub_surface_flux *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::connections::lateral_sub_surface_flux * >(argp1); - { - try { - - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *lateral_sub_surface_flux_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__connections__lateral_sub_surface_flux, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN int Swig_var_Darcy_cell_connector_set(PyObject *) { - SWIG_Error(SWIG_AttributeError,"Variable Darcy_cell_connector is read-only."); - return 1; -} - - -SWIGINTERN PyObject *Swig_var_Darcy_cell_connector_get(void) { - PyObject *pyobj = 0; - - pyobj = SWIG_NewPointerObj(SWIG_as_voidptr(&cmf::upslope::connections::Darcy::cell_connector), SWIGTYPE_p_cmf__upslope__CellConnector, 0 ); - return pyobj; -} - - -SWIGINTERN PyObject *_wrap_new_Darcy(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::SoilLayer::ptr arg1 ; - cmf::water::flux_node::ptr arg2 ; - real arg3 ; - real arg4 = (real) 0 ; - void *argp1 ; - int res1 = 0 ; - void *argp2 ; - int res2 = 0 ; - double val3 ; - int ecode3 = 0 ; - double val4 ; - int ecode4 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - char * kwnames[] = { - (char *) "left",(char *) "right",(char *) "FlowWidth",(char *) "Distance", NULL - }; - cmf::upslope::connections::Darcy *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|O:new_Darcy",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Darcy" "', argument " "1"" of type '" "cmf::upslope::SoilLayer::ptr""'"); - } - if (argp1) arg1 = *(reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp1)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp1); - } - { - int newmem = 0; - res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Darcy" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); - } - if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); - } - ecode3 = SWIG_AsVal_double(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Darcy" "', argument " "3"" of type '" "real""'"); - } - arg3 = static_cast< real >(val3); - if (obj3) { - ecode4 = SWIG_AsVal_double(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_Darcy" "', argument " "4"" of type '" "real""'"); - } - arg4 = static_cast< real >(val4); - } - { - try { - result = (cmf::upslope::connections::Darcy *)new cmf::upslope::connections::Darcy(arg1,arg2,arg3,arg4); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__connections__Darcy, SWIG_POINTER_NEW | 0 ); - - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_Darcy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::connections::Darcy *arg1 = (cmf::upslope::connections::Darcy *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__Darcy, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Darcy" "', argument " "1"" of type '" "cmf::upslope::connections::Darcy *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::connections::Darcy * >(argp1); - { - try { - - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *Darcy_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__connections__Darcy, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *Darcy_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN int Swig_var_TopographicGradientDarcy_cell_connector_set(PyObject *) { - SWIG_Error(SWIG_AttributeError,"Variable TopographicGradientDarcy_cell_connector is read-only."); - return 1; -} - - -SWIGINTERN PyObject *Swig_var_TopographicGradientDarcy_cell_connector_get(void) { - PyObject *pyobj = 0; - - pyobj = SWIG_NewPointerObj(SWIG_as_voidptr(&cmf::upslope::connections::TopographicGradientDarcy::cell_connector), SWIGTYPE_p_cmf__upslope__CellConnector, 0 ); - return pyobj; -} - - -SWIGINTERN PyObject *_wrap_new_TopographicGradientDarcy(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::SoilLayer::ptr arg1 ; - cmf::water::flux_node::ptr arg2 ; - real arg3 ; - real arg4 = (real) 0 ; - void *argp1 ; - int res1 = 0 ; - void *argp2 ; - int res2 = 0 ; - double val3 ; - int ecode3 = 0 ; - double val4 ; - int ecode4 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - char * kwnames[] = { - (char *) "left",(char *) "right",(char *) "FlowWidth",(char *) "Distance", NULL - }; - cmf::upslope::connections::TopographicGradientDarcy *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|O:new_TopographicGradientDarcy",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_TopographicGradientDarcy" "', argument " "1"" of type '" "cmf::upslope::SoilLayer::ptr""'"); - } - if (argp1) arg1 = *(reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp1)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp1); - } - { - int newmem = 0; - res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_TopographicGradientDarcy" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); - } - if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); - } - ecode3 = SWIG_AsVal_double(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_TopographicGradientDarcy" "', argument " "3"" of type '" "real""'"); - } - arg3 = static_cast< real >(val3); - if (obj3) { - ecode4 = SWIG_AsVal_double(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_TopographicGradientDarcy" "', argument " "4"" of type '" "real""'"); - } - arg4 = static_cast< real >(val4); - } - { - try { - result = (cmf::upslope::connections::TopographicGradientDarcy *)new cmf::upslope::connections::TopographicGradientDarcy(arg1,arg2,arg3,arg4); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__connections__TopographicGradientDarcy, SWIG_POINTER_NEW | 0 ); - - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_TopographicGradientDarcy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::connections::TopographicGradientDarcy *arg1 = (cmf::upslope::connections::TopographicGradientDarcy *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__TopographicGradientDarcy, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_TopographicGradientDarcy" "', argument " "1"" of type '" "cmf::upslope::connections::TopographicGradientDarcy *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::connections::TopographicGradientDarcy * >(argp1); - { - try { - - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *TopographicGradientDarcy_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__connections__TopographicGradientDarcy, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *TopographicGradientDarcy_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_new_DarcyKinematic(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::SoilLayer::ptr arg1 ; - cmf::water::flux_node::ptr arg2 ; - real arg3 ; - real arg4 = (real) 0 ; - void *argp1 ; - int res1 = 0 ; - void *argp2 ; - int res2 = 0 ; - double val3 ; - int ecode3 = 0 ; - double val4 ; - int ecode4 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - char * kwnames[] = { - (char *) "left",(char *) "right",(char *) "FlowWidth",(char *) "Distance", NULL - }; - cmf::upslope::connections::DarcyKinematic *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|O:new_DarcyKinematic",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DarcyKinematic" "', argument " "1"" of type '" "cmf::upslope::SoilLayer::ptr""'"); - } - if (argp1) arg1 = *(reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp1)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp1); - } - { - int newmem = 0; - res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_DarcyKinematic" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); - } - if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); - } - ecode3 = SWIG_AsVal_double(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_DarcyKinematic" "', argument " "3"" of type '" "real""'"); - } - arg3 = static_cast< real >(val3); - if (obj3) { - ecode4 = SWIG_AsVal_double(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_DarcyKinematic" "', argument " "4"" of type '" "real""'"); - } - arg4 = static_cast< real >(val4); - } - { - try { - result = (cmf::upslope::connections::DarcyKinematic *)new cmf::upslope::connections::DarcyKinematic(arg1,arg2,arg3,arg4); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__connections__DarcyKinematic, SWIG_POINTER_NEW | 0 ); - - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN int Swig_var_DarcyKinematic_cell_connector_set(PyObject *) { - SWIG_Error(SWIG_AttributeError,"Variable DarcyKinematic_cell_connector is read-only."); - return 1; -} - - -SWIGINTERN PyObject *Swig_var_DarcyKinematic_cell_connector_get(void) { - PyObject *pyobj = 0; - - pyobj = SWIG_NewPointerObj(SWIG_as_voidptr(&cmf::upslope::connections::DarcyKinematic::cell_connector), SWIGTYPE_p_cmf__upslope__CellConnector, 0 ); - return pyobj; -} - - -SWIGINTERN PyObject *_wrap_delete_DarcyKinematic(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::connections::DarcyKinematic *arg1 = (cmf::upslope::connections::DarcyKinematic *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__DarcyKinematic, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DarcyKinematic" "', argument " "1"" of type '" "cmf::upslope::connections::DarcyKinematic *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::connections::DarcyKinematic * >(argp1); - { - try { - - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *DarcyKinematic_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__connections__DarcyKinematic, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *DarcyKinematic_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_Richards_lateral_flow_thickness_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::connections::Richards_lateral *arg1 = (cmf::upslope::connections::Richards_lateral *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"Richards_lateral_flow_thickness_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__Richards_lateral, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Richards_lateral_flow_thickness_set" "', argument " "1"" of type '" "cmf::upslope::connections::Richards_lateral *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::connections::Richards_lateral * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Richards_lateral_flow_thickness_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->flow_thickness = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Richards_lateral_flow_thickness_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::connections::Richards_lateral *arg1 = (cmf::upslope::connections::Richards_lateral *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__Richards_lateral, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Richards_lateral_flow_thickness_get" "', argument " "1"" of type '" "cmf::upslope::connections::Richards_lateral *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::connections::Richards_lateral * >(argp1); - result = (real) ((arg1)->flow_thickness); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Richards_lateral_wet_right_node_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::connections::Richards_lateral *arg1 = (cmf::upslope::connections::Richards_lateral *) 0 ; - bool arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - bool val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"Richards_lateral_wet_right_node_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__Richards_lateral, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Richards_lateral_wet_right_node_set" "', argument " "1"" of type '" "cmf::upslope::connections::Richards_lateral *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::connections::Richards_lateral * >(argp1); - ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Richards_lateral_wet_right_node_set" "', argument " "2"" of type '" "bool""'"); - } - arg2 = static_cast< bool >(val2); - if (arg1) (arg1)->wet_right_node = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Richards_lateral_wet_right_node_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::connections::Richards_lateral *arg1 = (cmf::upslope::connections::Richards_lateral *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - bool result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__Richards_lateral, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Richards_lateral_wet_right_node_get" "', argument " "1"" of type '" "cmf::upslope::connections::Richards_lateral *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::connections::Richards_lateral * >(argp1); - result = (bool) ((arg1)->wet_right_node); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_Richards_lateral(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::SoilLayer::ptr arg1 ; - cmf::water::flux_node::ptr arg2 ; - real arg3 = (real) 0 ; - real arg4 = (real) 0 ; - void *argp1 ; - int res1 = 0 ; - void *argp2 ; - int res2 = 0 ; - double val3 ; - int ecode3 = 0 ; - double val4 ; - int ecode4 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - char * kwnames[] = { - (char *) "left",(char *) "right",(char *) "FlowWidth",(char *) "Distance", NULL - }; - cmf::upslope::connections::Richards_lateral *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OO:new_Richards_lateral",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Richards_lateral" "', argument " "1"" of type '" "cmf::upslope::SoilLayer::ptr""'"); - } - if (argp1) arg1 = *(reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp1)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp1); - } - { - int newmem = 0; - res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Richards_lateral" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); - } - if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); - } - if (obj2) { - ecode3 = SWIG_AsVal_double(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Richards_lateral" "', argument " "3"" of type '" "real""'"); - } - arg3 = static_cast< real >(val3); - } - if (obj3) { - ecode4 = SWIG_AsVal_double(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_Richards_lateral" "', argument " "4"" of type '" "real""'"); - } - arg4 = static_cast< real >(val4); - } - { - try { - result = (cmf::upslope::connections::Richards_lateral *)new cmf::upslope::connections::Richards_lateral(arg1,arg2,arg3,arg4); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__connections__Richards_lateral, SWIG_POINTER_NEW | 0 ); - - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Richards_lateral_usebaseflow(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - bool arg1 ; - bool val1 ; - int ecode1 = 0 ; - PyObject * obj0 = 0 ; - char * kwnames[] = { - (char *) "use", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:Richards_lateral_usebaseflow",kwnames,&obj0)) SWIG_fail; - ecode1 = SWIG_AsVal_bool(obj0, &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "Richards_lateral_usebaseflow" "', argument " "1"" of type '" "bool""'"); - } - arg1 = static_cast< bool >(val1); - { - try { - cmf::upslope::connections::Richards_lateral::usebaseflow(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN int Swig_var_Richards_lateral_cell_connector_set(PyObject *) { - SWIG_Error(SWIG_AttributeError,"Variable Richards_lateral_cell_connector is read-only."); - return 1; -} - - -SWIGINTERN PyObject *Swig_var_Richards_lateral_cell_connector_get(void) { - PyObject *pyobj = 0; - - pyobj = SWIG_NewPointerObj(SWIG_as_voidptr(&cmf::upslope::connections::Richards_lateral::cell_connector), SWIGTYPE_p_cmf__upslope__CellConnector, 0 ); - return pyobj; -} - - -SWIGINTERN PyObject *_wrap_delete_Richards_lateral(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::connections::Richards_lateral *arg1 = (cmf::upslope::connections::Richards_lateral *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__Richards_lateral, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Richards_lateral" "', argument " "1"" of type '" "cmf::upslope::connections::Richards_lateral *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::connections::Richards_lateral * >(argp1); - { - try { - - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *Richards_lateral_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__connections__Richards_lateral, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *Richards_lateral_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_TOPModelFlow_flow_width_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::connections::TOPModelFlow *arg1 = (cmf::upslope::connections::TOPModelFlow *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"TOPModelFlow_flow_width_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__TOPModelFlow, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TOPModelFlow_flow_width_set" "', argument " "1"" of type '" "cmf::upslope::connections::TOPModelFlow *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::connections::TOPModelFlow * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "TOPModelFlow_flow_width_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->flow_width = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_TOPModelFlow_flow_width_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::connections::TOPModelFlow *arg1 = (cmf::upslope::connections::TOPModelFlow *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__TOPModelFlow, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TOPModelFlow_flow_width_get" "', argument " "1"" of type '" "cmf::upslope::connections::TOPModelFlow *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::connections::TOPModelFlow * >(argp1); - result = (real) ((arg1)->flow_width); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_TOPModelFlow_distance_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::connections::TOPModelFlow *arg1 = (cmf::upslope::connections::TOPModelFlow *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"TOPModelFlow_distance_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__TOPModelFlow, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TOPModelFlow_distance_set" "', argument " "1"" of type '" "cmf::upslope::connections::TOPModelFlow *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::connections::TOPModelFlow * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "TOPModelFlow_distance_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->distance = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_TOPModelFlow_distance_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::connections::TOPModelFlow *arg1 = (cmf::upslope::connections::TOPModelFlow *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__TOPModelFlow, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TOPModelFlow_distance_get" "', argument " "1"" of type '" "cmf::upslope::connections::TOPModelFlow *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::connections::TOPModelFlow * >(argp1); - result = (real) ((arg1)->distance); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_TOPModelFlow_T0_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::connections::TOPModelFlow *arg1 = (cmf::upslope::connections::TOPModelFlow *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"TOPModelFlow_T0_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__TOPModelFlow, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TOPModelFlow_T0_set" "', argument " "1"" of type '" "cmf::upslope::connections::TOPModelFlow *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::connections::TOPModelFlow * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "TOPModelFlow_T0_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->T0 = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_TOPModelFlow_T0_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::connections::TOPModelFlow *arg1 = (cmf::upslope::connections::TOPModelFlow *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__TOPModelFlow, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TOPModelFlow_T0_get" "', argument " "1"" of type '" "cmf::upslope::connections::TOPModelFlow *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::connections::TOPModelFlow * >(argp1); - result = (real) ((arg1)->T0); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_TOPModelFlow_m_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::connections::TOPModelFlow *arg1 = (cmf::upslope::connections::TOPModelFlow *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"TOPModelFlow_m_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__TOPModelFlow, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TOPModelFlow_m_set" "', argument " "1"" of type '" "cmf::upslope::connections::TOPModelFlow *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::connections::TOPModelFlow * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "TOPModelFlow_m_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->m = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_TOPModelFlow_m_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::connections::TOPModelFlow *arg1 = (cmf::upslope::connections::TOPModelFlow *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__TOPModelFlow, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TOPModelFlow_m_get" "', argument " "1"" of type '" "cmf::upslope::connections::TOPModelFlow *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::connections::TOPModelFlow * >(argp1); - result = (real) ((arg1)->m); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_TOPModelFlow(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::SoilLayer::ptr arg1 ; - cmf::water::flux_node::ptr arg2 ; - real arg3 ; - real arg4 ; - real arg5 ; - real arg6 = (real) 0 ; - void *argp1 ; - int res1 = 0 ; - void *argp2 ; - int res2 = 0 ; - double val3 ; - int ecode3 = 0 ; - double val4 ; - int ecode4 = 0 ; - double val5 ; - int ecode5 = 0 ; - double val6 ; - int ecode6 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - char * kwnames[] = { - (char *) "left",(char *) "right",(char *) "T0",(char *) "m",(char *) "flowwidth",(char *) "distance", NULL - }; - cmf::upslope::connections::TOPModelFlow *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOO|O:new_TOPModelFlow",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_TOPModelFlow" "', argument " "1"" of type '" "cmf::upslope::SoilLayer::ptr""'"); - } - if (argp1) arg1 = *(reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp1)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp1); - } - { - int newmem = 0; - res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_TOPModelFlow" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); - } - if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); - } - ecode3 = SWIG_AsVal_double(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_TOPModelFlow" "', argument " "3"" of type '" "real""'"); - } - arg3 = static_cast< real >(val3); - ecode4 = SWIG_AsVal_double(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_TOPModelFlow" "', argument " "4"" of type '" "real""'"); - } - arg4 = static_cast< real >(val4); - ecode5 = SWIG_AsVal_double(obj4, &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_TOPModelFlow" "', argument " "5"" of type '" "real""'"); - } - arg5 = static_cast< real >(val5); - if (obj5) { - ecode6 = SWIG_AsVal_double(obj5, &val6); - if (!SWIG_IsOK(ecode6)) { - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_TOPModelFlow" "', argument " "6"" of type '" "real""'"); - } - arg6 = static_cast< real >(val6); - } - { - try { - result = (cmf::upslope::connections::TOPModelFlow *)new cmf::upslope::connections::TOPModelFlow(arg1,arg2,arg3,arg4,arg5,arg6); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__connections__TOPModelFlow, SWIG_POINTER_NEW | 0 ); - - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_TOPModelFlow(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::connections::TOPModelFlow *arg1 = (cmf::upslope::connections::TOPModelFlow *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__TOPModelFlow, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_TOPModelFlow" "', argument " "1"" of type '" "cmf::upslope::connections::TOPModelFlow *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::connections::TOPModelFlow * >(argp1); - { - try { - - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *TOPModelFlow_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__connections__TOPModelFlow, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *TOPModelFlow_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_Manning_is_diffusive_wave_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::river::Manning *arg1 = (cmf::river::Manning *) 0 ; - bool arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - bool val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"Manning_is_diffusive_wave_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__Manning, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Manning_is_diffusive_wave_set" "', argument " "1"" of type '" "cmf::river::Manning *""'"); - } - arg1 = reinterpret_cast< cmf::river::Manning * >(argp1); - ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Manning_is_diffusive_wave_set" "', argument " "2"" of type '" "bool""'"); - } - arg2 = static_cast< bool >(val2); - if (arg1) (arg1)->is_diffusive_wave = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Manning_is_diffusive_wave_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::river::Manning *arg1 = (cmf::river::Manning *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - bool result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__Manning, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Manning_is_diffusive_wave_get" "', argument " "1"" of type '" "cmf::river::Manning *""'"); - } - arg1 = reinterpret_cast< cmf::river::Manning * >(argp1); - result = (bool) ((arg1)->is_diffusive_wave); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Manning_flux_geometry_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::river::Manning *arg1 = (cmf::river::Manning *) 0 ; - cmf::river::volume_height_function *arg2 = (cmf::river::volume_height_function *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"Manning_flux_geometry_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__Manning, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Manning_flux_geometry_set" "', argument " "1"" of type '" "cmf::river::Manning *""'"); - } - arg1 = reinterpret_cast< cmf::river::Manning * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_cmf__river__volume_height_function, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Manning_flux_geometry_set" "', argument " "2"" of type '" "cmf::river::volume_height_function *""'"); - } - arg2 = reinterpret_cast< cmf::river::volume_height_function * >(argp2); - if (arg1) (arg1)->flux_geometry = *arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Manning_flux_geometry_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::river::Manning *arg1 = (cmf::river::Manning *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::river::volume_height_function *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__Manning, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Manning_flux_geometry_get" "', argument " "1"" of type '" "cmf::river::Manning *""'"); - } - arg1 = reinterpret_cast< cmf::river::Manning * >(argp1); - result = (cmf::river::volume_height_function *)& ((arg1)->flux_geometry); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__river__volume_height_function, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_Manning(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::river::Manning *arg1 = (cmf::river::Manning *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__Manning, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Manning" "', argument " "1"" of type '" "cmf::river::Manning *""'"); - } - arg1 = reinterpret_cast< cmf::river::Manning * >(argp1); - { - try { - - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *Manning_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__river__Manning, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN int Swig_var_Manning_Diffusive_cell_connector_set(PyObject *) { - SWIG_Error(SWIG_AttributeError,"Variable Manning_Diffusive_cell_connector is read-only."); - return 1; -} - - -SWIGINTERN PyObject *Swig_var_Manning_Diffusive_cell_connector_get(void) { - PyObject *pyobj = 0; - - pyobj = SWIG_NewPointerObj(SWIG_as_voidptr(&cmf::river::Manning_Diffusive::cell_connector), SWIGTYPE_p_cmf__upslope__CellConnector, 0 ); - return pyobj; -} - - -SWIGINTERN PyObject *_wrap_Manning_Diffusive_linear_slope_width_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::river::Manning_Diffusive *arg1 = (cmf::river::Manning_Diffusive *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"Manning_Diffusive_linear_slope_width_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__Manning_Diffusive, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Manning_Diffusive_linear_slope_width_set" "', argument " "1"" of type '" "cmf::river::Manning_Diffusive *""'"); - } - arg1 = reinterpret_cast< cmf::river::Manning_Diffusive * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Manning_Diffusive_linear_slope_width_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->linear_slope_width = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Manning_Diffusive_linear_slope_width_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::river::Manning_Diffusive *arg1 = (cmf::river::Manning_Diffusive *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__Manning_Diffusive, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Manning_Diffusive_linear_slope_width_get" "', argument " "1"" of type '" "cmf::river::Manning_Diffusive *""'"); - } - arg1 = reinterpret_cast< cmf::river::Manning_Diffusive * >(argp1); - result = (real) ((arg1)->linear_slope_width); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_Manning_Diffusive(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::river::OpenWaterStorage::ptr arg1 ; - cmf::water::flux_node::ptr arg2 ; - cmf::river::IChannel *arg3 = 0 ; - void *argp1 ; - int res1 = 0 ; - void *argp2 ; - int res2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char * kwnames[] = { - (char *) "left",(char *) "right",(char *) "reachtype", NULL - }; - cmf::river::Manning_Diffusive *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:new_Manning_Diffusive",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__river__OpenWaterStorage_t, 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Manning_Diffusive" "', argument " "1"" of type '" "cmf::river::OpenWaterStorage::ptr""'"); - } - if (argp1) arg1 = *(reinterpret_cast< cmf::river::OpenWaterStorage::ptr * >(argp1)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::river::OpenWaterStorage::ptr * >(argp1); - } - { - int newmem = 0; - res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Manning_Diffusive" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); - } - if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); - } - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_cmf__river__IChannel, 0 | 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_Manning_Diffusive" "', argument " "3"" of type '" "cmf::river::IChannel const &""'"); - } - if (!argp3) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Manning_Diffusive" "', argument " "3"" of type '" "cmf::river::IChannel const &""'"); - } - arg3 = reinterpret_cast< cmf::river::IChannel * >(argp3); - { - try { - result = (cmf::river::Manning_Diffusive *)new cmf::river::Manning_Diffusive(arg1,arg2,(cmf::river::IChannel const &)*arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__river__Manning_Diffusive, SWIG_POINTER_NEW | 0 ); - - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_Manning_Diffusive(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::river::Manning_Diffusive *arg1 = (cmf::river::Manning_Diffusive *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__Manning_Diffusive, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Manning_Diffusive" "', argument " "1"" of type '" "cmf::river::Manning_Diffusive *""'"); - } - arg1 = reinterpret_cast< cmf::river::Manning_Diffusive * >(argp1); - { - try { - - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *Manning_Diffusive_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__river__Manning_Diffusive, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *Manning_Diffusive_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN int Swig_var_Manning_Kinematic_cell_connector_set(PyObject *) { - SWIG_Error(SWIG_AttributeError,"Variable Manning_Kinematic_cell_connector is read-only."); - return 1; -} - - -SWIGINTERN PyObject *Swig_var_Manning_Kinematic_cell_connector_get(void) { - PyObject *pyobj = 0; - - pyobj = SWIG_NewPointerObj(SWIG_as_voidptr(&cmf::river::Manning_Kinematic::cell_connector), SWIGTYPE_p_cmf__upslope__CellConnector, 0 ); - return pyobj; -} - - -SWIGINTERN PyObject *_wrap_new_Manning_Kinematic(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::river::OpenWaterStorage::ptr arg1 ; - cmf::water::flux_node::ptr arg2 ; - cmf::river::IChannel *arg3 = 0 ; - void *argp1 ; - int res1 = 0 ; - void *argp2 ; - int res2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char * kwnames[] = { - (char *) "left",(char *) "right",(char *) "reachtype", NULL - }; - cmf::river::Manning_Kinematic *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:new_Manning_Kinematic",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__river__OpenWaterStorage_t, 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Manning_Kinematic" "', argument " "1"" of type '" "cmf::river::OpenWaterStorage::ptr""'"); - } - if (argp1) arg1 = *(reinterpret_cast< cmf::river::OpenWaterStorage::ptr * >(argp1)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::river::OpenWaterStorage::ptr * >(argp1); - } - { - int newmem = 0; - res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Manning_Kinematic" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); - } - if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); - } - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_cmf__river__IChannel, 0 | 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_Manning_Kinematic" "', argument " "3"" of type '" "cmf::river::IChannel const &""'"); - } - if (!argp3) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Manning_Kinematic" "', argument " "3"" of type '" "cmf::river::IChannel const &""'"); - } - arg3 = reinterpret_cast< cmf::river::IChannel * >(argp3); - { - try { - result = (cmf::river::Manning_Kinematic *)new cmf::river::Manning_Kinematic(arg1,arg2,(cmf::river::IChannel const &)*arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__river__Manning_Kinematic, SWIG_POINTER_NEW | 0 ); - - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_Manning_Kinematic(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::river::Manning_Kinematic *arg1 = (cmf::river::Manning_Kinematic *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__Manning_Kinematic, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Manning_Kinematic" "', argument " "1"" of type '" "cmf::river::Manning_Kinematic *""'"); - } - arg1 = reinterpret_cast< cmf::river::Manning_Kinematic * >(argp1); - { - try { - - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *Manning_Kinematic_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__river__Manning_Kinematic, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *Manning_Kinematic_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_new_CanopyOverflow(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::WaterStorage::ptr arg1 ; - cmf::water::flux_node::ptr arg2 ; - cmf::upslope::Cell *arg3 = 0 ; - void *argp1 ; - int res1 = 0 ; - void *argp2 ; - int res2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char * kwnames[] = { - (char *) "Canopy",(char *) "target",(char *) "cell", NULL - }; - cmf::upslope::connections::CanopyOverflow *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:new_CanopyOverflow",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CanopyOverflow" "', argument " "1"" of type '" "cmf::water::WaterStorage::ptr""'"); - } - if (argp1) arg1 = *(reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp1)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp1); - } - { - int newmem = 0; - res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_CanopyOverflow" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); - } - if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); - } - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_cmf__upslope__Cell, 0 ); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_CanopyOverflow" "', argument " "3"" of type '" "cmf::upslope::Cell &""'"); - } - if (!argp3) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CanopyOverflow" "', argument " "3"" of type '" "cmf::upslope::Cell &""'"); - } - arg3 = reinterpret_cast< cmf::upslope::Cell * >(argp3); - { - try { - result = (cmf::upslope::connections::CanopyOverflow *)new cmf::upslope::connections::CanopyOverflow(arg1,arg2,*arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__connections__CanopyOverflow, SWIG_POINTER_NEW | 0 ); - - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_CanopyOverflow_use_for_cell(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::Cell *arg1 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - char * kwnames[] = { - (char *) "cell", NULL - }; - cmf::upslope::connections::CanopyOverflow *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:CanopyOverflow_use_for_cell",kwnames,&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_cmf__upslope__Cell, 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CanopyOverflow_use_for_cell" "', argument " "1"" of type '" "cmf::upslope::Cell &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CanopyOverflow_use_for_cell" "', argument " "1"" of type '" "cmf::upslope::Cell &""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); - { - try { - result = (cmf::upslope::connections::CanopyOverflow *)cmf::upslope::connections::CanopyOverflow::use_for_cell(*arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__connections__CanopyOverflow, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_CanopyOverflow(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::connections::CanopyOverflow *arg1 = (cmf::upslope::connections::CanopyOverflow *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__CanopyOverflow, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CanopyOverflow" "', argument " "1"" of type '" "cmf::upslope::connections::CanopyOverflow *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::connections::CanopyOverflow * >(argp1); - { - try { - - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *CanopyOverflow_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__connections__CanopyOverflow, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *CanopyOverflow_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_new_RutterInterception(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::WaterStorage::ptr arg1 ; - cmf::water::flux_node::ptr arg2 ; - cmf::upslope::Cell *arg3 = 0 ; - void *argp1 ; - int res1 = 0 ; - void *argp2 ; - int res2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char * kwnames[] = { - (char *) "Canopy",(char *) "target",(char *) "cell", NULL - }; - cmf::upslope::connections::RutterInterception *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:new_RutterInterception",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_RutterInterception" "', argument " "1"" of type '" "cmf::water::WaterStorage::ptr""'"); - } - if (argp1) arg1 = *(reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp1)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp1); - } - { - int newmem = 0; - res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_RutterInterception" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); - } - if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); - } - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_cmf__upslope__Cell, 0 ); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_RutterInterception" "', argument " "3"" of type '" "cmf::upslope::Cell &""'"); - } - if (!argp3) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_RutterInterception" "', argument " "3"" of type '" "cmf::upslope::Cell &""'"); - } - arg3 = reinterpret_cast< cmf::upslope::Cell * >(argp3); - { - try { - result = (cmf::upslope::connections::RutterInterception *)new cmf::upslope::connections::RutterInterception(arg1,arg2,*arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__connections__RutterInterception, SWIG_POINTER_NEW | 0 ); - - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_RutterInterception_use_for_cell(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::Cell *arg1 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - char * kwnames[] = { - (char *) "cell", NULL - }; - cmf::upslope::connections::RutterInterception *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:RutterInterception_use_for_cell",kwnames,&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_cmf__upslope__Cell, 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RutterInterception_use_for_cell" "', argument " "1"" of type '" "cmf::upslope::Cell &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "RutterInterception_use_for_cell" "', argument " "1"" of type '" "cmf::upslope::Cell &""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); - { - try { - result = (cmf::upslope::connections::RutterInterception *)cmf::upslope::connections::RutterInterception::use_for_cell(*arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__connections__RutterInterception, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_RutterInterception(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::connections::RutterInterception *arg1 = (cmf::upslope::connections::RutterInterception *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__RutterInterception, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_RutterInterception" "', argument " "1"" of type '" "cmf::upslope::connections::RutterInterception *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::connections::RutterInterception * >(argp1); - { - try { - - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *RutterInterception_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__connections__RutterInterception, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *RutterInterception_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_SimpleTindexSnowMelt_SnowMeltRate_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::connections::SimpleTindexSnowMelt *arg1 = (cmf::upslope::connections::SimpleTindexSnowMelt *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"SimpleTindexSnowMelt_SnowMeltRate_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__SimpleTindexSnowMelt, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimpleTindexSnowMelt_SnowMeltRate_set" "', argument " "1"" of type '" "cmf::upslope::connections::SimpleTindexSnowMelt *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::connections::SimpleTindexSnowMelt * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SimpleTindexSnowMelt_SnowMeltRate_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->SnowMeltRate = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SimpleTindexSnowMelt_SnowMeltRate_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::connections::SimpleTindexSnowMelt *arg1 = (cmf::upslope::connections::SimpleTindexSnowMelt *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__SimpleTindexSnowMelt, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimpleTindexSnowMelt_SnowMeltRate_get" "', argument " "1"" of type '" "cmf::upslope::connections::SimpleTindexSnowMelt *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::connections::SimpleTindexSnowMelt * >(argp1); - result = (real) ((arg1)->SnowMeltRate); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_SimpleTindexSnowMelt(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::WaterStorage::ptr arg1 ; - cmf::water::flux_node::ptr arg2 ; - cmf::upslope::Cell *arg3 = 0 ; - real arg4 = (real) 7.0 ; - void *argp1 ; - int res1 = 0 ; - void *argp2 ; - int res2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - double val4 ; - int ecode4 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - char * kwnames[] = { - (char *) "snow",(char *) "surface_water",(char *) "cell",(char *) "rate", NULL - }; - cmf::upslope::connections::SimpleTindexSnowMelt *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|O:new_SimpleTindexSnowMelt",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SimpleTindexSnowMelt" "', argument " "1"" of type '" "cmf::water::WaterStorage::ptr""'"); - } - if (argp1) arg1 = *(reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp1)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp1); - } - { - int newmem = 0; - res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SimpleTindexSnowMelt" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); - } - if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); - } - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_cmf__upslope__Cell, 0 ); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_SimpleTindexSnowMelt" "', argument " "3"" of type '" "cmf::upslope::Cell &""'"); - } - if (!argp3) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SimpleTindexSnowMelt" "', argument " "3"" of type '" "cmf::upslope::Cell &""'"); - } - arg3 = reinterpret_cast< cmf::upslope::Cell * >(argp3); - if (obj3) { - ecode4 = SWIG_AsVal_double(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_SimpleTindexSnowMelt" "', argument " "4"" of type '" "real""'"); - } - arg4 = static_cast< real >(val4); - } - { - try { - result = (cmf::upslope::connections::SimpleTindexSnowMelt *)new cmf::upslope::connections::SimpleTindexSnowMelt(arg1,arg2,*arg3,arg4); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__connections__SimpleTindexSnowMelt, SWIG_POINTER_NEW | 0 ); - - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SimpleTindexSnowMelt_use_for_cell(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::Cell *arg1 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - char * kwnames[] = { - (char *) "cell", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:SimpleTindexSnowMelt_use_for_cell",kwnames,&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_cmf__upslope__Cell, 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimpleTindexSnowMelt_use_for_cell" "', argument " "1"" of type '" "cmf::upslope::Cell &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SimpleTindexSnowMelt_use_for_cell" "', argument " "1"" of type '" "cmf::upslope::Cell &""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); - { - try { - cmf::upslope::connections::SimpleTindexSnowMelt::use_for_cell(*arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_SimpleTindexSnowMelt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::connections::SimpleTindexSnowMelt *arg1 = (cmf::upslope::connections::SimpleTindexSnowMelt *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__SimpleTindexSnowMelt, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SimpleTindexSnowMelt" "', argument " "1"" of type '" "cmf::upslope::connections::SimpleTindexSnowMelt *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::connections::SimpleTindexSnowMelt * >(argp1); - { - try { - - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *SimpleTindexSnowMelt_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__connections__SimpleTindexSnowMelt, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *SimpleTindexSnowMelt_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_new_EnergyBudgetSnowMelt(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::WaterStorage::ptr arg1 ; - cmf::water::flux_node::ptr arg2 ; - cmf::upslope::Cell *arg3 = 0 ; - void *argp1 ; - int res1 = 0 ; - void *argp2 ; - int res2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char * kwnames[] = { - (char *) "snow",(char *) "surface_water",(char *) "cell", NULL - }; - cmf::upslope::connections::EnergyBudgetSnowMelt *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:new_EnergyBudgetSnowMelt",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_EnergyBudgetSnowMelt" "', argument " "1"" of type '" "cmf::water::WaterStorage::ptr""'"); - } - if (argp1) arg1 = *(reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp1)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp1); - } - { - int newmem = 0; - res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_EnergyBudgetSnowMelt" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); - } - if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); - } - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_cmf__upslope__Cell, 0 ); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_EnergyBudgetSnowMelt" "', argument " "3"" of type '" "cmf::upslope::Cell &""'"); - } - if (!argp3) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EnergyBudgetSnowMelt" "', argument " "3"" of type '" "cmf::upslope::Cell &""'"); - } - arg3 = reinterpret_cast< cmf::upslope::Cell * >(argp3); - { - try { - result = (cmf::upslope::connections::EnergyBudgetSnowMelt *)new cmf::upslope::connections::EnergyBudgetSnowMelt(arg1,arg2,*arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__connections__EnergyBudgetSnowMelt, SWIG_POINTER_NEW | 0 ); - - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_EnergyBudgetSnowMelt_use_for_cell(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::Cell *arg1 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - char * kwnames[] = { - (char *) "cell", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:EnergyBudgetSnowMelt_use_for_cell",kwnames,&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_cmf__upslope__Cell, 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EnergyBudgetSnowMelt_use_for_cell" "', argument " "1"" of type '" "cmf::upslope::Cell &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "EnergyBudgetSnowMelt_use_for_cell" "', argument " "1"" of type '" "cmf::upslope::Cell &""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); - { - try { - cmf::upslope::connections::EnergyBudgetSnowMelt::use_for_cell(*arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_EnergyBudgetSnowMelt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::connections::EnergyBudgetSnowMelt *arg1 = (cmf::upslope::connections::EnergyBudgetSnowMelt *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__EnergyBudgetSnowMelt, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_EnergyBudgetSnowMelt" "', argument " "1"" of type '" "cmf::upslope::connections::EnergyBudgetSnowMelt *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::connections::EnergyBudgetSnowMelt * >(argp1); - { - try { - - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *EnergyBudgetSnowMelt_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__connections__EnergyBudgetSnowMelt, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *EnergyBudgetSnowMelt_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_snowfraction(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - real arg1 ; - double val1 ; - int ecode1 = 0 ; - PyObject * obj0 = 0 ; - char * kwnames[] = { - (char *) "T", NULL - }; - real result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:snowfraction",kwnames,&obj0)) SWIG_fail; - ecode1 = SWIG_AsVal_double(obj0, &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "snowfraction" "', argument " "1"" of type '" "real""'"); - } - arg1 = static_cast< real >(val1); - { - try { - result = (real)cmf::upslope::connections::snowfraction(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Rainfall_Throughfall_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::connections::Rainfall *arg1 = (cmf::upslope::connections::Rainfall *) 0 ; - bool arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - bool val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"Rainfall_Throughfall_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__Rainfall, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Rainfall_Throughfall_set" "', argument " "1"" of type '" "cmf::upslope::connections::Rainfall *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::connections::Rainfall * >(argp1); - ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Rainfall_Throughfall_set" "', argument " "2"" of type '" "bool""'"); - } - arg2 = static_cast< bool >(val2); - if (arg1) (arg1)->Throughfall = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Rainfall_Throughfall_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::connections::Rainfall *arg1 = (cmf::upslope::connections::Rainfall *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - bool result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__Rainfall, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Rainfall_Throughfall_get" "', argument " "1"" of type '" "cmf::upslope::connections::Rainfall *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::connections::Rainfall * >(argp1); - result = (bool) ((arg1)->Throughfall); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Rainfall_InterceptedRainfall_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::connections::Rainfall *arg1 = (cmf::upslope::connections::Rainfall *) 0 ; - bool arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - bool val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"Rainfall_InterceptedRainfall_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__Rainfall, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Rainfall_InterceptedRainfall_set" "', argument " "1"" of type '" "cmf::upslope::connections::Rainfall *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::connections::Rainfall * >(argp1); - ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Rainfall_InterceptedRainfall_set" "', argument " "2"" of type '" "bool""'"); - } - arg2 = static_cast< bool >(val2); - if (arg1) (arg1)->InterceptedRainfall = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Rainfall_InterceptedRainfall_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::connections::Rainfall *arg1 = (cmf::upslope::connections::Rainfall *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - bool result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__Rainfall, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Rainfall_InterceptedRainfall_get" "', argument " "1"" of type '" "cmf::upslope::connections::Rainfall *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::connections::Rainfall * >(argp1); - result = (bool) ((arg1)->InterceptedRainfall); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_Rainfall(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::flux_node::ptr arg1 ; - cmf::upslope::Cell *arg2 = 0 ; - bool arg3 = (bool) true ; - bool arg4 = (bool) true ; - void *argp1 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - bool val3 ; - int ecode3 = 0 ; - bool val4 ; - int ecode4 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - char * kwnames[] = { - (char *) "target",(char *) "cell",(char *) "getthroughfall",(char *) "getintercepted", NULL - }; - cmf::upslope::connections::Rainfall *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OO:new_Rainfall",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Rainfall" "', argument " "1"" of type '" "cmf::water::flux_node::ptr""'"); - } - if (argp1) arg1 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp1)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp1); - } - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_cmf__upslope__Cell, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Rainfall" "', argument " "2"" of type '" "cmf::upslope::Cell &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Rainfall" "', argument " "2"" of type '" "cmf::upslope::Cell &""'"); - } - arg2 = reinterpret_cast< cmf::upslope::Cell * >(argp2); - if (obj2) { - ecode3 = SWIG_AsVal_bool(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Rainfall" "', argument " "3"" of type '" "bool""'"); - } - arg3 = static_cast< bool >(val3); - } - if (obj3) { - ecode4 = SWIG_AsVal_bool(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_Rainfall" "', argument " "4"" of type '" "bool""'"); - } - arg4 = static_cast< bool >(val4); - } - { - try { - result = (cmf::upslope::connections::Rainfall *)new cmf::upslope::connections::Rainfall(arg1,*arg2,arg3,arg4); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__connections__Rainfall, SWIG_POINTER_NEW | 0 ); - - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_Rainfall(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::connections::Rainfall *arg1 = (cmf::upslope::connections::Rainfall *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__Rainfall, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Rainfall" "', argument " "1"" of type '" "cmf::upslope::connections::Rainfall *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::connections::Rainfall * >(argp1); - { - try { - - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *Rainfall_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__connections__Rainfall, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *Rainfall_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_new_Snowfall(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::flux_node::ptr arg1 ; - cmf::upslope::Cell *arg2 = 0 ; - void *argp1 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "target",(char *) "cell", NULL - }; - cmf::upslope::connections::Snowfall *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:new_Snowfall",kwnames,&obj0,&obj1)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Snowfall" "', argument " "1"" of type '" "cmf::water::flux_node::ptr""'"); - } - if (argp1) arg1 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp1)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp1); - } - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_cmf__upslope__Cell, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Snowfall" "', argument " "2"" of type '" "cmf::upslope::Cell &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Snowfall" "', argument " "2"" of type '" "cmf::upslope::Cell &""'"); - } - arg2 = reinterpret_cast< cmf::upslope::Cell * >(argp2); - { - try { - result = (cmf::upslope::connections::Snowfall *)new cmf::upslope::connections::Snowfall(arg1,*arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__connections__Snowfall, SWIG_POINTER_NEW | 0 ); - - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_Snowfall(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::connections::Snowfall *arg1 = (cmf::upslope::connections::Snowfall *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__Snowfall, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Snowfall" "', argument " "1"" of type '" "cmf::upslope::connections::Snowfall *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::connections::Snowfall * >(argp1); - { - try { - - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *Snowfall_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__connections__Snowfall, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *Snowfall_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_new_MatrixInfiltration(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::SoilLayer::ptr arg1 ; - cmf::water::flux_node::ptr arg2 ; - void *argp1 ; - int res1 = 0 ; - void *argp2 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "soilwater",(char *) "surfacewater", NULL - }; - cmf::upslope::connections::MatrixInfiltration *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:new_MatrixInfiltration",kwnames,&obj0,&obj1)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MatrixInfiltration" "', argument " "1"" of type '" "cmf::upslope::SoilLayer::ptr""'"); - } - if (argp1) arg1 = *(reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp1)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp1); - } - { - int newmem = 0; - res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MatrixInfiltration" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); - } - if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); - } - { - try { - result = (cmf::upslope::connections::MatrixInfiltration *)new cmf::upslope::connections::MatrixInfiltration(arg1,arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__connections__MatrixInfiltration, SWIG_POINTER_NEW | 0 ); - - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MatrixInfiltration_use_for_cell(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::Cell *arg1 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - char * kwnames[] = { - (char *) "c", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:MatrixInfiltration_use_for_cell",kwnames,&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_cmf__upslope__Cell, 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MatrixInfiltration_use_for_cell" "', argument " "1"" of type '" "cmf::upslope::Cell &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MatrixInfiltration_use_for_cell" "', argument " "1"" of type '" "cmf::upslope::Cell &""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); - { - try { - cmf::upslope::connections::MatrixInfiltration::use_for_cell(*arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_MatrixInfiltration(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::connections::MatrixInfiltration *arg1 = (cmf::upslope::connections::MatrixInfiltration *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__MatrixInfiltration, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MatrixInfiltration" "', argument " "1"" of type '" "cmf::upslope::connections::MatrixInfiltration *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::connections::MatrixInfiltration * >(argp1); - { - try { - - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *MatrixInfiltration_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__connections__MatrixInfiltration, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *MatrixInfiltration_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_new_GreenAmptInfiltration(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::SoilLayer::ptr arg1 ; - cmf::water::flux_node::ptr arg2 ; - void *argp1 ; - int res1 = 0 ; - void *argp2 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "soilwater",(char *) "surfacewater", NULL - }; - cmf::upslope::connections::GreenAmptInfiltration *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:new_GreenAmptInfiltration",kwnames,&obj0,&obj1)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_GreenAmptInfiltration" "', argument " "1"" of type '" "cmf::upslope::SoilLayer::ptr""'"); - } - if (argp1) arg1 = *(reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp1)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp1); - } - { - int newmem = 0; - res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_GreenAmptInfiltration" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); - } - if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); - } - { - try { - result = (cmf::upslope::connections::GreenAmptInfiltration *)new cmf::upslope::connections::GreenAmptInfiltration(arg1,arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__connections__GreenAmptInfiltration, SWIG_POINTER_NEW | 0 ); - - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_GreenAmptInfiltration_use_for_cell(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::Cell *arg1 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - char * kwnames[] = { - (char *) "c", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:GreenAmptInfiltration_use_for_cell",kwnames,&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_cmf__upslope__Cell, 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GreenAmptInfiltration_use_for_cell" "', argument " "1"" of type '" "cmf::upslope::Cell &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "GreenAmptInfiltration_use_for_cell" "', argument " "1"" of type '" "cmf::upslope::Cell &""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); - { - try { - cmf::upslope::connections::GreenAmptInfiltration::use_for_cell(*arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_GreenAmptInfiltration(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::connections::GreenAmptInfiltration *arg1 = (cmf::upslope::connections::GreenAmptInfiltration *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__GreenAmptInfiltration, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GreenAmptInfiltration" "', argument " "1"" of type '" "cmf::upslope::connections::GreenAmptInfiltration *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::connections::GreenAmptInfiltration * >(argp1); - { - try { - - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *GreenAmptInfiltration_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__connections__GreenAmptInfiltration, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *GreenAmptInfiltration_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_SimpleInfiltration_W0_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::connections::SimpleInfiltration *arg1 = (cmf::upslope::connections::SimpleInfiltration *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"SimpleInfiltration_W0_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__SimpleInfiltration, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimpleInfiltration_W0_set" "', argument " "1"" of type '" "cmf::upslope::connections::SimpleInfiltration *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::connections::SimpleInfiltration * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SimpleInfiltration_W0_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->W0 = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SimpleInfiltration_W0_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::connections::SimpleInfiltration *arg1 = (cmf::upslope::connections::SimpleInfiltration *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__SimpleInfiltration, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimpleInfiltration_W0_get" "', argument " "1"" of type '" "cmf::upslope::connections::SimpleInfiltration *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::connections::SimpleInfiltration * >(argp1); - result = (real) ((arg1)->W0); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_SimpleInfiltration(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::SoilLayer::ptr arg1 ; - cmf::water::flux_node::ptr arg2 ; - real arg3 = (real) 0.9 ; - void *argp1 ; - int res1 = 0 ; - void *argp2 ; - int res2 = 0 ; - double val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char * kwnames[] = { - (char *) "soilwater",(char *) "surfacewater",(char *) "W0", NULL - }; - cmf::upslope::connections::SimpleInfiltration *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:new_SimpleInfiltration",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SimpleInfiltration" "', argument " "1"" of type '" "cmf::upslope::SoilLayer::ptr""'"); - } - if (argp1) arg1 = *(reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp1)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp1); - } - { - int newmem = 0; - res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SimpleInfiltration" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); - } - if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); - } - if (obj2) { - ecode3 = SWIG_AsVal_double(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_SimpleInfiltration" "', argument " "3"" of type '" "real""'"); - } - arg3 = static_cast< real >(val3); - } - { - try { - result = (cmf::upslope::connections::SimpleInfiltration *)new cmf::upslope::connections::SimpleInfiltration(arg1,arg2,arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__connections__SimpleInfiltration, SWIG_POINTER_NEW | 0 ); - - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SimpleInfiltration_use_for_cell(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::Cell *arg1 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - char * kwnames[] = { - (char *) "c", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:SimpleInfiltration_use_for_cell",kwnames,&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_cmf__upslope__Cell, 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimpleInfiltration_use_for_cell" "', argument " "1"" of type '" "cmf::upslope::Cell &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SimpleInfiltration_use_for_cell" "', argument " "1"" of type '" "cmf::upslope::Cell &""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); - { - try { - cmf::upslope::connections::SimpleInfiltration::use_for_cell(*arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_SimpleInfiltration(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::connections::SimpleInfiltration *arg1 = (cmf::upslope::connections::SimpleInfiltration *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__SimpleInfiltration, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SimpleInfiltration" "', argument " "1"" of type '" "cmf::upslope::connections::SimpleInfiltration *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::connections::SimpleInfiltration * >(argp1); - { - try { - - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *SimpleInfiltration_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__connections__SimpleInfiltration, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *SimpleInfiltration_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_SWATPercolation_use_for_cell(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::Cell *arg1 = 0 ; - bool arg2 = (bool) true ; - void *argp1 = 0 ; - int res1 = 0 ; - bool val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "cell",(char *) "no_override", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:SWATPercolation_use_for_cell",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_cmf__upslope__Cell, 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SWATPercolation_use_for_cell" "', argument " "1"" of type '" "cmf::upslope::Cell &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SWATPercolation_use_for_cell" "', argument " "1"" of type '" "cmf::upslope::Cell &""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); - if (obj1) { - ecode2 = SWIG_AsVal_bool(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SWATPercolation_use_for_cell" "', argument " "2"" of type '" "bool""'"); - } - arg2 = static_cast< bool >(val2); - } - { - try { - cmf::upslope::connections::SWATPercolation::use_for_cell(*arg1,arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_SWATPercolation(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::SoilLayer::ptr arg1 ; - cmf::upslope::SoilLayer::ptr arg2 ; - void *argp1 ; - int res1 = 0 ; - void *argp2 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "upperLayer",(char *) "lowerLayer", NULL - }; - cmf::upslope::connections::SWATPercolation *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:new_SWATPercolation",kwnames,&obj0,&obj1)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SWATPercolation" "', argument " "1"" of type '" "cmf::upslope::SoilLayer::ptr""'"); - } - if (argp1) arg1 = *(reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp1)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp1); - } - { - int newmem = 0; - res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 , &newmem); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SWATPercolation" "', argument " "2"" of type '" "cmf::upslope::SoilLayer::ptr""'"); - } - if (argp2) arg2 = *(reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp2)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp2); - } - { - try { - result = (cmf::upslope::connections::SWATPercolation *)new cmf::upslope::connections::SWATPercolation(arg1,arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__connections__SWATPercolation, SWIG_POINTER_NEW | 0 ); - - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_SWATPercolation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::connections::SWATPercolation *arg1 = (cmf::upslope::connections::SWATPercolation *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__SWATPercolation, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SWATPercolation" "', argument " "1"" of type '" "cmf::upslope::connections::SWATPercolation *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::connections::SWATPercolation * >(argp1); - { - try { - - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *SWATPercolation_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__connections__SWATPercolation, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *SWATPercolation_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_new_Richards(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::SoilLayer::ptr arg1 ; - cmf::water::flux_node::ptr arg2 ; - void *argp1 ; - int res1 = 0 ; - void *argp2 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "left",(char *) "right", NULL - }; - cmf::upslope::connections::Richards *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:new_Richards",kwnames,&obj0,&obj1)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Richards" "', argument " "1"" of type '" "cmf::upslope::SoilLayer::ptr""'"); - } - if (argp1) arg1 = *(reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp1)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp1); - } - { - int newmem = 0; - res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Richards" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); - } - if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); - } - { - try { - result = (cmf::upslope::connections::Richards *)new cmf::upslope::connections::Richards(arg1,arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__connections__Richards, SWIG_POINTER_NEW | 0 ); - - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Richards_use_for_cell(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::Cell *arg1 = 0 ; - bool arg2 = (bool) true ; - void *argp1 = 0 ; - int res1 = 0 ; - bool val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "cell",(char *) "no_override", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Richards_use_for_cell",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_cmf__upslope__Cell, 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Richards_use_for_cell" "', argument " "1"" of type '" "cmf::upslope::Cell &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Richards_use_for_cell" "', argument " "1"" of type '" "cmf::upslope::Cell &""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); - if (obj1) { - ecode2 = SWIG_AsVal_bool(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Richards_use_for_cell" "', argument " "2"" of type '" "bool""'"); - } - arg2 = static_cast< bool >(val2); - } - { - try { - cmf::upslope::connections::Richards::use_for_cell(*arg1,arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_Richards(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::connections::Richards *arg1 = (cmf::upslope::connections::Richards *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__Richards, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Richards" "', argument " "1"" of type '" "cmf::upslope::connections::Richards *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::connections::Richards * >(argp1); - { - try { - - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *Richards_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__connections__Richards, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *Richards_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_new_SimplRichards(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::SoilLayer::ptr arg1 ; - cmf::water::flux_node::ptr arg2 ; - void *argp1 ; - int res1 = 0 ; - void *argp2 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "left",(char *) "right", NULL - }; - cmf::upslope::connections::SimplRichards *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:new_SimplRichards",kwnames,&obj0,&obj1)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SimplRichards" "', argument " "1"" of type '" "cmf::upslope::SoilLayer::ptr""'"); - } - if (argp1) arg1 = *(reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp1)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp1); - } - { - int newmem = 0; - res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SimplRichards" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); - } - if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); - } - { - try { - result = (cmf::upslope::connections::SimplRichards *)new cmf::upslope::connections::SimplRichards(arg1,arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__connections__SimplRichards, SWIG_POINTER_NEW | 0 ); - - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SimplRichards_use_for_cell(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::Cell *arg1 = 0 ; - bool arg2 = (bool) true ; - void *argp1 = 0 ; - int res1 = 0 ; - bool val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "cell",(char *) "no_override", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:SimplRichards_use_for_cell",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_cmf__upslope__Cell, 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimplRichards_use_for_cell" "', argument " "1"" of type '" "cmf::upslope::Cell &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SimplRichards_use_for_cell" "', argument " "1"" of type '" "cmf::upslope::Cell &""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); - if (obj1) { - ecode2 = SWIG_AsVal_bool(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SimplRichards_use_for_cell" "', argument " "2"" of type '" "bool""'"); - } - arg2 = static_cast< bool >(val2); - } - { - try { - cmf::upslope::connections::SimplRichards::use_for_cell(*arg1,arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_SimplRichards(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::connections::SimplRichards *arg1 = (cmf::upslope::connections::SimplRichards *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__SimplRichards, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SimplRichards" "', argument " "1"" of type '" "cmf::upslope::connections::SimplRichards *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::connections::SimplRichards * >(argp1); - { - try { - - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *SimplRichards_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__connections__SimplRichards, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *SimplRichards_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_new_FreeDrainagePercolation(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::SoilLayer::ptr arg1 ; - cmf::water::flux_node::ptr arg2 ; - void *argp1 ; - int res1 = 0 ; - void *argp2 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "left",(char *) "right", NULL - }; - cmf::upslope::connections::FreeDrainagePercolation *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:new_FreeDrainagePercolation",kwnames,&obj0,&obj1)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FreeDrainagePercolation" "', argument " "1"" of type '" "cmf::upslope::SoilLayer::ptr""'"); - } - if (argp1) arg1 = *(reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp1)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp1); - } - { - int newmem = 0; - res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FreeDrainagePercolation" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); - } - if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); - } - { - try { - result = (cmf::upslope::connections::FreeDrainagePercolation *)new cmf::upslope::connections::FreeDrainagePercolation(arg1,arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__connections__FreeDrainagePercolation, SWIG_POINTER_NEW | 0 ); - - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_FreeDrainagePercolation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::connections::FreeDrainagePercolation *arg1 = (cmf::upslope::connections::FreeDrainagePercolation *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__FreeDrainagePercolation, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FreeDrainagePercolation" "', argument " "1"" of type '" "cmf::upslope::connections::FreeDrainagePercolation *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::connections::FreeDrainagePercolation * >(argp1); - { - try { - - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *FreeDrainagePercolation_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__connections__FreeDrainagePercolation, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *FreeDrainagePercolation_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_LayerBypass_Kmax_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::connections::LayerBypass *arg1 = (cmf::upslope::connections::LayerBypass *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"LayerBypass_Kmax_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__LayerBypass, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LayerBypass_Kmax_set" "', argument " "1"" of type '" "cmf::upslope::connections::LayerBypass *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::connections::LayerBypass * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LayerBypass_Kmax_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->Kmax = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_LayerBypass_Kmax_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::connections::LayerBypass *arg1 = (cmf::upslope::connections::LayerBypass *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__LayerBypass, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LayerBypass_Kmax_get" "', argument " "1"" of type '" "cmf::upslope::connections::LayerBypass *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::connections::LayerBypass * >(argp1); - result = (real) ((arg1)->Kmax); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_LayerBypass_w0_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::connections::LayerBypass *arg1 = (cmf::upslope::connections::LayerBypass *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"LayerBypass_w0_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__LayerBypass, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LayerBypass_w0_set" "', argument " "1"" of type '" "cmf::upslope::connections::LayerBypass *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::connections::LayerBypass * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LayerBypass_w0_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->w0 = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_LayerBypass_w0_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::connections::LayerBypass *arg1 = (cmf::upslope::connections::LayerBypass *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__LayerBypass, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LayerBypass_w0_get" "', argument " "1"" of type '" "cmf::upslope::connections::LayerBypass *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::connections::LayerBypass * >(argp1); - result = (real) ((arg1)->w0); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_LayerBypass_beta_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::connections::LayerBypass *arg1 = (cmf::upslope::connections::LayerBypass *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"LayerBypass_beta_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__LayerBypass, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LayerBypass_beta_set" "', argument " "1"" of type '" "cmf::upslope::connections::LayerBypass *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::connections::LayerBypass * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LayerBypass_beta_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->beta = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_LayerBypass_beta_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::connections::LayerBypass *arg1 = (cmf::upslope::connections::LayerBypass *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__LayerBypass, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LayerBypass_beta_get" "', argument " "1"" of type '" "cmf::upslope::connections::LayerBypass *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::connections::LayerBypass * >(argp1); - result = (real) ((arg1)->beta); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_LayerBypass_K(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::connections::LayerBypass *arg1 = (cmf::upslope::connections::LayerBypass *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "w", NULL - }; - real result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:LayerBypass_K",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__connections__LayerBypass, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LayerBypass_K" "', argument " "1"" of type '" "cmf::upslope::connections::LayerBypass *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::connections::LayerBypass * >(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LayerBypass_K" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - { - try { - result = (real)(arg1)->K(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_LayerBypass(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::flux_node::ptr arg1 ; - cmf::upslope::SoilLayer::ptr arg2 ; - real arg3 = (real) 100. ; - real arg4 = (real) 0.0 ; - real arg5 = (real) 1.0 ; - void *argp1 ; - int res1 = 0 ; - void *argp2 ; - int res2 = 0 ; - double val3 ; - int ecode3 = 0 ; - double val4 ; - int ecode4 = 0 ; - double val5 ; - int ecode5 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - char * kwnames[] = { - (char *) "left",(char *) "right",(char *) "Kmax",(char *) "w0",(char *) "beta", NULL - }; - cmf::upslope::connections::LayerBypass *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOO:new_LayerBypass",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_LayerBypass" "', argument " "1"" of type '" "cmf::water::flux_node::ptr""'"); - } - if (argp1) arg1 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp1)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp1); - } - { - int newmem = 0; - res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 , &newmem); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_LayerBypass" "', argument " "2"" of type '" "cmf::upslope::SoilLayer::ptr""'"); - } - if (argp2) arg2 = *(reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp2)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp2); - } - if (obj2) { - ecode3 = SWIG_AsVal_double(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_LayerBypass" "', argument " "3"" of type '" "real""'"); - } - arg3 = static_cast< real >(val3); - } - if (obj3) { - ecode4 = SWIG_AsVal_double(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_LayerBypass" "', argument " "4"" of type '" "real""'"); - } - arg4 = static_cast< real >(val4); - } - if (obj4) { - ecode5 = SWIG_AsVal_double(obj4, &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_LayerBypass" "', argument " "5"" of type '" "real""'"); - } - arg5 = static_cast< real >(val5); - } - { - try { - result = (cmf::upslope::connections::LayerBypass *)new cmf::upslope::connections::LayerBypass(arg1,arg2,arg3,arg4,arg5); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__connections__LayerBypass, SWIG_POINTER_NEW | 0 ); - - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_LayerBypass(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::connections::LayerBypass *arg1 = (cmf::upslope::connections::LayerBypass *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__LayerBypass, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_LayerBypass" "', argument " "1"" of type '" "cmf::upslope::connections::LayerBypass *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::connections::LayerBypass * >(argp1); - { - try { - - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *LayerBypass_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__connections__LayerBypass, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *LayerBypass_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_RootUptakeStessFunction_Tact(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::ET::RootUptakeStessFunction *arg1 = (cmf::upslope::ET::RootUptakeStessFunction *) 0 ; - cmf::upslope::ET::stressedET *arg2 = (cmf::upslope::ET::stressedET *) 0 ; - real arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - double val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "connection",(char *) "Tpot", NULL - }; - real result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:RootUptakeStessFunction_Tact",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__ET__RootUptakeStessFunction, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RootUptakeStessFunction_Tact" "', argument " "1"" of type '" "cmf::upslope::ET::RootUptakeStessFunction const *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::RootUptakeStessFunction * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_cmf__upslope__ET__stressedET, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "RootUptakeStessFunction_Tact" "', argument " "2"" of type '" "cmf::upslope::ET::stressedET const *""'"); - } - arg2 = reinterpret_cast< cmf::upslope::ET::stressedET * >(argp2); - ecode3 = SWIG_AsVal_double(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RootUptakeStessFunction_Tact" "', argument " "3"" of type '" "real""'"); - } - arg3 = static_cast< real >(val3); - { - try { - result = (real)((cmf::upslope::ET::RootUptakeStessFunction const *)arg1)->Tact((cmf::upslope::ET::stressedET const *)arg2,arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_RootUptakeStessFunction_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::ET::RootUptakeStessFunction *arg1 = (cmf::upslope::ET::RootUptakeStessFunction *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::upslope::ET::RootUptakeStessFunction *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__RootUptakeStessFunction, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RootUptakeStessFunction_copy" "', argument " "1"" of type '" "cmf::upslope::ET::RootUptakeStessFunction const *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::RootUptakeStessFunction * >(argp1); - { - try { - result = (cmf::upslope::ET::RootUptakeStessFunction *)((cmf::upslope::ET::RootUptakeStessFunction const *)arg1)->copy(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__ET__RootUptakeStessFunction, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_RootUptakeStessFunction_to_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::ET::RootUptakeStessFunction *arg1 = (cmf::upslope::ET::RootUptakeStessFunction *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::string result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__RootUptakeStessFunction, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RootUptakeStessFunction_to_string" "', argument " "1"" of type '" "cmf::upslope::ET::RootUptakeStessFunction const *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::RootUptakeStessFunction * >(argp1); - { - try { - result = ((cmf::upslope::ET::RootUptakeStessFunction const *)arg1)->to_string(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_std_string(static_cast< std::string >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_RootUptakeStessFunction(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::ET::RootUptakeStessFunction *arg1 = (cmf::upslope::ET::RootUptakeStessFunction *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__RootUptakeStessFunction, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_RootUptakeStessFunction" "', argument " "1"" of type '" "cmf::upslope::ET::RootUptakeStessFunction *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::RootUptakeStessFunction * >(argp1); - { - try { - delete arg1; - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *RootUptakeStessFunction_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__ET__RootUptakeStessFunction, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *_wrap_SuctionStress_P0_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::ET::SuctionStress *arg1 = (cmf::upslope::ET::SuctionStress *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"SuctionStress_P0_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__SuctionStress, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SuctionStress_P0_set" "', argument " "1"" of type '" "cmf::upslope::ET::SuctionStress *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::SuctionStress * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SuctionStress_P0_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->P0 = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SuctionStress_P0_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::ET::SuctionStress *arg1 = (cmf::upslope::ET::SuctionStress *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__SuctionStress, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SuctionStress_P0_get" "', argument " "1"" of type '" "cmf::upslope::ET::SuctionStress *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::SuctionStress * >(argp1); - result = (real) ((arg1)->P0); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SuctionStress_P1_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::ET::SuctionStress *arg1 = (cmf::upslope::ET::SuctionStress *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"SuctionStress_P1_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__SuctionStress, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SuctionStress_P1_set" "', argument " "1"" of type '" "cmf::upslope::ET::SuctionStress *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::SuctionStress * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SuctionStress_P1_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->P1 = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SuctionStress_P1_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::ET::SuctionStress *arg1 = (cmf::upslope::ET::SuctionStress *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__SuctionStress, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SuctionStress_P1_get" "', argument " "1"" of type '" "cmf::upslope::ET::SuctionStress *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::SuctionStress * >(argp1); - result = (real) ((arg1)->P1); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SuctionStress_P2_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::ET::SuctionStress *arg1 = (cmf::upslope::ET::SuctionStress *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"SuctionStress_P2_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__SuctionStress, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SuctionStress_P2_set" "', argument " "1"" of type '" "cmf::upslope::ET::SuctionStress *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::SuctionStress * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SuctionStress_P2_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->P2 = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SuctionStress_P2_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::ET::SuctionStress *arg1 = (cmf::upslope::ET::SuctionStress *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__SuctionStress, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SuctionStress_P2_get" "', argument " "1"" of type '" "cmf::upslope::ET::SuctionStress *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::SuctionStress * >(argp1); - result = (real) ((arg1)->P2); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SuctionStress_P3_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::ET::SuctionStress *arg1 = (cmf::upslope::ET::SuctionStress *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"SuctionStress_P3_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__SuctionStress, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SuctionStress_P3_set" "', argument " "1"" of type '" "cmf::upslope::ET::SuctionStress *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::SuctionStress * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SuctionStress_P3_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->P3 = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SuctionStress_P3_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::ET::SuctionStress *arg1 = (cmf::upslope::ET::SuctionStress *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__SuctionStress, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SuctionStress_P3_get" "', argument " "1"" of type '" "cmf::upslope::ET::SuctionStress *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::SuctionStress * >(argp1); - result = (real) ((arg1)->P3); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_SuctionStress__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - real arg1 = (real) 1e308 ; - real arg2 = (real) 1e307 ; - real arg3 = (real) -5 ; - real arg4 = (real) -160 ; - double val1 ; - int ecode1 = 0 ; - double val2 ; - int ecode2 = 0 ; - double val3 ; - int ecode3 = 0 ; - double val4 ; - int ecode4 = 0 ; - cmf::upslope::ET::SuctionStress *result = 0 ; - - if ((nobjs < 0) || (nobjs > 4)) SWIG_fail; - if (swig_obj[0]) { - ecode1 = SWIG_AsVal_double(swig_obj[0], &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_SuctionStress" "', argument " "1"" of type '" "real""'"); - } - arg1 = static_cast< real >(val1); - } - if (swig_obj[1]) { - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_SuctionStress" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - } - if (swig_obj[2]) { - ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_SuctionStress" "', argument " "3"" of type '" "real""'"); - } - arg3 = static_cast< real >(val3); - } - if (swig_obj[3]) { - ecode4 = SWIG_AsVal_double(swig_obj[3], &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_SuctionStress" "', argument " "4"" of type '" "real""'"); - } - arg4 = static_cast< real >(val4); - } - { - try { - result = (cmf::upslope::ET::SuctionStress *)new cmf::upslope::ET::SuctionStress(arg1,arg2,arg3,arg4); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__ET__SuctionStress, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_SuctionStress__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::upslope::ET::SuctionStress *arg1 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - cmf::upslope::ET::SuctionStress *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_cmf__upslope__ET__SuctionStress, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SuctionStress" "', argument " "1"" of type '" "cmf::upslope::ET::SuctionStress const &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SuctionStress" "', argument " "1"" of type '" "cmf::upslope::ET::SuctionStress const &""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::SuctionStress * >(argp1); - { - try { - result = (cmf::upslope::ET::SuctionStress *)new cmf::upslope::ET::SuctionStress((cmf::upslope::ET::SuctionStress const &)*arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__ET__SuctionStress, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_SuctionStress(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[5] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args,"new_SuctionStress",0,4,argv))) SWIG_fail; - --argc; - { - unsigned long _index = 0; - SWIG_TypeRank _rank = 0; - if ((argc >= 0) && (argc <= 4)) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - if (argc > 0) { - { - { - int res = SWIG_AsVal_double(argv[0], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (argc > 1) { - { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (argc > 2) { - { - { - int res = SWIG_AsVal_double(argv[2], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (argc > 3) { - { - { - int res = SWIG_AsVal_double(argv[3], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - } - } - } - } - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 1; - if (_rank == _rankm) goto dispatch; - } - } - check_1: - - if (argc == 1) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_cmf__upslope__ET__SuctionStress, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 2; - if (_rank == _rankm) goto dispatch; - } - } - check_2: - - dispatch: - switch(_index) { - case 1: - return _wrap_new_SuctionStress__SWIG_0(self, argc, argv); - case 2: - return _wrap_new_SuctionStress__SWIG_1(self, argc, argv); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_SuctionStress'.\n" - " Possible C/C++ prototypes are:\n" - " cmf::upslope::ET::SuctionStress::SuctionStress(real,real,real,real)\n" - " cmf::upslope::ET::SuctionStress::SuctionStress(cmf::upslope::ET::SuctionStress const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_SuctionStress_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::ET::SuctionStress *arg1 = (cmf::upslope::ET::SuctionStress *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::upslope::ET::SuctionStress *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__SuctionStress, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SuctionStress_copy" "', argument " "1"" of type '" "cmf::upslope::ET::SuctionStress const *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::SuctionStress * >(argp1); - { - try { - result = (cmf::upslope::ET::SuctionStress *)((cmf::upslope::ET::SuctionStress const *)arg1)->copy(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__ET__SuctionStress, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_SuctionStress(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::ET::SuctionStress *arg1 = (cmf::upslope::ET::SuctionStress *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__SuctionStress, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SuctionStress" "', argument " "1"" of type '" "cmf::upslope::ET::SuctionStress *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::SuctionStress * >(argp1); - { - try { - delete arg1; - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *SuctionStress_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__ET__SuctionStress, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *SuctionStress_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_ContentStress_theta_d_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::ET::ContentStress *arg1 = (cmf::upslope::ET::ContentStress *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"ContentStress_theta_d_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__ContentStress, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContentStress_theta_d_set" "', argument " "1"" of type '" "cmf::upslope::ET::ContentStress *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::ContentStress * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ContentStress_theta_d_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->theta_d = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ContentStress_theta_d_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::ET::ContentStress *arg1 = (cmf::upslope::ET::ContentStress *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__ContentStress, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContentStress_theta_d_get" "', argument " "1"" of type '" "cmf::upslope::ET::ContentStress *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::ContentStress * >(argp1); - result = (real) ((arg1)->theta_d); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ContentStress_theta_w_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::ET::ContentStress *arg1 = (cmf::upslope::ET::ContentStress *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"ContentStress_theta_w_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__ContentStress, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContentStress_theta_w_set" "', argument " "1"" of type '" "cmf::upslope::ET::ContentStress *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::ContentStress * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ContentStress_theta_w_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->theta_w = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ContentStress_theta_w_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::ET::ContentStress *arg1 = (cmf::upslope::ET::ContentStress *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__ContentStress, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContentStress_theta_w_get" "', argument " "1"" of type '" "cmf::upslope::ET::ContentStress *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::ContentStress * >(argp1); - result = (real) ((arg1)->theta_w); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ContentStress_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::ET::ContentStress *arg1 = (cmf::upslope::ET::ContentStress *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::upslope::ET::ContentStress *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__ContentStress, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContentStress_copy" "', argument " "1"" of type '" "cmf::upslope::ET::ContentStress const *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::ContentStress * >(argp1); - { - try { - result = (cmf::upslope::ET::ContentStress *)((cmf::upslope::ET::ContentStress const *)arg1)->copy(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__ET__ContentStress, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_ContentStress(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - real arg1 = (real) -1 ; - real arg2 = (real) -1 ; - double val1 ; - int ecode1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "theta_d",(char *) "theta_w", NULL - }; - cmf::upslope::ET::ContentStress *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|OO:new_ContentStress",kwnames,&obj0,&obj1)) SWIG_fail; - if (obj0) { - ecode1 = SWIG_AsVal_double(obj0, &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ContentStress" "', argument " "1"" of type '" "real""'"); - } - arg1 = static_cast< real >(val1); - } - if (obj1) { - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_ContentStress" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - } - { - try { - result = (cmf::upslope::ET::ContentStress *)new cmf::upslope::ET::ContentStress(arg1,arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__ET__ContentStress, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_ContentStress(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::ET::ContentStress *arg1 = (cmf::upslope::ET::ContentStress *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__ContentStress, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ContentStress" "', argument " "1"" of type '" "cmf::upslope::ET::ContentStress *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::ContentStress * >(argp1); - { - try { - delete arg1; - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *ContentStress_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__ET__ContentStress, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *ContentStress_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_VolumeStress_V1_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::ET::VolumeStress *arg1 = (cmf::upslope::ET::VolumeStress *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"VolumeStress_V1_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__VolumeStress, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VolumeStress_V1_set" "', argument " "1"" of type '" "cmf::upslope::ET::VolumeStress *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::VolumeStress * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VolumeStress_V1_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->V1 = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_VolumeStress_V1_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::ET::VolumeStress *arg1 = (cmf::upslope::ET::VolumeStress *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__VolumeStress, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VolumeStress_V1_get" "', argument " "1"" of type '" "cmf::upslope::ET::VolumeStress *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::VolumeStress * >(argp1); - result = (real) ((arg1)->V1); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_VolumeStress_V0_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::ET::VolumeStress *arg1 = (cmf::upslope::ET::VolumeStress *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"VolumeStress_V0_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__VolumeStress, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VolumeStress_V0_set" "', argument " "1"" of type '" "cmf::upslope::ET::VolumeStress *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::VolumeStress * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VolumeStress_V0_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->V0 = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_VolumeStress_V0_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::ET::VolumeStress *arg1 = (cmf::upslope::ET::VolumeStress *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__VolumeStress, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VolumeStress_V0_get" "', argument " "1"" of type '" "cmf::upslope::ET::VolumeStress *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::VolumeStress * >(argp1); - result = (real) ((arg1)->V0); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_VolumeStress__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - real arg1 ; - real arg2 ; - double val1 ; - int ecode1 = 0 ; - double val2 ; - int ecode2 = 0 ; - cmf::upslope::ET::VolumeStress *result = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - ecode1 = SWIG_AsVal_double(swig_obj[0], &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_VolumeStress" "', argument " "1"" of type '" "real""'"); - } - arg1 = static_cast< real >(val1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_VolumeStress" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - { - try { - result = (cmf::upslope::ET::VolumeStress *)new cmf::upslope::ET::VolumeStress(arg1,arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__ET__VolumeStress, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_VolumeStress__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::upslope::ET::VolumeStress *arg1 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - cmf::upslope::ET::VolumeStress *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_cmf__upslope__ET__VolumeStress, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_VolumeStress" "', argument " "1"" of type '" "cmf::upslope::ET::VolumeStress const &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_VolumeStress" "', argument " "1"" of type '" "cmf::upslope::ET::VolumeStress const &""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::VolumeStress * >(argp1); - { - try { - result = (cmf::upslope::ET::VolumeStress *)new cmf::upslope::ET::VolumeStress((cmf::upslope::ET::VolumeStress const &)*arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__ET__VolumeStress, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_VolumeStress(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args,"new_VolumeStress",0,2,argv))) SWIG_fail; - --argc; - { - unsigned long _index = 0; - SWIG_TypeRank _rank = 0; - if (argc == 1) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_cmf__upslope__ET__VolumeStress, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 1; - if (_rank == _rankm) goto dispatch; - } - } - check_1: - - if (argc == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - { - int res = SWIG_AsVal_double(argv[0], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 2; - if (_rank == _rankm) goto dispatch; - } - } - check_2: - - dispatch: - switch(_index) { - case 1: - return _wrap_new_VolumeStress__SWIG_1(self, argc, argv); - case 2: - return _wrap_new_VolumeStress__SWIG_0(self, argc, argv); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_VolumeStress'.\n" - " Possible C/C++ prototypes are:\n" - " cmf::upslope::ET::VolumeStress::VolumeStress(real,real)\n" - " cmf::upslope::ET::VolumeStress::VolumeStress(cmf::upslope::ET::VolumeStress const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_VolumeStress_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::ET::VolumeStress *arg1 = (cmf::upslope::ET::VolumeStress *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::upslope::ET::VolumeStress *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__VolumeStress, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VolumeStress_copy" "', argument " "1"" of type '" "cmf::upslope::ET::VolumeStress const *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::VolumeStress * >(argp1); - { - try { - result = (cmf::upslope::ET::VolumeStress *)((cmf::upslope::ET::VolumeStress const *)arg1)->copy(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__ET__VolumeStress, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_VolumeStress(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::ET::VolumeStress *arg1 = (cmf::upslope::ET::VolumeStress *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__VolumeStress, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_VolumeStress" "', argument " "1"" of type '" "cmf::upslope::ET::VolumeStress *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::VolumeStress * >(argp1); - { - try { - delete arg1; - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *VolumeStress_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__ET__VolumeStress, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *VolumeStress_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_new_log_wind_profile(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::Cell *arg1 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - char * kwnames[] = { - (char *) "_cell", NULL - }; - cmf::atmosphere::log_wind_profile *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:new_log_wind_profile",kwnames,&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_cmf__upslope__Cell, 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_log_wind_profile" "', argument " "1"" of type '" "cmf::upslope::Cell &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_log_wind_profile" "', argument " "1"" of type '" "cmf::upslope::Cell &""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); - { - try { - result = (cmf::atmosphere::log_wind_profile *)new cmf::atmosphere::log_wind_profile(*arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__atmosphere__log_wind_profile, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_log_wind_profile(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::atmosphere::log_wind_profile *arg1 = (cmf::atmosphere::log_wind_profile *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__atmosphere__log_wind_profile, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_log_wind_profile" "', argument " "1"" of type '" "cmf::atmosphere::log_wind_profile *""'"); - } - arg1 = reinterpret_cast< cmf::atmosphere::log_wind_profile * >(argp1); - { - try { - delete arg1; - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *log_wind_profile_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__atmosphere__log_wind_profile, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *log_wind_profile_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_transpiration_method_transp_from_layer(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::ET::transpiration_method *arg1 = (cmf::upslope::ET::transpiration_method *) 0 ; - cmf::upslope::SoilLayer::ptr arg2 ; - cmf::math::Time arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "arg2",(char *) "t", NULL - }; - double result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:transpiration_method_transp_from_layer",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__ET__transpiration_method, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "transpiration_method_transp_from_layer" "', argument " "1"" of type '" "cmf::upslope::ET::transpiration_method *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::transpiration_method * >(argp1); - { - int newmem = 0; - res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 , &newmem); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "transpiration_method_transp_from_layer" "', argument " "2"" of type '" "cmf::upslope::SoilLayer::ptr""'"); - } - if (argp2) arg2 = *(reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp2)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp2); - } - { - arg3 = convert_datetime_to_cmftime(obj2); - if (arg3 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } - } - { - try { - result = (double)(arg1)->transp_from_layer(arg2,arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_transpiration_method(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::ET::transpiration_method *arg1 = (cmf::upslope::ET::transpiration_method *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__transpiration_method, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_transpiration_method" "', argument " "1"" of type '" "cmf::upslope::ET::transpiration_method *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::transpiration_method * >(argp1); - { - try { - delete arg1; - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *transpiration_method_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__ET__transpiration_method, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *_wrap_soil_evaporation_method_evap_from_layer(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::ET::soil_evaporation_method *arg1 = (cmf::upslope::ET::soil_evaporation_method *) 0 ; - cmf::upslope::SoilLayer::ptr arg2 ; - cmf::math::Time arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "arg2",(char *) "t", NULL - }; - double result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:soil_evaporation_method_evap_from_layer",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__ET__soil_evaporation_method, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "soil_evaporation_method_evap_from_layer" "', argument " "1"" of type '" "cmf::upslope::ET::soil_evaporation_method *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::soil_evaporation_method * >(argp1); - { - int newmem = 0; - res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 , &newmem); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "soil_evaporation_method_evap_from_layer" "', argument " "2"" of type '" "cmf::upslope::SoilLayer::ptr""'"); - } - if (argp2) arg2 = *(reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp2)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp2); - } - { - arg3 = convert_datetime_to_cmftime(obj2); - if (arg3 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } - } - { - try { - result = (double)(arg1)->evap_from_layer(arg2,arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_soil_evaporation_method(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::ET::soil_evaporation_method *arg1 = (cmf::upslope::ET::soil_evaporation_method *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__soil_evaporation_method, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_soil_evaporation_method" "', argument " "1"" of type '" "cmf::upslope::ET::soil_evaporation_method *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::soil_evaporation_method * >(argp1); - { - try { - delete arg1; - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *soil_evaporation_method_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__ET__soil_evaporation_method, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *_wrap_surface_water_evaporation_method_evap_from_openwater(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::ET::surface_water_evaporation_method *arg1 = (cmf::upslope::ET::surface_water_evaporation_method *) 0 ; - cmf::river::OpenWaterStorage::ptr arg2 ; - cmf::math::Time arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "arg2",(char *) "arg3", NULL - }; - double result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:surface_water_evaporation_method_evap_from_openwater",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__ET__surface_water_evaporation_method, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "surface_water_evaporation_method_evap_from_openwater" "', argument " "1"" of type '" "cmf::upslope::ET::surface_water_evaporation_method *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::surface_water_evaporation_method * >(argp1); - { - int newmem = 0; - res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__river__OpenWaterStorage_t, 0 , &newmem); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "surface_water_evaporation_method_evap_from_openwater" "', argument " "2"" of type '" "cmf::river::OpenWaterStorage::ptr""'"); - } - if (argp2) arg2 = *(reinterpret_cast< cmf::river::OpenWaterStorage::ptr * >(argp2)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::river::OpenWaterStorage::ptr * >(argp2); - } - { - arg3 = convert_datetime_to_cmftime(obj2); - if (arg3 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } - } - { - try { - result = (double)(arg1)->evap_from_openwater(arg2,arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_surface_water_evaporation_method(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::ET::surface_water_evaporation_method *arg1 = (cmf::upslope::ET::surface_water_evaporation_method *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__surface_water_evaporation_method, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_surface_water_evaporation_method" "', argument " "1"" of type '" "cmf::upslope::ET::surface_water_evaporation_method *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::surface_water_evaporation_method * >(argp1); - { - try { - delete arg1; - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *surface_water_evaporation_method_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__ET__surface_water_evaporation_method, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *_wrap_canopy_evaporation_method_evap_from_canopy(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::ET::canopy_evaporation_method *arg1 = (cmf::upslope::ET::canopy_evaporation_method *) 0 ; - cmf::water::WaterStorage::ptr arg2 ; - cmf::math::Time arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "arg2",(char *) "arg3", NULL - }; - double result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:canopy_evaporation_method_evap_from_canopy",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__ET__canopy_evaporation_method, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "canopy_evaporation_method_evap_from_canopy" "', argument " "1"" of type '" "cmf::upslope::ET::canopy_evaporation_method *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::canopy_evaporation_method * >(argp1); - { - int newmem = 0; - res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0 , &newmem); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "canopy_evaporation_method_evap_from_canopy" "', argument " "2"" of type '" "cmf::water::WaterStorage::ptr""'"); - } - if (argp2) arg2 = *(reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp2)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp2); - } - { - arg3 = convert_datetime_to_cmftime(obj2); - if (arg3 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } - } - { - try { - result = (double)(arg1)->evap_from_canopy(arg2,arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_canopy_evaporation_method(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::ET::canopy_evaporation_method *arg1 = (cmf::upslope::ET::canopy_evaporation_method *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__canopy_evaporation_method, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_canopy_evaporation_method" "', argument " "1"" of type '" "cmf::upslope::ET::canopy_evaporation_method *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::canopy_evaporation_method * >(argp1); - { - try { - delete arg1; - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *canopy_evaporation_method_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__ET__canopy_evaporation_method, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *_wrap_snow_evaporation_method_evap_from_snow(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::ET::snow_evaporation_method *arg1 = (cmf::upslope::ET::snow_evaporation_method *) 0 ; - cmf::water::WaterStorage::ptr arg2 ; - cmf::math::Time arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "snow",(char *) "t", NULL - }; - double result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:snow_evaporation_method_evap_from_snow",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__ET__snow_evaporation_method, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "snow_evaporation_method_evap_from_snow" "', argument " "1"" of type '" "cmf::upslope::ET::snow_evaporation_method *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::snow_evaporation_method * >(argp1); - { - int newmem = 0; - res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0 , &newmem); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "snow_evaporation_method_evap_from_snow" "', argument " "2"" of type '" "cmf::water::WaterStorage::ptr""'"); - } - if (argp2) arg2 = *(reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp2)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp2); - } - { - arg3 = convert_datetime_to_cmftime(obj2); - if (arg3 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } - } - { - try { - result = (double)(arg1)->evap_from_snow(arg2,arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_snow_evaporation_method(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::ET::snow_evaporation_method *arg1 = (cmf::upslope::ET::snow_evaporation_method *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__snow_evaporation_method, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_snow_evaporation_method" "', argument " "1"" of type '" "cmf::upslope::ET::snow_evaporation_method *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::snow_evaporation_method * >(argp1); - { - try { - delete arg1; - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *snow_evaporation_method_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__ET__snow_evaporation_method, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *_wrap_new_transpiration(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::SoilLayer::ptr arg1 ; - cmf::water::flux_node::ptr arg2 ; - SwigValueWrapper< std::shared_ptr< cmf::upslope::ET::transpiration_method > > arg3 ; - std::string arg4 ; - void *argp1 ; - int res1 = 0 ; - void *argp2 ; - int res2 = 0 ; - void *argp3 ; - int res3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - char * kwnames[] = { - (char *) "source",(char *) "ET_target",(char *) "_method",(char *) "method_name", NULL - }; - cmf::upslope::ET::transpiration *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO:new_transpiration",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_transpiration" "', argument " "1"" of type '" "cmf::upslope::SoilLayer::ptr""'"); - } - if (argp1) arg1 = *(reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp1)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp1); - } - { - int newmem = 0; - res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_transpiration" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); - } - if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); - } - { - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__ET__transpiration_method_t, 0 | 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_transpiration" "', argument " "3"" of type '" "std::shared_ptr< cmf::upslope::ET::transpiration_method >""'"); - } - if (!argp3) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_transpiration" "', argument " "3"" of type '" "std::shared_ptr< cmf::upslope::ET::transpiration_method >""'"); - } else { - std::shared_ptr< cmf::upslope::ET::transpiration_method > * temp = reinterpret_cast< std::shared_ptr< cmf::upslope::ET::transpiration_method > * >(argp3); - arg3 = *temp; - if (SWIG_IsNewObj(res3)) delete temp; - } - } - { - std::string *ptr = (std::string *)0; - int res = SWIG_AsPtr_std_string(obj3, &ptr); - if (!SWIG_IsOK(res) || !ptr) { - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "new_transpiration" "', argument " "4"" of type '" "std::string""'"); - } - arg4 = *ptr; - if (SWIG_IsNewObj(res)) delete ptr; - } - { - try { - result = (cmf::upslope::ET::transpiration *)new cmf::upslope::ET::transpiration(arg1,arg2,arg3,arg4); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__ET__transpiration, SWIG_POINTER_NEW | 0 ); - - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_transpiration(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::ET::transpiration *arg1 = (cmf::upslope::ET::transpiration *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__transpiration, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_transpiration" "', argument " "1"" of type '" "cmf::upslope::ET::transpiration *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::transpiration * >(argp1); - { - try { - - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *transpiration_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__ET__transpiration, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *transpiration_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_new_soil_evaporation(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::SoilLayer::ptr arg1 ; - cmf::water::flux_node::ptr arg2 ; - SwigValueWrapper< std::shared_ptr< cmf::upslope::ET::soil_evaporation_method > > arg3 ; - std::string arg4 ; - void *argp1 ; - int res1 = 0 ; - void *argp2 ; - int res2 = 0 ; - void *argp3 ; - int res3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - char * kwnames[] = { - (char *) "source",(char *) "ET_target",(char *) "_method",(char *) "method_name", NULL - }; - cmf::upslope::ET::soil_evaporation *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO:new_soil_evaporation",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_soil_evaporation" "', argument " "1"" of type '" "cmf::upslope::SoilLayer::ptr""'"); - } - if (argp1) arg1 = *(reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp1)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp1); - } - { - int newmem = 0; - res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_soil_evaporation" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); - } - if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); - } - { - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__ET__soil_evaporation_method_t, 0 | 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_soil_evaporation" "', argument " "3"" of type '" "std::shared_ptr< cmf::upslope::ET::soil_evaporation_method >""'"); - } - if (!argp3) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_soil_evaporation" "', argument " "3"" of type '" "std::shared_ptr< cmf::upslope::ET::soil_evaporation_method >""'"); - } else { - std::shared_ptr< cmf::upslope::ET::soil_evaporation_method > * temp = reinterpret_cast< std::shared_ptr< cmf::upslope::ET::soil_evaporation_method > * >(argp3); - arg3 = *temp; - if (SWIG_IsNewObj(res3)) delete temp; - } - } - { - std::string *ptr = (std::string *)0; - int res = SWIG_AsPtr_std_string(obj3, &ptr); - if (!SWIG_IsOK(res) || !ptr) { - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "new_soil_evaporation" "', argument " "4"" of type '" "std::string""'"); - } - arg4 = *ptr; - if (SWIG_IsNewObj(res)) delete ptr; - } - { - try { - result = (cmf::upslope::ET::soil_evaporation *)new cmf::upslope::ET::soil_evaporation(arg1,arg2,arg3,arg4); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__ET__soil_evaporation, SWIG_POINTER_NEW | 0 ); - - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_soil_evaporation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::ET::soil_evaporation *arg1 = (cmf::upslope::ET::soil_evaporation *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__soil_evaporation, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_soil_evaporation" "', argument " "1"" of type '" "cmf::upslope::ET::soil_evaporation *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::soil_evaporation * >(argp1); - { - try { - - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *soil_evaporation_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__ET__soil_evaporation, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *soil_evaporation_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_new_canopy_evaporation(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::WaterStorage::ptr arg1 ; - cmf::water::flux_node::ptr arg2 ; - SwigValueWrapper< std::shared_ptr< cmf::upslope::ET::canopy_evaporation_method > > arg3 ; - std::string arg4 ; - void *argp1 ; - int res1 = 0 ; - void *argp2 ; - int res2 = 0 ; - void *argp3 ; - int res3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - char * kwnames[] = { - (char *) "source",(char *) "ET_target",(char *) "_method",(char *) "method_name", NULL - }; - cmf::upslope::ET::canopy_evaporation *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO:new_canopy_evaporation",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_canopy_evaporation" "', argument " "1"" of type '" "cmf::water::WaterStorage::ptr""'"); - } - if (argp1) arg1 = *(reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp1)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp1); - } - { - int newmem = 0; - res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_canopy_evaporation" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); - } - if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); - } - { - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__ET__canopy_evaporation_method_t, 0 | 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_canopy_evaporation" "', argument " "3"" of type '" "std::shared_ptr< cmf::upslope::ET::canopy_evaporation_method >""'"); - } - if (!argp3) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_canopy_evaporation" "', argument " "3"" of type '" "std::shared_ptr< cmf::upslope::ET::canopy_evaporation_method >""'"); - } else { - std::shared_ptr< cmf::upslope::ET::canopy_evaporation_method > * temp = reinterpret_cast< std::shared_ptr< cmf::upslope::ET::canopy_evaporation_method > * >(argp3); - arg3 = *temp; - if (SWIG_IsNewObj(res3)) delete temp; - } - } - { - std::string *ptr = (std::string *)0; - int res = SWIG_AsPtr_std_string(obj3, &ptr); - if (!SWIG_IsOK(res) || !ptr) { - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "new_canopy_evaporation" "', argument " "4"" of type '" "std::string""'"); - } - arg4 = *ptr; - if (SWIG_IsNewObj(res)) delete ptr; - } - { - try { - result = (cmf::upslope::ET::canopy_evaporation *)new cmf::upslope::ET::canopy_evaporation(arg1,arg2,arg3,arg4); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__ET__canopy_evaporation, SWIG_POINTER_NEW | 0 ); - - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_canopy_evaporation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::ET::canopy_evaporation *arg1 = (cmf::upslope::ET::canopy_evaporation *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__canopy_evaporation, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_canopy_evaporation" "', argument " "1"" of type '" "cmf::upslope::ET::canopy_evaporation *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::canopy_evaporation * >(argp1); - { - try { - - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *canopy_evaporation_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__ET__canopy_evaporation, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *canopy_evaporation_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_new_snow_evaporation(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::WaterStorage::ptr arg1 ; - cmf::water::flux_node::ptr arg2 ; - SwigValueWrapper< std::shared_ptr< cmf::upslope::ET::snow_evaporation_method > > arg3 ; - std::string arg4 ; - void *argp1 ; - int res1 = 0 ; - void *argp2 ; - int res2 = 0 ; - void *argp3 ; - int res3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - char * kwnames[] = { - (char *) "source",(char *) "ET_target",(char *) "_method",(char *) "method_name", NULL - }; - cmf::upslope::ET::snow_evaporation *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO:new_snow_evaporation",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_snow_evaporation" "', argument " "1"" of type '" "cmf::water::WaterStorage::ptr""'"); - } - if (argp1) arg1 = *(reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp1)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp1); - } - { - int newmem = 0; - res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_snow_evaporation" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); - } - if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); - } - { - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__ET__snow_evaporation_method_t, 0 | 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_snow_evaporation" "', argument " "3"" of type '" "std::shared_ptr< cmf::upslope::ET::snow_evaporation_method >""'"); - } - if (!argp3) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_snow_evaporation" "', argument " "3"" of type '" "std::shared_ptr< cmf::upslope::ET::snow_evaporation_method >""'"); - } else { - std::shared_ptr< cmf::upslope::ET::snow_evaporation_method > * temp = reinterpret_cast< std::shared_ptr< cmf::upslope::ET::snow_evaporation_method > * >(argp3); - arg3 = *temp; - if (SWIG_IsNewObj(res3)) delete temp; - } - } - { - std::string *ptr = (std::string *)0; - int res = SWIG_AsPtr_std_string(obj3, &ptr); - if (!SWIG_IsOK(res) || !ptr) { - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "new_snow_evaporation" "', argument " "4"" of type '" "std::string""'"); - } - arg4 = *ptr; - if (SWIG_IsNewObj(res)) delete ptr; - } - { - try { - result = (cmf::upslope::ET::snow_evaporation *)new cmf::upslope::ET::snow_evaporation(arg1,arg2,arg3,arg4); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__ET__snow_evaporation, SWIG_POINTER_NEW | 0 ); - - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_snow_evaporation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::ET::snow_evaporation *arg1 = (cmf::upslope::ET::snow_evaporation *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__snow_evaporation, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_snow_evaporation" "', argument " "1"" of type '" "cmf::upslope::ET::snow_evaporation *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::snow_evaporation * >(argp1); - { - try { - - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *snow_evaporation_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__ET__snow_evaporation, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *snow_evaporation_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_new_surface_water_evaporation(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::river::OpenWaterStorage::ptr arg1 ; - cmf::water::flux_node::ptr arg2 ; - SwigValueWrapper< std::shared_ptr< cmf::upslope::ET::surface_water_evaporation_method > > arg3 ; - std::string arg4 ; - void *argp1 ; - int res1 = 0 ; - void *argp2 ; - int res2 = 0 ; - void *argp3 ; - int res3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - char * kwnames[] = { - (char *) "source",(char *) "ET_target",(char *) "_method",(char *) "method_name", NULL - }; - cmf::upslope::ET::surface_water_evaporation *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO:new_surface_water_evaporation",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__river__OpenWaterStorage_t, 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_surface_water_evaporation" "', argument " "1"" of type '" "cmf::river::OpenWaterStorage::ptr""'"); - } - if (argp1) arg1 = *(reinterpret_cast< cmf::river::OpenWaterStorage::ptr * >(argp1)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::river::OpenWaterStorage::ptr * >(argp1); - } - { - int newmem = 0; - res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_surface_water_evaporation" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); - } - if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); - } - { - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__ET__surface_water_evaporation_method_t, 0 | 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_surface_water_evaporation" "', argument " "3"" of type '" "std::shared_ptr< cmf::upslope::ET::surface_water_evaporation_method >""'"); - } - if (!argp3) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_surface_water_evaporation" "', argument " "3"" of type '" "std::shared_ptr< cmf::upslope::ET::surface_water_evaporation_method >""'"); - } else { - std::shared_ptr< cmf::upslope::ET::surface_water_evaporation_method > * temp = reinterpret_cast< std::shared_ptr< cmf::upslope::ET::surface_water_evaporation_method > * >(argp3); - arg3 = *temp; - if (SWIG_IsNewObj(res3)) delete temp; - } - } - { - std::string *ptr = (std::string *)0; - int res = SWIG_AsPtr_std_string(obj3, &ptr); - if (!SWIG_IsOK(res) || !ptr) { - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "new_surface_water_evaporation" "', argument " "4"" of type '" "std::string""'"); - } - arg4 = *ptr; - if (SWIG_IsNewObj(res)) delete ptr; - } - { - try { - result = (cmf::upslope::ET::surface_water_evaporation *)new cmf::upslope::ET::surface_water_evaporation(arg1,arg2,arg3,arg4); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__ET__surface_water_evaporation, SWIG_POINTER_NEW | 0 ); - - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_surface_water_evaporation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::ET::surface_water_evaporation *arg1 = (cmf::upslope::ET::surface_water_evaporation *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__surface_water_evaporation, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_surface_water_evaporation" "', argument " "1"" of type '" "cmf::upslope::ET::surface_water_evaporation *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::surface_water_evaporation * >(argp1); - { - try { - - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *surface_water_evaporation_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__ET__surface_water_evaporation, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *surface_water_evaporation_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_PenmanMonteith__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - real arg1 ; - real arg2 ; - real arg3 ; - real arg4 ; - real arg5 ; - double val1 ; - int ecode1 = 0 ; - double val2 ; - int ecode2 = 0 ; - double val3 ; - int ecode3 = 0 ; - double val4 ; - int ecode4 = 0 ; - double val5 ; - int ecode5 = 0 ; - real result; - - if ((nobjs < 5) || (nobjs > 5)) SWIG_fail; - ecode1 = SWIG_AsVal_double(swig_obj[0], &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "PenmanMonteith" "', argument " "1"" of type '" "real""'"); - } - arg1 = static_cast< real >(val1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "PenmanMonteith" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "PenmanMonteith" "', argument " "3"" of type '" "real""'"); - } - arg3 = static_cast< real >(val3); - ecode4 = SWIG_AsVal_double(swig_obj[3], &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "PenmanMonteith" "', argument " "4"" of type '" "real""'"); - } - arg4 = static_cast< real >(val4); - ecode5 = SWIG_AsVal_double(swig_obj[4], &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "PenmanMonteith" "', argument " "5"" of type '" "real""'"); - } - arg5 = static_cast< real >(val5); - { - try { - result = (real)cmf::upslope::ET::PenmanMonteith(arg1,arg2,arg3,arg4,arg5); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_PenmanMonteith__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::atmosphere::Weather arg1 ; - cmf::upslope::vegetation::Vegetation *arg2 = 0 ; - double arg3 ; - void *argp1 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - double val3 ; - int ecode3 = 0 ; - real result; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - { - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_cmf__atmosphere__Weather, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PenmanMonteith" "', argument " "1"" of type '" "cmf::atmosphere::Weather""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "PenmanMonteith" "', argument " "1"" of type '" "cmf::atmosphere::Weather""'"); - } else { - cmf::atmosphere::Weather * temp = reinterpret_cast< cmf::atmosphere::Weather * >(argp1); - arg1 = *temp; - if (SWIG_IsNewObj(res1)) delete temp; - } - } - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_cmf__upslope__vegetation__Vegetation, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "PenmanMonteith" "', argument " "2"" of type '" "cmf::upslope::vegetation::Vegetation const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "PenmanMonteith" "', argument " "2"" of type '" "cmf::upslope::vegetation::Vegetation const &""'"); - } - arg2 = reinterpret_cast< cmf::upslope::vegetation::Vegetation * >(argp2); - ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "PenmanMonteith" "', argument " "3"" of type '" "double""'"); - } - arg3 = static_cast< double >(val3); - { - try { - result = (real)cmf::upslope::ET::PenmanMonteith(arg1,(cmf::upslope::vegetation::Vegetation const &)*arg2,arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_PenmanMonteith(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[6] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args,"PenmanMonteith",0,5,argv))) SWIG_fail; - --argc; - { - unsigned long _index = 0; - SWIG_TypeRank _rank = 0; - if (argc == 3) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_cmf__atmosphere__Weather, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_cmf__upslope__vegetation__Vegetation, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - int res = SWIG_AsVal_double(argv[2], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 1; - if (_rank == _rankm) goto dispatch; - } - } - check_1: - - if (argc == 5) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - { - int res = SWIG_AsVal_double(argv[0], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - int res = SWIG_AsVal_double(argv[2], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - int res = SWIG_AsVal_double(argv[3], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - int res = SWIG_AsVal_double(argv[4], NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 2; - if (_rank == _rankm) goto dispatch; - } - } - check_2: - - dispatch: - switch(_index) { - case 1: - return _wrap_PenmanMonteith__SWIG_1(self, argc, argv); - case 2: - return _wrap_PenmanMonteith__SWIG_0(self, argc, argv); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'PenmanMonteith'.\n" - " Possible C/C++ prototypes are:\n" - " cmf::upslope::ET::PenmanMonteith(real,real,real,real,real)\n" - " cmf::upslope::ET::PenmanMonteith(cmf::atmosphere::Weather,cmf::upslope::vegetation::Vegetation const &,double)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_stressedET_set_stressfunction(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::ET::stressedET *arg1 = (cmf::upslope::ET::stressedET *) 0 ; - cmf::upslope::ET::RootUptakeStessFunction *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "stressfunction", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:stressedET_set_stressfunction",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__ET__stressedET, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "stressedET_set_stressfunction" "', argument " "1"" of type '" "cmf::upslope::ET::stressedET *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::stressedET * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_cmf__upslope__ET__RootUptakeStessFunction, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "stressedET_set_stressfunction" "', argument " "2"" of type '" "cmf::upslope::ET::RootUptakeStessFunction const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "stressedET_set_stressfunction" "', argument " "2"" of type '" "cmf::upslope::ET::RootUptakeStessFunction const &""'"); - } - arg2 = reinterpret_cast< cmf::upslope::ET::RootUptakeStessFunction * >(argp2); - { - try { - (arg1)->set_stressfunction((cmf::upslope::ET::RootUptakeStessFunction const &)*arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_stressedET_get_layer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::ET::stressedET *arg1 = (cmf::upslope::ET::stressedET *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::upslope::SoilLayer::ptr result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__stressedET, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "stressedET_get_layer" "', argument " "1"" of type '" "cmf::upslope::ET::stressedET const *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::stressedET * >(argp1); - { - try { - result = ((cmf::upslope::ET::stressedET const *)arg1)->get_layer(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - std::shared_ptr< cmf::upslope::SoilLayer > *smartresult = result ? new std::shared_ptr< cmf::upslope::SoilLayer >(result) : 0; - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, SWIG_POINTER_OWN); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_stressedET_ETpot(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::ET::stressedET *arg1 = (cmf::upslope::ET::stressedET *) 0 ; - cmf::math::Time arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "t", NULL - }; - real result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:stressedET_ETpot",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__ET__stressedET, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "stressedET_ETpot" "', argument " "1"" of type '" "cmf::upslope::ET::stressedET const *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::stressedET * >(argp1); - { - arg2 = convert_datetime_to_cmftime(obj1); - if (arg2 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } - } - { - try { - result = (real)((cmf::upslope::ET::stressedET const *)arg1)->ETpot(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_stressedET(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::ET::stressedET *arg1 = (cmf::upslope::ET::stressedET *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__stressedET, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_stressedET" "', argument " "1"" of type '" "cmf::upslope::ET::stressedET *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::stressedET * >(argp1); - { - try { - - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *stressedET_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__ET__stressedET, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *_wrap_constantETpot_ETpot_value_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::ET::constantETpot *arg1 = (cmf::upslope::ET::constantETpot *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"constantETpot_ETpot_value_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__constantETpot, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "constantETpot_ETpot_value_set" "', argument " "1"" of type '" "cmf::upslope::ET::constantETpot *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::constantETpot * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "constantETpot_ETpot_value_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->ETpot_value = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_constantETpot_ETpot_value_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::ET::constantETpot *arg1 = (cmf::upslope::ET::constantETpot *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__constantETpot, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "constantETpot_ETpot_value_get" "', argument " "1"" of type '" "cmf::upslope::ET::constantETpot *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::constantETpot * >(argp1); - result = (real) ((arg1)->ETpot_value); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_constantETpot_GetETpot(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::ET::constantETpot *arg1 = (cmf::upslope::ET::constantETpot *) 0 ; - cmf::math::Time arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "t", NULL - }; - real result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:constantETpot_GetETpot",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__ET__constantETpot, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "constantETpot_GetETpot" "', argument " "1"" of type '" "cmf::upslope::ET::constantETpot const *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::constantETpot * >(argp1); - { - arg2 = convert_datetime_to_cmftime(obj1); - if (arg2 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } - } - { - try { - result = (real)((cmf::upslope::ET::constantETpot const *)arg1)->GetETpot(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_constantETpot(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::SoilLayer::ptr arg1 ; - cmf::water::flux_node::ptr arg2 ; - double arg3 ; - void *argp1 ; - int res1 = 0 ; - void *argp2 ; - int res2 = 0 ; - double val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char * kwnames[] = { - (char *) "source",(char *) "ET_target",(char *) "constantETpot_value", NULL - }; - cmf::upslope::ET::constantETpot *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:new_constantETpot",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_constantETpot" "', argument " "1"" of type '" "cmf::upslope::SoilLayer::ptr""'"); - } - if (argp1) arg1 = *(reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp1)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp1); - } - { - int newmem = 0; - res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_constantETpot" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); - } - if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); - } - ecode3 = SWIG_AsVal_double(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_constantETpot" "', argument " "3"" of type '" "double""'"); - } - arg3 = static_cast< double >(val3); - { - try { - result = (cmf::upslope::ET::constantETpot *)new cmf::upslope::ET::constantETpot(arg1,arg2,arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__ET__constantETpot, SWIG_POINTER_NEW | 0 ); - - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_constantETpot(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::ET::constantETpot *arg1 = (cmf::upslope::ET::constantETpot *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__constantETpot, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_constantETpot" "', argument " "1"" of type '" "cmf::upslope::ET::constantETpot *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::constantETpot * >(argp1); - { - try { - - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *constantETpot_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__ET__constantETpot, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *constantETpot_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_timeseriesETpot_ETpot_data_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::ET::timeseriesETpot *arg1 = (cmf::upslope::ET::timeseriesETpot *) 0 ; - cmf::math::timeseries *arg2 = (cmf::math::timeseries *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"timeseriesETpot_ETpot_data_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__timeseriesETpot, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseriesETpot_ETpot_data_set" "', argument " "1"" of type '" "cmf::upslope::ET::timeseriesETpot *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::timeseriesETpot * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "timeseriesETpot_ETpot_data_set" "', argument " "2"" of type '" "cmf::math::timeseries *""'"); - } - arg2 = reinterpret_cast< cmf::math::timeseries * >(argp2); - if (arg1) (arg1)->ETpot_data = *arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_timeseriesETpot_ETpot_data_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::ET::timeseriesETpot *arg1 = (cmf::upslope::ET::timeseriesETpot *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::math::timeseries *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__timeseriesETpot, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseriesETpot_ETpot_data_get" "', argument " "1"" of type '" "cmf::upslope::ET::timeseriesETpot *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::timeseriesETpot * >(argp1); - result = (cmf::math::timeseries *)& ((arg1)->ETpot_data); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_timeseriesETpot(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::SoilLayer::ptr arg1 ; - cmf::water::flux_node::ptr arg2 ; - cmf::math::timeseries arg3 ; - void *argp1 ; - int res1 = 0 ; - void *argp2 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char * kwnames[] = { - (char *) "source",(char *) "ET_target",(char *) "ETpot_values", NULL - }; - cmf::upslope::ET::timeseriesETpot *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:new_timeseriesETpot",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_timeseriesETpot" "', argument " "1"" of type '" "cmf::upslope::SoilLayer::ptr""'"); - } - if (argp1) arg1 = *(reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp1)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp1); - } - { - int newmem = 0; - res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_timeseriesETpot" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); - } - if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); - } - { - cmf::math::timeseries *p_ts = &arg3; - int res=SWIG_ConvertPtr(obj2,(void**)(&p_ts),SWIGTYPE_p_cmf__math__timeseries,0); - if (!(SWIG_IsOK(res)) || p_ts==0) { - if (PyNumber_Check(obj2)) { - double scalar = PyFloat_AsDouble(obj2); - arg3 = cmf::math::timeseries::from_scalar(scalar); - } else { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.timeseries object"); - } - } else { - arg3 = *p_ts; - } - } - { - try { - result = (cmf::upslope::ET::timeseriesETpot *)new cmf::upslope::ET::timeseriesETpot(arg1,arg2,arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__ET__timeseriesETpot, SWIG_POINTER_NEW | 0 ); - - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_timeseriesETpot(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::ET::timeseriesETpot *arg1 = (cmf::upslope::ET::timeseriesETpot *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__timeseriesETpot, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_timeseriesETpot" "', argument " "1"" of type '" "cmf::upslope::ET::timeseriesETpot *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::timeseriesETpot * >(argp1); - { - try { - - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *timeseriesETpot_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__ET__timeseriesETpot, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *timeseriesETpot_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_PenmanMonteithET_daily_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::ET::PenmanMonteithET *arg1 = (cmf::upslope::ET::PenmanMonteithET *) 0 ; - bool arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - bool val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"PenmanMonteithET_daily_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__PenmanMonteithET, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PenmanMonteithET_daily_set" "', argument " "1"" of type '" "cmf::upslope::ET::PenmanMonteithET *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::PenmanMonteithET * >(argp1); - ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "PenmanMonteithET_daily_set" "', argument " "2"" of type '" "bool""'"); - } - arg2 = static_cast< bool >(val2); - if (arg1) (arg1)->daily = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_PenmanMonteithET_daily_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::ET::PenmanMonteithET *arg1 = (cmf::upslope::ET::PenmanMonteithET *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - bool result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__PenmanMonteithET, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PenmanMonteithET_daily_get" "', argument " "1"" of type '" "cmf::upslope::ET::PenmanMonteithET *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::PenmanMonteithET * >(argp1); - result = (bool) ((arg1)->daily); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_PenmanMonteithET(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::SoilLayer::ptr arg1 ; - cmf::water::flux_node::ptr arg2 ; - void *argp1 ; - int res1 = 0 ; - void *argp2 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "source",(char *) "ET_target", NULL - }; - cmf::upslope::ET::PenmanMonteithET *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:new_PenmanMonteithET",kwnames,&obj0,&obj1)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_PenmanMonteithET" "', argument " "1"" of type '" "cmf::upslope::SoilLayer::ptr""'"); - } - if (argp1) arg1 = *(reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp1)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp1); - } - { - int newmem = 0; - res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_PenmanMonteithET" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); - } - if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); - } - { - try { - result = (cmf::upslope::ET::PenmanMonteithET *)new cmf::upslope::ET::PenmanMonteithET(arg1,arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__ET__PenmanMonteithET, SWIG_POINTER_NEW | 0 ); - - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_PenmanMonteithET_r_s(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::vegetation::Vegetation *arg1 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - char * kwnames[] = { - (char *) "veg", NULL - }; - real result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:PenmanMonteithET_r_s",kwnames,&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_cmf__upslope__vegetation__Vegetation, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PenmanMonteithET_r_s" "', argument " "1"" of type '" "cmf::upslope::vegetation::Vegetation const &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "PenmanMonteithET_r_s" "', argument " "1"" of type '" "cmf::upslope::vegetation::Vegetation const &""'"); - } - arg1 = reinterpret_cast< cmf::upslope::vegetation::Vegetation * >(argp1); - { - try { - result = (real)cmf::upslope::ET::PenmanMonteithET::r_s((cmf::upslope::vegetation::Vegetation const &)*arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_PenmanMonteithET_r_a(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::atmosphere::Weather arg1 ; - real arg2 ; - void *argp1 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "A",(char *) "veg_height", NULL - }; - real result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PenmanMonteithET_r_a",kwnames,&obj0,&obj1)) SWIG_fail; - { - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_cmf__atmosphere__Weather, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PenmanMonteithET_r_a" "', argument " "1"" of type '" "cmf::atmosphere::Weather""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "PenmanMonteithET_r_a" "', argument " "1"" of type '" "cmf::atmosphere::Weather""'"); - } else { - cmf::atmosphere::Weather * temp = reinterpret_cast< cmf::atmosphere::Weather * >(argp1); - arg1 = *temp; - if (SWIG_IsNewObj(res1)) delete temp; - } - } - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "PenmanMonteithET_r_a" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - { - try { - result = (real)cmf::upslope::ET::PenmanMonteithET::r_a(arg1,arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_PenmanMonteithET_use_for_cell(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::Cell *arg1 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - char * kwnames[] = { - (char *) "cell", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:PenmanMonteithET_use_for_cell",kwnames,&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_cmf__upslope__Cell, 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PenmanMonteithET_use_for_cell" "', argument " "1"" of type '" "cmf::upslope::Cell &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "PenmanMonteithET_use_for_cell" "', argument " "1"" of type '" "cmf::upslope::Cell &""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); - { - try { - cmf::upslope::ET::PenmanMonteithET::use_for_cell(*arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_PenmanMonteithET(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::ET::PenmanMonteithET *arg1 = (cmf::upslope::ET::PenmanMonteithET *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__PenmanMonteithET, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_PenmanMonteithET" "', argument " "1"" of type '" "cmf::upslope::ET::PenmanMonteithET *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::PenmanMonteithET * >(argp1); - { - try { - - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *PenmanMonteithET_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__ET__PenmanMonteithET, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *PenmanMonteithET_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_PriestleyTaylorET_daily_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::ET::PriestleyTaylorET *arg1 = (cmf::upslope::ET::PriestleyTaylorET *) 0 ; - bool arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - bool val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"PriestleyTaylorET_daily_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__PriestleyTaylorET, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PriestleyTaylorET_daily_set" "', argument " "1"" of type '" "cmf::upslope::ET::PriestleyTaylorET *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::PriestleyTaylorET * >(argp1); - ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "PriestleyTaylorET_daily_set" "', argument " "2"" of type '" "bool""'"); - } - arg2 = static_cast< bool >(val2); - if (arg1) (arg1)->daily = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_PriestleyTaylorET_daily_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::ET::PriestleyTaylorET *arg1 = (cmf::upslope::ET::PriestleyTaylorET *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - bool result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__PriestleyTaylorET, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PriestleyTaylorET_daily_get" "', argument " "1"" of type '" "cmf::upslope::ET::PriestleyTaylorET *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::PriestleyTaylorET * >(argp1); - result = (bool) ((arg1)->daily); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_PriestleyTaylorET_alpha_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::ET::PriestleyTaylorET *arg1 = (cmf::upslope::ET::PriestleyTaylorET *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"PriestleyTaylorET_alpha_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__PriestleyTaylorET, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PriestleyTaylorET_alpha_set" "', argument " "1"" of type '" "cmf::upslope::ET::PriestleyTaylorET *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::PriestleyTaylorET * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "PriestleyTaylorET_alpha_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->alpha = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_PriestleyTaylorET_alpha_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::ET::PriestleyTaylorET *arg1 = (cmf::upslope::ET::PriestleyTaylorET *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__PriestleyTaylorET, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PriestleyTaylorET_alpha_get" "', argument " "1"" of type '" "cmf::upslope::ET::PriestleyTaylorET *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::PriestleyTaylorET * >(argp1); - result = (real) ((arg1)->alpha); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_PriestleyTaylorET(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::SoilLayer::ptr arg1 ; - cmf::water::flux_node::ptr arg2 ; - real arg3 = (real) 1.26 ; - void *argp1 ; - int res1 = 0 ; - void *argp2 ; - int res2 = 0 ; - double val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char * kwnames[] = { - (char *) "source",(char *) "ET_target",(char *) "alpha", NULL - }; - cmf::upslope::ET::PriestleyTaylorET *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:new_PriestleyTaylorET",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_PriestleyTaylorET" "', argument " "1"" of type '" "cmf::upslope::SoilLayer::ptr""'"); - } - if (argp1) arg1 = *(reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp1)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp1); - } - { - int newmem = 0; - res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_PriestleyTaylorET" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); - } - if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); - } - if (obj2) { - ecode3 = SWIG_AsVal_double(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_PriestleyTaylorET" "', argument " "3"" of type '" "real""'"); - } - arg3 = static_cast< real >(val3); - } - { - try { - result = (cmf::upslope::ET::PriestleyTaylorET *)new cmf::upslope::ET::PriestleyTaylorET(arg1,arg2,arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__ET__PriestleyTaylorET, SWIG_POINTER_NEW | 0 ); - - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_PriestleyTaylorET_use_for_cell(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::Cell *arg1 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - char * kwnames[] = { - (char *) "cell", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:PriestleyTaylorET_use_for_cell",kwnames,&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_cmf__upslope__Cell, 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PriestleyTaylorET_use_for_cell" "', argument " "1"" of type '" "cmf::upslope::Cell &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "PriestleyTaylorET_use_for_cell" "', argument " "1"" of type '" "cmf::upslope::Cell &""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); - { - try { - cmf::upslope::ET::PriestleyTaylorET::use_for_cell(*arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_PriestleyTaylorET(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::ET::PriestleyTaylorET *arg1 = (cmf::upslope::ET::PriestleyTaylorET *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__PriestleyTaylorET, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_PriestleyTaylorET" "', argument " "1"" of type '" "cmf::upslope::ET::PriestleyTaylorET *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::PriestleyTaylorET * >(argp1); - { - try { - - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *PriestleyTaylorET_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__ET__PriestleyTaylorET, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *PriestleyTaylorET_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_new_HargreaveET(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::SoilLayer::ptr arg1 ; - cmf::water::flux_node::ptr arg2 ; - real arg3 = (real) 51.0 ; - void *argp1 ; - int res1 = 0 ; - void *argp2 ; - int res2 = 0 ; - double val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char * kwnames[] = { - (char *) "source",(char *) "ET_target",(char *) "latitude", NULL - }; - cmf::upslope::ET::HargreaveET *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:new_HargreaveET",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_HargreaveET" "', argument " "1"" of type '" "cmf::upslope::SoilLayer::ptr""'"); - } - if (argp1) arg1 = *(reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp1)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp1); - } - { - int newmem = 0; - res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_HargreaveET" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); - } - if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); - } - if (obj2) { - ecode3 = SWIG_AsVal_double(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_HargreaveET" "', argument " "3"" of type '" "real""'"); - } - arg3 = static_cast< real >(val3); - } - { - try { - result = (cmf::upslope::ET::HargreaveET *)new cmf::upslope::ET::HargreaveET(arg1,arg2,arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__ET__HargreaveET, SWIG_POINTER_NEW | 0 ); - - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HargreaveET_lat_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::ET::HargreaveET *arg1 = (cmf::upslope::ET::HargreaveET *) 0 ; - real arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"HargreaveET_lat_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__HargreaveET, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HargreaveET_lat_set" "', argument " "1"" of type '" "cmf::upslope::ET::HargreaveET *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::HargreaveET * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HargreaveET_lat_set" "', argument " "2"" of type '" "real""'"); - } - arg2 = static_cast< real >(val2); - if (arg1) (arg1)->lat = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HargreaveET_lat_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::ET::HargreaveET *arg1 = (cmf::upslope::ET::HargreaveET *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - real result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__HargreaveET, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HargreaveET_lat_get" "', argument " "1"" of type '" "cmf::upslope::ET::HargreaveET *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::HargreaveET * >(argp1); - result = (real) ((arg1)->lat); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_HargreaveET_use_for_cell(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::Cell *arg1 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - char * kwnames[] = { - (char *) "cell", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:HargreaveET_use_for_cell",kwnames,&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_cmf__upslope__Cell, 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HargreaveET_use_for_cell" "', argument " "1"" of type '" "cmf::upslope::Cell &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HargreaveET_use_for_cell" "', argument " "1"" of type '" "cmf::upslope::Cell &""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); - { - try { - cmf::upslope::ET::HargreaveET::use_for_cell(*arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_HargreaveET(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::ET::HargreaveET *arg1 = (cmf::upslope::ET::HargreaveET *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__HargreaveET, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_HargreaveET" "', argument " "1"" of type '" "cmf::upslope::ET::HargreaveET *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::HargreaveET * >(argp1); - { - try { - - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *HargreaveET_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__ET__HargreaveET, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *HargreaveET_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_new_TurcET(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::SoilLayer::ptr arg1 ; - cmf::water::flux_node::ptr arg2 ; - void *argp1 ; - int res1 = 0 ; - void *argp2 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "source",(char *) "ET_target", NULL - }; - cmf::upslope::ET::TurcET *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:new_TurcET",kwnames,&obj0,&obj1)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_TurcET" "', argument " "1"" of type '" "cmf::upslope::SoilLayer::ptr""'"); - } - if (argp1) arg1 = *(reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp1)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp1); - } - { - int newmem = 0; - res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_TurcET" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); - } - if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); - } - { - try { - result = (cmf::upslope::ET::TurcET *)new cmf::upslope::ET::TurcET(arg1,arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__ET__TurcET, SWIG_POINTER_NEW | 0 ); - - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_TurcET_use_for_cell(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::Cell *arg1 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - char * kwnames[] = { - (char *) "cell", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:TurcET_use_for_cell",kwnames,&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_cmf__upslope__Cell, 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TurcET_use_for_cell" "', argument " "1"" of type '" "cmf::upslope::Cell &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "TurcET_use_for_cell" "', argument " "1"" of type '" "cmf::upslope::Cell &""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); - { - try { - cmf::upslope::ET::TurcET::use_for_cell(*arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_TurcET(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::ET::TurcET *arg1 = (cmf::upslope::ET::TurcET *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__TurcET, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_TurcET" "', argument " "1"" of type '" "cmf::upslope::ET::TurcET *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::TurcET * >(argp1); - { - try { - - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *TurcET_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__ET__TurcET, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *TurcET_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_new_CanopyStorageEvaporation(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::water::WaterStorage::ptr arg1 ; - cmf::water::flux_node::ptr arg2 ; - cmf::upslope::Cell *arg3 = 0 ; - void *argp1 ; - int res1 = 0 ; - void *argp2 ; - int res2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char * kwnames[] = { - (char *) "CanopyStorage",(char *) "ET_target",(char *) "cell", NULL - }; - cmf::upslope::ET::CanopyStorageEvaporation *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:new_CanopyStorageEvaporation",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CanopyStorageEvaporation" "', argument " "1"" of type '" "cmf::water::WaterStorage::ptr""'"); - } - if (argp1) arg1 = *(reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp1)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp1); - } - { - int newmem = 0; - res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_CanopyStorageEvaporation" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); - } - if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); - } - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_cmf__upslope__Cell, 0 ); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_CanopyStorageEvaporation" "', argument " "3"" of type '" "cmf::upslope::Cell &""'"); - } - if (!argp3) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CanopyStorageEvaporation" "', argument " "3"" of type '" "cmf::upslope::Cell &""'"); - } - arg3 = reinterpret_cast< cmf::upslope::Cell * >(argp3); - { - try { - result = (cmf::upslope::ET::CanopyStorageEvaporation *)new cmf::upslope::ET::CanopyStorageEvaporation(arg1,arg2,*arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__ET__CanopyStorageEvaporation, SWIG_POINTER_NEW | 0 ); - - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_CanopyStorageEvaporation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::ET::CanopyStorageEvaporation *arg1 = (cmf::upslope::ET::CanopyStorageEvaporation *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__CanopyStorageEvaporation, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CanopyStorageEvaporation" "', argument " "1"" of type '" "cmf::upslope::ET::CanopyStorageEvaporation *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::CanopyStorageEvaporation * >(argp1); - { - try { - - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *CanopyStorageEvaporation_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__ET__CanopyStorageEvaporation, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *CanopyStorageEvaporation_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_new_PenmanEvaporation(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::river::OpenWaterStorage::ptr arg1 ; - cmf::water::flux_node::ptr arg2 ; - cmf::atmosphere::Meteorology *arg3 = 0 ; - void *argp1 ; - int res1 = 0 ; - void *argp2 ; - int res2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char * kwnames[] = { - (char *) "source",(char *) "Evap_target",(char *) "meteo", NULL - }; - cmf::upslope::ET::PenmanEvaporation *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:new_PenmanEvaporation",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__river__OpenWaterStorage_t, 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_PenmanEvaporation" "', argument " "1"" of type '" "cmf::river::OpenWaterStorage::ptr""'"); - } - if (argp1) arg1 = *(reinterpret_cast< cmf::river::OpenWaterStorage::ptr * >(argp1)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::river::OpenWaterStorage::ptr * >(argp1); - } - { - int newmem = 0; - res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_PenmanEvaporation" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); - } - if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); - } - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_cmf__atmosphere__Meteorology, 0 | 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_PenmanEvaporation" "', argument " "3"" of type '" "cmf::atmosphere::Meteorology const &""'"); - } - if (!argp3) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PenmanEvaporation" "', argument " "3"" of type '" "cmf::atmosphere::Meteorology const &""'"); - } - arg3 = reinterpret_cast< cmf::atmosphere::Meteorology * >(argp3); - { - try { - result = (cmf::upslope::ET::PenmanEvaporation *)new cmf::upslope::ET::PenmanEvaporation(arg1,arg2,(cmf::atmosphere::Meteorology const &)*arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__ET__PenmanEvaporation, SWIG_POINTER_NEW | 0 ); - - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_PenmanEvaporation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::ET::PenmanEvaporation *arg1 = (cmf::upslope::ET::PenmanEvaporation *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__PenmanEvaporation, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_PenmanEvaporation" "', argument " "1"" of type '" "cmf::upslope::ET::PenmanEvaporation *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::PenmanEvaporation * >(argp1); - { - try { - - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *PenmanEvaporation_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__ET__PenmanEvaporation, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *PenmanEvaporation_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_ShuttleworthWallace_RAA_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::ET::ShuttleworthWallace *arg1 = (cmf::upslope::ET::ShuttleworthWallace *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"ShuttleworthWallace_RAA_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__ShuttleworthWallace, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShuttleworthWallace_RAA_set" "', argument " "1"" of type '" "cmf::upslope::ET::ShuttleworthWallace *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::ShuttleworthWallace * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShuttleworthWallace_RAA_set" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - if (arg1) (arg1)->RAA = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ShuttleworthWallace_RAA_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::ET::ShuttleworthWallace *arg1 = (cmf::upslope::ET::ShuttleworthWallace *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - double result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__ShuttleworthWallace, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShuttleworthWallace_RAA_get" "', argument " "1"" of type '" "cmf::upslope::ET::ShuttleworthWallace *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::ShuttleworthWallace * >(argp1); - result = (double) ((arg1)->RAA); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ShuttleworthWallace_RAC_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::ET::ShuttleworthWallace *arg1 = (cmf::upslope::ET::ShuttleworthWallace *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"ShuttleworthWallace_RAC_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__ShuttleworthWallace, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShuttleworthWallace_RAC_set" "', argument " "1"" of type '" "cmf::upslope::ET::ShuttleworthWallace *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::ShuttleworthWallace * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShuttleworthWallace_RAC_set" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - if (arg1) (arg1)->RAC = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ShuttleworthWallace_RAC_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::ET::ShuttleworthWallace *arg1 = (cmf::upslope::ET::ShuttleworthWallace *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - double result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__ShuttleworthWallace, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShuttleworthWallace_RAC_get" "', argument " "1"" of type '" "cmf::upslope::ET::ShuttleworthWallace *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::ShuttleworthWallace * >(argp1); - result = (double) ((arg1)->RAC); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ShuttleworthWallace_RAS_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::ET::ShuttleworthWallace *arg1 = (cmf::upslope::ET::ShuttleworthWallace *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"ShuttleworthWallace_RAS_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__ShuttleworthWallace, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShuttleworthWallace_RAS_set" "', argument " "1"" of type '" "cmf::upslope::ET::ShuttleworthWallace *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::ShuttleworthWallace * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShuttleworthWallace_RAS_set" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - if (arg1) (arg1)->RAS = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ShuttleworthWallace_RAS_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::ET::ShuttleworthWallace *arg1 = (cmf::upslope::ET::ShuttleworthWallace *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - double result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__ShuttleworthWallace, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShuttleworthWallace_RAS_get" "', argument " "1"" of type '" "cmf::upslope::ET::ShuttleworthWallace *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::ShuttleworthWallace * >(argp1); - result = (double) ((arg1)->RAS); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ShuttleworthWallace_RSS_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::ET::ShuttleworthWallace *arg1 = (cmf::upslope::ET::ShuttleworthWallace *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"ShuttleworthWallace_RSS_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__ShuttleworthWallace, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShuttleworthWallace_RSS_set" "', argument " "1"" of type '" "cmf::upslope::ET::ShuttleworthWallace *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::ShuttleworthWallace * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShuttleworthWallace_RSS_set" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - if (arg1) (arg1)->RSS = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ShuttleworthWallace_RSS_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::ET::ShuttleworthWallace *arg1 = (cmf::upslope::ET::ShuttleworthWallace *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - double result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__ShuttleworthWallace, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShuttleworthWallace_RSS_get" "', argument " "1"" of type '" "cmf::upslope::ET::ShuttleworthWallace *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::ShuttleworthWallace * >(argp1); - result = (double) ((arg1)->RSS); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ShuttleworthWallace_RSC_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::ET::ShuttleworthWallace *arg1 = (cmf::upslope::ET::ShuttleworthWallace *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"ShuttleworthWallace_RSC_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__ShuttleworthWallace, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShuttleworthWallace_RSC_set" "', argument " "1"" of type '" "cmf::upslope::ET::ShuttleworthWallace *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::ShuttleworthWallace * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShuttleworthWallace_RSC_set" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - if (arg1) (arg1)->RSC = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ShuttleworthWallace_RSC_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::ET::ShuttleworthWallace *arg1 = (cmf::upslope::ET::ShuttleworthWallace *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - double result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__ShuttleworthWallace, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShuttleworthWallace_RSC_get" "', argument " "1"" of type '" "cmf::upslope::ET::ShuttleworthWallace *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::ShuttleworthWallace * >(argp1); - result = (double) ((arg1)->RSC); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ShuttleworthWallace_refresh_counter_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::ET::ShuttleworthWallace *arg1 = (cmf::upslope::ET::ShuttleworthWallace *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"ShuttleworthWallace_refresh_counter_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__ShuttleworthWallace, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShuttleworthWallace_refresh_counter_set" "', argument " "1"" of type '" "cmf::upslope::ET::ShuttleworthWallace *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::ShuttleworthWallace * >(argp1); - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShuttleworthWallace_refresh_counter_set" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - if (arg1) (arg1)->refresh_counter = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ShuttleworthWallace_refresh_counter_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::ET::ShuttleworthWallace *arg1 = (cmf::upslope::ET::ShuttleworthWallace *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - int result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__ShuttleworthWallace, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShuttleworthWallace_refresh_counter_get" "', argument " "1"" of type '" "cmf::upslope::ET::ShuttleworthWallace *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::ShuttleworthWallace * >(argp1); - result = (int) ((arg1)->refresh_counter); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ShuttleworthWallace_refresh__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::upslope::ET::ShuttleworthWallace *arg1 = (cmf::upslope::ET::ShuttleworthWallace *) 0 ; - cmf::math::Time arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__ShuttleworthWallace, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShuttleworthWallace_refresh" "', argument " "1"" of type '" "cmf::upslope::ET::ShuttleworthWallace *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::ShuttleworthWallace * >(argp1); - { - arg2 = convert_datetime_to_cmftime(swig_obj[1]); - if (arg2 == cmf::math::never) { - SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); - } - } - { - try { - (arg1)->refresh(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ShuttleworthWallace_refresh__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::upslope::ET::ShuttleworthWallace *arg1 = (cmf::upslope::ET::ShuttleworthWallace *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__ShuttleworthWallace, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShuttleworthWallace_refresh" "', argument " "1"" of type '" "cmf::upslope::ET::ShuttleworthWallace *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::ShuttleworthWallace * >(argp1); - { - try { - (arg1)->refresh(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ShuttleworthWallace_refresh(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args,"ShuttleworthWallace_refresh",0,2,argv))) SWIG_fail; - --argc; - { - unsigned long _index = 0; - SWIG_TypeRank _rank = 0; - if (argc == 1) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__upslope__ET__ShuttleworthWallace, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 1; - if (_rank == _rankm) goto dispatch; - } - } - check_1: - - if (argc == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__upslope__ET__ShuttleworthWallace, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - _v = check_time(argv[1]); - } - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 2; - if (_rank == _rankm) goto dispatch; - } - } - check_2: - - dispatch: - switch(_index) { - case 1: - return _wrap_ShuttleworthWallace_refresh__SWIG_1(self, argc, argv); - case 2: - return _wrap_ShuttleworthWallace_refresh__SWIG_0(self, argc, argv); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'ShuttleworthWallace_refresh'.\n" - " Possible C/C++ prototypes are:\n" - " cmf::upslope::ET::ShuttleworthWallace::refresh(cmf::math::Time)\n" - " cmf::upslope::ET::ShuttleworthWallace::refresh()\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_ShuttleworthWallace_PTR_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::ET::ShuttleworthWallace *arg1 = (cmf::upslope::ET::ShuttleworthWallace *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"ShuttleworthWallace_PTR_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__ShuttleworthWallace, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShuttleworthWallace_PTR_set" "', argument " "1"" of type '" "cmf::upslope::ET::ShuttleworthWallace *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::ShuttleworthWallace * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShuttleworthWallace_PTR_set" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - if (arg1) (arg1)->PTR = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ShuttleworthWallace_PTR_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::ET::ShuttleworthWallace *arg1 = (cmf::upslope::ET::ShuttleworthWallace *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - double result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__ShuttleworthWallace, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShuttleworthWallace_PTR_get" "', argument " "1"" of type '" "cmf::upslope::ET::ShuttleworthWallace *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::ShuttleworthWallace * >(argp1); - result = (double) ((arg1)->PTR); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ShuttleworthWallace_PSNVP_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::ET::ShuttleworthWallace *arg1 = (cmf::upslope::ET::ShuttleworthWallace *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"ShuttleworthWallace_PSNVP_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__ShuttleworthWallace, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShuttleworthWallace_PSNVP_set" "', argument " "1"" of type '" "cmf::upslope::ET::ShuttleworthWallace *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::ShuttleworthWallace * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShuttleworthWallace_PSNVP_set" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - if (arg1) (arg1)->PSNVP = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ShuttleworthWallace_PSNVP_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::ET::ShuttleworthWallace *arg1 = (cmf::upslope::ET::ShuttleworthWallace *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - double result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__ShuttleworthWallace, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShuttleworthWallace_PSNVP_get" "', argument " "1"" of type '" "cmf::upslope::ET::ShuttleworthWallace *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::ShuttleworthWallace * >(argp1); - result = (double) ((arg1)->PSNVP); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ShuttleworthWallace_ASNVP_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::ET::ShuttleworthWallace *arg1 = (cmf::upslope::ET::ShuttleworthWallace *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"ShuttleworthWallace_ASNVP_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__ShuttleworthWallace, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShuttleworthWallace_ASNVP_set" "', argument " "1"" of type '" "cmf::upslope::ET::ShuttleworthWallace *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::ShuttleworthWallace * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShuttleworthWallace_ASNVP_set" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - if (arg1) (arg1)->ASNVP = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ShuttleworthWallace_ASNVP_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::ET::ShuttleworthWallace *arg1 = (cmf::upslope::ET::ShuttleworthWallace *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - double result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__ShuttleworthWallace, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShuttleworthWallace_ASNVP_get" "', argument " "1"" of type '" "cmf::upslope::ET::ShuttleworthWallace *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::ShuttleworthWallace * >(argp1); - result = (double) ((arg1)->ASNVP); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ShuttleworthWallace_GER_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::ET::ShuttleworthWallace *arg1 = (cmf::upslope::ET::ShuttleworthWallace *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"ShuttleworthWallace_GER_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__ShuttleworthWallace, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShuttleworthWallace_GER_set" "', argument " "1"" of type '" "cmf::upslope::ET::ShuttleworthWallace *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::ShuttleworthWallace * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShuttleworthWallace_GER_set" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - if (arg1) (arg1)->GER = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ShuttleworthWallace_GER_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::ET::ShuttleworthWallace *arg1 = (cmf::upslope::ET::ShuttleworthWallace *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - double result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__ShuttleworthWallace, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShuttleworthWallace_GER_get" "', argument " "1"" of type '" "cmf::upslope::ET::ShuttleworthWallace *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::ShuttleworthWallace * >(argp1); - result = (double) ((arg1)->GER); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ShuttleworthWallace_PIR_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::ET::ShuttleworthWallace *arg1 = (cmf::upslope::ET::ShuttleworthWallace *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"ShuttleworthWallace_PIR_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__ShuttleworthWallace, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShuttleworthWallace_PIR_set" "', argument " "1"" of type '" "cmf::upslope::ET::ShuttleworthWallace *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::ShuttleworthWallace * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShuttleworthWallace_PIR_set" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - if (arg1) (arg1)->PIR = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ShuttleworthWallace_PIR_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::ET::ShuttleworthWallace *arg1 = (cmf::upslope::ET::ShuttleworthWallace *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - double result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__ShuttleworthWallace, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShuttleworthWallace_PIR_get" "', argument " "1"" of type '" "cmf::upslope::ET::ShuttleworthWallace *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::ShuttleworthWallace * >(argp1); - result = (double) ((arg1)->PIR); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ShuttleworthWallace_AIR_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::ET::ShuttleworthWallace *arg1 = (cmf::upslope::ET::ShuttleworthWallace *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"ShuttleworthWallace_AIR_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__ShuttleworthWallace, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShuttleworthWallace_AIR_set" "', argument " "1"" of type '" "cmf::upslope::ET::ShuttleworthWallace *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::ShuttleworthWallace * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShuttleworthWallace_AIR_set" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - if (arg1) (arg1)->AIR = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ShuttleworthWallace_AIR_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::ET::ShuttleworthWallace *arg1 = (cmf::upslope::ET::ShuttleworthWallace *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - double result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__ShuttleworthWallace, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShuttleworthWallace_AIR_get" "', argument " "1"" of type '" "cmf::upslope::ET::ShuttleworthWallace *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::ShuttleworthWallace * >(argp1); - result = (double) ((arg1)->AIR); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ShuttleworthWallace_GIR_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::ET::ShuttleworthWallace *arg1 = (cmf::upslope::ET::ShuttleworthWallace *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"ShuttleworthWallace_GIR_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__ShuttleworthWallace, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShuttleworthWallace_GIR_set" "', argument " "1"" of type '" "cmf::upslope::ET::ShuttleworthWallace *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::ShuttleworthWallace * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShuttleworthWallace_GIR_set" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - if (arg1) (arg1)->GIR = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ShuttleworthWallace_GIR_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::ET::ShuttleworthWallace *arg1 = (cmf::upslope::ET::ShuttleworthWallace *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - double result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__ShuttleworthWallace, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShuttleworthWallace_GIR_get" "', argument " "1"" of type '" "cmf::upslope::ET::ShuttleworthWallace *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::ShuttleworthWallace * >(argp1); - result = (double) ((arg1)->GIR); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ShuttleworthWallace_ATR_sum_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::ET::ShuttleworthWallace *arg1 = (cmf::upslope::ET::ShuttleworthWallace *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"ShuttleworthWallace_ATR_sum_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__ShuttleworthWallace, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShuttleworthWallace_ATR_sum_set" "', argument " "1"" of type '" "cmf::upslope::ET::ShuttleworthWallace *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::ShuttleworthWallace * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShuttleworthWallace_ATR_sum_set" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - if (arg1) (arg1)->ATR_sum = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ShuttleworthWallace_ATR_sum_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::ET::ShuttleworthWallace *arg1 = (cmf::upslope::ET::ShuttleworthWallace *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - double result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__ShuttleworthWallace, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShuttleworthWallace_ATR_sum_get" "', argument " "1"" of type '" "cmf::upslope::ET::ShuttleworthWallace *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::ShuttleworthWallace * >(argp1); - result = (double) ((arg1)->ATR_sum); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ShuttleworthWallace_ATR_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::ET::ShuttleworthWallace *arg1 = (cmf::upslope::ET::ShuttleworthWallace *) 0 ; - cmf::math::num_array arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"ShuttleworthWallace_ATR_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__ShuttleworthWallace, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShuttleworthWallace_ATR_set" "', argument " "1"" of type '" "cmf::upslope::ET::ShuttleworthWallace *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::ShuttleworthWallace * >(argp1); - { - // Convert a array_wrapper from numpy array - double * data=0; - ptrdiff_t size = from_npy_array(swig_obj[1],&data); - if (!data) { - SWIG_exception_fail(SWIG_TypeError,"Input data is not 'array-like' (in the sense of numpy arrays)"); - return NULL; - } - arg2 = cmf::math::num_array(size,data); - } - if (arg1) (arg1)->ATR = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ShuttleworthWallace_ATR_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::ET::ShuttleworthWallace *arg1 = (cmf::upslope::ET::ShuttleworthWallace *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::math::num_array result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__ShuttleworthWallace, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShuttleworthWallace_ATR_get" "', argument " "1"" of type '" "cmf::upslope::ET::ShuttleworthWallace *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::ShuttleworthWallace * >(argp1); - result = ((arg1)->ATR); - { - resultobj = as_npy_array(result); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ShuttleworthWallace_KSNVP_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::ET::ShuttleworthWallace *arg1 = (cmf::upslope::ET::ShuttleworthWallace *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"ShuttleworthWallace_KSNVP_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__ShuttleworthWallace, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShuttleworthWallace_KSNVP_set" "', argument " "1"" of type '" "cmf::upslope::ET::ShuttleworthWallace *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::ShuttleworthWallace * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShuttleworthWallace_KSNVP_set" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - if (arg1) (arg1)->KSNVP = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ShuttleworthWallace_KSNVP_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::ET::ShuttleworthWallace *arg1 = (cmf::upslope::ET::ShuttleworthWallace *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - double result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__ShuttleworthWallace, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShuttleworthWallace_KSNVP_get" "', argument " "1"" of type '" "cmf::upslope::ET::ShuttleworthWallace *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::ShuttleworthWallace * >(argp1); - result = (double) ((arg1)->KSNVP); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ShuttleworthWallace_allow_dew_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::ET::ShuttleworthWallace *arg1 = (cmf::upslope::ET::ShuttleworthWallace *) 0 ; - bool arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - bool val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"ShuttleworthWallace_allow_dew_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__ShuttleworthWallace, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShuttleworthWallace_allow_dew_set" "', argument " "1"" of type '" "cmf::upslope::ET::ShuttleworthWallace *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::ShuttleworthWallace * >(argp1); - ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShuttleworthWallace_allow_dew_set" "', argument " "2"" of type '" "bool""'"); - } - arg2 = static_cast< bool >(val2); - if (arg1) (arg1)->allow_dew = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ShuttleworthWallace_allow_dew_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::ET::ShuttleworthWallace *arg1 = (cmf::upslope::ET::ShuttleworthWallace *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - bool result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__ShuttleworthWallace, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShuttleworthWallace_allow_dew_get" "', argument " "1"" of type '" "cmf::upslope::ET::ShuttleworthWallace *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::ShuttleworthWallace * >(argp1); - result = (bool) ((arg1)->allow_dew); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ShuttleworthWallace_set_RSS_parameters(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - double arg1 = (double) 500. ; - double arg2 = (double) 1.0 ; - double arg3 = (double) -3.22 ; - double val1 ; - int ecode1 = 0 ; - double val2 ; - int ecode2 = 0 ; - double val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char * kwnames[] = { - (char *) "_RSSa",(char *) "_RSSb",(char *) "_RSSa_pot", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|OOO:ShuttleworthWallace_set_RSS_parameters",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; - if (obj0) { - ecode1 = SWIG_AsVal_double(obj0, &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "ShuttleworthWallace_set_RSS_parameters" "', argument " "1"" of type '" "double""'"); - } - arg1 = static_cast< double >(val1); - } - if (obj1) { - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShuttleworthWallace_set_RSS_parameters" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - } - if (obj2) { - ecode3 = SWIG_AsVal_double(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ShuttleworthWallace_set_RSS_parameters" "', argument " "3"" of type '" "double""'"); - } - arg3 = static_cast< double >(val3); - } - { - try { - cmf::upslope::ET::ShuttleworthWallace::set_RSS_parameters(arg1,arg2,arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_ShuttleworthWallace(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::Cell *arg1 = 0 ; - bool arg2 = (bool) true ; - void *argp1 = 0 ; - int res1 = 0 ; - bool val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "cell",(char *) "allow_dew", NULL - }; - cmf::upslope::ET::ShuttleworthWallace *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:new_ShuttleworthWallace",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_cmf__upslope__Cell, 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ShuttleworthWallace" "', argument " "1"" of type '" "cmf::upslope::Cell &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ShuttleworthWallace" "', argument " "1"" of type '" "cmf::upslope::Cell &""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); - if (obj1) { - ecode2 = SWIG_AsVal_bool(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_ShuttleworthWallace" "', argument " "2"" of type '" "bool""'"); - } - arg2 = static_cast< bool >(val2); - } - { - try { - result = (cmf::upslope::ET::ShuttleworthWallace *)new cmf::upslope::ET::ShuttleworthWallace(*arg1,arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__ET__ShuttleworthWallace, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ShuttleworthWallace_use_for_cell(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::upslope::Cell *arg1 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - char * kwnames[] = { - (char *) "cell", NULL - }; - cmf::upslope::ET::ShuttleworthWallace *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:ShuttleworthWallace_use_for_cell",kwnames,&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_cmf__upslope__Cell, 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShuttleworthWallace_use_for_cell" "', argument " "1"" of type '" "cmf::upslope::Cell &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ShuttleworthWallace_use_for_cell" "', argument " "1"" of type '" "cmf::upslope::Cell &""'"); - } - arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); - { - try { - result = (cmf::upslope::ET::ShuttleworthWallace *)cmf::upslope::ET::ShuttleworthWallace::use_for_cell(*arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__ET__ShuttleworthWallace, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_ShuttleworthWallace(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::upslope::ET::ShuttleworthWallace *arg1 = (cmf::upslope::ET::ShuttleworthWallace *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__ShuttleworthWallace, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ShuttleworthWallace" "', argument " "1"" of type '" "cmf::upslope::ET::ShuttleworthWallace *""'"); - } - arg1 = reinterpret_cast< cmf::upslope::ET::ShuttleworthWallace * >(argp1); - { - try { - delete arg1; - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *ShuttleworthWallace_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__ET__ShuttleworthWallace, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *ShuttleworthWallace_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_project_remove_node(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::project *arg1 = (cmf::project *) 0 ; - cmf::water::flux_node::ptr arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "node", NULL - }; - size_t result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:project_remove_node",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__project, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "project_remove_node" "', argument " "1"" of type '" "cmf::project *""'"); - } - arg1 = reinterpret_cast< cmf::project * >(argp1); - { - int newmem = 0; - res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "project_remove_node" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); - } - if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); - } - { - try { - result = (arg1)->remove_node(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_project_solutes_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::project *arg1 = (cmf::project *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::water::solute_vector *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__project, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "project_solutes_get" "', argument " "1"" of type '" "cmf::project *""'"); - } - arg1 = reinterpret_cast< cmf::project * >(argp1); - result = (cmf::water::solute_vector *)& ((arg1)->solutes); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__water__solute_vector, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_project_meteo_stations_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::project *arg1 = (cmf::project *) 0 ; - cmf::atmosphere::MeteoStationList *arg2 = (cmf::atmosphere::MeteoStationList *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"project_meteo_stations_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__project, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "project_meteo_stations_set" "', argument " "1"" of type '" "cmf::project *""'"); - } - arg1 = reinterpret_cast< cmf::project * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_cmf__atmosphere__MeteoStationList, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "project_meteo_stations_set" "', argument " "2"" of type '" "cmf::atmosphere::MeteoStationList *""'"); - } - arg2 = reinterpret_cast< cmf::atmosphere::MeteoStationList * >(argp2); - if (arg1) (arg1)->meteo_stations = *arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_project_meteo_stations_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::project *arg1 = (cmf::project *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::atmosphere::MeteoStationList *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__project, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "project_meteo_stations_get" "', argument " "1"" of type '" "cmf::project *""'"); - } - arg1 = reinterpret_cast< cmf::project * >(argp1); - result = (cmf::atmosphere::MeteoStationList *)& ((arg1)->meteo_stations); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__atmosphere__MeteoStationList, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_project_rainfall_stations_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::project *arg1 = (cmf::project *) 0 ; - cmf::atmosphere::RainfallStationList *arg2 = (cmf::atmosphere::RainfallStationList *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args,"project_rainfall_stations_set",2,2,swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__project, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "project_rainfall_stations_set" "', argument " "1"" of type '" "cmf::project *""'"); - } - arg1 = reinterpret_cast< cmf::project * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_cmf__atmosphere__RainfallStationList, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "project_rainfall_stations_set" "', argument " "2"" of type '" "cmf::atmosphere::RainfallStationList *""'"); - } - arg2 = reinterpret_cast< cmf::atmosphere::RainfallStationList * >(argp2); - if (arg1) (arg1)->rainfall_stations = *arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_project_rainfall_stations_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::project *arg1 = (cmf::project *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::atmosphere::RainfallStationList *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__project, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "project_rainfall_stations_get" "', argument " "1"" of type '" "cmf::project *""'"); - } - arg1 = reinterpret_cast< cmf::project * >(argp1); - result = (cmf::atmosphere::RainfallStationList *)& ((arg1)->rainfall_stations); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__atmosphere__RainfallStationList, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_project_use_IDW_meteo(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::project *arg1 = (cmf::project *) 0 ; - double arg2 = (double) 0 ; - double arg3 = (double) 2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - double val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "z_weight",(char *) "power", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OO:project_use_IDW_meteo",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__project, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "project_use_IDW_meteo" "', argument " "1"" of type '" "cmf::project *""'"); - } - arg1 = reinterpret_cast< cmf::project * >(argp1); - if (obj1) { - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "project_use_IDW_meteo" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - } - if (obj2) { - ecode3 = SWIG_AsVal_double(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "project_use_IDW_meteo" "', argument " "3"" of type '" "double""'"); - } - arg3 = static_cast< double >(val3); - } - { - try { - (arg1)->use_IDW_meteo(arg2,arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_project_use_nearest_meteo(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::project *arg1 = (cmf::project *) 0 ; - double arg2 = (double) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "z_weight", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:project_use_nearest_meteo",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__project, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "project_use_nearest_meteo" "', argument " "1"" of type '" "cmf::project *""'"); - } - arg1 = reinterpret_cast< cmf::project * >(argp1); - if (obj1) { - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "project_use_nearest_meteo" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - } - { - try { - (arg1)->use_nearest_meteo(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_project_use_IDW_rainfall(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::project *arg1 = (cmf::project *) 0 ; - double arg2 = (double) 0 ; - double arg3 = (double) 2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - double val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "z_weight",(char *) "power", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OO:project_use_IDW_rainfall",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__project, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "project_use_IDW_rainfall" "', argument " "1"" of type '" "cmf::project *""'"); - } - arg1 = reinterpret_cast< cmf::project * >(argp1); - if (obj1) { - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "project_use_IDW_rainfall" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - } - if (obj2) { - ecode3 = SWIG_AsVal_double(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "project_use_IDW_rainfall" "', argument " "3"" of type '" "double""'"); - } - arg3 = static_cast< double >(val3); - } - { - try { - (arg1)->use_IDW_rainfall(arg2,arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_project_use_nearest_rainfall(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::project *arg1 = (cmf::project *) 0 ; - double arg2 = (double) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "z_weight", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:project_use_nearest_rainfall",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__project, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "project_use_nearest_rainfall" "', argument " "1"" of type '" "cmf::project *""'"); - } - arg1 = reinterpret_cast< cmf::project * >(argp1); - if (obj1) { - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "project_use_nearest_rainfall" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - } - { - try { - (arg1)->use_nearest_rainfall(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_project_get_cell(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::project *arg1 = (cmf::project *) 0 ; - ptrdiff_t arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "index", NULL - }; - cmf::upslope::Cell *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:project_get_cell",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__project, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "project_get_cell" "', argument " "1"" of type '" "cmf::project *""'"); - } - arg1 = reinterpret_cast< cmf::project * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "project_get_cell" "', argument " "2"" of type '" "ptrdiff_t""'"); - } - arg2 = static_cast< ptrdiff_t >(val2); - { - try { - result = (cmf::upslope::Cell *) &(arg1)->get_cell(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_project_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::project *arg1 = (cmf::project *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - size_t result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__project, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "project_size" "', argument " "1"" of type '" "cmf::project const *""'"); - } - arg1 = reinterpret_cast< cmf::project * >(argp1); - { - try { - result = ((cmf::project const *)arg1)->size(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_project(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - std::string arg1 = (std::string) "" ; - PyObject * obj0 = 0 ; - char * kwnames[] = { - (char *) "solute_names", NULL - }; - cmf::project *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|O:new_project",kwnames,&obj0)) SWIG_fail; - if (obj0) { - { - std::string *ptr = (std::string *)0; - int res = SWIG_AsPtr_std_string(obj0, &ptr); - if (!SWIG_IsOK(res) || !ptr) { - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "new_project" "', argument " "1"" of type '" "std::string""'"); - } - arg1 = *ptr; - if (SWIG_IsNewObj(res)) delete ptr; - } - } - { - try { - result = (cmf::project *)new cmf::project(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__project, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_project(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::project *arg1 = (cmf::project *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__project, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_project" "', argument " "1"" of type '" "cmf::project *""'"); - } - arg1 = reinterpret_cast< cmf::project * >(argp1); - { - try { - delete arg1; - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_project_NewCell(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::project *arg1 = (cmf::project *) 0 ; - double arg2 ; - double arg3 ; - double arg4 ; - double arg5 ; - bool arg6 = (bool) false ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - double val3 ; - int ecode3 = 0 ; - double val4 ; - int ecode4 = 0 ; - double val5 ; - int ecode5 = 0 ; - bool val6 ; - int ecode6 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "x",(char *) "y",(char *) "z",(char *) "area",(char *) "with_surfacewater", NULL - }; - cmf::upslope::Cell *result = 0 ; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOO|O:project_NewCell",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__project, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "project_NewCell" "', argument " "1"" of type '" "cmf::project *""'"); - } - arg1 = reinterpret_cast< cmf::project * >(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "project_NewCell" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - ecode3 = SWIG_AsVal_double(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "project_NewCell" "', argument " "3"" of type '" "double""'"); - } - arg3 = static_cast< double >(val3); - ecode4 = SWIG_AsVal_double(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "project_NewCell" "', argument " "4"" of type '" "double""'"); - } - arg4 = static_cast< double >(val4); - ecode5 = SWIG_AsVal_double(obj4, &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "project_NewCell" "', argument " "5"" of type '" "double""'"); - } - arg5 = static_cast< double >(val5); - if (obj5) { - ecode6 = SWIG_AsVal_bool(obj5, &val6); - if (!SWIG_IsOK(ecode6)) { - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "project_NewCell" "', argument " "6"" of type '" "bool""'"); - } - arg6 = static_cast< bool >(val6); - } - { - try { - result = (cmf::upslope::Cell *)(arg1)->NewCell(arg2,arg3,arg4,arg5,arg6); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_project_NewOutlet(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::project *arg1 = (cmf::project *) 0 ; - std::string arg2 ; - double arg3 = (double) 0 ; - double arg4 = (double) 0 ; - double arg5 = (double) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val3 ; - int ecode3 = 0 ; - double val4 ; - int ecode4 = 0 ; - double val5 ; - int ecode5 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "name",(char *) "x",(char *) "y",(char *) "z", NULL - }; - cmf::water::DirichletBoundary::ptr result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOO:project_NewOutlet",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__project, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "project_NewOutlet" "', argument " "1"" of type '" "cmf::project *""'"); - } - arg1 = reinterpret_cast< cmf::project * >(argp1); - { - std::string *ptr = (std::string *)0; - int res = SWIG_AsPtr_std_string(obj1, &ptr); - if (!SWIG_IsOK(res) || !ptr) { - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "project_NewOutlet" "', argument " "2"" of type '" "std::string""'"); - } - arg2 = *ptr; - if (SWIG_IsNewObj(res)) delete ptr; - } - if (obj2) { - ecode3 = SWIG_AsVal_double(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "project_NewOutlet" "', argument " "3"" of type '" "double""'"); - } - arg3 = static_cast< double >(val3); - } - if (obj3) { - ecode4 = SWIG_AsVal_double(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "project_NewOutlet" "', argument " "4"" of type '" "double""'"); - } - arg4 = static_cast< double >(val4); - } - if (obj4) { - ecode5 = SWIG_AsVal_double(obj4, &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "project_NewOutlet" "', argument " "5"" of type '" "double""'"); - } - arg5 = static_cast< double >(val5); - } - { - try { - result = (arg1)->NewOutlet(arg2,arg3,arg4,arg5); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - std::shared_ptr< cmf::water::DirichletBoundary > *smartresult = result ? new std::shared_ptr< cmf::water::DirichletBoundary >(result) : 0; - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__water__DirichletBoundary_t, SWIG_POINTER_OWN); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_project_NewStorage(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::project *arg1 = (cmf::project *) 0 ; - std::string arg2 ; - double arg3 = (double) 0 ; - double arg4 = (double) 0 ; - double arg5 = (double) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val3 ; - int ecode3 = 0 ; - double val4 ; - int ecode4 = 0 ; - double val5 ; - int ecode5 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "name",(char *) "x",(char *) "y",(char *) "z", NULL - }; - cmf::water::WaterStorage::ptr result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOO:project_NewStorage",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__project, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "project_NewStorage" "', argument " "1"" of type '" "cmf::project *""'"); - } - arg1 = reinterpret_cast< cmf::project * >(argp1); - { - std::string *ptr = (std::string *)0; - int res = SWIG_AsPtr_std_string(obj1, &ptr); - if (!SWIG_IsOK(res) || !ptr) { - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "project_NewStorage" "', argument " "2"" of type '" "std::string""'"); - } - arg2 = *ptr; - if (SWIG_IsNewObj(res)) delete ptr; - } - if (obj2) { - ecode3 = SWIG_AsVal_double(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "project_NewStorage" "', argument " "3"" of type '" "double""'"); - } - arg3 = static_cast< double >(val3); - } - if (obj3) { - ecode4 = SWIG_AsVal_double(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "project_NewStorage" "', argument " "4"" of type '" "double""'"); - } - arg4 = static_cast< double >(val4); - } - if (obj4) { - ecode5 = SWIG_AsVal_double(obj4, &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "project_NewStorage" "', argument " "5"" of type '" "double""'"); - } - arg5 = static_cast< double >(val5); - } - { - try { - result = (arg1)->NewStorage(arg2,arg3,arg4,arg5); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - std::shared_ptr< cmf::water::WaterStorage > *smartresult = result ? new std::shared_ptr< cmf::water::WaterStorage >(result) : 0; - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, SWIG_POINTER_OWN); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_project_NewOpenStorage(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::project *arg1 = (cmf::project *) 0 ; - std::string arg2 ; - double arg3 ; - double arg4 ; - double arg5 ; - double arg6 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val3 ; - int ecode3 = 0 ; - double val4 ; - int ecode4 = 0 ; - double val5 ; - int ecode5 = 0 ; - double val6 ; - int ecode6 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "name",(char *) "x",(char *) "y",(char *) "z",(char *) "area", NULL - }; - cmf::river::OpenWaterStorage::ptr result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOOO:project_NewOpenStorage",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__project, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "project_NewOpenStorage" "', argument " "1"" of type '" "cmf::project *""'"); - } - arg1 = reinterpret_cast< cmf::project * >(argp1); - { - std::string *ptr = (std::string *)0; - int res = SWIG_AsPtr_std_string(obj1, &ptr); - if (!SWIG_IsOK(res) || !ptr) { - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "project_NewOpenStorage" "', argument " "2"" of type '" "std::string""'"); - } - arg2 = *ptr; - if (SWIG_IsNewObj(res)) delete ptr; - } - ecode3 = SWIG_AsVal_double(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "project_NewOpenStorage" "', argument " "3"" of type '" "double""'"); - } - arg3 = static_cast< double >(val3); - ecode4 = SWIG_AsVal_double(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "project_NewOpenStorage" "', argument " "4"" of type '" "double""'"); - } - arg4 = static_cast< double >(val4); - ecode5 = SWIG_AsVal_double(obj4, &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "project_NewOpenStorage" "', argument " "5"" of type '" "double""'"); - } - arg5 = static_cast< double >(val5); - ecode6 = SWIG_AsVal_double(obj5, &val6); - if (!SWIG_IsOK(ecode6)) { - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "project_NewOpenStorage" "', argument " "6"" of type '" "double""'"); - } - arg6 = static_cast< double >(val6); - { - try { - result = (arg1)->NewOpenStorage(arg2,arg3,arg4,arg5,arg6); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - std::shared_ptr< cmf::river::OpenWaterStorage > *smartresult = result ? new std::shared_ptr< cmf::river::OpenWaterStorage >(result) : 0; - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__river__OpenWaterStorage_t, SWIG_POINTER_OWN); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_project_NewNeumannBoundary(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::project *arg1 = (cmf::project *) 0 ; - std::string arg2 ; - cmf::water::WaterStorage::ptr arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp3 ; - int res3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "name",(char *) "target", NULL - }; - cmf::water::NeumannBoundary::ptr result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:project_NewNeumannBoundary",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__project, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "project_NewNeumannBoundary" "', argument " "1"" of type '" "cmf::project *""'"); - } - arg1 = reinterpret_cast< cmf::project * >(argp1); - { - std::string *ptr = (std::string *)0; - int res = SWIG_AsPtr_std_string(obj1, &ptr); - if (!SWIG_IsOK(res) || !ptr) { - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "project_NewNeumannBoundary" "', argument " "2"" of type '" "std::string""'"); - } - arg2 = *ptr; - if (SWIG_IsNewObj(res)) delete ptr; - } - { - int newmem = 0; - res3 = SWIG_ConvertPtrAndOwn(obj2, &argp3, SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0 , &newmem); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "project_NewNeumannBoundary" "', argument " "3"" of type '" "cmf::water::WaterStorage::ptr""'"); - } - if (argp3) arg3 = *(reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp3)); - if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp3); - } - { - try { - result = (arg1)->NewNeumannBoundary(arg2,arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - std::shared_ptr< cmf::water::NeumannBoundary > *smartresult = result ? new std::shared_ptr< cmf::water::NeumannBoundary >(result) : 0; - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__water__NeumannBoundary_t, SWIG_POINTER_OWN); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_project_NewReach(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::project *arg1 = (cmf::project *) 0 ; - double arg2 ; - double arg3 ; - double arg4 ; - cmf::river::IChannel *arg5 = 0 ; - bool arg6 = (bool) false ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - double val3 ; - int ecode3 = 0 ; - double val4 ; - int ecode4 = 0 ; - void *argp5 = 0 ; - int res5 = 0 ; - bool val6 ; - int ecode6 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "x",(char *) "y",(char *) "z",(char *) "shape",(char *) "diffusive", NULL - }; - cmf::river::Reach::ptr result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOO|O:project_NewReach",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__project, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "project_NewReach" "', argument " "1"" of type '" "cmf::project *""'"); - } - arg1 = reinterpret_cast< cmf::project * >(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "project_NewReach" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - ecode3 = SWIG_AsVal_double(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "project_NewReach" "', argument " "3"" of type '" "double""'"); - } - arg3 = static_cast< double >(val3); - ecode4 = SWIG_AsVal_double(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "project_NewReach" "', argument " "4"" of type '" "double""'"); - } - arg4 = static_cast< double >(val4); - res5 = SWIG_ConvertPtr(obj4, &argp5, SWIGTYPE_p_cmf__river__IChannel, 0 ); - if (!SWIG_IsOK(res5)) { - SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "project_NewReach" "', argument " "5"" of type '" "cmf::river::IChannel &""'"); - } - if (!argp5) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "project_NewReach" "', argument " "5"" of type '" "cmf::river::IChannel &""'"); - } - arg5 = reinterpret_cast< cmf::river::IChannel * >(argp5); - if (obj5) { - ecode6 = SWIG_AsVal_bool(obj5, &val6); - if (!SWIG_IsOK(ecode6)) { - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "project_NewReach" "', argument " "6"" of type '" "bool""'"); - } - arg6 = static_cast< bool >(val6); - } - { - try { - result = (arg1)->NewReach(arg2,arg3,arg4,*arg5,arg6); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - std::shared_ptr< cmf::river::Reach > *smartresult = result ? new std::shared_ptr< cmf::river::Reach >(result) : 0; - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__river__Reach_t, SWIG_POINTER_OWN); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_project_get_reach(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::project *arg1 = (cmf::project *) 0 ; - ptrdiff_t arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "index", NULL - }; - cmf::river::Reach::ptr result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:project_get_reach",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__project, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "project_get_reach" "', argument " "1"" of type '" "cmf::project *""'"); - } - arg1 = reinterpret_cast< cmf::project * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "project_get_reach" "', argument " "2"" of type '" "ptrdiff_t""'"); - } - arg2 = static_cast< ptrdiff_t >(val2); - { - try { - result = (arg1)->get_reach(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - std::shared_ptr< cmf::river::Reach > *smartresult = result ? new std::shared_ptr< cmf::river::Reach >(result) : 0; - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__river__Reach_t, SWIG_POINTER_OWN); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_project_reach_count(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::project *arg1 = (cmf::project *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - size_t result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__project, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "project_reach_count" "', argument " "1"" of type '" "cmf::project const *""'"); - } - arg1 = reinterpret_cast< cmf::project * >(argp1); - { - try { - result = ((cmf::project const *)arg1)->reach_count(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_project_get_node(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cmf::project *arg1 = (cmf::project *) 0 ; - ptrdiff_t arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "index", NULL - }; - cmf::water::flux_node::ptr result; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:project_get_node",kwnames,&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__project, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "project_get_node" "', argument " "1"" of type '" "cmf::project *""'"); - } - arg1 = reinterpret_cast< cmf::project * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "project_get_node" "', argument " "2"" of type '" "ptrdiff_t""'"); - } - arg2 = static_cast< ptrdiff_t >(val2); - { - try { - result = (arg1)->get_node(arg2); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - { - std::shared_ptr< cmf::water::flux_node > *smartresult = result ? new std::shared_ptr< cmf::water::flux_node >(result) : 0; - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, SWIG_POINTER_OWN); - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_project_node_count(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::project *arg1 = (cmf::project *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - size_t result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__project, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "project_node_count" "', argument " "1"" of type '" "cmf::project const *""'"); - } - arg1 = reinterpret_cast< cmf::project * >(argp1); - { - try { - result = ((cmf::project const *)arg1)->node_count(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_project_get_storages(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::project *arg1 = (cmf::project *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::water::node_list result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__project, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "project_get_storages" "', argument " "1"" of type '" "cmf::project *""'"); - } - arg1 = reinterpret_cast< cmf::project * >(argp1); - { - try { - result = (arg1)->get_storages(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj((new cmf::water::node_list(static_cast< const cmf::water::node_list& >(result))), SWIGTYPE_p_cmf__water__node_list, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_project_cells_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::project *arg1 = (cmf::project *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::upslope::cell_vector *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__project, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "project_cells_get" "', argument " "1"" of type '" "cmf::project *""'"); - } - arg1 = reinterpret_cast< cmf::project * >(argp1); - { - try { - result = (cmf::upslope::cell_vector *)cmf_project_cells_get(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__cell_vector, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *project_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__project, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *project_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -SWIGINTERN PyObject *_wrap_SoluteWaterIntegrator_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::SoluteWaterIntegrator *arg1 = (cmf::math::SoluteWaterIntegrator *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - cmf::math::SoluteWaterIntegrator *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__SoluteWaterIntegrator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SoluteWaterIntegrator_copy" "', argument " "1"" of type '" "cmf::math::SoluteWaterIntegrator const *""'"); - } - arg1 = reinterpret_cast< cmf::math::SoluteWaterIntegrator * >(argp1); - { - try { - result = (cmf::math::SoluteWaterIntegrator *)((cmf::math::SoluteWaterIntegrator const *)arg1)->copy(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__SoluteWaterIntegrator, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_SoluteWaterIntegrator__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - cmf::water::solute_vector *arg1 = 0 ; - cmf::math::Integrator *arg2 = 0 ; - cmf::math::Integrator *arg3 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - cmf::math::SoluteWaterIntegrator *result = 0 ; - - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_cmf__water__solute_vector, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SoluteWaterIntegrator" "', argument " "1"" of type '" "cmf::water::solute_vector const &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SoluteWaterIntegrator" "', argument " "1"" of type '" "cmf::water::solute_vector const &""'"); - } - arg1 = reinterpret_cast< cmf::water::solute_vector * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_cmf__math__Integrator, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SoluteWaterIntegrator" "', argument " "2"" of type '" "cmf::math::Integrator const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SoluteWaterIntegrator" "', argument " "2"" of type '" "cmf::math::Integrator const &""'"); - } - arg2 = reinterpret_cast< cmf::math::Integrator * >(argp2); - res3 = SWIG_ConvertPtr(swig_obj[2], &argp3, SWIGTYPE_p_cmf__math__Integrator, 0 | 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_SoluteWaterIntegrator" "', argument " "3"" of type '" "cmf::math::Integrator const &""'"); - } - if (!argp3) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SoluteWaterIntegrator" "', argument " "3"" of type '" "cmf::math::Integrator const &""'"); - } - arg3 = reinterpret_cast< cmf::math::Integrator * >(argp3); - { - try { - result = (cmf::math::SoluteWaterIntegrator *)new cmf::math::SoluteWaterIntegrator((cmf::water::solute_vector const &)*arg1,(cmf::math::Integrator const &)*arg2,(cmf::math::Integrator const &)*arg3); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__SoluteWaterIntegrator, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_SoluteWaterIntegrator__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - SwigValueWrapper< cmf::water::solute_vector > arg1 ; - cmf::math::Integrator *arg2 = 0 ; - cmf::math::Integrator *arg3 = 0 ; - cmf::math::StateVariableOwner *arg4 = 0 ; - void *argp1 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - void *argp4 = 0 ; - int res4 = 0 ; - cmf::math::SoluteWaterIntegrator *result = 0 ; - - if ((nobjs < 4) || (nobjs > 4)) SWIG_fail; - { - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_cmf__water__solute_vector, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SoluteWaterIntegrator" "', argument " "1"" of type '" "cmf::water::solute_vector""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SoluteWaterIntegrator" "', argument " "1"" of type '" "cmf::water::solute_vector""'"); - } else { - cmf::water::solute_vector * temp = reinterpret_cast< cmf::water::solute_vector * >(argp1); - arg1 = *temp; - if (SWIG_IsNewObj(res1)) delete temp; - } - } - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_cmf__math__Integrator, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SoluteWaterIntegrator" "', argument " "2"" of type '" "cmf::math::Integrator const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SoluteWaterIntegrator" "', argument " "2"" of type '" "cmf::math::Integrator const &""'"); - } - arg2 = reinterpret_cast< cmf::math::Integrator * >(argp2); - res3 = SWIG_ConvertPtr(swig_obj[2], &argp3, SWIGTYPE_p_cmf__math__Integrator, 0 | 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_SoluteWaterIntegrator" "', argument " "3"" of type '" "cmf::math::Integrator const &""'"); - } - if (!argp3) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SoluteWaterIntegrator" "', argument " "3"" of type '" "cmf::math::Integrator const &""'"); - } - arg3 = reinterpret_cast< cmf::math::Integrator * >(argp3); - res4 = SWIG_ConvertPtr(swig_obj[3], &argp4, SWIGTYPE_p_cmf__math__StateVariableOwner, 0 ); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_SoluteWaterIntegrator" "', argument " "4"" of type '" "cmf::math::StateVariableOwner &""'"); - } - if (!argp4) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SoluteWaterIntegrator" "', argument " "4"" of type '" "cmf::math::StateVariableOwner &""'"); - } - arg4 = reinterpret_cast< cmf::math::StateVariableOwner * >(argp4); - { - try { - result = (cmf::math::SoluteWaterIntegrator *)new cmf::math::SoluteWaterIntegrator(arg1,(cmf::math::Integrator const &)*arg2,(cmf::math::Integrator const &)*arg3,*arg4); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__SoluteWaterIntegrator, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_SoluteWaterIntegrator(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[5] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args,"new_SoluteWaterIntegrator",0,4,argv))) SWIG_fail; - --argc; - { - unsigned long _index = 0; - SWIG_TypeRank _rank = 0; - if (argc == 3) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_cmf__water__solute_vector, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_cmf__math__Integrator, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_cmf__math__Integrator, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_1; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 1; - if (_rank == _rankm) goto dispatch; - } - } - check_1: - - if (argc == 4) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_cmf__water__solute_vector, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_cmf__math__Integrator, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_cmf__math__Integrator, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_cmf__math__StateVariableOwner, 0); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_2; - _ranki += _v*_pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; _index = 2; - if (_rank == _rankm) goto dispatch; - } - } - check_2: - - dispatch: - switch(_index) { - case 1: - return _wrap_new_SoluteWaterIntegrator__SWIG_0(self, argc, argv); - case 2: - return _wrap_new_SoluteWaterIntegrator__SWIG_1(self, argc, argv); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_SoluteWaterIntegrator'.\n" - " Possible C/C++ prototypes are:\n" - " cmf::math::SoluteWaterIntegrator::SoluteWaterIntegrator(cmf::water::solute_vector const &,cmf::math::Integrator const &,cmf::math::Integrator const &)\n" - " cmf::math::SoluteWaterIntegrator::SoluteWaterIntegrator(cmf::water::solute_vector,cmf::math::Integrator const &,cmf::math::Integrator const &,cmf::math::StateVariableOwner &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_delete_SoluteWaterIntegrator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::SoluteWaterIntegrator *arg1 = (cmf::math::SoluteWaterIntegrator *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__SoluteWaterIntegrator, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SoluteWaterIntegrator" "', argument " "1"" of type '" "cmf::math::SoluteWaterIntegrator *""'"); - } - arg1 = reinterpret_cast< cmf::math::SoluteWaterIntegrator * >(argp1); - { - try { - delete arg1; - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SoluteWaterIntegrator_to_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::SoluteWaterIntegrator *arg1 = (cmf::math::SoluteWaterIntegrator *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - std::string result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__SoluteWaterIntegrator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SoluteWaterIntegrator_to_string" "', argument " "1"" of type '" "cmf::math::SoluteWaterIntegrator const *""'"); - } - arg1 = reinterpret_cast< cmf::math::SoluteWaterIntegrator * >(argp1); - { - try { - result = ((cmf::math::SoluteWaterIntegrator const *)arg1)->to_string(); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_std_string(static_cast< std::string >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *SoluteWaterIntegrator_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cmf__math__SoluteWaterIntegrator, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *SoluteWaterIntegrator_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - -static PyMethodDef SwigMethods[] = { - { (char *)"SWIG_PyInstanceMethod_New", (PyCFunction)SWIG_PyInstanceMethod_New, METH_O, NULL}, - { (char *)"get_parallel_threads", (PyCFunction)_wrap_get_parallel_threads, METH_NOARGS, (char *)"\n" - "get_parallel_threads() -> int\n" - "\n" - "int\n" - "cmf::math::get_parallel_threads()\n" - "\n" - "Returns the max number of threads used by OpenMP in parallel sections\n" - "of the code. \n" - ""}, - { (char *)"set_parallel_threads", (PyCFunction) _wrap_set_parallel_threads, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "set_parallel_threads(int numthreads) -> int\n" - "\n" - "int\n" - "cmf::math::set_parallel_threads(int numthreads)\n" - "\n" - "Set the number of threads used by OpenMP in parallel sections of the\n" - "code. \n" - ""}, - { (char *)"new_cubicspline", (PyCFunction) _wrap_new_cubicspline, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "new_cubicspline(cmf::math::num_array const & x, cmf::math::num_array const & y) -> cubicspline\n" - "\n" - "cubicspline(const cmf::math::num_array &x, const cmf::math::num_array\n" - "&y) \n" - ""}, - { (char *)"cubicspline_generate", (PyCFunction)_wrap_cubicspline_generate, METH_O, (char *)"\n" - "cubicspline_generate(cubicspline self)\n" - "\n" - "void\n" - "generate() \n" - ""}, - { (char *)"cubicspline_size", (PyCFunction)_wrap_cubicspline_size, METH_O, (char *)"\n" - "cubicspline_size(cubicspline self) -> size_t\n" - "\n" - "size_t size()\n" - "const \n" - ""}, - { (char *)"cubicspline___call__", (PyCFunction) _wrap_cubicspline___call__, METH_VARARGS | METH_KEYWORDS, (char *)"cubicspline___call__(cubicspline self, real x) -> real"}, - { (char *)"delete_cubicspline", (PyCFunction)_wrap_delete_cubicspline, METH_O, (char *)"delete_cubicspline(cubicspline self)"}, - { (char *)"cubicspline_swigregister", cubicspline_swigregister, METH_VARARGS, NULL}, - { (char *)"cubicspline_swiginit", cubicspline_swiginit, METH_VARARGS, NULL}, - { (char *)"point_x_set", _wrap_point_x_set, METH_VARARGS, (char *)"point_x_set(point self, double x)"}, - { (char *)"point_x_get", (PyCFunction)_wrap_point_x_get, METH_O, (char *)"point_x_get(point self) -> double"}, - { (char *)"point_y_set", _wrap_point_y_set, METH_VARARGS, (char *)"point_y_set(point self, double y)"}, - { (char *)"point_y_get", (PyCFunction)_wrap_point_y_get, METH_O, (char *)"point_y_get(point self) -> double"}, - { (char *)"point_z_set", _wrap_point_z_set, METH_VARARGS, (char *)"point_z_set(point self, double z)"}, - { (char *)"point_z_get", (PyCFunction)_wrap_point_z_get, METH_O, (char *)"point_z_get(point self) -> double"}, - { (char *)"new_point", _wrap_new_point, METH_VARARGS, (char *)"\n" - "point()\n" - "point(point p)\n" - "new_point(double x_, double y_, double z_=0.0) -> point\n" - "\n" - "point(double x_,\n" - "double y_, double z_=0.0)\n" - "\n" - "Creates a point from two doubles. \n" - ""}, - { (char *)"point_distanceTo", (PyCFunction) _wrap_point_distanceTo, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "point_distanceTo(point self, point p) -> double\n" - "\n" - "double\n" - "distanceTo(point p) const\n" - "\n" - "Returns the horizontal euclidian distance to another point p.\n" - "\n" - ":math:`\\\\sqrt{(this.x-p.x)^2+(this.y-p.y)^2}` \n" - ""}, - { (char *)"point_z_weight_distance", (PyCFunction) _wrap_point_z_weight_distance, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "point_z_weight_distance(point self, point p, double z_weight) -> double\n" - "\n" - "double z_weight_distance(point p, double z_weight) const\n" - "\n" - "Returns the horizontal euclidian distance plus the absolute of the\n" - "height difference times a factor.\n" - "\n" - ":math:`\\\\sqrt{(this.x-p.x)^2+(this.y-p.y)^2}\\\\ +\\\\ w_{z}|this.z-p.z|`\n" - "\n" - ""}, - { (char *)"point_distance3DTo", (PyCFunction) _wrap_point_distance3DTo, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "point_distance3DTo(point self, point p) -> double\n" - "\n" - "double\n" - "distance3DTo(point p) const\n" - "\n" - "Returns the euclidian distance in space to another point p. \n" - ""}, - { (char *)"point_distance", (PyCFunction) _wrap_point_distance, METH_VARARGS | METH_KEYWORDS, (char *)"point_distance(point p1, point p2) -> double"}, - { (char *)"point_distance_max", (PyCFunction) _wrap_point_distance_max, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "point_distance_max(point self, point p) -> double\n" - "\n" - "double\n" - "distance_max(point p) const\n" - "\n" - "Returns the distance by the maximum orthogonal offset. \n" - ""}, - { (char *)"point_azimuth", (PyCFunction) _wrap_point_azimuth, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "point_azimuth(point self, point p) -> double\n" - "\n" - "double\n" - "azimuth(point p) const\n" - "\n" - "Returns the azimuth angle of the line :math:`\\\\overline{this,p}` to the\n" - "Azimuth in degrees. \n" - ""}, - { (char *)"point_angleToXAxis", (PyCFunction) _wrap_point_angleToXAxis, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "point_angleToXAxis(point self, point p) -> double\n" - "\n" - "double\n" - "angleToXAxis(point p) const\n" - "\n" - "Returns the angle between the line :math:`\\\\overline{this,p}` to the\n" - "x-Axis in degrees. \n" - ""}, - { (char *)"point_sum", (PyCFunction)_wrap_point_sum, METH_O, (char *)"\n" - "point_sum(point self) -> double\n" - "\n" - "double sum() const\n" - "\n" - "Returns x+y+z. \n" - ""}, - { (char *)"point_length", (PyCFunction)_wrap_point_length, METH_O, (char *)"\n" - "point_length(point self) -> double\n" - "\n" - "double length()\n" - "const \n" - ""}, - { (char *)"point___add__", (PyCFunction) _wrap_point___add__, METH_VARARGS | METH_KEYWORDS, (char *)"point___add__(point self, point p) -> point"}, - { (char *)"point___iadd__", (PyCFunction) _wrap_point___iadd__, METH_VARARGS | METH_KEYWORDS, (char *)"point___iadd__(point self, point left) -> point"}, - { (char *)"point___sub__", (PyCFunction) _wrap_point___sub__, METH_VARARGS | METH_KEYWORDS, (char *)"point___sub__(point self, point p) -> point"}, - { (char *)"point___isub__", (PyCFunction) _wrap_point___isub__, METH_VARARGS | METH_KEYWORDS, (char *)"point___isub__(point self, point left) -> point"}, - { (char *)"point___mul__", _wrap_point___mul__, METH_VARARGS, (char *)"\n" - "__mul__(double left) -> point\n" - "point___mul__(point self, point p) -> point\n" - ""}, - { (char *)"point___imul__", _wrap_point___imul__, METH_VARARGS, (char *)"\n" - "__imul__(double left) -> point\n" - "point___imul__(point self, point left) -> point\n" - ""}, - { (char *)"point___truediv__", _wrap_point___truediv__, METH_VARARGS, (char *)"\n" - "__truediv__(double left) -> point\n" - "point___truediv__(point self, point p) -> point\n" - ""}, - { (char *)"point___itruediv__", _wrap_point___itruediv__, METH_VARARGS, (char *)"\n" - "__itruediv__(double left) -> point\n" - "point___itruediv__(point self, point left) -> point\n" - ""}, - { (char *)"point___eq__", (PyCFunction) _wrap_point___eq__, METH_VARARGS | METH_KEYWORDS, (char *)"point___eq__(point self, point p) -> bool"}, - { (char *)"point___ne__", (PyCFunction) _wrap_point___ne__, METH_VARARGS | METH_KEYWORDS, (char *)"point___ne__(point self, point p) -> bool"}, - { (char *)"point___len__", (PyCFunction)_wrap_point___len__, METH_O, (char *)"point___len__(point self) -> int"}, - { (char *)"point___rmul__", (PyCFunction) _wrap_point___rmul__, METH_VARARGS | METH_KEYWORDS, (char *)"point___rmul__(point self, double val) -> point"}, - { (char *)"point___rdiv__", (PyCFunction) _wrap_point___rdiv__, METH_VARARGS | METH_KEYWORDS, (char *)"point___rdiv__(point self, double val) -> point"}, - { (char *)"delete_point", (PyCFunction)_wrap_delete_point, METH_O, (char *)"delete_point(point self)"}, - { (char *)"point_swigregister", point_swigregister, METH_VARARGS, NULL}, - { (char *)"point_swiginit", point_swiginit, METH_VARARGS, NULL}, - { (char *)"dot", (PyCFunction) _wrap_dot, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "dot(point p1, point p2) -> double\n" - "\n" - "double\n" - "cmf::geometry::dot(const point &p1, const point &p2) \n" - ""}, - { (char *)"distance", (PyCFunction) _wrap_distance, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "distance(point p1, point p2) -> double\n" - "\n" - "double\n" - "cmf::geometry::distance(const point &p1, const point &p2) \n" - ""}, - { (char *)"point_vector_X_set", _wrap_point_vector_X_set, METH_VARARGS, (char *)"point_vector_X_set(point_vector self, cmf::math::num_array X)"}, - { (char *)"point_vector_X_get", (PyCFunction)_wrap_point_vector_X_get, METH_O, (char *)"point_vector_X_get(point_vector self) -> cmf::math::num_array"}, - { (char *)"point_vector_Y_set", _wrap_point_vector_Y_set, METH_VARARGS, (char *)"point_vector_Y_set(point_vector self, cmf::math::num_array Y)"}, - { (char *)"point_vector_Y_get", (PyCFunction)_wrap_point_vector_Y_get, METH_O, (char *)"point_vector_Y_get(point_vector self) -> cmf::math::num_array"}, - { (char *)"point_vector_Z_set", _wrap_point_vector_Z_set, METH_VARARGS, (char *)"point_vector_Z_set(point_vector self, cmf::math::num_array Z)"}, - { (char *)"point_vector_Z_get", (PyCFunction)_wrap_point_vector_Z_get, METH_O, (char *)"point_vector_Z_get(point_vector self) -> cmf::math::num_array"}, - { (char *)"new_point_vector", (PyCFunction) _wrap_new_point_vector, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "new_point_vector(ptrdiff_t size) -> point_vector\n" - "\n" - "point_vector(ptrdiff_t size)\n" - "\n" - "Create a point vector of a specific size. \n" - ""}, - { (char *)"point_vector_get", (PyCFunction) _wrap_point_vector_get, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "point_vector_get(point_vector self, ptrdiff_t index) -> point\n" - "\n" - "point\n" - "get(ptrdiff_t index) const\n" - "\n" - "Return a point at index. \n" - ""}, - { (char *)"point_vector_set", (PyCFunction) _wrap_point_vector_set, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "point_vector_set(point_vector self, ptrdiff_t index, point p)\n" - "\n" - "void\n" - "set(ptrdiff_t index, cmf::geometry::point p)\n" - "\n" - "Change the point at index. \n" - ""}, - { (char *)"point_vector_size", (PyCFunction)_wrap_point_vector_size, METH_O, (char *)"\n" - "point_vector_size(point_vector self) -> size_t\n" - "\n" - "size_t\n" - "size() const\n" - "\n" - "Return the number of points in the point_vector. \n" - ""}, - { (char *)"delete_point_vector", (PyCFunction)_wrap_delete_point_vector, METH_O, (char *)"delete_point_vector(point_vector self)"}, - { (char *)"point_vector_swigregister", point_vector_swigregister, METH_VARARGS, NULL}, - { (char *)"point_vector_swiginit", point_vector_swiginit, METH_VARARGS, NULL}, - { (char *)"minimum", (PyCFunction) _wrap_minimum, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "minimum(real a, real b) -> real\n" - "\n" - "real minimum(real a, real b)\n" - "\n" - "Returns the minimum of two values. \n" - ""}, - { (char *)"maximum", (PyCFunction) _wrap_maximum, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "maximum(real a, real b) -> real\n" - "\n" - "real maximum(real a, real b) \n" - ""}, - { (char *)"minmax", (PyCFunction) _wrap_minmax, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "minmax(real x, real min, real max) -> real\n" - "\n" - "real minmax(real x, real min, real\n" - "max) \n" - ""}, - { (char *)"mean", (PyCFunction) _wrap_mean, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "mean(real a, real b) -> real\n" - "\n" - "real mean(real a, real b) \n" - ""}, - { (char *)"geo_mean", (PyCFunction) _wrap_geo_mean, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "geo_mean(real a, real b) -> real\n" - "\n" - "real geo_mean(real a, real b) \n" - ""}, - { (char *)"harmonic_mean", (PyCFunction) _wrap_harmonic_mean, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "harmonic_mean(real a, real b) -> real\n" - "\n" - "real harmonic_mean(real a, real\n" - "b) \n" - ""}, - { (char *)"piecewise_linear", (PyCFunction) _wrap_piecewise_linear, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "piecewise_linear(real x, real xmin, real xmax, real ymin=0, real ymax=1) -> real\n" - "\n" - "real piecewise_linear(real\n" - "x, real xmin, real xmax, real ymin=0, real ymax=1) \n" - ""}, - { (char *)"boltzmann", (PyCFunction) _wrap_boltzmann, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "boltzmann(real x, real x_half, real tau) -> real\n" - "\n" - "real boltzmann(real x, real x_half,\n" - "real tau)\n" - "\n" - "The boltzmann function, used in cmf at several places where a s-shaped\n" - "curve is needed.\n" - "\n" - "\n" - "\n" - ".. math::\n" - "\n" - " f(x,x_{1/2},\\\\tau)=\\\\frac{1}{1+e^{-\\\\frac{x-x_{1/2}}{tau}}}\n" - "\n" - "\n" - ""}, - { (char *)"sign", (PyCFunction) _wrap_sign, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "sign(real x) -> real\n" - "\n" - "real sign(real x) \n" - ""}, - { (char *)"square", (PyCFunction) _wrap_square, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "square(real x) -> real\n" - "\n" - "real square(real x) \n" - ""}, - { (char *)"new_Time", _wrap_new_Time, METH_VARARGS, (char *)"\n" - "Time(int day, int month, int year, int hour=0, int minute=0, int second=0, int ms=0)\n" - "Time(Date date)\n" - "Time(Time t)\n" - "new_Time() -> Time\n" - "\n" - "Time(long long ms) \n" - ""}, - { (char *)"Time_AsDays", (PyCFunction)_wrap_Time_AsDays, METH_O, (char *)"\n" - "Time_AsDays(Time self) -> double\n" - "\n" - "double AsDays() const\n" - "\n" - "Time in days. \n" - ""}, - { (char *)"Time_AsHours", (PyCFunction)_wrap_Time_AsHours, METH_O, (char *)"\n" - "Time_AsHours(Time self) -> double\n" - "\n" - "double AsHours()\n" - "const\n" - "\n" - "Time in hours. \n" - ""}, - { (char *)"Time_AsMinutes", (PyCFunction)_wrap_Time_AsMinutes, METH_O, (char *)"\n" - "Time_AsMinutes(Time self) -> double\n" - "\n" - "double AsMinutes()\n" - "const\n" - "\n" - "Time in minutes. \n" - ""}, - { (char *)"Time_AsSeconds", (PyCFunction)_wrap_Time_AsSeconds, METH_O, (char *)"\n" - "Time_AsSeconds(Time self) -> double\n" - "\n" - "double AsSeconds()\n" - "const\n" - "\n" - "Time in seconds. \n" - ""}, - { (char *)"Time_AsMilliseconds", (PyCFunction)_wrap_Time_AsMilliseconds, METH_O, (char *)"\n" - "Time_AsMilliseconds(Time self) -> long long\n" - "\n" - "long long\n" - "AsMilliseconds() const\n" - "\n" - "Time in milliseconds. \n" - ""}, - { (char *)"Time_AsDate", (PyCFunction)_wrap_Time_AsDate, METH_O, (char *)"\n" - "Time_AsDate(Time self) -> Date\n" - "\n" - "Date AsDate() const\n" - "\n" - ""}, - { (char *)"Time_to_string", (PyCFunction) _wrap_Time_to_string, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "Time_to_string(Time self, char seperator) -> std::string\n" - "\n" - "std::string\n" - "to_string(char seperator=':') \n" - ""}, - { (char *)"Time_is_not_0", (PyCFunction)_wrap_Time_is_not_0, METH_O, (char *)"\n" - "Time_is_not_0(Time self) -> bool\n" - "\n" - "bool is_not_0()\n" - "const \n" - ""}, - { (char *)"Time_DOY", (PyCFunction)_wrap_Time_DOY, METH_O, (char *)"\n" - "Time_DOY(Time self) -> double\n" - "\n" - "double DOY() const \n" - ""}, - { (char *)"Time___add__", (PyCFunction) _wrap_Time___add__, METH_VARARGS | METH_KEYWORDS, (char *)"Time___add__(Time self, Time t1) -> Time"}, - { (char *)"Time___sub__", (PyCFunction) _wrap_Time___sub__, METH_VARARGS | METH_KEYWORDS, (char *)"Time___sub__(Time self, Time t1) -> Time"}, - { (char *)"Time___iadd__", (PyCFunction) _wrap_Time___iadd__, METH_VARARGS | METH_KEYWORDS, (char *)"Time___iadd__(Time self, Time t1) -> Time"}, - { (char *)"Time___isub__", (PyCFunction) _wrap_Time___isub__, METH_VARARGS | METH_KEYWORDS, (char *)"Time___isub__(Time self, Time t1) -> Time"}, - { (char *)"Time___mod__", (PyCFunction) _wrap_Time___mod__, METH_VARARGS | METH_KEYWORDS, (char *)"Time___mod__(Time self, Time t1) -> Time"}, - { (char *)"Time___mul__", _wrap_Time___mul__, METH_VARARGS, (char *)"\n" - "__mul__(double x) -> Time\n" - "__mul__(long long x) -> Time\n" - "Time___mul__(Time self, int x) -> Time\n" - ""}, - { (char *)"Time___imul__", _wrap_Time___imul__, METH_VARARGS, (char *)"\n" - "__imul__(double x) -> Time\n" - "__imul__(long long x) -> Time\n" - "Time___imul__(Time self, int x) -> Time\n" - ""}, - { (char *)"Time___itruediv__", _wrap_Time___itruediv__, METH_VARARGS, (char *)"\n" - "__itruediv__(double x) -> Time\n" - "__itruediv__(long long x) -> Time\n" - "Time___itruediv__(Time self, int x) -> Time\n" - ""}, - { (char *)"Time___imod__", (PyCFunction) _wrap_Time___imod__, METH_VARARGS | METH_KEYWORDS, (char *)"Time___imod__(Time self, Time t1) -> Time"}, - { (char *)"Time___truediv__", _wrap_Time___truediv__, METH_VARARGS, (char *)"\n" - "__truediv__(double x) -> Time\n" - "__truediv__(long long x) -> Time\n" - "__truediv__(int x) -> Time\n" - "Time___truediv__(Time self, Time t1) -> double\n" - ""}, - { (char *)"Time_times_in", (PyCFunction) _wrap_Time_times_in, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "Time_times_in(Time self, Time t1) -> long long\n" - "\n" - "long long\n" - "times_in(const Time &t1) const\n" - "\n" - "Returns the number of times this is included in t1. \n" - ""}, - { (char *)"Time___lt__", (PyCFunction) _wrap_Time___lt__, METH_VARARGS | METH_KEYWORDS, (char *)"Time___lt__(Time self, Time t1) -> bool"}, - { (char *)"Time___gt__", (PyCFunction) _wrap_Time___gt__, METH_VARARGS | METH_KEYWORDS, (char *)"Time___gt__(Time self, Time t1) -> bool"}, - { (char *)"Time___le__", (PyCFunction) _wrap_Time___le__, METH_VARARGS | METH_KEYWORDS, (char *)"Time___le__(Time self, Time t1) -> bool"}, - { (char *)"Time___ge__", (PyCFunction) _wrap_Time___ge__, METH_VARARGS | METH_KEYWORDS, (char *)"Time___ge__(Time self, Time t1) -> bool"}, - { (char *)"Time___eq__", (PyCFunction) _wrap_Time___eq__, METH_VARARGS | METH_KEYWORDS, (char *)"Time___eq__(Time self, Time t1) -> bool"}, - { (char *)"Time___ne__", (PyCFunction) _wrap_Time___ne__, METH_VARARGS | METH_KEYWORDS, (char *)"Time___ne__(Time self, Time t1) -> bool"}, - { (char *)"delete_Time", (PyCFunction)_wrap_delete_Time, METH_O, (char *)"delete_Time(Time self)"}, - { (char *)"Time_swigregister", Time_swigregister, METH_VARARGS, NULL}, - { (char *)"Time_swiginit", Time_swiginit, METH_VARARGS, NULL}, - { (char *)"Date_year_set", _wrap_Date_year_set, METH_VARARGS, (char *)"Date_year_set(Date self, int year)"}, - { (char *)"Date_year_get", (PyCFunction)_wrap_Date_year_get, METH_O, (char *)"Date_year_get(Date self) -> int"}, - { (char *)"Date_month_set", _wrap_Date_month_set, METH_VARARGS, (char *)"Date_month_set(Date self, int month)"}, - { (char *)"Date_month_get", (PyCFunction)_wrap_Date_month_get, METH_O, (char *)"Date_month_get(Date self) -> int"}, - { (char *)"Date_day_set", _wrap_Date_day_set, METH_VARARGS, (char *)"Date_day_set(Date self, int day)"}, - { (char *)"Date_day_get", (PyCFunction)_wrap_Date_day_get, METH_O, (char *)"Date_day_get(Date self) -> int"}, - { (char *)"Date_hour_set", _wrap_Date_hour_set, METH_VARARGS, (char *)"Date_hour_set(Date self, int hour)"}, - { (char *)"Date_hour_get", (PyCFunction)_wrap_Date_hour_get, METH_O, (char *)"Date_hour_get(Date self) -> int"}, - { (char *)"Date_minute_set", _wrap_Date_minute_set, METH_VARARGS, (char *)"Date_minute_set(Date self, int minute)"}, - { (char *)"Date_minute_get", (PyCFunction)_wrap_Date_minute_get, METH_O, (char *)"Date_minute_get(Date self) -> int"}, - { (char *)"Date_second_set", _wrap_Date_second_set, METH_VARARGS, (char *)"Date_second_set(Date self, int second)"}, - { (char *)"Date_second_get", (PyCFunction)_wrap_Date_second_get, METH_O, (char *)"Date_second_get(Date self) -> int"}, - { (char *)"Date_ms_set", _wrap_Date_ms_set, METH_VARARGS, (char *)"Date_ms_set(Date self, int ms)"}, - { (char *)"Date_ms_get", (PyCFunction)_wrap_Date_ms_get, METH_O, (char *)"Date_ms_get(Date self) -> int"}, - { (char *)"new_Date", _wrap_new_Date, METH_VARARGS, (char *)"\n" - "Date(int _day, int _month, int _year, int _hour=0, int _minute=0, int _second=0, int _ms=0)\n" - "new_Date(Time time) -> Date\n" - "\n" - "Date(const Time &time)\n" - "\n" - "Creates a new date from time (based on the 31.12.1899, like in\n" - "Excel(TM)) \n" - ""}, - { (char *)"Date_ToTime", (PyCFunction)_wrap_Date_ToTime, METH_O, (char *)"\n" - "Date_ToTime(Date self) -> Time\n" - "\n" - "Time ToTime()\n" - "\n" - "Converts a date to Time (based on the 31.12.1899, like in Excel(TM) \n" - ""}, - { (char *)"Date_DOY", (PyCFunction)_wrap_Date_DOY, METH_O, (char *)"\n" - "Date_DOY(Date self) -> double\n" - "\n" - "double DOY()\n" - "\n" - "Returns the day of year. \n" - ""}, - { (char *)"Date_to_string", (PyCFunction)_wrap_Date_to_string, METH_O, (char *)"\n" - "Date_to_string(Date self) -> std::string\n" - "\n" - "std::string\n" - "to_string()\n" - "\n" - "Returns a string representing the date. \n" - ""}, - { (char *)"delete_Date", (PyCFunction)_wrap_delete_Date, METH_O, (char *)"delete_Date(Date self)"}, - { (char *)"Date_swigregister", Date_swigregister, METH_VARARGS, NULL}, - { (char *)"Date_swiginit", Date_swiginit, METH_VARARGS, NULL}, - { (char *)"timeseries_interpolationpower", (PyCFunction)_wrap_timeseries_interpolationpower, METH_O, (char *)"\n" - "timeseries_interpolationpower(timeseries self) -> int\n" - "\n" - "int\n" - "interpolationpower() const\n" - "\n" - "Method for the interpolation (0 - Nearest neighbor, 1- linear, 2 -\n" - "cubic spline (not implemented yet) \n" - ""}, - { (char *)"timeseries_add", (PyCFunction) _wrap_timeseries_add, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "timeseries_add(timeseries self, double Value)\n" - "\n" - "void add(double\n" - "Value)\n" - "\n" - "Appends a measurement. \n" - ""}, - { (char *)"timeseries_is_empty", (PyCFunction)_wrap_timeseries_is_empty, METH_O, (char *)"\n" - "timeseries_is_empty(timeseries self) -> bool\n" - "\n" - "bool\n" - "is_empty() const\n" - "\n" - "returns true if no values are added to the timeseries \n" - ""}, - { (char *)"timeseries_clear", (PyCFunction)_wrap_timeseries_clear, METH_O, (char *)"\n" - "timeseries_clear(timeseries self)\n" - "\n" - "void clear() \n" - ""}, - { (char *)"timeseries_adress", (PyCFunction)_wrap_timeseries_adress, METH_O, (char *)"\n" - "timeseries_adress(timeseries self) -> size_t\n" - "\n" - "size_t adress()\n" - "const \n" - ""}, - { (char *)"timeseries_copy", (PyCFunction)_wrap_timeseries_copy, METH_O, (char *)"\n" - "timeseries_copy(timeseries self) -> timeseries\n" - "\n" - "timeseries copy()\n" - "const \n" - ""}, - { (char *)"timeseries_size", (PyCFunction)_wrap_timeseries_size, METH_O, (char *)"\n" - "timeseries_size(timeseries self) -> size_t\n" - "\n" - "size_t size()\n" - "const\n" - "\n" - "Number of items in the timeseries. \n" - ""}, - { (char *)"timeseries_count_values", (PyCFunction)_wrap_timeseries_count_values, METH_O, (char *)"\n" - "timeseries_count_values(timeseries self) -> size_t\n" - "\n" - "size_t\n" - "count_values() const\n" - "\n" - "Number of valid values (=size - # of NaN's) \n" - ""}, - { (char *)"new_timeseries", (PyCFunction) _wrap_new_timeseries, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "new_timeseries(Time begin, Time step, int interpolationmethod=1, size_t count=0) -> timeseries\n" - "\n" - "timeseries(const cmf::math::timeseries &ts) \n" - ""}, - { (char *)"timeseries_from_array", (PyCFunction) _wrap_timeseries_from_array, METH_VARARGS | METH_KEYWORDS, (char *)"timeseries_from_array(Time begin, Time step, cmf::math::num_array const & data) -> timeseries"}, - { (char *)"timeseries_from_scalar", (PyCFunction) _wrap_timeseries_from_scalar, METH_VARARGS | METH_KEYWORDS, (char *)"timeseries_from_scalar(double scalar) -> timeseries"}, - { (char *)"timeseries_from_file", (PyCFunction) _wrap_timeseries_from_file, METH_VARARGS | METH_KEYWORDS, (char *)"timeseries_from_file(std::string filename) -> timeseries"}, - { (char *)"timeseries_get_t", (PyCFunction) _wrap_timeseries_get_t, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "timeseries_get_t(timeseries self, Time t) -> double\n" - "\n" - "double\n" - "get_t(cmf::math::Time t) const \n" - ""}, - { (char *)"timeseries_get_i", (PyCFunction) _wrap_timeseries_get_i, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "timeseries_get_i(timeseries self, ptrdiff_t i) -> double\n" - "\n" - "double\n" - "get_i(ptrdiff_t i) const \n" - ""}, - { (char *)"timeseries_set_t", (PyCFunction) _wrap_timeseries_set_t, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "timeseries_set_t(timeseries self, Time t, double value)\n" - "\n" - "void\n" - "set_t(cmf::math::Time t, double value) \n" - ""}, - { (char *)"timeseries_set_i", (PyCFunction) _wrap_timeseries_set_i, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "timeseries_set_i(timeseries self, ptrdiff_t i, double value)\n" - "\n" - "void\n" - "set_i(ptrdiff_t i, double value) \n" - ""}, - { (char *)"timeseries_get_slice", _wrap_timeseries_get_slice, METH_VARARGS, (char *)"\n" - "get_slice(Time _begin, Time _end, Time _step) -> timeseries\n" - "timeseries_get_slice(timeseries self, ptrdiff_t _begin, ptrdiff_t _end, ptrdiff_t step=1) -> timeseries\n" - "\n" - "cmf::math::timeseries get_slice(ptrdiff_t _begin, ptrdiff_t _end,\n" - "ptrdiff_t step=1) \n" - ""}, - { (char *)"timeseries_set_slice", _wrap_timeseries_set_slice, METH_VARARGS, (char *)"\n" - "set_slice(Time _begin, Time _end, timeseries values)\n" - "timeseries_set_slice(timeseries self, ptrdiff_t _begin, ptrdiff_t _end, timeseries _values)\n" - "\n" - "void\n" - "set_slice(ptrdiff_t _begin, ptrdiff_t _end, cmf::math::timeseries\n" - "_values) \n" - ""}, - { (char *)"timeseries_remove_nodata", (PyCFunction) _wrap_timeseries_remove_nodata, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "timeseries_remove_nodata(timeseries self, double nodata_value)\n" - "\n" - "void\n" - "remove_nodata(double nodata_value) \n" - ""}, - { (char *)"timeseries___iadd__", _wrap_timeseries___iadd__, METH_VARARGS, (char *)"\n" - "__iadd__(timeseries arg2) -> timeseries\n" - "timeseries___iadd__(timeseries self, double arg3) -> timeseries\n" - ""}, - { (char *)"timeseries___isub__", _wrap_timeseries___isub__, METH_VARARGS, (char *)"\n" - "__isub__(timeseries arg2) -> timeseries\n" - "timeseries___isub__(timeseries self, double arg3) -> timeseries\n" - ""}, - { (char *)"timeseries___imul__", _wrap_timeseries___imul__, METH_VARARGS, (char *)"\n" - "__imul__(timeseries arg2) -> timeseries\n" - "timeseries___imul__(timeseries self, double arg3) -> timeseries\n" - ""}, - { (char *)"timeseries___itruediv__", _wrap_timeseries___itruediv__, METH_VARARGS, (char *)"\n" - "__itruediv__(timeseries arg2) -> timeseries\n" - "timeseries___itruediv__(timeseries self, double arg3) -> timeseries\n" - ""}, - { (char *)"timeseries___add__", _wrap_timeseries___add__, METH_VARARGS, (char *)"\n" - "__add__(timeseries arg2) -> timeseries\n" - "timeseries___add__(timeseries self, double arg3) -> timeseries\n" - ""}, - { (char *)"timeseries___sub__", _wrap_timeseries___sub__, METH_VARARGS, (char *)"\n" - "__sub__(timeseries arg2) -> timeseries\n" - "timeseries___sub__(timeseries self, double arg3) -> timeseries\n" - ""}, - { (char *)"timeseries___mul__", _wrap_timeseries___mul__, METH_VARARGS, (char *)"\n" - "__mul__(timeseries arg2) -> timeseries\n" - "timeseries___mul__(timeseries self, double arg3) -> timeseries\n" - ""}, - { (char *)"timeseries___truediv__", _wrap_timeseries___truediv__, METH_VARARGS, (char *)"\n" - "__truediv__(timeseries arg2) -> timeseries\n" - "timeseries___truediv__(timeseries self, double arg3) -> timeseries\n" - ""}, - { (char *)"timeseries___neg__", (PyCFunction)_wrap_timeseries___neg__, METH_O, (char *)"timeseries___neg__(timeseries self) -> timeseries"}, - { (char *)"timeseries_inv", (PyCFunction)_wrap_timeseries_inv, METH_O, (char *)"\n" - "timeseries_inv(timeseries self) -> timeseries\n" - "\n" - "timeseries inv()\n" - "const \n" - ""}, - { (char *)"timeseries_reduce_min", (PyCFunction) _wrap_timeseries_reduce_min, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "timeseries_reduce_min(timeseries self, Time begin, Time step) -> timeseries\n" - "\n" - "timeseries\n" - "reduce_min(cmf::math::Time begin, cmf::math::Time step) const\n" - "\n" - "Creates a timeseries with a bigger timestep, containing the minimum.\n" - "\n" - ""}, - { (char *)"timeseries_reduce_max", (PyCFunction) _wrap_timeseries_reduce_max, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "timeseries_reduce_max(timeseries self, Time begin, Time step) -> timeseries\n" - "\n" - "timeseries\n" - "reduce_max(cmf::math::Time begin, cmf::math::Time step) const\n" - "\n" - "Creates a timeseries with a bigger timestep, containing the maximum.\n" - "\n" - ""}, - { (char *)"timeseries_reduce_sum", (PyCFunction) _wrap_timeseries_reduce_sum, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "timeseries_reduce_sum(timeseries self, Time begin, Time step) -> timeseries\n" - "\n" - "timeseries\n" - "reduce_sum(cmf::math::Time begin, cmf::math::Time step) const\n" - "\n" - "Creates a timeseries with a bigger timestep, containing the sum. \n" - ""}, - { (char *)"timeseries_reduce_avg", (PyCFunction) _wrap_timeseries_reduce_avg, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "timeseries_reduce_avg(timeseries self, Time begin, Time step) -> timeseries\n" - "\n" - "timeseries\n" - "reduce_avg(cmf::math::Time begin, cmf::math::Time step) const\n" - "\n" - "Creates a timeseries with a bigger timestep, containing the average.\n" - "\n" - ""}, - { (char *)"timeseries_floating_avg", _wrap_timeseries_floating_avg, METH_VARARGS, (char *)"\n" - "floating_avg(Time window_width) -> timeseries\n" - "timeseries_floating_avg(timeseries self, size_t window_size) -> timeseries\n" - "\n" - "timeseries floating_avg(size_t window_size) const \n" - ""}, - { (char *)"timeseries_floating_max", (PyCFunction) _wrap_timeseries_floating_max, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "timeseries_floating_max(timeseries self, Time window_width) -> timeseries\n" - "\n" - "timeseries floating_max(cmf::math::Time window_width) const \n" - ""}, - { (char *)"timeseries_floating_min", (PyCFunction) _wrap_timeseries_floating_min, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "timeseries_floating_min(timeseries self, Time window_width) -> timeseries\n" - "\n" - "timeseries floating_min(cmf::math::Time window_width) const \n" - ""}, - { (char *)"timeseries_mean", (PyCFunction)_wrap_timeseries_mean, METH_O, (char *)"\n" - "timeseries_mean(timeseries self) -> double\n" - "\n" - "double mean()\n" - "const \n" - ""}, - { (char *)"timeseries_min", (PyCFunction)_wrap_timeseries_min, METH_O, (char *)"\n" - "timeseries_min(timeseries self) -> double\n" - "\n" - "double min() const\n" - "\n" - ""}, - { (char *)"timeseries_max", (PyCFunction)_wrap_timeseries_max, METH_O, (char *)"\n" - "timeseries_max(timeseries self) -> double\n" - "\n" - "double max() const\n" - "\n" - ""}, - { (char *)"timeseries_log", (PyCFunction)_wrap_timeseries_log, METH_O, (char *)"\n" - "timeseries_log(timeseries self) -> timeseries\n" - "\n" - "timeseries log()\n" - "const \n" - ""}, - { (char *)"timeseries_log10", (PyCFunction)_wrap_timeseries_log10, METH_O, (char *)"\n" - "timeseries_log10(timeseries self) -> timeseries\n" - "\n" - "timeseries\n" - "log10() const \n" - ""}, - { (char *)"timeseries_power", (PyCFunction) _wrap_timeseries_power, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "timeseries_power(timeseries self, double exponent) -> timeseries\n" - "\n" - "timeseries\n" - "power(double exponent) const \n" - ""}, - { (char *)"timeseries_exp", (PyCFunction)_wrap_timeseries_exp, METH_O, (char *)"\n" - "timeseries_exp(timeseries self) -> timeseries\n" - "\n" - "timeseries exp()\n" - "const \n" - ""}, - { (char *)"timeseries_begin_get", (PyCFunction)_wrap_timeseries_begin_get, METH_O, (char *)"\n" - "timeseries_begin_get(timeseries self) -> Time\n" - "\n" - "cmf::math::Time\n" - "begin() const\n" - "\n" - "First date of measurement. \n" - ""}, - { (char *)"timeseries_step_get", (PyCFunction)_wrap_timeseries_step_get, METH_O, (char *)"\n" - "timeseries_step_get(timeseries self) -> Time\n" - "\n" - "cmf::math::Time\n" - "step() const\n" - "\n" - "Time between the measurements. \n" - ""}, - { (char *)"timeseries_end_get", (PyCFunction)_wrap_timeseries_end_get, METH_O, (char *)"\n" - "timeseries_end_get(timeseries self) -> Time\n" - "\n" - "cmf::math::Time\n" - "end() const\n" - "\n" - "Last date of measurements. \n" - ""}, - { (char *)"timeseries___len__", (PyCFunction)_wrap_timeseries___len__, METH_O, (char *)"timeseries___len__(timeseries self) -> ptrdiff_t"}, - { (char *)"delete_timeseries", (PyCFunction)_wrap_delete_timeseries, METH_O, (char *)"delete_timeseries(timeseries self)"}, - { (char *)"timeseries_swigregister", timeseries_swigregister, METH_VARARGS, NULL}, - { (char *)"timeseries_swiginit", timeseries_swiginit, METH_VARARGS, NULL}, - { (char *)"nash_sutcliffe", (PyCFunction) _wrap_nash_sutcliffe, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "nash_sutcliffe(timeseries model, timeseries observation) -> double\n" - "\n" - "double\n" - "cmf::math::nash_sutcliffe(const cmf::math::timeseries &model, const\n" - "cmf::math::timeseries &observation)\n" - "\n" - "Calculates the Nash-Sutcliffe efficiency of a modeled timeseries in\n" - "comparison with an observed timeseries.\n" - "\n" - "The Nash-Sutcliffe efficiancy is defined as: \n" - "\n" - ".. math::\n" - "\n" - " E = 1 -\n" - " \\\\frac{\\\\sum_{t=1}^{T}(M_t - O_t)^2}{\\\\sum_{t=1}^{T}(O_t -\n" - " \\\\overline{O})^2}\n" - "\n" - "where :math:`T` is the number of observation time\n" - "steps\n" - "\n" - ":math:`M` is the timeseries of model results matchinig O\n" - "\n" - ":math:`O` is the timeseries containing observations\n" - "\n" - ":math:`\\\\overline{O}` is the arithmetic mean of observations \n" - ""}, - { (char *)"integratable_integrate", (PyCFunction) _wrap_integratable_integrate, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "integratable_integrate(integratable self, Time t)\n" - "\n" - "virtual\n" - "void integrate(Time t)=0\n" - "\n" - "Integrates the variable until time t. \n" - ""}, - { (char *)"integratable_reset", (PyCFunction) _wrap_integratable_reset, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "integratable_reset(integratable self, Time t)\n" - "\n" - "virtual void\n" - "reset(Time t)=0\n" - "\n" - "Sets the start time of the integral. \n" - ""}, - { (char *)"integratable_sum", (PyCFunction)_wrap_integratable_sum, METH_O, (char *)"\n" - "integratable_sum(integratable self) -> double\n" - "\n" - "virtual double\n" - "sum() const =0\n" - "\n" - "Get the integral from the last reset until the last call of integrate.\n" - "\n" - ""}, - { (char *)"integratable_avg", (PyCFunction)_wrap_integratable_avg, METH_O, (char *)"\n" - "integratable_avg(integratable self) -> double\n" - "\n" - "virtual double\n" - "avg() const =0\n" - "\n" - "Returns average of the integrated variable (eg. flux) from the last\n" - "reset until the last call of integrate. \n" - ""}, - { (char *)"delete_integratable", (PyCFunction)_wrap_delete_integratable, METH_O, (char *)"delete_integratable(integratable self)"}, - { (char *)"integratable_swigregister", integratable_swigregister, METH_VARARGS, NULL}, - { (char *)"integratable_list_append", (PyCFunction) _wrap_integratable_list_append, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "integratable_list_append(integratable_list self, cmf::math::integratable::ptr add)\n" - "\n" - "void\n" - "append(cmf::math::integratable::ptr add)\n" - "\n" - "Adds an integratable to the list. \n" - ""}, - { (char *)"integratable_list_remove", (PyCFunction) _wrap_integratable_list_remove, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "integratable_list_remove(integratable_list self, cmf::math::integratable::ptr rm)\n" - "\n" - "void\n" - "remove(cmf::math::integratable::ptr rm)\n" - "\n" - "Removes an integratable from the list. \n" - ""}, - { (char *)"integratable_list___getitem", (PyCFunction) _wrap_integratable_list___getitem, METH_VARARGS | METH_KEYWORDS, (char *)"integratable_list___getitem(integratable_list self, int index) -> cmf::math::integratable::ptr"}, - { (char *)"integratable_list_size", (PyCFunction)_wrap_integratable_list_size, METH_O, (char *)"\n" - "integratable_list_size(integratable_list self) -> size_t\n" - "\n" - "size_t\n" - "size() const\n" - "\n" - "Number of integratables in the list. \n" - ""}, - { (char *)"integratable_list_avg", (PyCFunction)_wrap_integratable_list_avg, METH_O, (char *)"\n" - "integratable_list_avg(integratable_list self) -> cmf::math::num_array\n" - "\n" - "cmf::math::num_array avg() const \n" - ""}, - { (char *)"integratable_list_sum", (PyCFunction)_wrap_integratable_list_sum, METH_O, (char *)"\n" - "integratable_list_sum(integratable_list self) -> cmf::math::num_array\n" - "\n" - "cmf::math::num_array sum() const \n" - ""}, - { (char *)"integratable_list_reset", (PyCFunction) _wrap_integratable_list_reset, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "integratable_list_reset(integratable_list self, Time t)\n" - "\n" - "void\n" - "reset(Time t) \n" - ""}, - { (char *)"integratable_list_integrate", (PyCFunction) _wrap_integratable_list_integrate, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "integratable_list_integrate(integratable_list self, Time t)\n" - "\n" - "void\n" - "integrate(Time t) \n" - ""}, - { (char *)"new_integratable_list", _wrap_new_integratable_list, METH_VARARGS, (char *)"\n" - "integratable_list()\n" - "new_integratable_list(integratable_list for_copy) -> integratable_list\n" - "\n" - "integratable_list(const integratable_list &for_copy) \n" - ""}, - { (char *)"integratable_list___len__", (PyCFunction)_wrap_integratable_list___len__, METH_O, (char *)"integratable_list___len__(integratable_list self) -> size_t"}, - { (char *)"delete_integratable_list", (PyCFunction)_wrap_delete_integratable_list, METH_O, (char *)"delete_integratable_list(integratable_list self)"}, - { (char *)"integratable_list_swigregister", integratable_list_swigregister, METH_VARARGS, NULL}, - { (char *)"integratable_list_swiginit", integratable_list_swiginit, METH_VARARGS, NULL}, - { (char *)"StateVariable_dxdt", (PyCFunction) _wrap_StateVariable_dxdt, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "StateVariable_dxdt(StateVariable self, Time time) -> real\n" - "\n" - "virtual real\n" - "dxdt(const cmf::math::Time &time)=0\n" - "\n" - "Returns the derivate of the state variable at time time. \n" - ""}, - { (char *)"StateVariable_get_abs_errtol", (PyCFunction) _wrap_StateVariable_get_abs_errtol, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "StateVariable_get_abs_errtol(StateVariable self, real rel_errtol) -> real\n" - "\n" - "virtual real get_abs_errtol(real rel_errtol) const \n" - ""}, - { (char *)"StateVariable_to_string", (PyCFunction)_wrap_StateVariable_to_string, METH_O, (char *)"\n" - "StateVariable_to_string(StateVariable self) -> std::string\n" - "\n" - "virtual\n" - "std::string to_string() const =0 \n" - ""}, - { (char *)"delete_StateVariable", (PyCFunction)_wrap_delete_StateVariable, METH_O, (char *)"\n" - "delete_StateVariable(StateVariable self)\n" - "\n" - "virtual ~StateVariable() \n" - ""}, - { (char *)"StateVariable_state_set", _wrap_StateVariable_state_set, METH_VARARGS, (char *)"StateVariable_state_set(StateVariable self, real state)"}, - { (char *)"StateVariable_state_get", (PyCFunction)_wrap_StateVariable_state_get, METH_O, (char *)"StateVariable_state_get(StateVariable self) -> real"}, - { (char *)"StateVariable_swigregister", StateVariable_swigregister, METH_VARARGS, NULL}, - { (char *)"StateVariableOwner_get_states", (PyCFunction)_wrap_StateVariableOwner_get_states, METH_O, (char *)"\n" - "StateVariableOwner_get_states(StateVariableOwner self) -> StateVariableList\n" - "\n" - "virtual StateVariableList get_states()=0\n" - "\n" - "Add the state variables, owned by an object derived from\n" - "StateVariableOwner, to the given vector. \n" - ""}, - { (char *)"delete_StateVariableOwner", (PyCFunction)_wrap_delete_StateVariableOwner, METH_O, (char *)"\n" - "delete_StateVariableOwner(StateVariableOwner self)\n" - "\n" - "virtual\n" - "~StateVariableOwner() \n" - ""}, - { (char *)"StateVariableOwner_swigregister", StateVariableOwner_swigregister, METH_VARARGS, NULL}, - { (char *)"StateVariableList_append", (PyCFunction) _wrap_StateVariableList_append, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "StateVariableList_append(StateVariableList self, cmf::math::StateVariable::ptr sv)\n" - "\n" - "void\n" - "append(StateVariable::ptr sv) \n" - ""}, - { (char *)"StateVariableList_extend", (PyCFunction) _wrap_StateVariableList_extend, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "StateVariableList_extend(StateVariableList self, StateVariableOwner svo)\n" - "\n" - "void\n" - "extend(StateVariableOwner &svo) \n" - ""}, - { (char *)"StateVariableList___iadd__", _wrap_StateVariableList___iadd__, METH_VARARGS, (char *)"\n" - "__iadd__(StateVariableList food) -> StateVariableList\n" - "StateVariableList___iadd__(StateVariableList self, StateVariableOwner svo) -> StateVariableList\n" - ""}, - { (char *)"StateVariableList_size", (PyCFunction)_wrap_StateVariableList_size, METH_O, (char *)"\n" - "StateVariableList_size(StateVariableList self) -> size_t\n" - "\n" - "size_t\n" - "size() const \n" - ""}, - { (char *)"delete_StateVariableList", (PyCFunction)_wrap_delete_StateVariableList, METH_O, (char *)"\n" - "delete_StateVariableList(StateVariableList self)\n" - "\n" - "virtual\n" - "~StateVariableList() \n" - ""}, - { (char *)"StateVariableList___len__", (PyCFunction)_wrap_StateVariableList___len__, METH_O, (char *)"StateVariableList___len__(StateVariableList self) -> size_t"}, - { (char *)"new_StateVariableList", (PyCFunction)_wrap_new_StateVariableList, METH_NOARGS, (char *)"new_StateVariableList() -> StateVariableList"}, - { (char *)"StateVariableList_swigregister", StateVariableList_swigregister, METH_VARARGS, NULL}, - { (char *)"StateVariableList_swiginit", StateVariableList_swiginit, METH_VARARGS, NULL}, - { (char *)"Integrator_get_dxdt", (PyCFunction) _wrap_Integrator_get_dxdt, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "Integrator_get_dxdt(Integrator self, Time time) -> cmf::math::num_array\n" - "\n" - "cmf::math::num_array get_dxdt(Time time) const \n" - ""}, - { (char *)"Integrator_add_states", (PyCFunction) _wrap_Integrator_add_states, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "Integrator_add_states(Integrator self, StateVariableOwner stateOwner)\n" - "\n" - "virtual\n" - "void add_states(cmf::math::StateVariableOwner &stateOwner)\n" - "\n" - "Add state variables from a StateVariableOwner. \n" - ""}, - { (char *)"Integrator_add_single_state", (PyCFunction) _wrap_Integrator_add_single_state, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "Integrator_add_single_state(Integrator self, cmf::math::StateVariable::ptr state)\n" - "\n" - "virtual void add_single_state(cmf::math::StateVariable::ptr state)\n" - "\n" - "Adds a single state variable to the integrator. \n" - ""}, - { (char *)"Integrator_integratables_set", _wrap_Integrator_integratables_set, METH_VARARGS, (char *)"Integrator_integratables_set(Integrator self, integratable_list integratables)"}, - { (char *)"Integrator_integratables_get", (PyCFunction)_wrap_Integrator_integratables_get, METH_O, (char *)"Integrator_integratables_get(Integrator self) -> integratable_list"}, - { (char *)"Integrator_reset_integratables_set", _wrap_Integrator_reset_integratables_set, METH_VARARGS, (char *)"Integrator_reset_integratables_set(Integrator self, bool reset_integratables)"}, - { (char *)"Integrator_reset_integratables_get", (PyCFunction)_wrap_Integrator_reset_integratables_get, METH_O, (char *)"Integrator_reset_integratables_get(Integrator self) -> bool"}, - { (char *)"Integrator_use_OpenMP_set", _wrap_Integrator_use_OpenMP_set, METH_VARARGS, (char *)"Integrator_use_OpenMP_set(Integrator self, bool use_OpenMP)"}, - { (char *)"Integrator_use_OpenMP_get", (PyCFunction)_wrap_Integrator_use_OpenMP_get, METH_O, (char *)"Integrator_use_OpenMP_get(Integrator self) -> bool"}, - { (char *)"Integrator_size", (PyCFunction)_wrap_Integrator_size, METH_O, (char *)"\n" - "Integrator_size(Integrator self) -> size_t\n" - "\n" - "size_t size()\n" - "const\n" - "\n" - "returns the number of state variables \n" - ""}, - { (char *)"Integrator_get_state", (PyCFunction) _wrap_Integrator_get_state, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "Integrator_get_state(Integrator self, ptrdiff_t position) -> real\n" - "\n" - "real\n" - "get_state(ptrdiff_t position) const\n" - "\n" - "Returns the statevariable at position Simplifies the assessment of\n" - "state variables. \n" - ""}, - { (char *)"Integrator_set_state", (PyCFunction) _wrap_Integrator_set_state, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "Integrator_set_state(Integrator self, ptrdiff_t position, real newState)\n" - "\n" - "void\n" - "set_state(ptrdiff_t position, real newState)\n" - "\n" - "Simplifies the assessment of state variables. \n" - ""}, - { (char *)"Integrator_get_states", _wrap_Integrator_get_states, METH_VARARGS, (char *)"\n" - "get_states() -> cmf::math::num_array\n" - "Integrator_get_states(Integrator self) -> StateVariableList\n" - "\n" - "StateVariableList get_states()\n" - "\n" - "gets the state variables of the integrator \n" - ""}, - { (char *)"delete_Integrator", (PyCFunction)_wrap_delete_Integrator, METH_O, (char *)"\n" - "delete_Integrator(Integrator self)\n" - "\n" - "virtual\n" - "~Integrator() \n" - ""}, - { (char *)"Integrator_get_t", (PyCFunction)_wrap_Integrator_get_t, METH_O, (char *)"\n" - "Integrator_get_t(Integrator self) -> Time\n" - "\n" - "cmf::math::Time\n" - "get_t() const\n" - "\n" - "Returns the current model time. \n" - ""}, - { (char *)"Integrator_set_t", (PyCFunction) _wrap_Integrator_set_t, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "Integrator_set_t(Integrator self, Time val)\n" - "\n" - "void\n" - "set_t(cmf::math::Time val)\n" - "\n" - "Sets the current model time. \n" - ""}, - { (char *)"Integrator_get_dt", (PyCFunction)_wrap_Integrator_get_dt, METH_O, (char *)"\n" - "Integrator_get_dt(Integrator self) -> Time\n" - "\n" - "cmf::math::Time\n" - "get_dt() const\n" - "\n" - "Returns the last time step. \n" - ""}, - { (char *)"Integrator_reset", (PyCFunction)_wrap_Integrator_reset, METH_O, (char *)"\n" - "Integrator_reset(Integrator self)\n" - "\n" - "virtual void\n" - "reset()\n" - "\n" - "Resets any saved history (for multistep methods) \n" - ""}, - { (char *)"Integrator_copy", (PyCFunction)_wrap_Integrator_copy, METH_O, (char *)"\n" - "Integrator_copy(Integrator self) -> Integrator\n" - "\n" - "virtual\n" - "Integrator* copy() const =0\n" - "\n" - "Polymorphic copy constructor. \n" - ""}, - { (char *)"Integrator_integrate", (PyCFunction) _wrap_Integrator_integrate, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "Integrator_integrate(Integrator self, Time t_max, Time dt) -> int\n" - "\n" - "virtual int\n" - "integrate(cmf::math::Time t_max, cmf::math::Time dt)=0\n" - "\n" - "Integrates the vector of state variables.\n" - "\n" - "Parameters:\n" - "-----------\n" - "\n" - "t_max: To stop the model (if running in a model framework) at time\n" - "steps of value exchange e.g. full hours, the next value exchange time\n" - "can be given\n" - "\n" - "dt: Takes the proposed time step, and changes it into the effectively\n" - "used time step according to the local stiffness of the problem and\n" - "MaxTime \n" - ""}, - { (char *)"Integrator_integrate_until", (PyCFunction) _wrap_Integrator_integrate_until, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "Integrator_integrate_until(Integrator self, Time t_max, Time dt, bool reset=False)\n" - "\n" - "void\n" - "integrate_until(cmf::math::Time t_max, cmf::math::Time dt=Time(), bool\n" - "reset=false)\n" - "\n" - "Integrates the vector of state variables until t_max.\n" - "\n" - "Parameters:\n" - "-----------\n" - "\n" - "t_max: Time, the solver should run to\n" - "\n" - "dt: Time step (may be omitted)\n" - "\n" - "reset: If true, solver is reseted before integration starts \n" - ""}, - { (char *)"Integrator___getitem__", (PyCFunction) _wrap_Integrator___getitem__, METH_VARARGS | METH_KEYWORDS, (char *)"Integrator___getitem__(Integrator self, int index) -> cmf::math::StateVariable::ptr"}, - { (char *)"Integrator_swigregister", Integrator_swigregister, METH_VARARGS, NULL}, - { (char *)"BDF2_get_error_position", (PyCFunction)_wrap_BDF2_get_error_position, METH_O, (char *)"\n" - "BDF2_get_error_position(BDF2 self) -> int\n" - "\n" - "int\n" - "get_error_position() const\n" - "\n" - "Returns the position of the biggest error. \n" - ""}, - { (char *)"BDF2_max_order_set", _wrap_BDF2_max_order_set, METH_VARARGS, (char *)"BDF2_max_order_set(BDF2 self, int max_order)"}, - { (char *)"BDF2_max_order_get", (PyCFunction)_wrap_BDF2_max_order_get, METH_O, (char *)"BDF2_max_order_get(BDF2 self) -> int"}, - { (char *)"new_BDF2", _wrap_new_BDF2, METH_VARARGS, (char *)"\n" - "BDF2(real epsilon=1e-9, Time tStepMin)\n" - "BDF2(StateVariableOwner states, real epsilon=1e-9, Time tStepMin)\n" - "new_BDF2(Integrator templ) -> BDF2\n" - "\n" - "BDF2(const Integrator\n" - "&templ)\n" - "\n" - "Constructs a new BDF2 integrator.\n" - "\n" - "Parameters:\n" - "-----------\n" - "\n" - "templ: Template to be used to construct a BDF2 method \n" - ""}, - { (char *)"delete_BDF2", (PyCFunction)_wrap_delete_BDF2, METH_O, (char *)"delete_BDF2(BDF2 self)"}, - { (char *)"BDF2_swigregister", BDF2_swigregister, METH_VARARGS, NULL}, - { (char *)"BDF2_swiginit", BDF2_swiginit, METH_VARARGS, NULL}, - { (char *)"new_ExplicitEuler_fixed", _wrap_new_ExplicitEuler_fixed, METH_VARARGS, (char *)"\n" - "ExplicitEuler_fixed(StateVariableOwner states)\n" - "ExplicitEuler_fixed()\n" - "new_ExplicitEuler_fixed(Integrator copy) -> ExplicitEuler_fixed\n" - "\n" - "ExplicitEuler_fixed(const Integrator ©)\n" - "\n" - "copy constructor \n" - ""}, - { (char *)"delete_ExplicitEuler_fixed", (PyCFunction)_wrap_delete_ExplicitEuler_fixed, METH_O, (char *)"\n" - "delete_ExplicitEuler_fixed(ExplicitEuler_fixed self)\n" - "\n" - "virtual\n" - "~ExplicitEuler_fixed() \n" - ""}, - { (char *)"ExplicitEuler_fixed_swigregister", ExplicitEuler_fixed_swigregister, METH_VARARGS, NULL}, - { (char *)"ExplicitEuler_fixed_swiginit", ExplicitEuler_fixed_swiginit, METH_VARARGS, NULL}, - { (char *)"HeunIntegrator_alpha_set", _wrap_HeunIntegrator_alpha_set, METH_VARARGS, (char *)"HeunIntegrator_alpha_set(HeunIntegrator self, real alpha)"}, - { (char *)"HeunIntegrator_alpha_get", (PyCFunction)_wrap_HeunIntegrator_alpha_get, METH_O, (char *)"HeunIntegrator_alpha_get(HeunIntegrator self) -> real"}, - { (char *)"new_HeunIntegrator", _wrap_new_HeunIntegrator, METH_VARARGS, (char *)"\n" - "HeunIntegrator(StateVariableOwner states, real Alpha=0.5)\n" - "HeunIntegrator(real Alpha=0.5)\n" - "new_HeunIntegrator(Integrator copy) -> HeunIntegrator\n" - "\n" - "HeunIntegrator(const Integrator ©)\n" - "\n" - "copy constructor \n" - ""}, - { (char *)"delete_HeunIntegrator", (PyCFunction)_wrap_delete_HeunIntegrator, METH_O, (char *)"\n" - "delete_HeunIntegrator(HeunIntegrator self)\n" - "\n" - "virtual ~HeunIntegrator() \n" - ""}, - { (char *)"HeunIntegrator_swigregister", HeunIntegrator_swigregister, METH_VARARGS, NULL}, - { (char *)"HeunIntegrator_swiginit", HeunIntegrator_swiginit, METH_VARARGS, NULL}, - { (char *)"ImplicitEuler_dt_min_set", _wrap_ImplicitEuler_dt_min_set, METH_VARARGS, (char *)"ImplicitEuler_dt_min_set(ImplicitEuler self, Time dt_min)"}, - { (char *)"ImplicitEuler_dt_min_get", (PyCFunction)_wrap_ImplicitEuler_dt_min_get, METH_O, (char *)"ImplicitEuler_dt_min_get(ImplicitEuler self) -> Time"}, - { (char *)"new_ImplicitEuler", _wrap_new_ImplicitEuler, METH_VARARGS, (char *)"\n" - "ImplicitEuler(StateVariableOwner states, real epsilon=1e-9, Time tStepMin)\n" - "ImplicitEuler(real epsilon=1e-9, Time tStepMin)\n" - "new_ImplicitEuler(Integrator arg2) -> ImplicitEuler\n" - "\n" - "ImplicitEuler(const Integrator &)\n" - "\n" - "copy constructor \n" - ""}, - { (char *)"delete_ImplicitEuler", (PyCFunction)_wrap_delete_ImplicitEuler, METH_O, (char *)"delete_ImplicitEuler(ImplicitEuler self)"}, - { (char *)"ImplicitEuler_swigregister", ImplicitEuler_swigregister, METH_VARARGS, NULL}, - { (char *)"ImplicitEuler_swiginit", ImplicitEuler_swiginit, METH_VARARGS, NULL}, - { (char *)"new_RKFIntegrator", _wrap_new_RKFIntegrator, METH_VARARGS, (char *)"\n" - "RKFIntegrator(StateVariableOwner states, real epsilon=1e-9, Time dt_min)\n" - "new_RKFIntegrator(real epsilon=1e-9, Time dt_min) -> RKFIntegrator\n" - "\n" - "RKFIntegrator(real epsilon=1e-9, cmf::math::Time\n" - "dt_min=cmf::math::timespan(1000))\n" - "\n" - "Constructs a new RKFIntegrator.\n" - "\n" - "Parameters:\n" - "-----------\n" - "\n" - "epsilon: relative error tolerance per time step (default=1e-9)\n" - "\n" - "dt_min: minimum time step (default=1s) \n" - ""}, - { (char *)"delete_RKFIntegrator", (PyCFunction)_wrap_delete_RKFIntegrator, METH_O, (char *)"delete_RKFIntegrator(RKFIntegrator self)"}, - { (char *)"RKFIntegrator_swigregister", RKFIntegrator_swigregister, METH_VARARGS, NULL}, - { (char *)"RKFIntegrator_swiginit", RKFIntegrator_swiginit, METH_VARARGS, NULL}, - { (char *)"CVodeIntegrator_preconditioner_set", _wrap_CVodeIntegrator_preconditioner_set, METH_VARARGS, (char *)"CVodeIntegrator_preconditioner_set(CVodeIntegrator self, char preconditioner)"}, - { (char *)"CVodeIntegrator_preconditioner_get", (PyCFunction)_wrap_CVodeIntegrator_preconditioner_get, METH_O, (char *)"CVodeIntegrator_preconditioner_get(CVodeIntegrator self) -> char"}, - { (char *)"CVodeIntegrator_MaxNonLinearIterations_set", _wrap_CVodeIntegrator_MaxNonLinearIterations_set, METH_VARARGS, (char *)"CVodeIntegrator_MaxNonLinearIterations_set(CVodeIntegrator self, int MaxNonLinearIterations)"}, - { (char *)"CVodeIntegrator_MaxNonLinearIterations_get", (PyCFunction)_wrap_CVodeIntegrator_MaxNonLinearIterations_get, METH_O, (char *)"CVodeIntegrator_MaxNonLinearIterations_get(CVodeIntegrator self) -> int"}, - { (char *)"CVodeIntegrator_MaxConvergenceFailures_set", _wrap_CVodeIntegrator_MaxConvergenceFailures_set, METH_VARARGS, (char *)"CVodeIntegrator_MaxConvergenceFailures_set(CVodeIntegrator self, int MaxConvergenceFailures)"}, - { (char *)"CVodeIntegrator_MaxConvergenceFailures_get", (PyCFunction)_wrap_CVodeIntegrator_MaxConvergenceFailures_get, METH_O, (char *)"CVodeIntegrator_MaxConvergenceFailures_get(CVodeIntegrator self) -> int"}, - { (char *)"CVodeIntegrator_MaxErrorTestFailures_set", _wrap_CVodeIntegrator_MaxErrorTestFailures_set, METH_VARARGS, (char *)"CVodeIntegrator_MaxErrorTestFailures_set(CVodeIntegrator self, int MaxErrorTestFailures)"}, - { (char *)"CVodeIntegrator_MaxErrorTestFailures_get", (PyCFunction)_wrap_CVodeIntegrator_MaxErrorTestFailures_get, METH_O, (char *)"CVodeIntegrator_MaxErrorTestFailures_get(CVodeIntegrator self) -> int"}, - { (char *)"CVodeIntegrator_maxl_set", _wrap_CVodeIntegrator_maxl_set, METH_VARARGS, (char *)"CVodeIntegrator_maxl_set(CVodeIntegrator self, int maxl)"}, - { (char *)"CVodeIntegrator_maxl_get", (PyCFunction)_wrap_CVodeIntegrator_maxl_get, METH_O, (char *)"CVodeIntegrator_maxl_get(CVodeIntegrator self) -> int"}, - { (char *)"CVodeIntegrator_LinearSolver_set", _wrap_CVodeIntegrator_LinearSolver_set, METH_VARARGS, (char *)"CVodeIntegrator_LinearSolver_set(CVodeIntegrator self, int LinearSolver)"}, - { (char *)"CVodeIntegrator_LinearSolver_get", (PyCFunction)_wrap_CVodeIntegrator_LinearSolver_get, METH_O, (char *)"CVodeIntegrator_LinearSolver_get(CVodeIntegrator self) -> int"}, - { (char *)"CVodeIntegrator_MaxOrder_set", _wrap_CVodeIntegrator_MaxOrder_set, METH_VARARGS, (char *)"CVodeIntegrator_MaxOrder_set(CVodeIntegrator self, int MaxOrder)"}, - { (char *)"CVodeIntegrator_MaxOrder_get", (PyCFunction)_wrap_CVodeIntegrator_MaxOrder_get, METH_O, (char *)"CVodeIntegrator_MaxOrder_get(CVodeIntegrator self) -> int"}, - { (char *)"CVodeIntegrator_max_step_set", _wrap_CVodeIntegrator_max_step_set, METH_VARARGS, (char *)"CVodeIntegrator_max_step_set(CVodeIntegrator self, Time max_step)"}, - { (char *)"CVodeIntegrator_max_step_get", (PyCFunction)_wrap_CVodeIntegrator_max_step_get, METH_O, (char *)"CVodeIntegrator_max_step_get(CVodeIntegrator self) -> Time"}, - { (char *)"CVodeIntegrator_initialize", (PyCFunction)_wrap_CVodeIntegrator_initialize, METH_O, (char *)"\n" - "CVodeIntegrator_initialize(CVodeIntegrator self)\n" - "\n" - "void\n" - "initialize()\n" - "\n" - "Initializes the solver. Do not add or remove state variables after\n" - "initialization. The solver is automatically intialized when\n" - "integrating. \n" - ""}, - { (char *)"CVodeIntegrator_release", (PyCFunction)_wrap_CVodeIntegrator_release, METH_O, (char *)"\n" - "CVodeIntegrator_release(CVodeIntegrator self)\n" - "\n" - "void\n" - "release()\n" - "\n" - "Releases the internal solver. Call release before you add state\n" - "variables or to change properties. \n" - ""}, - { (char *)"new_CVodeIntegrator", _wrap_new_CVodeIntegrator, METH_VARARGS, (char *)"\n" - "CVodeIntegrator(real epsilon=1e-9, char _preconditioner)\n" - "CVodeIntegrator(StateVariableOwner states, real epsilon=1e-9, char _preconditioner)\n" - "new_CVodeIntegrator(CVodeIntegrator templ) -> CVodeIntegrator\n" - "\n" - "CVodeIntegrator(const CVodeIntegrator &templ)\n" - "\n" - "copy constructor, creates a new CVODE integrator similiar to the\n" - "given, but without statevariables \n" - ""}, - { (char *)"CVodeIntegrator_get_error", (PyCFunction)_wrap_CVodeIntegrator_get_error, METH_O, (char *)"\n" - "CVodeIntegrator_get_error(CVodeIntegrator self) -> cmf::math::num_array\n" - "\n" - "cmf::math::num_array get_error() const\n" - "\n" - "Error vector of the integrator. \n" - ""}, - { (char *)"CVodeIntegrator_get_nonlinear_iterations", (PyCFunction)_wrap_CVodeIntegrator_get_nonlinear_iterations, METH_O, (char *)"\n" - "CVodeIntegrator_get_nonlinear_iterations(CVodeIntegrator self) -> int\n" - "\n" - "int\n" - "get_nonlinear_iterations() const\n" - "\n" - "Returns the number of non-linear iterations performed. Calls\n" - "CVodeGetNumNonlinSolvIters. \n" - ""}, - { (char *)"CVodeIntegrator_get_rhsevals", (PyCFunction)_wrap_CVodeIntegrator_get_rhsevals, METH_O, (char *)"\n" - "CVodeIntegrator_get_rhsevals(CVodeIntegrator self) -> int\n" - "\n" - "int\n" - "get_rhsevals() const\n" - "\n" - "Returns the number of evaluations of the right hand side of the ODE.\n" - "Calls CVodeGetNumRhsEvals. \n" - ""}, - { (char *)"CVodeIntegrator_copy", (PyCFunction)_wrap_CVodeIntegrator_copy, METH_O, (char *)"\n" - "CVodeIntegrator_copy(CVodeIntegrator self) -> CVodeIntegrator\n" - "\n" - "CVodeIntegrator* copy() const\n" - "\n" - "Polymorphic copy constructor. \n" - ""}, - { (char *)"delete_CVodeIntegrator", (PyCFunction)_wrap_delete_CVodeIntegrator, METH_O, (char *)"\n" - "delete_CVodeIntegrator(CVodeIntegrator self)\n" - "\n" - "virtual ~CVodeIntegrator() \n" - ""}, - { (char *)"CVodeIntegrator_order_get", (PyCFunction)_wrap_CVodeIntegrator_order_get, METH_O, (char *)"CVodeIntegrator_order_get(CVodeIntegrator self) -> int"}, - { (char *)"CVodeIntegrator_swigregister", CVodeIntegrator_swigregister, METH_VARARGS, NULL}, - { (char *)"CVodeIntegrator_swiginit", CVodeIntegrator_swiginit, METH_VARARGS, NULL}, - { (char *)"MultiIntegrator_copy", (PyCFunction)_wrap_MultiIntegrator_copy, METH_O, (char *)"\n" - "MultiIntegrator_copy(MultiIntegrator self) -> MultiIntegrator\n" - "\n" - "virtual\n" - "cmf::math::MultiIntegrator* copy() const\n" - "\n" - "Polymorphic copy constructor. \n" - ""}, - { (char *)"MultiIntegrator_add_states_to_integrator", (PyCFunction) _wrap_MultiIntegrator_add_states_to_integrator, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "MultiIntegrator_add_states_to_integrator(MultiIntegrator self, StateVariableOwner stateOwner, int integrator_position)\n" - "\n" - "void\n" - "add_states_to_integrator(cmf::math::StateVariableOwner &stateOwner,\n" - "int integrator_position)\n" - "\n" - "Add state variables from a StateVariableOwner. \n" - ""}, - { (char *)"new_MultiIntegrator", (PyCFunction) _wrap_new_MultiIntegrator, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "new_MultiIntegrator(Integrator template_integrator, int count) -> MultiIntegrator\n" - "\n" - "MultiIntegrator(const cmf::math::Integrator &template_integrator, int\n" - "count)\n" - "\n" - "Creates a new MultiIntegrator.\n" - "\n" - "Parameters:\n" - "-----------\n" - "\n" - "template_integrator: Template for the integrators\n" - "\n" - "count: Number of integrators \n" - ""}, - { (char *)"delete_MultiIntegrator", (PyCFunction)_wrap_delete_MultiIntegrator, METH_O, (char *)"delete_MultiIntegrator(MultiIntegrator self)"}, - { (char *)"MultiIntegrator_swigregister", MultiIntegrator_swigregister, METH_VARARGS, NULL}, - { (char *)"MultiIntegrator_swiginit", MultiIntegrator_swiginit, METH_VARARGS, NULL}, - { (char *)"Adsorption_freesolute", (PyCFunction) _wrap_Adsorption_freesolute, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "Adsorption_freesolute(Adsorption self, real xt, real V) -> real\n" - "\n" - "virtual\n" - "real freesolute(real xt, real V) const =0\n" - "\n" - "Returns the mass of dissolved tracer as a function of the total tracer\n" - "mass in the solute storage and the water volume.\n" - "\n" - "Parameters:\n" - "-----------\n" - "\n" - "xt: :math:`x_t` the total tracer mass in the storage\n" - "\n" - "V: :math:`V m^3` the water volume in the storage\n" - "\n" - ":math:`x_f` the dissolved mass of the tracer \n" - ""}, - { (char *)"Adsorption_totalsolute", (PyCFunction) _wrap_Adsorption_totalsolute, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "Adsorption_totalsolute(Adsorption self, real xf, real V) -> real\n" - "\n" - "virtual\n" - "real totalsolute(real xf, real V) const =0\n" - "\n" - "Returns the total mass of the tracer from the dissolved concetration\n" - "in tracer unit/m3.\n" - "\n" - "Parameters:\n" - "-----------\n" - "\n" - "xf: :math:`x_f` the dissolved tracer mass in the storage\n" - "\n" - "V: :math:`V m^3` the water volume in the storage\n" - "\n" - ":math:`x_t` the total mass of the tracer \n" - ""}, - { (char *)"Adsorption_copy", (PyCFunction) _wrap_Adsorption_copy, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "Adsorption_copy(Adsorption self, real m=-1) -> Adsorption\n" - "\n" - "virtual\n" - "Adsorption* copy(real m=-1) const =0\n" - "\n" - "returns a copy of the Adsorption object.\n" - "\n" - "If the adsorption is depending on the sorbent mass, you can give a\n" - "positive value for the sorbent mass m. If the value is not given or\n" - "negative, m is used from the original object. \n" - ""}, - { (char *)"delete_Adsorption", (PyCFunction)_wrap_delete_Adsorption, METH_O, (char *)"\n" - "delete_Adsorption(Adsorption self)\n" - "\n" - "virtual\n" - "~Adsorption() \n" - ""}, - { (char *)"Adsorption_swigregister", Adsorption_swigregister, METH_VARARGS, NULL}, - { (char *)"NullAdsorption_copy", (PyCFunction) _wrap_NullAdsorption_copy, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "NullAdsorption_copy(NullAdsorption self, real m=-1) -> NullAdsorption\n" - "\n" - "virtual\n" - "NullAdsorption* copy(real m=-1) const\n" - "\n" - "returns a copy of the Adsorption object.\n" - "\n" - "If the adsorption is depending on the sorbent mass, you can give a\n" - "positive value for the sorbent mass m. If the value is not given or\n" - "negative, m is used from the original object. \n" - ""}, - { (char *)"delete_NullAdsorption", (PyCFunction)_wrap_delete_NullAdsorption, METH_O, (char *)"\n" - "delete_NullAdsorption(NullAdsorption self)\n" - "\n" - "virtual ~NullAdsorption() \n" - ""}, - { (char *)"new_NullAdsorption", (PyCFunction)_wrap_new_NullAdsorption, METH_NOARGS, (char *)"new_NullAdsorption() -> NullAdsorption"}, - { (char *)"NullAdsorption_swigregister", NullAdsorption_swigregister, METH_VARARGS, NULL}, - { (char *)"NullAdsorption_swiginit", NullAdsorption_swiginit, METH_VARARGS, NULL}, - { (char *)"LinearAdsorption_K_set", _wrap_LinearAdsorption_K_set, METH_VARARGS, (char *)"LinearAdsorption_K_set(LinearAdsorption self, real K)"}, - { (char *)"LinearAdsorption_K_get", (PyCFunction)_wrap_LinearAdsorption_K_get, METH_O, (char *)"LinearAdsorption_K_get(LinearAdsorption self) -> real"}, - { (char *)"LinearAdsorption_m_set", _wrap_LinearAdsorption_m_set, METH_VARARGS, (char *)"LinearAdsorption_m_set(LinearAdsorption self, real m)"}, - { (char *)"LinearAdsorption_m_get", (PyCFunction)_wrap_LinearAdsorption_m_get, METH_O, (char *)"LinearAdsorption_m_get(LinearAdsorption self) -> real"}, - { (char *)"new_LinearAdsorption", _wrap_new_LinearAdsorption, METH_VARARGS, (char *)"\n" - "LinearAdsorption(real K, real m)\n" - "new_LinearAdsorption(LinearAdsorption other) -> LinearAdsorption\n" - "\n" - "LinearAdsorption(const LinearAdsorption &other) \n" - ""}, - { (char *)"LinearAdsorption_copy", (PyCFunction) _wrap_LinearAdsorption_copy, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "LinearAdsorption_copy(LinearAdsorption self, real m=-1) -> LinearAdsorption\n" - "\n" - "LinearAdsorption* copy(real m=-1) const\n" - "\n" - "returns a copy of the Adsorption object.\n" - "\n" - "If the adsorption is depending on the sorbent mass, you can give a\n" - "positive value for the sorbent mass m. If the value is not given or\n" - "negative, m is used from the original object. \n" - ""}, - { (char *)"delete_LinearAdsorption", (PyCFunction)_wrap_delete_LinearAdsorption, METH_O, (char *)"\n" - "delete_LinearAdsorption(LinearAdsorption self)\n" - "\n" - "virtual ~LinearAdsorption() \n" - ""}, - { (char *)"LinearAdsorption_swigregister", LinearAdsorption_swigregister, METH_VARARGS, NULL}, - { (char *)"LinearAdsorption_swiginit", LinearAdsorption_swiginit, METH_VARARGS, NULL}, - { (char *)"FreundlichAdsorbtion_K_set", _wrap_FreundlichAdsorbtion_K_set, METH_VARARGS, (char *)"FreundlichAdsorbtion_K_set(FreundlichAdsorbtion self, real K)"}, - { (char *)"FreundlichAdsorbtion_K_get", (PyCFunction)_wrap_FreundlichAdsorbtion_K_get, METH_O, (char *)"FreundlichAdsorbtion_K_get(FreundlichAdsorbtion self) -> real"}, - { (char *)"FreundlichAdsorbtion_n_set", _wrap_FreundlichAdsorbtion_n_set, METH_VARARGS, (char *)"FreundlichAdsorbtion_n_set(FreundlichAdsorbtion self, real n)"}, - { (char *)"FreundlichAdsorbtion_n_get", (PyCFunction)_wrap_FreundlichAdsorbtion_n_get, METH_O, (char *)"FreundlichAdsorbtion_n_get(FreundlichAdsorbtion self) -> real"}, - { (char *)"FreundlichAdsorbtion_m_set", _wrap_FreundlichAdsorbtion_m_set, METH_VARARGS, (char *)"FreundlichAdsorbtion_m_set(FreundlichAdsorbtion self, real m)"}, - { (char *)"FreundlichAdsorbtion_m_get", (PyCFunction)_wrap_FreundlichAdsorbtion_m_get, METH_O, (char *)"FreundlichAdsorbtion_m_get(FreundlichAdsorbtion self) -> real"}, - { (char *)"FreundlichAdsorbtion_epsilon_set", _wrap_FreundlichAdsorbtion_epsilon_set, METH_VARARGS, (char *)"FreundlichAdsorbtion_epsilon_set(FreundlichAdsorbtion self, real epsilon)"}, - { (char *)"FreundlichAdsorbtion_epsilon_get", (PyCFunction)_wrap_FreundlichAdsorbtion_epsilon_get, METH_O, (char *)"FreundlichAdsorbtion_epsilon_get(FreundlichAdsorbtion self) -> real"}, - { (char *)"FreundlichAdsorbtion_maxiter_set", _wrap_FreundlichAdsorbtion_maxiter_set, METH_VARARGS, (char *)"FreundlichAdsorbtion_maxiter_set(FreundlichAdsorbtion self, int maxiter)"}, - { (char *)"FreundlichAdsorbtion_maxiter_get", (PyCFunction)_wrap_FreundlichAdsorbtion_maxiter_get, METH_O, (char *)"FreundlichAdsorbtion_maxiter_get(FreundlichAdsorbtion self) -> int"}, - { (char *)"new_FreundlichAdsorbtion", _wrap_new_FreundlichAdsorbtion, METH_VARARGS, (char *)"\n" - "FreundlichAdsorbtion(real K, real n, real m, real epsilon=1e-12, int maxiter=100)\n" - "new_FreundlichAdsorbtion(FreundlichAdsorbtion other) -> FreundlichAdsorbtion\n" - "\n" - "FreundlichAdsorbtion(const FreundlichAdsorbtion &other) \n" - ""}, - { (char *)"FreundlichAdsorbtion_copy", (PyCFunction) _wrap_FreundlichAdsorbtion_copy, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "FreundlichAdsorbtion_copy(FreundlichAdsorbtion self, real m=-1) -> FreundlichAdsorbtion\n" - "\n" - "FreundlichAdsorbtion* copy(real m=-1) const\n" - "\n" - "returns a copy of the Adsorption object.\n" - "\n" - "If the adsorption is depending on the sorbent mass, you can give a\n" - "positive value for the sorbent mass m. If the value is not given or\n" - "negative, m is used from the original object. \n" - ""}, - { (char *)"delete_FreundlichAdsorbtion", (PyCFunction)_wrap_delete_FreundlichAdsorbtion, METH_O, (char *)"\n" - "delete_FreundlichAdsorbtion(FreundlichAdsorbtion self)\n" - "\n" - "virtual\n" - "~FreundlichAdsorbtion() \n" - ""}, - { (char *)"FreundlichAdsorbtion_swigregister", FreundlichAdsorbtion_swigregister, METH_VARARGS, NULL}, - { (char *)"FreundlichAdsorbtion_swiginit", FreundlichAdsorbtion_swiginit, METH_VARARGS, NULL}, - { (char *)"LangmuirAdsorption_K_set", _wrap_LangmuirAdsorption_K_set, METH_VARARGS, (char *)"LangmuirAdsorption_K_set(LangmuirAdsorption self, real K)"}, - { (char *)"LangmuirAdsorption_K_get", (PyCFunction)_wrap_LangmuirAdsorption_K_get, METH_O, (char *)"LangmuirAdsorption_K_get(LangmuirAdsorption self) -> real"}, - { (char *)"LangmuirAdsorption_m_set", _wrap_LangmuirAdsorption_m_set, METH_VARARGS, (char *)"LangmuirAdsorption_m_set(LangmuirAdsorption self, real m)"}, - { (char *)"LangmuirAdsorption_m_get", (PyCFunction)_wrap_LangmuirAdsorption_m_get, METH_O, (char *)"LangmuirAdsorption_m_get(LangmuirAdsorption self) -> real"}, - { (char *)"new_LangmuirAdsorption", _wrap_new_LangmuirAdsorption, METH_VARARGS, (char *)"\n" - "LangmuirAdsorption(real K, real m)\n" - "new_LangmuirAdsorption(LangmuirAdsorption other) -> LangmuirAdsorption\n" - "\n" - "LangmuirAdsorption(const LangmuirAdsorption &other) \n" - ""}, - { (char *)"LangmuirAdsorption_copy", (PyCFunction) _wrap_LangmuirAdsorption_copy, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "LangmuirAdsorption_copy(LangmuirAdsorption self, real m=-1) -> LangmuirAdsorption\n" - "\n" - "LangmuirAdsorption* copy(real m=-1) const\n" - "\n" - "returns a copy of the Adsorption object.\n" - "\n" - "If the adsorption is depending on the sorbent mass, you can give a\n" - "positive value for the sorbent mass m. If the value is not given or\n" - "negative, m is used from the original object. \n" - ""}, - { (char *)"delete_LangmuirAdsorption", (PyCFunction)_wrap_delete_LangmuirAdsorption, METH_O, (char *)"\n" - "delete_LangmuirAdsorption(LangmuirAdsorption self)\n" - "\n" - "virtual\n" - "~LangmuirAdsorption() \n" - ""}, - { (char *)"LangmuirAdsorption_swigregister", LangmuirAdsorption_swigregister, METH_VARARGS, NULL}, - { (char *)"LangmuirAdsorption_swiginit", LangmuirAdsorption_swiginit, METH_VARARGS, NULL}, - { (char *)"new_solute", (PyCFunction) _wrap_new_solute, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "new_solute(solute copy) -> solute\n" - "\n" - "solute(const\n" - "solute ©) \n" - ""}, - { (char *)"solute___eq__", (PyCFunction) _wrap_solute___eq__, METH_VARARGS | METH_KEYWORDS, (char *)"solute___eq__(solute self, solute cmp) -> bool"}, - { (char *)"solute___lt__", (PyCFunction) _wrap_solute___lt__, METH_VARARGS | METH_KEYWORDS, (char *)"solute___lt__(solute self, solute cmp) -> bool"}, - { (char *)"solute___gt__", (PyCFunction) _wrap_solute___gt__, METH_VARARGS | METH_KEYWORDS, (char *)"solute___gt__(solute self, solute cmp) -> bool"}, - { (char *)"solute___le__", (PyCFunction) _wrap_solute___le__, METH_VARARGS | METH_KEYWORDS, (char *)"solute___le__(solute self, solute cmp) -> bool"}, - { (char *)"solute___ge__", (PyCFunction) _wrap_solute___ge__, METH_VARARGS | METH_KEYWORDS, (char *)"solute___ge__(solute self, solute cmp) -> bool"}, - { (char *)"solute___ne__", (PyCFunction) _wrap_solute___ne__, METH_VARARGS | METH_KEYWORDS, (char *)"solute___ne__(solute self, solute cmp) -> bool"}, - { (char *)"solute_Name_set", _wrap_solute_Name_set, METH_VARARGS, (char *)"solute_Name_set(solute self, std::string const & Name)"}, - { (char *)"solute_Name_get", (PyCFunction)_wrap_solute_Name_get, METH_O, (char *)"solute_Name_get(solute self) -> std::string const &"}, - { (char *)"solute_Unit_set", _wrap_solute_Unit_set, METH_VARARGS, (char *)"solute_Unit_set(solute self, std::string const & Unit)"}, - { (char *)"solute_Unit_get", (PyCFunction)_wrap_solute_Unit_get, METH_O, (char *)"solute_Unit_get(solute self) -> std::string const &"}, - { (char *)"solute_Uptake_set", _wrap_solute_Uptake_set, METH_VARARGS, (char *)"solute_Uptake_set(solute self, double Uptake)"}, - { (char *)"solute_Uptake_get", (PyCFunction)_wrap_solute_Uptake_get, METH_O, (char *)"solute_Uptake_get(solute self) -> double"}, - { (char *)"solute_Id_get", (PyCFunction)_wrap_solute_Id_get, METH_O, (char *)"solute_Id_get(solute self) -> size_t const"}, - { (char *)"solute___repr__", (PyCFunction)_wrap_solute___repr__, METH_O, (char *)"solute___repr__(solute self) -> std::string"}, - { (char *)"delete_solute", (PyCFunction)_wrap_delete_solute, METH_O, (char *)"delete_solute(solute self)"}, - { (char *)"solute_swigregister", solute_swigregister, METH_VARARGS, NULL}, - { (char *)"solute_swiginit", solute_swiginit, METH_VARARGS, NULL}, - { (char *)"solute_vector_size", (PyCFunction)_wrap_solute_vector_size, METH_O, (char *)"\n" - "solute_vector_size(solute_vector self) -> size_t\n" - "\n" - "size_t size()\n" - "const \n" - ""}, - { (char *)"new_solute_vector", (PyCFunction) _wrap_new_solute_vector, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "new_solute_vector(std::string str) -> solute_vector\n" - "\n" - "solute_vector(std::string str)\n" - "\n" - "Creates a solute vector from solute names, separated by whitespace.\n" - "E.g. solutes= solute_vector(\"dO18 dH2\") \n" - ""}, - { (char *)"solute_vector_get_solute", (PyCFunction) _wrap_solute_vector_get_solute, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "solute_vector_get_solute(solute_vector self, int position) -> solute\n" - "\n" - "cmf::water::solute* get_solute(int position) \n" - ""}, - { (char *)"solute_vector___getitem__", (PyCFunction) _wrap_solute_vector___getitem__, METH_VARARGS | METH_KEYWORDS, (char *)"solute_vector___getitem__(solute_vector self, int i) -> solute"}, - { (char *)"solute_vector___len__", (PyCFunction)_wrap_solute_vector___len__, METH_O, (char *)"solute_vector___len__(solute_vector self) -> size_t"}, - { (char *)"delete_solute_vector", (PyCFunction)_wrap_delete_solute_vector, METH_O, (char *)"delete_solute_vector(solute_vector self)"}, - { (char *)"solute_vector_swigregister", solute_vector_swigregister, METH_VARARGS, NULL}, - { (char *)"solute_vector_swiginit", solute_vector_swiginit, METH_VARARGS, NULL}, - { (char *)"SoluteTimeseries_conc", (PyCFunction) _wrap_SoluteTimeseries_conc, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "SoluteTimeseries_conc(SoluteTimeseries self, Time t, solute _Solute) -> real\n" - "\n" - "real\n" - "conc(cmf::math::Time t, const cmf::water::solute &_Solute) const \n" - ""}, - { (char *)"SoluteTimeseries_size", (PyCFunction)_wrap_SoluteTimeseries_size, METH_O, (char *)"\n" - "SoluteTimeseries_size(SoluteTimeseries self) -> size_t\n" - "\n" - "size_t\n" - "size() const\n" - "\n" - "Returns the number of solutes in the solution. \n" - ""}, - { (char *)"new_SoluteTimeseries", _wrap_new_SoluteTimeseries, METH_VARARGS, (char *)"\n" - "SoluteTimeseries()\n" - "SoluteTimeseries(solute_vector solutes, Time begin, Time step)\n" - "new_SoluteTimeseries(SoluteTimeseries sts) -> SoluteTimeseries\n" - "\n" - "SoluteTimeseries(const cmf::water::SoluteTimeseries &sts) \n" - ""}, - { (char *)"SoluteTimeseries___getitem__", (PyCFunction) _wrap_SoluteTimeseries___getitem__, METH_VARARGS | METH_KEYWORDS, (char *)"SoluteTimeseries___getitem__(SoluteTimeseries self, solute solute) -> timeseries"}, - { (char *)"SoluteTimeseries___setitem__", (PyCFunction) _wrap_SoluteTimeseries___setitem__, METH_VARARGS | METH_KEYWORDS, (char *)"SoluteTimeseries___setitem__(SoluteTimeseries self, solute solute, timeseries concentration)"}, - { (char *)"SoluteTimeseries___len__", (PyCFunction)_wrap_SoluteTimeseries___len__, METH_O, (char *)"SoluteTimeseries___len__(SoluteTimeseries self) -> size_t"}, - { (char *)"delete_SoluteTimeseries", (PyCFunction)_wrap_delete_SoluteTimeseries, METH_O, (char *)"delete_SoluteTimeseries(SoluteTimeseries self)"}, - { (char *)"SoluteTimeseries_swigregister", SoluteTimeseries_swigregister, METH_VARARGS, NULL}, - { (char *)"SoluteTimeseries_swiginit", SoluteTimeseries_swiginit, METH_VARARGS, NULL}, - { (char *)"SoluteStorage_set_adsorption", (PyCFunction) _wrap_SoluteStorage_set_adsorption, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "SoluteStorage_set_adsorption(SoluteStorage self, Adsorption newadsorption, real m=-1)\n" - "\n" - "void set_adsorption(const Adsorption &newadsorption, real m=-1) \n" - ""}, - { (char *)"SoluteStorage_decay_set", _wrap_SoluteStorage_decay_set, METH_VARARGS, (char *)"SoluteStorage_decay_set(SoluteStorage self, real decay)"}, - { (char *)"SoluteStorage_decay_get", (PyCFunction)_wrap_SoluteStorage_decay_get, METH_O, (char *)"SoluteStorage_decay_get(SoluteStorage self) -> real"}, - { (char *)"SoluteStorage_source_set", _wrap_SoluteStorage_source_set, METH_VARARGS, (char *)"SoluteStorage_source_set(SoluteStorage self, real source)"}, - { (char *)"SoluteStorage_source_get", (PyCFunction)_wrap_SoluteStorage_source_get, METH_O, (char *)"SoluteStorage_source_get(SoluteStorage self) -> real"}, - { (char *)"SoluteStorage_Solute_get", (PyCFunction)_wrap_SoluteStorage_Solute_get, METH_O, (char *)"SoluteStorage_Solute_get(SoluteStorage self) -> solute"}, - { (char *)"SoluteStorage_conc", (PyCFunction)_wrap_SoluteStorage_conc, METH_O, (char *)"\n" - "SoluteStorage_conc(SoluteStorage self) -> real\n" - "\n" - "real conc()\n" - "const\n" - "\n" - "Returns the concentration of the solute. \n" - ""}, - { (char *)"SoluteStorage_set_conc", (PyCFunction) _wrap_SoluteStorage_set_conc, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "SoluteStorage_set_conc(SoluteStorage self, real NewConcentration)\n" - "\n" - "void\n" - "set_conc(real NewConcentration)\n" - "\n" - "set a new concentration of dissolved tracers.\n" - "\n" - "In case of adsorption functions, the isotherm is used \n" - ""}, - { (char *)"delete_SoluteStorage", (PyCFunction)_wrap_delete_SoluteStorage, METH_O, (char *)"delete_SoluteStorage(SoluteStorage self)"}, - { (char *)"SoluteStorage_swigregister", SoluteStorage_swigregister, METH_VARARGS, NULL}, - { (char *)"flux_node_node_id_get", (PyCFunction)_wrap_flux_node_node_id_get, METH_O, (char *)"flux_node_node_id_get(flux_node self) -> int const"}, - { (char *)"flux_node_is_storage", (PyCFunction)_wrap_flux_node_is_storage, METH_O, (char *)"\n" - "flux_node_is_storage(flux_node self) -> bool\n" - "\n" - "virtual\n" - "bool is_storage() const\n" - "\n" - "true, if this is a waterstorage \n" - ""}, - { (char *)"flux_node_Name_set", _wrap_flux_node_Name_set, METH_VARARGS, (char *)"flux_node_Name_set(flux_node self, std::string const & Name)"}, - { (char *)"flux_node_Name_get", (PyCFunction)_wrap_flux_node_Name_get, METH_O, (char *)"flux_node_Name_get(flux_node self) -> std::string const &"}, - { (char *)"flux_node_to_string", (PyCFunction)_wrap_flux_node_to_string, METH_O, (char *)"\n" - "flux_node_to_string(flux_node self) -> std::string\n" - "\n" - "virtual\n" - "std::string to_string() const \n" - ""}, - { (char *)"delete_flux_node", (PyCFunction)_wrap_delete_flux_node, METH_O, (char *)"\n" - "delete_flux_node(flux_node self)\n" - "\n" - "virtual\n" - "~flux_node()\n" - "\n" - "The destructor deletes all connections. \n" - ""}, - { (char *)"flux_node___eq__", (PyCFunction) _wrap_flux_node___eq__, METH_VARARGS | METH_KEYWORDS, (char *)"flux_node___eq__(flux_node self, flux_node other) -> bool"}, - { (char *)"flux_node_RecalcFluxes", (PyCFunction) _wrap_flux_node_RecalcFluxes, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "flux_node_RecalcFluxes(flux_node self, Time t) -> bool\n" - "\n" - "virtual\n" - "bool RecalcFluxes(cmf::math::Time t)\n" - "\n" - "Pure flux_nodes do not influence fluxes, therefore no recalculation of\n" - "fluxes is required by flux_node.\n" - "\n" - "WaterStorage overrides this, since state changes require an update of\n" - "the fluxes \n" - ""}, - { (char *)"flux_node_connection_to", (PyCFunction) _wrap_flux_node_connection_to, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "flux_node_connection_to(flux_node self, flux_node target) -> flux_connection\n" - "\n" - "cmf::water::flux_connection* connection_to(const cmf::water::flux_node\n" - "&target)\n" - "\n" - "Returns the connection between this and target. \n" - ""}, - { (char *)"flux_node_remove_connection", (PyCFunction) _wrap_flux_node_remove_connection, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "flux_node_remove_connection(flux_node self, cmf::water::flux_node::ptr To) -> bool\n" - "\n" - "bool\n" - "remove_connection(cmf::water::flux_node::ptr To)\n" - "\n" - "Remove the connection. \n" - ""}, - { (char *)"flux_node_flux_to", (PyCFunction) _wrap_flux_node_flux_to, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "flux_node_flux_to(flux_node self, flux_node target, Time t) -> real\n" - "\n" - "real\n" - "flux_to(const cmf::water::flux_node &target, cmf::math::Time t)\n" - "\n" - "Returns the actual flux between this and target (positive sign means\n" - "\"from this into target\") \n" - ""}, - { (char *)"flux_node_flux3d_to", (PyCFunction) _wrap_flux_node_flux3d_to, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "flux_node_flux3d_to(flux_node self, flux_node target, Time t) -> point\n" - "\n" - "cmf::geometry::point flux3d_to(const cmf::water::flux_node &target,\n" - "cmf::math::Time t) \n" - ""}, - { (char *)"flux_node_get_3d_flux", (PyCFunction) _wrap_flux_node_get_3d_flux, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "flux_node_get_3d_flux(flux_node self, Time t) -> point\n" - "\n" - "cmf::geometry::point get_3d_flux(cmf::math::Time t)\n" - "\n" - "Returns the sum of all flux vectors. \n" - ""}, - { (char *)"flux_node_waterbalance", (PyCFunction) _wrap_flux_node_waterbalance, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "flux_node_waterbalance(flux_node self, Time t, flux_connection Without=None) -> real\n" - "\n" - "real\n" - "waterbalance(cmf::math::Time t, const flux_connection *Without=0)\n" - "const\n" - "\n" - "Returns the sum of all fluxes (positive and negative) at time t.\n" - "\n" - "Single fluxes can be excluded from the calculation\n" - "\n" - "Parameters:\n" - "-----------\n" - "\n" - "t: Time of the query\n" - "\n" - "Without: A flux_connection that is excluded from the waterbalance\n" - "(e.g. to prevent closed circuits) \n" - ""}, - { (char *)"flux_node___call__", (PyCFunction) _wrap_flux_node___call__, METH_VARARGS | METH_KEYWORDS, (char *)"flux_node___call__(flux_node self, Time t) -> real"}, - { (char *)"flux_node_conc", (PyCFunction) _wrap_flux_node_conc, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "flux_node_conc(flux_node self, Time t, solute Solute) -> real\n" - "\n" - "virtual real\n" - "conc(cmf::math::Time t, const cmf::water::solute &Solute) const\n" - "\n" - "Returns the water quality of the flux_node, if it is not overridden\n" - "this is the mix of the incoming fluxes. \n" - ""}, - { (char *)"flux_node_position_set", _wrap_flux_node_position_set, METH_VARARGS, (char *)"flux_node_position_set(flux_node self, point position)"}, - { (char *)"flux_node_position_get", (PyCFunction)_wrap_flux_node_position_get, METH_O, (char *)"flux_node_position_get(flux_node self) -> point"}, - { (char *)"flux_node_is_empty", (PyCFunction)_wrap_flux_node_is_empty, METH_O, (char *)"\n" - "flux_node_is_empty(flux_node self) -> double\n" - "\n" - "virtual\n" - "double is_empty() const\n" - "\n" - "Returns true if the node has no water. \n" - ""}, - { (char *)"new_flux_node", (PyCFunction) _wrap_new_flux_node, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "new_flux_node(project _project, point location) -> flux_node\n" - "\n" - "flux_node(cmf::project &_project, cmf::geometry::point\n" - "location=cmf::geometry::point()) \n" - ""}, - { (char *)"flux_node_project_get", (PyCFunction)_wrap_flux_node_project_get, METH_O, (char *)"flux_node_project_get(flux_node self) -> project"}, - { (char *)"flux_node_potential_set", _wrap_flux_node_potential_set, METH_VARARGS, (char *)"flux_node_potential_set(flux_node self, real potential)"}, - { (char *)"flux_node_potential_get", (PyCFunction)_wrap_flux_node_potential_get, METH_O, (char *)"flux_node_potential_get(flux_node self) -> real"}, - { (char *)"flux_node_connections_get", (PyCFunction)_wrap_flux_node_connections_get, METH_O, (char *)"flux_node_connections_get(flux_node self) -> connection_list"}, - { (char *)"flux_node_swigregister", flux_node_swigregister, METH_VARARGS, NULL}, - { (char *)"flux_node_swiginit", flux_node_swiginit, METH_VARARGS, NULL}, - { (char *)"count_node_references", (PyCFunction) _wrap_count_node_references, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "count_node_references(cmf::water::flux_node::ptr node) -> int\n" - "\n" - "int\n" - "cmf::water::count_node_references(flux_node::ptr node) \n" - ""}, - { (char *)"get_higher_node", (PyCFunction) _wrap_get_higher_node, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "get_higher_node(cmf::water::flux_node::ptr node1, cmf::water::flux_node::ptr node2) -> cmf::water::flux_node::ptr\n" - "\n" - "flux_node::ptr\n" - "cmf::water::get_higher_node(flux_node::ptr node1, flux_node::ptr\n" - "node2) \n" - ""}, - { (char *)"get_lower_node", (PyCFunction) _wrap_get_lower_node, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "get_lower_node(cmf::water::flux_node::ptr node1, cmf::water::flux_node::ptr node2) -> cmf::water::flux_node::ptr\n" - "\n" - "flux_node::ptr\n" - "cmf::water::get_lower_node(flux_node::ptr node1, flux_node::ptr node2)\n" - "\n" - ""}, - { (char *)"waterbalance_integrator_integration_t", (PyCFunction)_wrap_waterbalance_integrator_integration_t, METH_O, (char *)"\n" - "waterbalance_integrator_integration_t(waterbalance_integrator self) -> Time\n" - "\n" - "cmf::math::Time\n" - "integration_t() const\n" - "\n" - "Returns the duration of the integration. \n" - ""}, - { (char *)"waterbalance_integrator_t0", (PyCFunction)_wrap_waterbalance_integrator_t0, METH_O, (char *)"\n" - "waterbalance_integrator_t0(waterbalance_integrator self) -> Time\n" - "\n" - "cmf::math::Time t0() const\n" - "\n" - "Returns the start time of the integration. \n" - ""}, - { (char *)"waterbalance_integrator___get_node", (PyCFunction)_wrap_waterbalance_integrator___get_node, METH_O, (char *)"\n" - "waterbalance_integrator___get_node(waterbalance_integrator self) -> cmf::water::flux_node::ptr\n" - "\n" - "flux_node::ptr get_node() const\n" - "\n" - "Returns the node of this integrator. \n" - ""}, - { (char *)"waterbalance_integrator___set_node", (PyCFunction) _wrap_waterbalance_integrator___set_node, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "waterbalance_integrator___set_node(waterbalance_integrator self, cmf::water::flux_node::ptr node)\n" - "\n" - "void set_node(cmf::water::flux_node::ptr node) \n" - ""}, - { (char *)"new_waterbalance_integrator", (PyCFunction) _wrap_new_waterbalance_integrator, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "new_waterbalance_integrator(cmf::water::flux_node::ptr node) -> waterbalance_integrator\n" - "\n" - "waterbalance_integrator(cmf::water::flux_node::ptr node) \n" - ""}, - { (char *)"delete_waterbalance_integrator", (PyCFunction)_wrap_delete_waterbalance_integrator, METH_O, (char *)"delete_waterbalance_integrator(waterbalance_integrator self)"}, - { (char *)"waterbalance_integrator_swigregister", waterbalance_integrator_swigregister, METH_VARARGS, NULL}, - { (char *)"waterbalance_integrator_swiginit", waterbalance_integrator_swiginit, METH_VARARGS, NULL}, - { (char *)"flux_connection_left_node", (PyCFunction)_wrap_flux_connection_left_node, METH_O, (char *)"\n" - "flux_connection_left_node(flux_connection self) -> cmf::water::flux_node::ptr\n" - "\n" - "flux_node::ptr left_node() const\n" - "\n" - "Returns the left node of this connection. \n" - ""}, - { (char *)"flux_connection_right_node", (PyCFunction)_wrap_flux_connection_right_node, METH_O, (char *)"\n" - "flux_connection_right_node(flux_connection self) -> cmf::water::flux_node::ptr\n" - "\n" - "flux_node::ptr right_node() const\n" - "\n" - "returns the right node of this connection \n" - ""}, - { (char *)"flux_connection_kill_me", (PyCFunction)_wrap_flux_connection_kill_me, METH_O, (char *)"\n" - "flux_connection_kill_me(flux_connection self) -> bool\n" - "\n" - "bool\n" - "kill_me()\n" - "\n" - "Deregisters this connection from its nodes. Returns true if only one\n" - "reference is left. \n" - ""}, - { (char *)"flux_connection_refresh", (PyCFunction) _wrap_flux_connection_refresh, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "flux_connection_refresh(flux_connection self, Time t)\n" - "\n" - "void\n" - "refresh(cmf::math::Time t)\n" - "\n" - "Performes a new calculation of the flux. \n" - ""}, - { (char *)"flux_connection_connection_id_get", (PyCFunction)_wrap_flux_connection_connection_id_get, METH_O, (char *)"flux_connection_connection_id_get(flux_connection self) -> int const"}, - { (char *)"flux_connection___eq__", (PyCFunction) _wrap_flux_connection___eq__, METH_VARARGS | METH_KEYWORDS, (char *)"flux_connection___eq__(flux_connection self, flux_connection other) -> bool"}, - { (char *)"flux_connection_get_target", _wrap_flux_connection_get_target, METH_VARARGS, (char *)"\n" - "get_target(flux_node inquirer) -> cmf::water::flux_node::ptr\n" - "flux_connection_get_target(flux_connection self, int index) -> cmf::water::flux_node::ptr\n" - "\n" - "flux_node::ptr get_target(int index) const\n" - "\n" - "With index 0, the left node is returned, with index 1 the right node\n" - "of the connection. \n" - ""}, - { (char *)"flux_connection_exchange_target", (PyCFunction) _wrap_flux_connection_exchange_target, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "flux_connection_exchange_target(flux_connection self, cmf::water::flux_node::ptr oldtarget, cmf::water::flux_node::ptr newTarget)\n" - "\n" - "void exchange_target(flux_node::ptr oldtarget, flux_node::ptr\n" - "newTarget) \n" - ""}, - { (char *)"flux_connection_q", (PyCFunction) _wrap_flux_connection_q, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "flux_connection_q(flux_connection self, flux_node inquirer, Time t) -> real\n" - "\n" - "real q(const\n" - "flux_node &inquirer, cmf::math::Time t)\n" - "\n" - "Returns the current flux through a connection. Negative signs mean out\n" - "of the inquirer, positive are inflows to the inquirer. \n" - ""}, - { (char *)"flux_connection_conc", (PyCFunction) _wrap_flux_connection_conc, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "flux_connection_conc(flux_connection self, Time t, solute _Solute) -> real\n" - "\n" - "real\n" - "conc(cmf::math::Time t, const cmf::water::solute &_Solute)\n" - "\n" - "Returns the concentration of the flux.\n" - "\n" - "If not overridden, it returns the concentration of the source of the\n" - "flux (direction depending) \n" - ""}, - { (char *)"flux_connection_type_get", (PyCFunction)_wrap_flux_connection_type_get, METH_O, (char *)"flux_connection_type_get(flux_connection self) -> std::string const &"}, - { (char *)"flux_connection_get_tracer_filter", _wrap_flux_connection_get_tracer_filter, METH_VARARGS, (char *)"\n" - "get_tracer_filter() -> real\n" - "flux_connection_get_tracer_filter(flux_connection self, solute S) -> real\n" - "\n" - "real get_tracer_filter(solute S)\n" - "\n" - "A value ranging from 0 to 1 to filter tracers out of the water flux.\n" - "\n" - ""}, - { (char *)"flux_connection_set_tracer_filter", _wrap_flux_connection_set_tracer_filter, METH_VARARGS, (char *)"\n" - "set_tracer_filter(real value)\n" - "flux_connection_set_tracer_filter(flux_connection self, solute S, real value)\n" - "\n" - "void set_tracer_filter(solute S, real value) \n" - ""}, - { (char *)"flux_connection_to_string", (PyCFunction)_wrap_flux_connection_to_string, METH_O, (char *)"\n" - "flux_connection_to_string(flux_connection self) -> std::string\n" - "\n" - "virtual std::string to_string() const \n" - ""}, - { (char *)"flux_connection_short_string", (PyCFunction)_wrap_flux_connection_short_string, METH_O, (char *)"\n" - "flux_connection_short_string(flux_connection self) -> std::string\n" - "\n" - "virtual std::string short_string() const \n" - ""}, - { (char *)"delete_flux_connection", (PyCFunction)_wrap_delete_flux_connection, METH_O, (char *)"\n" - "delete_flux_connection(flux_connection self)\n" - "\n" - "virtual ~flux_connection() \n" - ""}, - { (char *)"flux_connection_swigregister", flux_connection_swigregister, METH_VARARGS, NULL}, - { (char *)"replace_node", (PyCFunction) _wrap_replace_node, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "replace_node(cmf::water::flux_node::ptr oldnode, cmf::water::flux_node::ptr newnode) -> int\n" - "\n" - "int\n" - "cmf::water::replace_node(cmf::water::flux_node::ptr oldnode,\n" - "cmf::water::flux_node::ptr newnode) \n" - ""}, - { (char *)"connection_list_append", (PyCFunction) _wrap_connection_list_append, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "connection_list_append(connection_list self, cmf::water::flux_connection::ptr connection) -> bool\n" - "\n" - "bool\n" - "append(cmf::water::flux_connection::ptr connection) \n" - ""}, - { (char *)"connection_list_extend", (PyCFunction) _wrap_connection_list_extend, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "connection_list_extend(connection_list self, connection_list connections)\n" - "\n" - "void\n" - "extend(const connection_list &connections) \n" - ""}, - { (char *)"connection_list_contains", (PyCFunction) _wrap_connection_list_contains, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "connection_list_contains(connection_list self, cmf::water::flux_connection::ptr connection) -> bool\n" - "\n" - "bool\n" - "contains(cmf::water::flux_connection::ptr connection) const \n" - ""}, - { (char *)"connection_list_remove", (PyCFunction) _wrap_connection_list_remove, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "connection_list_remove(connection_list self, cmf::water::flux_connection::ptr connection) -> bool\n" - "\n" - "bool\n" - "remove(cmf::water::flux_connection::ptr connection) \n" - ""}, - { (char *)"connection_list_do_action", (PyCFunction) _wrap_connection_list_do_action, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "connection_list_do_action(connection_list self, Time t, bool use_OpenMP=True)\n" - "\n" - "void\n" - "do_action(cmf::math::Time t, bool use_OpenMP=true) \n" - ""}, - { (char *)"connection_list_size", (PyCFunction)_wrap_connection_list_size, METH_O, (char *)"\n" - "connection_list_size(connection_list self) -> size_t\n" - "\n" - "size_t\n" - "size() const \n" - ""}, - { (char *)"connection_list_at", (PyCFunction) _wrap_connection_list_at, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "connection_list_at(connection_list self, size_t pos) -> cmf::water::flux_connection::ptr\n" - "\n" - "cmf::water::flux_connection::ptr at(size_t pos) const \n" - ""}, - { (char *)"connection_list_begin", _wrap_connection_list_begin, METH_VARARGS, (char *)"\n" - "begin() -> cmf::water::connection_list::iterator\n" - "connection_list_begin(connection_list self) -> cmf::water::connection_list::const_iterator\n" - "\n" - "const_iterator begin() const \n" - ""}, - { (char *)"connection_list_end", _wrap_connection_list_end, METH_VARARGS, (char *)"\n" - "end() -> cmf::water::connection_list::iterator\n" - "connection_list_end(connection_list self) -> cmf::water::connection_list::const_iterator\n" - "\n" - "const_iterator end() const \n" - ""}, - { (char *)"delete_connection_list", (PyCFunction)_wrap_delete_connection_list, METH_O, (char *)"\n" - "delete_connection_list(connection_list self)\n" - "\n" - "virtual ~connection_list() \n" - ""}, - { (char *)"connection_list___len__", (PyCFunction)_wrap_connection_list___len__, METH_O, (char *)"connection_list___len__(connection_list self) -> size_t"}, - { (char *)"connection_list___contains__", (PyCFunction) _wrap_connection_list___contains__, METH_VARARGS | METH_KEYWORDS, (char *)"connection_list___contains__(connection_list self, cmf::water::flux_connection::ptr const & con) -> bool"}, - { (char *)"new_connection_list", (PyCFunction)_wrap_new_connection_list, METH_NOARGS, (char *)"new_connection_list() -> connection_list"}, - { (char *)"connection_list_swigregister", connection_list_swigregister, METH_VARARGS, NULL}, - { (char *)"connection_list_swiginit", connection_list_swiginit, METH_VARARGS, NULL}, - { (char *)"flux_integrator_integration_t", (PyCFunction)_wrap_flux_integrator_integration_t, METH_O, (char *)"\n" - "flux_integrator_integration_t(flux_integrator self) -> Time\n" - "\n" - "cmf::math::Time integration_t() const\n" - "\n" - "Returns the duration of the integration. \n" - ""}, - { (char *)"flux_integrator_t0", (PyCFunction)_wrap_flux_integrator_t0, METH_O, (char *)"\n" - "flux_integrator_t0(flux_integrator self) -> Time\n" - "\n" - "cmf::math::Time t0() const\n" - "\n" - "Returns the start time of the integration. \n" - ""}, - { (char *)"flux_integrator_invert_set", _wrap_flux_integrator_invert_set, METH_VARARGS, (char *)"flux_integrator_invert_set(flux_integrator self, bool invert)"}, - { (char *)"flux_integrator_invert_get", (PyCFunction)_wrap_flux_integrator_invert_get, METH_O, (char *)"flux_integrator_invert_get(flux_integrator self) -> bool"}, - { (char *)"flux_integrator_connection", (PyCFunction)_wrap_flux_integrator_connection, METH_O, (char *)"\n" - "flux_integrator_connection(flux_integrator self) -> cmf::water::flux_connection::ptr\n" - "\n" - "flux_connection::ptr connection() const\n" - "\n" - "Returns the flux_connection. \n" - ""}, - { (char *)"new_flux_integrator", _wrap_new_flux_integrator, METH_VARARGS, (char *)"\n" - "flux_integrator(flux_connection connection)\n" - "new_flux_integrator(cmf::water::flux_node::ptr left, cmf::water::flux_node::ptr right) -> flux_integrator\n" - "\n" - "flux_integrator(cmf::water::flux_node::ptr left,\n" - "cmf::water::flux_node::ptr right)\n" - "\n" - "Creates a flux_integrator from the endpoints of a connection. Throws\n" - "if there is no connection between the endpoints. \n" - ""}, - { (char *)"delete_flux_integrator", (PyCFunction)_wrap_delete_flux_integrator, METH_O, (char *)"delete_flux_integrator(flux_integrator self)"}, - { (char *)"flux_integrator_swigregister", flux_integrator_swigregister, METH_VARARGS, NULL}, - { (char *)"flux_integrator_swiginit", flux_integrator_swiginit, METH_VARARGS, NULL}, - { (char *)"linear_scale_displacement_set", _wrap_linear_scale_displacement_set, METH_VARARGS, (char *)"linear_scale_displacement_set(linear_scale self, real displacement)"}, - { (char *)"linear_scale_displacement_get", (PyCFunction)_wrap_linear_scale_displacement_get, METH_O, (char *)"linear_scale_displacement_get(linear_scale self) -> real"}, - { (char *)"linear_scale_slope_set", _wrap_linear_scale_slope_set, METH_VARARGS, (char *)"linear_scale_slope_set(linear_scale self, real slope)"}, - { (char *)"linear_scale_slope_get", (PyCFunction)_wrap_linear_scale_slope_get, METH_O, (char *)"linear_scale_slope_get(linear_scale self) -> real"}, - { (char *)"linear_scale___call__", (PyCFunction) _wrap_linear_scale___call__, METH_VARARGS | METH_KEYWORDS, (char *)"linear_scale___call__(linear_scale self, real value) -> real"}, - { (char *)"new_linear_scale", (PyCFunction) _wrap_new_linear_scale, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "new_linear_scale(real _slope=1, real _displacement=0) -> linear_scale\n" - "\n" - "linear_scale(real _slope=1, real _displacement=0)\n" - "\n" - "Creates a linear scale (by default it is a unity scale, :math:`a=1; b=0`) \n" - ""}, - { (char *)"delete_linear_scale", (PyCFunction)_wrap_delete_linear_scale, METH_O, (char *)"delete_linear_scale(linear_scale self)"}, - { (char *)"linear_scale_swigregister", linear_scale_swigregister, METH_VARARGS, NULL}, - { (char *)"linear_scale_swiginit", linear_scale_swiginit, METH_VARARGS, NULL}, - { (char *)"DirichletBoundary_set_conc", (PyCFunction) _wrap_DirichletBoundary_set_conc, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "DirichletBoundary_set_conc(DirichletBoundary self, solute _Solute, double value)\n" - "\n" - "virtual void set_conc(const cmf::water::solute &_Solute, double value)\n" - "\n" - ""}, - { (char *)"DirichletBoundary_is_source_set", _wrap_DirichletBoundary_is_source_set, METH_VARARGS, (char *)"DirichletBoundary_is_source_set(DirichletBoundary self, bool is_source)"}, - { (char *)"DirichletBoundary_is_source_get", (PyCFunction)_wrap_DirichletBoundary_is_source_get, METH_O, (char *)"DirichletBoundary_is_source_get(DirichletBoundary self) -> bool"}, - { (char *)"DirichletBoundary_RecalcFluxes", (PyCFunction) _wrap_DirichletBoundary_RecalcFluxes, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "DirichletBoundary_RecalcFluxes(DirichletBoundary self, Time t) -> bool\n" - "\n" - "virtual bool RecalcFluxes(cmf::math::Time t)\n" - "\n" - "Pure flux_nodes do not influence fluxes, therefore no recalculation of\n" - "fluxes is required by flux_node.\n" - "\n" - "WaterStorage overrides this, since state changes require an update of\n" - "the fluxes \n" - ""}, - { (char *)"new_DirichletBoundary", (PyCFunction) _wrap_new_DirichletBoundary, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "new_DirichletBoundary(project _p, real potential, point Location) -> DirichletBoundary\n" - "\n" - "DirichletBoundary(cmf::project &_p, real potential,\n" - "cmf::geometry::point Location=cmf::geometry::point()) \n" - ""}, - { (char *)"delete_DirichletBoundary", (PyCFunction)_wrap_delete_DirichletBoundary, METH_O, (char *)"delete_DirichletBoundary(DirichletBoundary self)"}, - { (char *)"DirichletBoundary_swigregister", DirichletBoundary_swigregister, METH_VARARGS, NULL}, - { (char *)"DirichletBoundary_swiginit", DirichletBoundary_swiginit, METH_VARARGS, NULL}, - { (char *)"NeumannBoundary_get_flux", (PyCFunction)_wrap_NeumannBoundary_get_flux, METH_O, (char *)"\n" - "NeumannBoundary_get_flux(NeumannBoundary self) -> timeseries\n" - "\n" - "cmf::math::timeseries get_flux()\n" - "\n" - "The timeseries of the boundary flux. \n" - ""}, - { (char *)"NeumannBoundary_set_flux", _wrap_NeumannBoundary_set_flux, METH_VARARGS, (char *)"\n" - "set_flux(timeseries new_flux)\n" - "NeumannBoundary_set_flux(NeumannBoundary self, double new_flux)\n" - "\n" - "void\n" - "set_flux(double new_flux)\n" - "\n" - "Set a constant as the boundary flux. \n" - ""}, - { (char *)"NeumannBoundary_flux_scale_set", _wrap_NeumannBoundary_flux_scale_set, METH_VARARGS, (char *)"NeumannBoundary_flux_scale_set(NeumannBoundary self, linear_scale flux_scale)"}, - { (char *)"NeumannBoundary_flux_scale_get", (PyCFunction)_wrap_NeumannBoundary_flux_scale_get, METH_O, (char *)"NeumannBoundary_flux_scale_get(NeumannBoundary self) -> linear_scale"}, - { (char *)"NeumannBoundary_concentration_set", _wrap_NeumannBoundary_concentration_set, METH_VARARGS, (char *)"NeumannBoundary_concentration_set(NeumannBoundary self, SoluteTimeseries concentration)"}, - { (char *)"NeumannBoundary_concentration_get", (PyCFunction)_wrap_NeumannBoundary_concentration_get, METH_O, (char *)"NeumannBoundary_concentration_get(NeumannBoundary self) -> SoluteTimeseries"}, - { (char *)"NeumannBoundary___call__", (PyCFunction) _wrap_NeumannBoundary___call__, METH_VARARGS | METH_KEYWORDS, (char *)"NeumannBoundary___call__(NeumannBoundary self, Time t) -> real"}, - { (char *)"NeumannBoundary_connect_to", (PyCFunction) _wrap_NeumannBoundary_connect_to, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "NeumannBoundary_connect_to(NeumannBoundary self, cmf::water::flux_node::ptr target)\n" - "\n" - "void\n" - "connect_to(cmf::water::flux_node::ptr target) \n" - ""}, - { (char *)"new_NeumannBoundary", _wrap_new_NeumannBoundary, METH_VARARGS, (char *)"\n" - "NeumannBoundary(project _project, timeseries _flux, SoluteTimeseries _concentration, point loc)\n" - "new_NeumannBoundary(project _project, point loc) -> NeumannBoundary\n" - "\n" - "NeumannBoundary(cmf::project &_project, cmf::geometry::point\n" - "loc=cmf::geometry::point()) \n" - ""}, - { (char *)"NeumannBoundary_create", (PyCFunction) _wrap_NeumannBoundary_create, METH_VARARGS | METH_KEYWORDS, (char *)"NeumannBoundary_create(cmf::water::flux_node::ptr target) -> cmf::water::NeumannBoundary::ptr"}, - { (char *)"delete_NeumannBoundary", (PyCFunction)_wrap_delete_NeumannBoundary, METH_O, (char *)"delete_NeumannBoundary(NeumannBoundary self)"}, - { (char *)"NeumannBoundary_swigregister", NeumannBoundary_swigregister, METH_VARARGS, NULL}, - { (char *)"NeumannBoundary_swiginit", NeumannBoundary_swiginit, METH_VARARGS, NULL}, - { (char *)"new_NeumannFlux", (PyCFunction) _wrap_new_NeumannFlux, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "new_NeumannFlux(std::shared_ptr< cmf::water::NeumannBoundary > left, cmf::water::flux_node::ptr right) -> NeumannFlux\n" - "\n" - "NeumannFlux(std::shared_ptr< NeumannBoundary > left,\n" - "cmf::water::flux_node::ptr right) \n" - ""}, - { (char *)"delete_NeumannFlux", (PyCFunction)_wrap_delete_NeumannFlux, METH_O, (char *)"delete_NeumannFlux(NeumannFlux self)"}, - { (char *)"NeumannFlux_swigregister", NeumannFlux_swigregister, METH_VARARGS, NULL}, - { (char *)"NeumannFlux_swiginit", NeumannFlux_swiginit, METH_VARARGS, NULL}, - { (char *)"new_WaterStorage", (PyCFunction) _wrap_new_WaterStorage, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "new_WaterStorage(project project, std::string const & Name, double InitialState=0, double scale=1) -> WaterStorage\n" - "\n" - "WaterStorage(cmf::project &project, const std::string &Name=\"\",\n" - "double InitialState=0, double scale=1)\n" - "\n" - "creates a water storage (abstract class)\n" - "\n" - "Parameters:\n" - "-----------\n" - "\n" - "project: The project the waterstorage belongs to\n" - "\n" - "Name: Name of the water storage\n" - "\n" - "InitialState: Initial water content in m3\n" - "\n" - "scale: A kind of \"standard size\" in m3 of the water storage to\n" - "scale tolerances, default 1m3 \n" - ""}, - { (char *)"WaterStorage_from_node", (PyCFunction) _wrap_WaterStorage_from_node, METH_VARARGS | METH_KEYWORDS, (char *)"WaterStorage_from_node(cmf::water::flux_node::ptr node) -> std::shared_ptr< cmf::water::WaterStorage >"}, - { (char *)"WaterStorage_Solute", _wrap_WaterStorage_Solute, METH_VARARGS, (char *)"\n" - "Solute(solute _Solute) -> SoluteStorage\n" - "WaterStorage_Solute(WaterStorage self, solute _Solute) -> SoluteStorage\n" - "\n" - "const\n" - "SoluteStorage& Solute(const cmf::water::solute &_Solute) const \n" - ""}, - { (char *)"WaterStorage_conc", _wrap_WaterStorage_conc, METH_VARARGS, (char *)"\n" - "conc(solute _Solute) -> real\n" - "conc(Time t, solute _Solute) -> real\n" - "WaterStorage_conc(WaterStorage self, solute _Solute, real NewConcetration)\n" - "\n" - "void\n" - "conc(const cmf::water::solute &_Solute, real NewConcetration)\n" - "\n" - "Sets a new concentration. \n" - ""}, - { (char *)"WaterStorage_cast", (PyCFunction) _wrap_WaterStorage_cast, METH_VARARGS | METH_KEYWORDS, (char *)"WaterStorage_cast(std::shared_ptr< cmf::water::flux_node > node) -> std::shared_ptr< cmf::water::WaterStorage >"}, - { (char *)"WaterStorage_create", (PyCFunction) _wrap_WaterStorage_create, METH_VARARGS | METH_KEYWORDS, (char *)"WaterStorage_create(project _project, real initial_state=0.0, real scale=1.0) -> std::shared_ptr< cmf::water::WaterStorage >"}, - { (char *)"WaterStorage_volume_set", _wrap_WaterStorage_volume_set, METH_VARARGS, (char *)"WaterStorage_volume_set(WaterStorage self, real volume)"}, - { (char *)"WaterStorage_volume_get", (PyCFunction)_wrap_WaterStorage_volume_get, METH_O, (char *)"WaterStorage_volume_get(WaterStorage self) -> real"}, - { (char *)"WaterStorage_statevariable_set", _wrap_WaterStorage_statevariable_set, METH_VARARGS, (char *)"WaterStorage_statevariable_set(WaterStorage self, char statevariable)"}, - { (char *)"WaterStorage_statevariable_get", (PyCFunction)_wrap_WaterStorage_statevariable_get, METH_O, (char *)"WaterStorage_statevariable_get(WaterStorage self) -> char"}, - { (char *)"delete_WaterStorage", (PyCFunction)_wrap_delete_WaterStorage, METH_O, (char *)"delete_WaterStorage(WaterStorage self)"}, - { (char *)"WaterStorage_swigregister", WaterStorage_swigregister, METH_VARARGS, NULL}, - { (char *)"WaterStorage_swiginit", WaterStorage_swiginit, METH_VARARGS, NULL}, - { (char *)"new_waterbalance_connection", (PyCFunction) _wrap_new_waterbalance_connection, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "new_waterbalance_connection(cmf::water::flux_node::ptr source, cmf::water::flux_node::ptr target) -> waterbalance_connection\n" - "\n" - "waterbalance_connection(flux_node::ptr source, flux_node::ptr target)\n" - "\n" - ""}, - { (char *)"delete_waterbalance_connection", (PyCFunction)_wrap_delete_waterbalance_connection, METH_O, (char *)"delete_waterbalance_connection(waterbalance_connection self)"}, - { (char *)"waterbalance_connection_swigregister", waterbalance_connection_swigregister, METH_VARARGS, NULL}, - { (char *)"waterbalance_connection_swiginit", waterbalance_connection_swiginit, METH_VARARGS, NULL}, - { (char *)"external_control_connection_flux_set", _wrap_external_control_connection_flux_set, METH_VARARGS, (char *)"external_control_connection_flux_set(external_control_connection self, real flux)"}, - { (char *)"external_control_connection_flux_get", (PyCFunction)_wrap_external_control_connection_flux_get, METH_O, (char *)"external_control_connection_flux_get(external_control_connection self) -> real"}, - { (char *)"new_external_control_connection", (PyCFunction) _wrap_new_external_control_connection, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "new_external_control_connection(cmf::water::flux_node::ptr source, cmf::water::flux_node::ptr target, real flux_value=0) -> external_control_connection\n" - "\n" - "external_control_connection(flux_node::ptr source, flux_node::ptr\n" - "target, real flux_value=0) \n" - ""}, - { (char *)"delete_external_control_connection", (PyCFunction)_wrap_delete_external_control_connection, METH_O, (char *)"delete_external_control_connection(external_control_connection self)"}, - { (char *)"external_control_connection_swigregister", external_control_connection_swigregister, METH_VARARGS, NULL}, - { (char *)"external_control_connection_swiginit", external_control_connection_swiginit, METH_VARARGS, NULL}, - { (char *)"set_flux", (PyCFunction) _wrap_set_flux, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "set_flux(cmf::water::flux_node::ptr source, cmf::water::flux_node::ptr target, real flux_value)\n" - "\n" - "void\n" - "cmf::water::set_flux(flux_node::ptr source, flux_node::ptr target,\n" - "real flux_value)\n" - "\n" - "Sets a constant flux between two nodes, if an\n" - "external_control_connection exists. \n" - ""}, - { (char *)"can_set_flux", (PyCFunction) _wrap_can_set_flux, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "can_set_flux(cmf::water::flux_node::ptr source, cmf::water::flux_node::ptr target) -> bool\n" - "\n" - "bool\n" - "cmf::water::can_set_flux(flux_node::ptr source, flux_node::ptr target)\n" - "\n" - "Checks if a constant flux between two nodes can be set.\n" - "\n" - "Returns true if the nodes are connected by an\n" - "external_control_connection \n" - ""}, - { (char *)"kinematic_wave_residencetime_set", _wrap_kinematic_wave_residencetime_set, METH_VARARGS, (char *)"kinematic_wave_residencetime_set(kinematic_wave self, real residencetime)"}, - { (char *)"kinematic_wave_residencetime_get", (PyCFunction)_wrap_kinematic_wave_residencetime_get, METH_O, (char *)"kinematic_wave_residencetime_get(kinematic_wave self) -> real"}, - { (char *)"kinematic_wave_exponent_set", _wrap_kinematic_wave_exponent_set, METH_VARARGS, (char *)"kinematic_wave_exponent_set(kinematic_wave self, real exponent)"}, - { (char *)"kinematic_wave_exponent_get", (PyCFunction)_wrap_kinematic_wave_exponent_get, METH_O, (char *)"kinematic_wave_exponent_get(kinematic_wave self) -> real"}, - { (char *)"kinematic_wave_residual_set", _wrap_kinematic_wave_residual_set, METH_VARARGS, (char *)"kinematic_wave_residual_set(kinematic_wave self, real residual)"}, - { (char *)"kinematic_wave_residual_get", (PyCFunction)_wrap_kinematic_wave_residual_get, METH_O, (char *)"kinematic_wave_residual_get(kinematic_wave self) -> real"}, - { (char *)"kinematic_wave_V0_set", _wrap_kinematic_wave_V0_set, METH_VARARGS, (char *)"kinematic_wave_V0_set(kinematic_wave self, real V0)"}, - { (char *)"kinematic_wave_V0_get", (PyCFunction)_wrap_kinematic_wave_V0_get, METH_O, (char *)"kinematic_wave_V0_get(kinematic_wave self) -> real"}, - { (char *)"new_kinematic_wave", (PyCFunction) _wrap_new_kinematic_wave, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "new_kinematic_wave(cmf::water::WaterStorage::ptr source, cmf::water::flux_node::ptr target, real residencetime, real exponent=1.0, real residual=0.0, real V0=1.0) -> kinematic_wave\n" - "\n" - "kinematic_wave(WaterStorage::ptr source, flux_node::ptr target, real\n" - "residencetime, real exponent=1.0, real residual=0.0, real V0=1.0)\n" - "\n" - "Creates a kinematic wave connection.\n" - "\n" - "\n" - "\n" - ".. math::\n" - "\n" - " q = \\\\frac 1 {t_r} {\\\\left(\\\\frac{V - V_{residual}}{V_0}\n" - " \\\\right)^\\\\beta} \n" - "\n" - "Parameters:\n" - "-----------\n" - "\n" - "source: Water storage from which the water flows out. Flux is a\n" - "function of source.volume\n" - "\n" - "target: Target node (boundary condition or storage). Does not\n" - "influence the strength of the flow\n" - "\n" - "residencetime: :math:`t_r [days]` The residence time of the water in this\n" - "storage\n" - "\n" - "exponent: :math:`\\\\beta [-]` An empirical exponent to shape the flux\n" - "function (default = 1 (linear function))\n" - "\n" - "residual: :math:`V_{residual} [m^3]` The volume of water not flowing out\n" - "(default = 0)\n" - "\n" - "V0: :math:`V_0` The reference volume to scale the exponent \n" - ""}, - { (char *)"delete_kinematic_wave", (PyCFunction)_wrap_delete_kinematic_wave, METH_O, (char *)"delete_kinematic_wave(kinematic_wave self)"}, - { (char *)"kinematic_wave_swigregister", kinematic_wave_swigregister, METH_VARARGS, NULL}, - { (char *)"kinematic_wave_swiginit", kinematic_wave_swiginit, METH_VARARGS, NULL}, - { (char *)"LinearStorageConnection_residencetime_set", _wrap_LinearStorageConnection_residencetime_set, METH_VARARGS, (char *)"LinearStorageConnection_residencetime_set(LinearStorageConnection self, real residencetime)"}, - { (char *)"LinearStorageConnection_residencetime_get", (PyCFunction)_wrap_LinearStorageConnection_residencetime_get, METH_O, (char *)"LinearStorageConnection_residencetime_get(LinearStorageConnection self) -> real"}, - { (char *)"LinearStorageConnection_residual_set", _wrap_LinearStorageConnection_residual_set, METH_VARARGS, (char *)"LinearStorageConnection_residual_set(LinearStorageConnection self, real residual)"}, - { (char *)"LinearStorageConnection_residual_get", (PyCFunction)_wrap_LinearStorageConnection_residual_get, METH_O, (char *)"LinearStorageConnection_residual_get(LinearStorageConnection self) -> real"}, - { (char *)"new_LinearStorageConnection", (PyCFunction) _wrap_new_LinearStorageConnection, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "new_LinearStorageConnection(cmf::water::WaterStorage::ptr source, cmf::water::flux_node::ptr target, real residencetime, real residual=0.0) -> LinearStorageConnection\n" - "\n" - "LinearStorageConnection(WaterStorage::ptr source, flux_node::ptr\n" - "target, real residencetime, real residual=0.0)\n" - "\n" - "Creates a linear storage connection or Nash-box.\n" - "\n" - "\n" - "\n" - ".. math::\n" - "\n" - " q = \\\\frac{V - V_{residual}}{t_r}} \n" - "\n" - "Parameters:\n" - "-----------\n" - "\n" - "source: Water storage from which the water flows out. Flux is a\n" - "function of source.volume\n" - "\n" - "target: Target node (boundary condition or storage). Does not\n" - "influence the strength of the flow\n" - "\n" - "residencetime: :math:`t_r [days]` The residence time of the water in this\n" - "storage\n" - "\n" - "residual: :math:`V_{residual} [m^3]` The volume of water not flowing out\n" - "(default = 0) \n" - ""}, - { (char *)"delete_LinearStorageConnection", (PyCFunction)_wrap_delete_LinearStorageConnection, METH_O, (char *)"delete_LinearStorageConnection(LinearStorageConnection self)"}, - { (char *)"LinearStorageConnection_swigregister", LinearStorageConnection_swigregister, METH_VARARGS, NULL}, - { (char *)"LinearStorageConnection_swiginit", LinearStorageConnection_swiginit, METH_VARARGS, NULL}, - { (char *)"PowerLawConnection_Q0_set", _wrap_PowerLawConnection_Q0_set, METH_VARARGS, (char *)"PowerLawConnection_Q0_set(PowerLawConnection self, real Q0)"}, - { (char *)"PowerLawConnection_Q0_get", (PyCFunction)_wrap_PowerLawConnection_Q0_get, METH_O, (char *)"PowerLawConnection_Q0_get(PowerLawConnection self) -> real"}, - { (char *)"PowerLawConnection_beta_set", _wrap_PowerLawConnection_beta_set, METH_VARARGS, (char *)"PowerLawConnection_beta_set(PowerLawConnection self, real beta)"}, - { (char *)"PowerLawConnection_beta_get", (PyCFunction)_wrap_PowerLawConnection_beta_get, METH_O, (char *)"PowerLawConnection_beta_get(PowerLawConnection self) -> real"}, - { (char *)"PowerLawConnection_residual_set", _wrap_PowerLawConnection_residual_set, METH_VARARGS, (char *)"PowerLawConnection_residual_set(PowerLawConnection self, real residual)"}, - { (char *)"PowerLawConnection_residual_get", (PyCFunction)_wrap_PowerLawConnection_residual_get, METH_O, (char *)"PowerLawConnection_residual_get(PowerLawConnection self) -> real"}, - { (char *)"PowerLawConnection_V0_set", _wrap_PowerLawConnection_V0_set, METH_VARARGS, (char *)"PowerLawConnection_V0_set(PowerLawConnection self, real V0)"}, - { (char *)"PowerLawConnection_V0_get", (PyCFunction)_wrap_PowerLawConnection_V0_get, METH_O, (char *)"PowerLawConnection_V0_get(PowerLawConnection self) -> real"}, - { (char *)"new_PowerLawConnection", (PyCFunction) _wrap_new_PowerLawConnection, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "new_PowerLawConnection(cmf::water::WaterStorage::ptr source, cmf::water::flux_node::ptr target, real Q0, real V0, real beta=1.0, real residual=0.0) -> PowerLawConnection\n" - "\n" - "PowerLawConnection(WaterStorage::ptr source, flux_node::ptr target,\n" - "real Q0, real V0, real beta=1.0, real residual=0.0)\n" - "\n" - "Creates a power law connection.\n" - "\n" - "Parameters:\n" - "-----------\n" - "\n" - "source: Water storage from which the water flows out. Flux is a\n" - "function of source.volume\n" - "\n" - "target: Target node (boundary condition or storage). Does not\n" - "influence the strength of the flow\n" - "\n" - "Q0: Reference flow :math:`Q_0 = q(V_0)` Outflow when the source storage\n" - "equals the reference volume\n" - "\n" - "V0: Reference volume :math:`V_0` The reference volume to scale the exponent\n" - "\n" - "beta: :math:`\\\\beta [-]` An empirical exponent to shape the flux\n" - "function (default = 1 (linear function))\n" - "\n" - "residual: :math:`V_{residual} [m^3]` The volume of water not flowing out\n" - "(default = 0) \n" - ""}, - { (char *)"delete_PowerLawConnection", (PyCFunction)_wrap_delete_PowerLawConnection, METH_O, (char *)"delete_PowerLawConnection(PowerLawConnection self)"}, - { (char *)"PowerLawConnection_swigregister", PowerLawConnection_swigregister, METH_VARARGS, NULL}, - { (char *)"PowerLawConnection_swiginit", PowerLawConnection_swiginit, METH_VARARGS, NULL}, - { (char *)"ExponentialDeclineConnection_Q0_set", _wrap_ExponentialDeclineConnection_Q0_set, METH_VARARGS, (char *)"ExponentialDeclineConnection_Q0_set(ExponentialDeclineConnection self, real Q0)"}, - { (char *)"ExponentialDeclineConnection_Q0_get", (PyCFunction)_wrap_ExponentialDeclineConnection_Q0_get, METH_O, (char *)"ExponentialDeclineConnection_Q0_get(ExponentialDeclineConnection self) -> real"}, - { (char *)"ExponentialDeclineConnection_m_set", _wrap_ExponentialDeclineConnection_m_set, METH_VARARGS, (char *)"ExponentialDeclineConnection_m_set(ExponentialDeclineConnection self, real m)"}, - { (char *)"ExponentialDeclineConnection_m_get", (PyCFunction)_wrap_ExponentialDeclineConnection_m_get, METH_O, (char *)"ExponentialDeclineConnection_m_get(ExponentialDeclineConnection self) -> real"}, - { (char *)"ExponentialDeclineConnection_V0_set", _wrap_ExponentialDeclineConnection_V0_set, METH_VARARGS, (char *)"ExponentialDeclineConnection_V0_set(ExponentialDeclineConnection self, real V0)"}, - { (char *)"ExponentialDeclineConnection_V0_get", (PyCFunction)_wrap_ExponentialDeclineConnection_V0_get, METH_O, (char *)"ExponentialDeclineConnection_V0_get(ExponentialDeclineConnection self) -> real"}, - { (char *)"new_ExponentialDeclineConnection", (PyCFunction) _wrap_new_ExponentialDeclineConnection, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "new_ExponentialDeclineConnection(cmf::water::WaterStorage::ptr source, cmf::water::flux_node::ptr target, real Q0, real V0, real m) -> ExponentialDeclineConnection\n" - "\n" - "ExponentialDeclineConnection(WaterStorage::ptr source,\n" - "flux_node::ptr target, real Q0, real V0, real m)\n" - "\n" - "creates the exponential decline connection \n" - ""}, - { (char *)"delete_ExponentialDeclineConnection", (PyCFunction)_wrap_delete_ExponentialDeclineConnection, METH_O, (char *)"delete_ExponentialDeclineConnection(ExponentialDeclineConnection self)"}, - { (char *)"ExponentialDeclineConnection_swigregister", ExponentialDeclineConnection_swigregister, METH_VARARGS, NULL}, - { (char *)"ExponentialDeclineConnection_swiginit", ExponentialDeclineConnection_swiginit, METH_VARARGS, NULL}, - { (char *)"ConstraintLinearStorageConnection_residencetime_set", _wrap_ConstraintLinearStorageConnection_residencetime_set, METH_VARARGS, (char *)"ConstraintLinearStorageConnection_residencetime_set(ConstraintLinearStorageConnection self, real residencetime)"}, - { (char *)"ConstraintLinearStorageConnection_residencetime_get", (PyCFunction)_wrap_ConstraintLinearStorageConnection_residencetime_get, METH_O, (char *)"ConstraintLinearStorageConnection_residencetime_get(ConstraintLinearStorageConnection self) -> real"}, - { (char *)"ConstraintLinearStorageConnection_Vlmin_set", _wrap_ConstraintLinearStorageConnection_Vlmin_set, METH_VARARGS, (char *)"ConstraintLinearStorageConnection_Vlmin_set(ConstraintLinearStorageConnection self, real Vlmin)"}, - { (char *)"ConstraintLinearStorageConnection_Vlmin_get", (PyCFunction)_wrap_ConstraintLinearStorageConnection_Vlmin_get, METH_O, (char *)"ConstraintLinearStorageConnection_Vlmin_get(ConstraintLinearStorageConnection self) -> real"}, - { (char *)"ConstraintLinearStorageConnection_Vrmax_set", _wrap_ConstraintLinearStorageConnection_Vrmax_set, METH_VARARGS, (char *)"ConstraintLinearStorageConnection_Vrmax_set(ConstraintLinearStorageConnection self, real Vrmax)"}, - { (char *)"ConstraintLinearStorageConnection_Vrmax_get", (PyCFunction)_wrap_ConstraintLinearStorageConnection_Vrmax_get, METH_O, (char *)"ConstraintLinearStorageConnection_Vrmax_get(ConstraintLinearStorageConnection self) -> real"}, - { (char *)"new_ConstraintLinearStorageConnection", (PyCFunction) _wrap_new_ConstraintLinearStorageConnection, METH_VARARGS | METH_KEYWORDS, (char *)"new_ConstraintLinearStorageConnection(cmf::water::WaterStorage::ptr source, cmf::water::WaterStorage::ptr target, real residencetime=1.0, real Vlmin=0.0, real Vrmax=1.0) -> ConstraintLinearStorageConnection"}, - { (char *)"delete_ConstraintLinearStorageConnection", (PyCFunction)_wrap_delete_ConstraintLinearStorageConnection, METH_O, (char *)"delete_ConstraintLinearStorageConnection(ConstraintLinearStorageConnection self)"}, - { (char *)"ConstraintLinearStorageConnection_swigregister", ConstraintLinearStorageConnection_swigregister, METH_VARARGS, NULL}, - { (char *)"ConstraintLinearStorageConnection_swiginit", ConstraintLinearStorageConnection_swiginit, METH_VARARGS, NULL}, - { (char *)"bidirectional_kinematic_exchange_Vmaxsuc_set", _wrap_bidirectional_kinematic_exchange_Vmaxsuc_set, METH_VARARGS, (char *)"bidirectional_kinematic_exchange_Vmaxsuc_set(bidirectional_kinematic_exchange self, real Vmaxsuc)"}, - { (char *)"bidirectional_kinematic_exchange_Vmaxsuc_get", (PyCFunction)_wrap_bidirectional_kinematic_exchange_Vmaxsuc_get, METH_O, (char *)"bidirectional_kinematic_exchange_Vmaxsuc_get(bidirectional_kinematic_exchange self) -> real"}, - { (char *)"bidirectional_kinematic_exchange_Vminspill_set", _wrap_bidirectional_kinematic_exchange_Vminspill_set, METH_VARARGS, (char *)"bidirectional_kinematic_exchange_Vminspill_set(bidirectional_kinematic_exchange self, real Vminspill)"}, - { (char *)"bidirectional_kinematic_exchange_Vminspill_get", (PyCFunction)_wrap_bidirectional_kinematic_exchange_Vminspill_get, METH_O, (char *)"bidirectional_kinematic_exchange_Vminspill_get(bidirectional_kinematic_exchange self) -> real"}, - { (char *)"bidirectional_kinematic_exchange_qspill_set", _wrap_bidirectional_kinematic_exchange_qspill_set, METH_VARARGS, (char *)"bidirectional_kinematic_exchange_qspill_set(bidirectional_kinematic_exchange self, real qspill)"}, - { (char *)"bidirectional_kinematic_exchange_qspill_get", (PyCFunction)_wrap_bidirectional_kinematic_exchange_qspill_get, METH_O, (char *)"bidirectional_kinematic_exchange_qspill_get(bidirectional_kinematic_exchange self) -> real"}, - { (char *)"bidirectional_kinematic_exchange_qsuc_set", _wrap_bidirectional_kinematic_exchange_qsuc_set, METH_VARARGS, (char *)"bidirectional_kinematic_exchange_qsuc_set(bidirectional_kinematic_exchange self, real qsuc)"}, - { (char *)"bidirectional_kinematic_exchange_qsuc_get", (PyCFunction)_wrap_bidirectional_kinematic_exchange_qsuc_get, METH_O, (char *)"bidirectional_kinematic_exchange_qsuc_get(bidirectional_kinematic_exchange self) -> real"}, - { (char *)"bidirectional_kinematic_exchange_beta_suc_set", _wrap_bidirectional_kinematic_exchange_beta_suc_set, METH_VARARGS, (char *)"bidirectional_kinematic_exchange_beta_suc_set(bidirectional_kinematic_exchange self, real beta_suc)"}, - { (char *)"bidirectional_kinematic_exchange_beta_suc_get", (PyCFunction)_wrap_bidirectional_kinematic_exchange_beta_suc_get, METH_O, (char *)"bidirectional_kinematic_exchange_beta_suc_get(bidirectional_kinematic_exchange self) -> real"}, - { (char *)"bidirectional_kinematic_exchange_beta_spill_set", _wrap_bidirectional_kinematic_exchange_beta_spill_set, METH_VARARGS, (char *)"bidirectional_kinematic_exchange_beta_spill_set(bidirectional_kinematic_exchange self, real beta_spill)"}, - { (char *)"bidirectional_kinematic_exchange_beta_spill_get", (PyCFunction)_wrap_bidirectional_kinematic_exchange_beta_spill_get, METH_O, (char *)"bidirectional_kinematic_exchange_beta_spill_get(bidirectional_kinematic_exchange self) -> real"}, - { (char *)"new_bidirectional_kinematic_exchange", (PyCFunction) _wrap_new_bidirectional_kinematic_exchange, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "new_bidirectional_kinematic_exchange(cmf::water::WaterStorage::ptr source, cmf::water::flux_node::ptr target, real Vminspill, real Vmaxsuc, real qspill, real qsuc, real beta_spill, real beta_suc) -> bidirectional_kinematic_exchange\n" - "\n" - "bidirectional_kinematic_exchange(WaterStorage::ptr source,\n" - "flux_node::ptr target, real Vminspill, real Vmaxsuc, real qspill, real\n" - "qsuc, real beta_spill, real beta_suc)\n" - "\n" - "Creates a kinematic wave connection.\n" - "\n" - "Parameters:\n" - "-----------\n" - "\n" - "source: Water storage from which the water flows out. Flux is a\n" - "function of source.volume\n" - "\n" - "target: Target node (boundary condition or storage). Does not\n" - "influence the strength of the flow\n" - "\n" - "Vmaxsuc: Suction starts below this threshold volume of source\n" - "\n" - "Vminspill: Spilling starts above this threshold volume of source\n" - "\n" - "qspill: Spill flow at 2*Vminspill in m3/day\n" - "\n" - "qsuc: Suction flow at V=0 m3\n" - "\n" - "beta_suc: beta_spill: Exponent for spill / suction flow \n" - ""}, - { (char *)"delete_bidirectional_kinematic_exchange", (PyCFunction)_wrap_delete_bidirectional_kinematic_exchange, METH_O, (char *)"delete_bidirectional_kinematic_exchange(bidirectional_kinematic_exchange self)"}, - { (char *)"bidirectional_kinematic_exchange_swigregister", bidirectional_kinematic_exchange_swigregister, METH_VARARGS, NULL}, - { (char *)"bidirectional_kinematic_exchange_swiginit", bidirectional_kinematic_exchange_swiginit, METH_VARARGS, NULL}, - { (char *)"constraint_kinematic_wave_residencetime_set", _wrap_constraint_kinematic_wave_residencetime_set, METH_VARARGS, (char *)"constraint_kinematic_wave_residencetime_set(constraint_kinematic_wave self, real residencetime)"}, - { (char *)"constraint_kinematic_wave_residencetime_get", (PyCFunction)_wrap_constraint_kinematic_wave_residencetime_get, METH_O, (char *)"constraint_kinematic_wave_residencetime_get(constraint_kinematic_wave self) -> real"}, - { (char *)"constraint_kinematic_wave_beta_set", _wrap_constraint_kinematic_wave_beta_set, METH_VARARGS, (char *)"constraint_kinematic_wave_beta_set(constraint_kinematic_wave self, real beta)"}, - { (char *)"constraint_kinematic_wave_beta_get", (PyCFunction)_wrap_constraint_kinematic_wave_beta_get, METH_O, (char *)"constraint_kinematic_wave_beta_get(constraint_kinematic_wave self) -> real"}, - { (char *)"constraint_kinematic_wave_residual_set", _wrap_constraint_kinematic_wave_residual_set, METH_VARARGS, (char *)"constraint_kinematic_wave_residual_set(constraint_kinematic_wave self, real residual)"}, - { (char *)"constraint_kinematic_wave_residual_get", (PyCFunction)_wrap_constraint_kinematic_wave_residual_get, METH_O, (char *)"constraint_kinematic_wave_residual_get(constraint_kinematic_wave self) -> real"}, - { (char *)"constraint_kinematic_wave_V0_set", _wrap_constraint_kinematic_wave_V0_set, METH_VARARGS, (char *)"constraint_kinematic_wave_V0_set(constraint_kinematic_wave self, real V0)"}, - { (char *)"constraint_kinematic_wave_V0_get", (PyCFunction)_wrap_constraint_kinematic_wave_V0_get, METH_O, (char *)"constraint_kinematic_wave_V0_get(constraint_kinematic_wave self) -> real"}, - { (char *)"constraint_kinematic_wave_Vrmax_set", _wrap_constraint_kinematic_wave_Vrmax_set, METH_VARARGS, (char *)"constraint_kinematic_wave_Vrmax_set(constraint_kinematic_wave self, real Vrmax)"}, - { (char *)"constraint_kinematic_wave_Vrmax_get", (PyCFunction)_wrap_constraint_kinematic_wave_Vrmax_get, METH_O, (char *)"constraint_kinematic_wave_Vrmax_get(constraint_kinematic_wave self) -> real"}, - { (char *)"constraint_kinematic_wave_gamma_set", _wrap_constraint_kinematic_wave_gamma_set, METH_VARARGS, (char *)"constraint_kinematic_wave_gamma_set(constraint_kinematic_wave self, real gamma)"}, - { (char *)"constraint_kinematic_wave_gamma_get", (PyCFunction)_wrap_constraint_kinematic_wave_gamma_get, METH_O, (char *)"constraint_kinematic_wave_gamma_get(constraint_kinematic_wave self) -> real"}, - { (char *)"new_constraint_kinematic_wave", (PyCFunction) _wrap_new_constraint_kinematic_wave, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "new_constraint_kinematic_wave(cmf::water::WaterStorage::ptr source, cmf::water::WaterStorage::ptr target, real residencetime=1.0, real exponent=1.0, real residual=0.0, real V0=1.0, real Vrmax=1.0, real gamma=1.0) -> constraint_kinematic_wave\n" - "\n" - "constraint_kinematic_wave(WaterStorage::ptr source, WaterStorage::ptr\n" - "target, real residencetime=1.0, real exponent=1.0, real residual=0.0,\n" - "real V0=1.0, real Vrmax=1.0, real gamma=1.0)\n" - "\n" - "Creates a kinematic wave connection.\n" - "\n" - "\n" - "\n" - ".. math::\n" - "\n" - " q = \\\\frac 1 {t_r} {\\\\left(\\\\frac{V - V_{residual}}{V_0}\n" - " \\\\right)^\\\\beta} \n" - "\n" - "Parameters:\n" - "-----------\n" - "\n" - "source: Water storage from which the water flows out. Flux is a\n" - "function of source.volume\n" - "\n" - "target: Target node (boundary condition or storage). Does not\n" - "influence the strength of the flow\n" - "\n" - "residencetime: :math:`t_r [days]` The residence time of the water in this\n" - "storage\n" - "\n" - "exponent: :math:`\\\\beta [-]` An empirical exponent to shape the flux\n" - "function (default = 1 (linear function))\n" - "\n" - "residual: :math:`V_{residual} [m^3]` The volume of water not flowing out\n" - "(default = 0)\n" - "\n" - "V0: :math:`V_0` The reference volume to scale the exponent\n" - "\n" - "Vrmax: :math:`V_{r,max}` Capacity of the target water storage in m3\n" - "\n" - "gamma: :math:`\\\\gamma` Target capacity constriction curve shape \n" - ""}, - { (char *)"delete_constraint_kinematic_wave", (PyCFunction)_wrap_delete_constraint_kinematic_wave, METH_O, (char *)"delete_constraint_kinematic_wave(constraint_kinematic_wave self)"}, - { (char *)"constraint_kinematic_wave_swigregister", constraint_kinematic_wave_swigregister, METH_VARARGS, NULL}, - { (char *)"constraint_kinematic_wave_swiginit", constraint_kinematic_wave_swiginit, METH_VARARGS, NULL}, - { (char *)"TechnicalFlux_MaxFlux_set", _wrap_TechnicalFlux_MaxFlux_set, METH_VARARGS, (char *)"TechnicalFlux_MaxFlux_set(TechnicalFlux self, real MaxFlux)"}, - { (char *)"TechnicalFlux_MaxFlux_get", (PyCFunction)_wrap_TechnicalFlux_MaxFlux_get, METH_O, (char *)"TechnicalFlux_MaxFlux_get(TechnicalFlux self) -> real"}, - { (char *)"TechnicalFlux_MinState_set", _wrap_TechnicalFlux_MinState_set, METH_VARARGS, (char *)"TechnicalFlux_MinState_set(TechnicalFlux self, real MinState)"}, - { (char *)"TechnicalFlux_MinState_get", (PyCFunction)_wrap_TechnicalFlux_MinState_get, METH_O, (char *)"TechnicalFlux_MinState_get(TechnicalFlux self) -> real"}, - { (char *)"TechnicalFlux_FluxDecreaseTime_set", _wrap_TechnicalFlux_FluxDecreaseTime_set, METH_VARARGS, (char *)"TechnicalFlux_FluxDecreaseTime_set(TechnicalFlux self, Time FluxDecreaseTime)"}, - { (char *)"TechnicalFlux_FluxDecreaseTime_get", (PyCFunction)_wrap_TechnicalFlux_FluxDecreaseTime_get, METH_O, (char *)"TechnicalFlux_FluxDecreaseTime_get(TechnicalFlux self) -> Time"}, - { (char *)"new_TechnicalFlux", (PyCFunction) _wrap_new_TechnicalFlux, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "new_TechnicalFlux(cmf::water::WaterStorage::ptr source, cmf::water::flux_node::ptr target, real maximum_flux, real minimal_state=0, Time flux_decrease_time) -> TechnicalFlux\n" - "\n" - "TechnicalFlux(cmf::water::WaterStorage::ptr source,\n" - "cmf::water::flux_node::ptr target, real maximum_flux, real\n" - "minimal_state=0, cmf::math::Time flux_decrease_time=cmf::math::h)\n" - "\n" - "Produces a constant but changeable flux from a source to a target, if\n" - "enough water is present in the source.\n" - "\n" - "Parameters:\n" - "-----------\n" - "\n" - "source: The source of the water\n" - "\n" - "target: The target of the water\n" - "\n" - "maximum_flux: The requested flux :math:`q_{0}`\n" - "\n" - "minimal_state: Minimal volume of stored water in source\n" - "\n" - "flux_decrease_time: ( cmf::math::Time) \n" - ""}, - { (char *)"delete_TechnicalFlux", (PyCFunction)_wrap_delete_TechnicalFlux, METH_O, (char *)"delete_TechnicalFlux(TechnicalFlux self)"}, - { (char *)"TechnicalFlux_swigregister", TechnicalFlux_swigregister, METH_VARARGS, NULL}, - { (char *)"TechnicalFlux_swiginit", TechnicalFlux_swiginit, METH_VARARGS, NULL}, - { (char *)"generic_gradient_connection_K_set", _wrap_generic_gradient_connection_K_set, METH_VARARGS, (char *)"generic_gradient_connection_K_set(generic_gradient_connection self, real K)"}, - { (char *)"generic_gradient_connection_K_get", (PyCFunction)_wrap_generic_gradient_connection_K_get, METH_O, (char *)"generic_gradient_connection_K_get(generic_gradient_connection self) -> real"}, - { (char *)"generic_gradient_connection_A_set", _wrap_generic_gradient_connection_A_set, METH_VARARGS, (char *)"generic_gradient_connection_A_set(generic_gradient_connection self, real A)"}, - { (char *)"generic_gradient_connection_A_get", (PyCFunction)_wrap_generic_gradient_connection_A_get, METH_O, (char *)"generic_gradient_connection_A_get(generic_gradient_connection self) -> real"}, - { (char *)"generic_gradient_connection_d_set", _wrap_generic_gradient_connection_d_set, METH_VARARGS, (char *)"generic_gradient_connection_d_set(generic_gradient_connection self, real d)"}, - { (char *)"generic_gradient_connection_d_get", (PyCFunction)_wrap_generic_gradient_connection_d_get, METH_O, (char *)"generic_gradient_connection_d_get(generic_gradient_connection self) -> real"}, - { (char *)"new_generic_gradient_connection", (PyCFunction) _wrap_new_generic_gradient_connection, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "new_generic_gradient_connection(cmf::water::WaterStorage::ptr left, cmf::water::WaterStorage::ptr right, real K, real d=1.0, real A=1.0) -> generic_gradient_connection\n" - "\n" - "generic_gradient_connection(cmf::water::WaterStorage::ptr left,\n" - "cmf::water::WaterStorage::ptr right, real K, real d=1.0, real A=1.0)\n" - "\n" - "Creates a generic gradient based flux, if enough water is present in\n" - "the source.\n" - "\n" - "Parameters:\n" - "-----------\n" - "\n" - "left: The left node of the connection\n" - "\n" - "right: The right node of the connection\n" - "\n" - "K: the conductivity of the connection in m/day\n" - "\n" - "d: the topographic lenght of the connection in m\n" - "\n" - "A: the area of the connection cross section in m2 \n" - ""}, - { (char *)"delete_generic_gradient_connection", (PyCFunction)_wrap_delete_generic_gradient_connection, METH_O, (char *)"delete_generic_gradient_connection(generic_gradient_connection self)"}, - { (char *)"generic_gradient_connection_swigregister", generic_gradient_connection_swigregister, METH_VARARGS, NULL}, - { (char *)"generic_gradient_connection_swiginit", generic_gradient_connection_swiginit, METH_VARARGS, NULL}, - { (char *)"statecontrol_connection_reaction_time_set", _wrap_statecontrol_connection_reaction_time_set, METH_VARARGS, (char *)"statecontrol_connection_reaction_time_set(statecontrol_connection self, Time reaction_time)"}, - { (char *)"statecontrol_connection_reaction_time_get", (PyCFunction)_wrap_statecontrol_connection_reaction_time_get, METH_O, (char *)"statecontrol_connection_reaction_time_get(statecontrol_connection self) -> Time"}, - { (char *)"statecontrol_connection_target_state_set", _wrap_statecontrol_connection_target_state_set, METH_VARARGS, (char *)"statecontrol_connection_target_state_set(statecontrol_connection self, real target_state)"}, - { (char *)"statecontrol_connection_target_state_get", (PyCFunction)_wrap_statecontrol_connection_target_state_get, METH_O, (char *)"statecontrol_connection_target_state_get(statecontrol_connection self) -> real"}, - { (char *)"new_statecontrol_connection", (PyCFunction) _wrap_new_statecontrol_connection, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "new_statecontrol_connection(cmf::water::WaterStorage::ptr controlled_storage, cmf::water::flux_node::ptr other_end, real target_state, Time reaction_time) -> statecontrol_connection\n" - "\n" - "statecontrol_connection(cmf::water::WaterStorage::ptr\n" - "controlled_storage, cmf::water::flux_node::ptr other_end, real\n" - "target_state, cmf::math::Time reaction_time)\n" - "\n" - "Creates a flux connection to control the state of a storage.\n" - "\n" - "Parameters:\n" - "-----------\n" - "\n" - "controlled_storage: Water storage, to be controlled\n" - "\n" - "other_end: source of missing water or target of excessive water\n" - "\n" - "target_state: State the controlled storage should hold (\n" - ":math:`h_{target}`)\n" - "\n" - "reaction_time: Time to reach state ( :math:`t_c`) \n" - ""}, - { (char *)"delete_statecontrol_connection", (PyCFunction)_wrap_delete_statecontrol_connection, METH_O, (char *)"delete_statecontrol_connection(statecontrol_connection self)"}, - { (char *)"statecontrol_connection_swigregister", statecontrol_connection_swigregister, METH_VARARGS, NULL}, - { (char *)"statecontrol_connection_swiginit", statecontrol_connection_swiginit, METH_VARARGS, NULL}, - { (char *)"node_list_size", (PyCFunction)_wrap_node_list_size, METH_O, (char *)"\n" - "node_list_size(node_list self) -> size_t\n" - "\n" - "size_t size()\n" - "const\n" - "\n" - "The number of nodes. \n" - ""}, - { (char *)"new_node_list", _wrap_new_node_list, METH_VARARGS, (char *)"\n" - "node_list()\n" - "new_node_list(node_list forcopy) -> node_list\n" - "\n" - "node_list(const cmf::water::node_list &forcopy)\n" - "\n" - "Copy the node_list. \n" - ""}, - { (char *)"node_list___iadd__", (PyCFunction) _wrap_node_list___iadd__, METH_VARARGS | METH_KEYWORDS, (char *)"node_list___iadd__(node_list self, node_list right) -> node_list"}, - { (char *)"node_list___add__", (PyCFunction) _wrap_node_list___add__, METH_VARARGS | METH_KEYWORDS, (char *)"node_list___add__(node_list self, node_list right) -> node_list"}, - { (char *)"node_list___get", (PyCFunction) _wrap_node_list___get, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "node_list___get(node_list self, ptrdiff_t index) -> cmf::water::flux_node::ptr\n" - "\n" - "flux_node::ptr\n" - "get(ptrdiff_t index) const\n" - "\n" - "Returns a node in the node_list. \n" - ""}, - { (char *)"node_list___getslice", (PyCFunction) _wrap_node_list___getslice, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "node_list___getslice(node_list self, ptrdiff_t begin, ptrdiff_t end, ptrdiff_t step=1) -> node_list\n" - "\n" - "node_list\n" - "getslice(ptrdiff_t begin, ptrdiff_t end, ptrdiff_t step=1) const\n" - "\n" - "Returns a slice of the node_list. \n" - ""}, - { (char *)"node_list_append", (PyCFunction) _wrap_node_list_append, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "node_list_append(node_list self, cmf::water::flux_node::ptr node)\n" - "\n" - "void\n" - "append(flux_node::ptr node)\n" - "\n" - "Adds a flux node to the list. \n" - ""}, - { (char *)"node_list_remove", (PyCFunction) _wrap_node_list_remove, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "node_list_remove(node_list self, cmf::water::flux_node::ptr node) -> bool\n" - "\n" - "bool\n" - "remove(flux_node::ptr node)\n" - "\n" - "Removes a flux node from the list, returns true if successful. \n" - ""}, - { (char *)"node_list_global_water_balance", (PyCFunction) _wrap_node_list_global_water_balance, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "node_list_global_water_balance(node_list self, Time t) -> real\n" - "\n" - "real global_water_balance(cmf::math::Time t) const\n" - "\n" - "Returns the sum of the water balances of the nodes.\n" - "\n" - "\n" - "\n" - ".. math::\n" - "\n" - " \\\\sigma_{global} =\n" - " \\\\sum_{i=0}^N{\\\\sum_{j=0}^{C_i}{q_{ij}(t)}} \n" - "\n" - "Replaces slow Python code like: \n" - ""}, - { (char *)"node_list_water_balance", (PyCFunction) _wrap_node_list_water_balance, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "node_list_water_balance(node_list self, Time t) -> cmf::math::num_array\n" - "\n" - "cmf::math::num_array water_balance(cmf::math::Time t) const\n" - "\n" - "Returns the water balance of each vector as a vector.\n" - "\n" - "\n" - "\n" - ".. math::\n" - "\n" - " \\\\sigma_i = \\\\sum_{j=0}^{C_i}{q_{ij}(t)} \n" - "\n" - "Replaces slow Python code like: \n" - ""}, - { (char *)"node_list_conc", (PyCFunction) _wrap_node_list_conc, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "node_list_conc(node_list self, Time t, solute _Solute) -> cmf::math::num_array\n" - "\n" - "cmf::math::num_array conc(cmf::math::Time t, const cmf::water::solute\n" - "&_Solute) const\n" - "\n" - "Returns an array holding the concentration of all the flux nodes for\n" - "the given solute. \n" - ""}, - { (char *)"node_list_set_solute_source", (PyCFunction) _wrap_node_list_set_solute_source, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "node_list_set_solute_source(node_list self, solute _Solute, cmf::math::num_array source_fluxes) -> ptrdiff_t\n" - "\n" - "ptrdiff_t set_solute_source(const cmf::water::solute &_Solute,\n" - "cmf::math::num_array source_fluxes)\n" - "\n" - "Sets the source flux of a solute storage associated with a node (node\n" - "has to be a water storage) \n" - ""}, - { (char *)"node_list_get_fluxes_to", (PyCFunction) _wrap_node_list_get_fluxes_to, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "node_list_get_fluxes_to(node_list self, node_list targets, Time t) -> cmf::math::num_array\n" - "\n" - "cmf::math::num_array get_fluxes_to(const cmf::water::node_list\n" - "&targets, cmf::math::Time t) const\n" - "\n" - "A fast method to perform flux queries as a batch.\n" - "\n" - "The node lists left and right should have the same length.\n" - "\n" - "The vector containing the flux from left to right at the same position\n" - "\n" - "Parameters:\n" - "-----------\n" - "\n" - "targets: A node_list containing the source nodes\n" - "\n" - "t: The time for the fluxes\n" - "\n" - "Replaces slow Python code like: \n" - ""}, - { (char *)"node_list_get_fluxes3d_to", (PyCFunction) _wrap_node_list_get_fluxes3d_to, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "node_list_get_fluxes3d_to(node_list self, node_list targets, Time t) -> point_vector\n" - "\n" - "cmf::geometry::point_vector get_fluxes3d_to(const\n" - "cmf::water::node_list &targets, cmf::math::Time t) const\n" - "\n" - "Returns the flux vectors to the nodes of a given target node_list. \n" - ""}, - { (char *)"node_list_get_fluxes3d", (PyCFunction) _wrap_node_list_get_fluxes3d, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "node_list_get_fluxes3d(node_list self, Time t) -> point_vector\n" - "\n" - "cmf::geometry::point_vector get_fluxes3d(cmf::math::Time t) const\n" - "\n" - "Returns the current flow vector for each node. \n" - ""}, - { (char *)"node_list_get_positions", (PyCFunction)_wrap_node_list_get_positions, METH_O, (char *)"\n" - "node_list_get_positions(node_list self) -> point_vector\n" - "\n" - "cmf::geometry::point_vector get_positions() const\n" - "\n" - "Returns the positions of the nodes. \n" - ""}, - { (char *)"delete_node_list", (PyCFunction)_wrap_delete_node_list, METH_O, (char *)"\n" - "delete_node_list(node_list self)\n" - "\n" - "virtual\n" - "~node_list() \n" - ""}, - { (char *)"node_list_potentials_set", _wrap_node_list_potentials_set, METH_VARARGS, (char *)"node_list_potentials_set(node_list self, cmf::math::num_array potentials)"}, - { (char *)"node_list_potentials_get", (PyCFunction)_wrap_node_list_potentials_get, METH_O, (char *)"node_list_potentials_get(node_list self) -> cmf::math::num_array"}, - { (char *)"node_list_swigregister", node_list_swigregister, METH_VARARGS, NULL}, - { (char *)"node_list_swiginit", node_list_swiginit, METH_VARARGS, NULL}, - { (char *)"NeumannBoundary_list_get", (PyCFunction) _wrap_NeumannBoundary_list_get, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "NeumannBoundary_list_get(NeumannBoundary_list self, ptrdiff_t index) -> cmf::water::NeumannBoundary::ptr\n" - "\n" - "NeumannBoundary::ptr get(ptrdiff_t index) const\n" - "\n" - "Returns the Neumann boundary condition at position index.\n" - "\n" - "From Python you can use [] \n" - ""}, - { (char *)"NeumannBoundary_list_get_fluxes", (PyCFunction) _wrap_NeumannBoundary_list_get_fluxes, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "NeumannBoundary_list_get_fluxes(NeumannBoundary_list self, Time t) -> cmf::math::num_array\n" - "\n" - "cmf::math::num_array get_fluxes(cmf::math::Time t=cmf::math::Time())\n" - "const\n" - "\n" - "Returns the fluxes of the items as an array.\n" - "\n" - "get_fluxes and set_fluxes are wrapped with the Python property fluxes\n" - "\n" - ""}, - { (char *)"NeumannBoundary_list_append", (PyCFunction) _wrap_NeumannBoundary_list_append, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "NeumannBoundary_list_append(NeumannBoundary_list self, cmf::water::NeumannBoundary::ptr nbc)\n" - "\n" - "void\n" - "append(NeumannBoundary::ptr nbc)\n" - "\n" - "Appends a neumann boundary to this list. \n" - ""}, - { (char *)"NeumannBoundary_list_size", (PyCFunction)_wrap_NeumannBoundary_list_size, METH_O, (char *)"\n" - "NeumannBoundary_list_size(NeumannBoundary_list self) -> size_t\n" - "\n" - "size_t\n" - "size() const\n" - "\n" - "returns the number of stored boundary conditions \n" - ""}, - { (char *)"new_NeumannBoundary_list", _wrap_new_NeumannBoundary_list, METH_VARARGS, (char *)"\n" - "NeumannBoundary_list()\n" - "NeumannBoundary_list(node_list copy)\n" - "new_NeumannBoundary_list(NeumannBoundary_list copy) -> NeumannBoundary_list\n" - "\n" - "NeumannBoundary_list(const NeumannBoundary_list ©) \n" - ""}, - { (char *)"NeumannBoundary_list_to_node_list", (PyCFunction)_wrap_NeumannBoundary_list_to_node_list, METH_O, (char *)"\n" - "NeumannBoundary_list_to_node_list(NeumannBoundary_list self) -> node_list\n" - "\n" - "cmf::water::node_list to_node_list() const\n" - "\n" - "Creates a node_list from this NeumannBoundary_list. \n" - ""}, - { (char *)"NeumannBoundary_list_global_water_balance", (PyCFunction) _wrap_NeumannBoundary_list_global_water_balance, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "NeumannBoundary_list_global_water_balance(NeumannBoundary_list self, Time t) -> real\n" - "\n" - "real\n" - "global_water_balance(cmf::math::Time t) const\n" - "\n" - "Returns the sum of the water balances of the nodes\n" - "\n" - "\n" - ".. math::\n" - "\n" - " \\\\sigma_{global} =\n" - " \\\\sum_{i=0}^N{\\\\sum_{j=0}^{C_i}{q_{ij}(t)}} \n" - "\n" - ".\n" - "\n" - "Replaces slow Python code like: \n" - ""}, - { (char *)"NeumannBoundary_list_water_balance", (PyCFunction) _wrap_NeumannBoundary_list_water_balance, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "NeumannBoundary_list_water_balance(NeumannBoundary_list self, Time t) -> cmf::math::num_array\n" - "\n" - "cmf::math::num_array water_balance(cmf::math::Time t) const\n" - "\n" - "Returns the water balance of each vector as a vector \n" - "\n" - ".. math::\n" - "\n" - " \\\\sigma_i\n" - " = \\\\sum_{j=0}^{C_i}{q_{ij}(t)} \n" - "\n" - ".\n" - "\n" - "Replaces slow Python code like: \n" - ""}, - { (char *)"NeumannBoundary_list_fluxes_set", _wrap_NeumannBoundary_list_fluxes_set, METH_VARARGS, (char *)"NeumannBoundary_list_fluxes_set(NeumannBoundary_list self, cmf::math::num_array fluxes)"}, - { (char *)"NeumannBoundary_list_fluxes_get", (PyCFunction)_wrap_NeumannBoundary_list_fluxes_get, METH_O, (char *)"NeumannBoundary_list_fluxes_get(NeumannBoundary_list self) -> cmf::math::num_array"}, - { (char *)"delete_NeumannBoundary_list", (PyCFunction)_wrap_delete_NeumannBoundary_list, METH_O, (char *)"delete_NeumannBoundary_list(NeumannBoundary_list self)"}, - { (char *)"NeumannBoundary_list_swigregister", NeumannBoundary_list_swigregister, METH_VARARGS, NULL}, - { (char *)"NeumannBoundary_list_swiginit", NeumannBoundary_list_swiginit, METH_VARARGS, NULL}, - { (char *)"SystemBridge_get_upper_node", (PyCFunction)_wrap_SystemBridge_get_upper_node, METH_O, (char *)"\n" - "SystemBridge_get_upper_node(SystemBridge self) -> cmf::water::flux_node::ptr\n" - "\n" - "flux_node::ptr get_upper_node() const\n" - "\n" - "Returns the upper node. \n" - ""}, - { (char *)"SystemBridge_get_lower_node", (PyCFunction)_wrap_SystemBridge_get_lower_node, METH_O, (char *)"\n" - "SystemBridge_get_lower_node(SystemBridge self) -> cmf::water::flux_node::ptr\n" - "\n" - "flux_node::ptr get_lower_node() const\n" - "\n" - "Returns the lower node. \n" - ""}, - { (char *)"SystemBridge_get_down_flux", (PyCFunction)_wrap_SystemBridge_get_down_flux, METH_O, (char *)"\n" - "SystemBridge_get_down_flux(SystemBridge self) -> double\n" - "\n" - "double get_down_flux() const\n" - "\n" - "Returns the currently integrated flux to the lower node. \n" - ""}, - { (char *)"SystemBridge_down_flux_integrator", (PyCFunction)_wrap_SystemBridge_down_flux_integrator, METH_O, (char *)"\n" - "SystemBridge_down_flux_integrator(SystemBridge self) -> cmf::water::flux_integrator::ptr\n" - "\n" - "flux_integrator::ptr down_flux_integrator() const \n" - ""}, - { (char *)"delete_SystemBridge", (PyCFunction)_wrap_delete_SystemBridge, METH_O, (char *)"delete_SystemBridge(SystemBridge self)"}, - { (char *)"SystemBridge_swigregister", SystemBridge_swigregister, METH_VARARGS, NULL}, - { (char *)"delete_SystemBridgeConnection", (PyCFunction)_wrap_delete_SystemBridgeConnection, METH_O, (char *)"delete_SystemBridgeConnection(SystemBridgeConnection self)"}, - { (char *)"SystemBridgeConnection_swigregister", SystemBridgeConnection_swigregister, METH_VARARGS, NULL}, - { (char *)"system_bridge", (PyCFunction) _wrap_system_bridge, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "system_bridge(project p, cmf::water::flux_node::ptr upper, cmf::water::flux_node::ptr lower) -> cmf::water::SystemBridge::ptr\n" - "\n" - "SystemBridge::ptr\n" - "cmf::water::system_bridge(cmf::project &p, flux_node::ptr upper,\n" - "flux_node::ptr lower)\n" - "\n" - "Creates a SystemBridge object.\n" - "\n" - "This is an advanced feature for tuning of the calculation time.\n" - "\n" - "A SystemBridge can be used to replace an existing connection between\n" - "nodes. After installation, the two nodes can more safely be added to\n" - "different integrator systems. One node (called upper) is connected\n" - "with the system bridge with the connection formerly connecting the\n" - "nodes, the second node (called lower) is connected to the system\n" - "bridge with as a Neumann boundary condition. The flux equals the\n" - "average flux of the connection upper <-> SystemBridge. Therefore, the\n" - "system bridge must become an integratable of the integrator system the\n" - "upper node belongs to. Use as an upper system (system upper node is\n" - "belonging to) the faster reacting system. For the connection between\n" - "upper and SystemBridge, the SystemBridge reacts as an Dirichlet\n" - "boundary condition, providing the potential of the lower node. \n" - ""}, - { (char *)"vapour_pressure", (PyCFunction) _wrap_vapour_pressure, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "vapour_pressure(double T) -> double\n" - "\n" - "double\n" - "cmf::atmosphere::vapour_pressure(double T)\n" - "\n" - "Returns the saturated vapor pressure in Pa for temperature T [degC].\n" - "\n" - "The saturated vapor pressure :math:`e_s` is calculated follwing the\n" - "following formula \n" - "\n" - ".. math::\n" - "\n" - " e_s = 0.6108 \\\\exp{\\\\frac{17.27\n" - " T}{T+237.3}}\n" - "\n" - "The definition is\n" - "fromhttp://www.fao.org/docrep/X0490E/x0490e07.htm#concepts \n" - ""}, - { (char *)"vpd_from_rH", (PyCFunction) _wrap_vpd_from_rH, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "vpd_from_rH(double T, double rH) -> double\n" - "\n" - "double\n" - "cmf::atmosphere::vpd_from_rH(double T, double rH)\n" - "\n" - "Returns the vapor pressure deficit in Pa for temperature T [degC] and\n" - "rel.\n" - "\n" - "humidity rH [%]\n" - "\n" - "The vapor pressure deficit :math:`e_s - e_a` is calculated from rel.\n" - "humidity as: \n" - "\n" - ".. math::\n" - "\n" - " e_s - e_a = (1-rH/100) * e_s(T)\n" - "\n" - "The definition\n" - "is fromhttp://www.fao.org/docrep/X0490E/x0490e07.htm#concepts\n" - "\n" - "Parameters:\n" - "-----------\n" - "\n" - "T: Air temperature in degC\n" - "\n" - "rH: Rel. humidity in %\n" - "\n" - ":math:`e_s(T)` is calculated using cmf::atmosphere::vapor_pressure(double)\n" - "\n" - ""}, - { (char *)"rH_from_vpd", (PyCFunction) _wrap_rH_from_vpd, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "rH_from_vpd(double T, double vpd) -> double\n" - "\n" - "double\n" - "cmf::atmosphere::rH_from_vpd(double T, double vpd)\n" - "\n" - "Returns the rel.\n" - "\n" - "humidity in % for temperature T [degC] and vapor pressure deficit vpd\n" - "[Pa]\n" - "\n" - "the rel. humidity is calculated from the vapor pressure deficit :math:`vpd = e_s - e_a` as: \n" - "\n" - ".. math::\n" - "\n" - " rH = 100 * \\\\frac{e_a}{e_s(T)}, e_a = e_s(T) -\n" - " vpd\n" - "\n" - "The definition is\n" - "fromhttp://www.fao.org/docrep/X0490E/x0490e07.htm#concepts\n" - "\n" - "Parameters:\n" - "-----------\n" - "\n" - "T: Air temperature in degC\n" - "\n" - "vpd: Vapor pressure deficit in Pa\n" - "\n" - ":math:`e_s(T)` is calculated using cmf::atmosphere::vapor_pressure(double)\n" - "\n" - ""}, - { (char *)"global_radiation", (PyCFunction) _wrap_global_radiation, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "global_radiation(Time t, double height, double sunshine_fraction, double longitude=8, double latitude=51, double time_zone=1, bool daily=False) -> double\n" - "\n" - "double\n" - "cmf::atmosphere::global_radiation(cmf::math::Time t, double height,\n" - "double sunshine_fraction, double longitude=8, double latitude=51,\n" - "double time_zone=1, bool daily=0)\n" - "\n" - "Calculates the global radiation in MJ/(m2 day) from the sun position\n" - "and the sunshine fraction.\n" - "\n" - "Parameters:\n" - "-----------\n" - "\n" - "t: actual time step\n" - "\n" - "height: Height above sea level\n" - "\n" - "sunshine_fraction: Fraction of sunshine hours per potential sunshine\n" - "duration in h/h\n" - "\n" - "longitude: latitude: Geographical position in degree. Latitude is\n" - "only taken into acount for subdaily calculation\n" - "\n" - "time_zone: Offset by timezone from GMT, eg. central Europe=1 US west\n" - "coast = -8\n" - "\n" - "daily: If true, the average radiation for the whole day is given\n" - "(therefore latitude and time zone ignored), otherwise the average of\n" - "the current hour is returned\n" - "\n" - "The calculation of the global radiation\n" - "followshttp://www.fao.org/docrep/X0490E/x0490e07.htm#radiation.\n" - "\n" - "The following formula is used: \n" - "\n" - ".. math::\n" - "\n" - " \\\\phi &=&\n" - " \\\\frac{(\\\\mbox{geogr. Latitude})^\\\\circ \\\\pi}{180^\\\\circ}\n" - " \\\\mbox{ Latitude in }rad \\\\\\\\ \\\\delta &=& 0.409\n" - " \\\\sin\\\\left(\\\\frac{2\\\\pi}{365}DOY - 1.39\\\\right) \\\\mbox{\n" - " Declination, DOY is day of year}\\\\\\\\ \\\\omega_s &=&\n" - " \\\\arccos(-\\\\tan\\\\phi\\\\tan\\\\delta) \\\\mbox{ Sunset angle}\n" - " \\\\\\\\ G_{sc} &=& 0.0802 \\\\frac{MJ}{m^2min} \\\\mbox{Solar\n" - " constant} \\\\\\\\ d_r &=& 1+0.033\n" - " \\\\cos\\\\left(\\\\frac{2\\\\pi}{365}DOY\\\\right) \\\\mbox{Inverse\n" - " relative distance Earth-Sun} \\\\\\\\ b &=&\n" - " \\\\frac{2\\\\pi(DOY-81)}{364}\\\\\\\\ S_c &=&\n" - " 0.1645\\\\sin(2b)-0.1255\\\\cos(b)-0.025\\\\sin(b) \\\\mbox{ Seasonal\n" - " correction for solar time} \\\\\\\\ \\\\omega &=& \\\\frac {\\\\pi}\n" - " {12} \\\\left(t_h+\\\\frac{(\\\\mbox{geogr.\n" - " Longitude})^\\\\circ}{15}-\\\\mbox{Timezone}+S_c-12\\\\right)\n" - " \\\\mbox{ solar time in }rad \\\\\\\\ \\\\mbox{If daily} \\\\\\\\ R_a\n" - " &=& \\\\frac{24\\\\ 60}{\\\\pi}G_{sc}\\\\ d_r \\\\left(\\\\omega_s\n" - " \\\\sin\\\\phi \\\\sin\\\\delta + \\\\cos\\\\phi \\\\cos\\\\delta\n" - " \\\\sin\\\\omega_s\\\\right) \\\\mbox{Extraterrestrial radiation }\n" - " \\\\frac{MJ}{m^2 day} \\\\\\\\ \\\\mbox{If hourly} \\\\\\\\ R_a &=&\n" - " \\\\frac{12\\\\ 24\\\\ 60}{\\\\pi}G_{sc}\\\\ d_r\n" - " \\\\left(\\\\left(\\\\omega^+ -\\\\omega^-\\\\right) \\\\sin\\\\phi\n" - " \\\\sin\\\\delta + \\\\cos\\\\phi \\\\cos\\\\delta\n" - " \\\\left(\\\\sin\\\\omega^+ - \\\\sin\\\\omega^-\\\\right)\\\\right)\n" - " \\\\\\\\ && \\\\omega^+,\\\\omega^- = \\\\omega\n" - " \\\\pm\\\\frac{\\\\pi}{24} \\\\\\\\ \\\\frac n N &=&\n" - " \\\\mbox{Fractional sunshine duration} \\\\\\\\ R_s &=&\n" - " \\\\left(0.25+\\\\left(0.5+2\\\\\n" - " 10^{-5}z\\\\right)\\\\frac{n}{N}\\\\right)R_a \\\\mbox{Global\n" - " radiation in }\\\\frac{MJ}{m^2 day} \\\\\\\\ && z=\\\\mbox{Height\n" - " a.s.l. in }m \\\\\\\\ \n" - "\n" - "\n" - ""}, - { (char *)"Pressure", (PyCFunction) _wrap_Pressure, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "Pressure(double height) -> double\n" - "\n" - "double\n" - "cmf::atmosphere::Pressure(double height)\n" - "\n" - "Returns the average air pressure for a height (m a.s.l.) \n" - ""}, - { (char *)"Weather_T_set", _wrap_Weather_T_set, METH_VARARGS, (char *)"Weather_T_set(Weather self, double T)"}, - { (char *)"Weather_T_get", (PyCFunction)_wrap_Weather_T_get, METH_O, (char *)"Weather_T_get(Weather self) -> double"}, - { (char *)"Weather_Tmax_set", _wrap_Weather_Tmax_set, METH_VARARGS, (char *)"Weather_Tmax_set(Weather self, double Tmax)"}, - { (char *)"Weather_Tmax_get", (PyCFunction)_wrap_Weather_Tmax_get, METH_O, (char *)"Weather_Tmax_get(Weather self) -> double"}, - { (char *)"Weather_Tmin_set", _wrap_Weather_Tmin_set, METH_VARARGS, (char *)"Weather_Tmin_set(Weather self, double Tmin)"}, - { (char *)"Weather_Tmin_get", (PyCFunction)_wrap_Weather_Tmin_get, METH_O, (char *)"Weather_Tmin_get(Weather self) -> double"}, - { (char *)"Weather_Tground_set", _wrap_Weather_Tground_set, METH_VARARGS, (char *)"Weather_Tground_set(Weather self, double Tground)"}, - { (char *)"Weather_Tground_get", (PyCFunction)_wrap_Weather_Tground_get, METH_O, (char *)"Weather_Tground_get(Weather self) -> double"}, - { (char *)"Weather_Windspeed_set", _wrap_Weather_Windspeed_set, METH_VARARGS, (char *)"Weather_Windspeed_set(Weather self, double Windspeed)"}, - { (char *)"Weather_Windspeed_get", (PyCFunction)_wrap_Weather_Windspeed_get, METH_O, (char *)"Weather_Windspeed_get(Weather self) -> double"}, - { (char *)"Weather_e_a_set", _wrap_Weather_e_a_set, METH_VARARGS, (char *)"Weather_e_a_set(Weather self, double e_a)"}, - { (char *)"Weather_e_a_get", (PyCFunction)_wrap_Weather_e_a_get, METH_O, (char *)"Weather_e_a_get(Weather self) -> double"}, - { (char *)"Weather_e_s_set", _wrap_Weather_e_s_set, METH_VARARGS, (char *)"Weather_e_s_set(Weather self, double e_s)"}, - { (char *)"Weather_e_s_get", (PyCFunction)_wrap_Weather_e_s_get, METH_O, (char *)"Weather_e_s_get(Weather self) -> double"}, - { (char *)"Weather_sunshine_set", _wrap_Weather_sunshine_set, METH_VARARGS, (char *)"Weather_sunshine_set(Weather self, double sunshine)"}, - { (char *)"Weather_sunshine_get", (PyCFunction)_wrap_Weather_sunshine_get, METH_O, (char *)"Weather_sunshine_get(Weather self) -> double"}, - { (char *)"Weather_Rs_set", _wrap_Weather_Rs_set, METH_VARARGS, (char *)"Weather_Rs_set(Weather self, double Rs)"}, - { (char *)"Weather_Rs_get", (PyCFunction)_wrap_Weather_Rs_get, METH_O, (char *)"Weather_Rs_get(Weather self) -> double"}, - { (char *)"Weather_daylength_set", _wrap_Weather_daylength_set, METH_VARARGS, (char *)"Weather_daylength_set(Weather self, double daylength)"}, - { (char *)"Weather_daylength_get", (PyCFunction)_wrap_Weather_daylength_get, METH_O, (char *)"Weather_daylength_get(Weather self) -> double"}, - { (char *)"Weather_instrument_height_set", _wrap_Weather_instrument_height_set, METH_VARARGS, (char *)"Weather_instrument_height_set(Weather self, double instrument_height)"}, - { (char *)"Weather_instrument_height_get", (PyCFunction)_wrap_Weather_instrument_height_get, METH_O, (char *)"Weather_instrument_height_get(Weather self) -> double"}, - { (char *)"Weather_Rn", (PyCFunction) _wrap_Weather_Rn, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "Weather_Rn(Weather self, double albedo, bool daily=False) -> double\n" - "\n" - "double Rn(double\n" - "albedo, bool daily=false) const\n" - "\n" - "Calculates the net radiation flux :math:`R_n \\\\left[\\\\frac{MJ}{m^2 day}\\\\right]`.\n" - "\n" - "\n" - "\n" - ".. math::\n" - "\n" - " R_{n} &=& R_{ns} - R_{nl} \\\\\\\\ \\\\mbox{ Net\n" - " short wave radiation: }R_{ns} &=& (1-\\\\alpha) R_s \\\\\\\\ \\\\mbox{\n" - " Net long wave radiation: }R_{nl} &=& R_{black}\\\\ \\\\beta_{v}\\\\\n" - " \\\\beta_{c} \\\\\\\\ \\\\mbox{Black body radiation: } R_{black} &=&\n" - " \\\\left\\\\{\\\\begin{array}{cl} \\\\sigma T^4 & \\\\mbox{for less\n" - " than daily time steps} \\\\\\\\ \\\\sigma \\\\frac {T_{max}^4 +\n" - " T_{min}^4} 2 & \\\\mbox{for daily time steps} \\\\end{array}\n" - " \\\\right. \\\\\\\\ T &=& \\\\mbox{Temperature }[K] \\\\\\\\ \\\\sigma\n" - " &=& 4.903\\\\ 10^{-9} \\\\frac{MJ}{K^4 m^2 day} \\\\mbox{ Stefan-\n" - " Boltzmann constant } \\\\\\\\ \\\\mbox{Long wave reflectance: }\n" - " \\\\\\\\ \\\\mbox{by water vapor: }\\\\beta_{v} &=& 0.34 - 0.14\n" - " \\\\sqrt{e_a} \\\\\\\\ \\\\mbox{ by clouds: }\\\\beta_{c} &=& 0.1 +\n" - " 0.9 \\\\frac n N \n" - "\n" - "\n" - "\n" - "Parameters:\n" - "-----------\n" - "\n" - "albedo: the albedo :math:`\\\\alpha` of the surface\n" - "\n" - "daily: If true, the net radiation for daily averages will be\n" - "calculated \n" - ""}, - { (char *)"new_Weather", (PyCFunction) _wrap_new_Weather, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "new_Weather(double T=15.0, double Tmax=17.0, double Tmin=13.0, double rH=70.0, double wind=2.0, double sunshine=0.5, double Rs=15, double daylength=12) -> Weather\n" - "\n" - "Weather(double T=15.0, double Tmax=17.0, double Tmin=13.0, double\n" - "rH=70.0, double wind=2.0, double sunshine=0.5, double Rs=15, double\n" - "daylength=12)\n" - "\n" - "Creates a \"weather\" from given data.\n" - "\n" - "Parameters:\n" - "-----------\n" - "\n" - "T: actual Temperature in deg C\n" - "\n" - "Tmax: daily maximum Temperature in deg C\n" - "\n" - "Tmin: daily minimum Temperature in deg C\n" - "\n" - "rH: actual relative humidity in % [0..100]\n" - "\n" - "wind: actual wind speed in m/s\n" - "\n" - "sunshine: actual fraction of sunshine duration per potential sunshine\n" - "duration in h/h\n" - "\n" - "Rs: actual incoming shortwave global radiation in MJ/(m2 day)\n" - "\n" - "daylength: length of the day in h \n" - ""}, - { (char *)"Weather_to_string", (PyCFunction)_wrap_Weather_to_string, METH_O, (char *)"\n" - "Weather_to_string(Weather self) -> std::string\n" - "\n" - "std::string to_string() const\n" - "\n" - "Returns a string representation. \n" - ""}, - { (char *)"Weather_set_snow_threshold", (PyCFunction) _wrap_Weather_set_snow_threshold, METH_VARARGS | METH_KEYWORDS, (char *)"Weather_set_snow_threshold(double new_threshold)"}, - { (char *)"Weather_get_snow_threshold", (PyCFunction)_wrap_Weather_get_snow_threshold, METH_NOARGS, (char *)"Weather_get_snow_threshold() -> double"}, - { (char *)"Weather___iadd__", (PyCFunction) _wrap_Weather___iadd__, METH_VARARGS | METH_KEYWORDS, (char *)"Weather___iadd__(Weather self, Weather w) -> Weather"}, - { (char *)"Weather___imul__", (PyCFunction) _wrap_Weather___imul__, METH_VARARGS | METH_KEYWORDS, (char *)"Weather___imul__(Weather self, double factor) -> Weather"}, - { (char *)"Weather___add__", (PyCFunction) _wrap_Weather___add__, METH_VARARGS | METH_KEYWORDS, (char *)"Weather___add__(Weather self, Weather w) -> Weather"}, - { (char *)"Weather___mul__", (PyCFunction) _wrap_Weather___mul__, METH_VARARGS | METH_KEYWORDS, (char *)"Weather___mul__(Weather self, double factor) -> Weather"}, - { (char *)"delete_Weather", (PyCFunction)_wrap_delete_Weather, METH_O, (char *)"delete_Weather(Weather self)"}, - { (char *)"Weather_swigregister", Weather_swigregister, METH_VARARGS, NULL}, - { (char *)"Weather_swiginit", Weather_swiginit, METH_VARARGS, NULL}, - { (char *)"Meteorology___call__", (PyCFunction) _wrap_Meteorology___call__, METH_VARARGS | METH_KEYWORDS, (char *)"Meteorology___call__(Meteorology self, Time t) -> Weather"}, - { (char *)"Meteorology_get_weather", (PyCFunction) _wrap_Meteorology_get_weather, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "Meteorology_get_weather(Meteorology self, Time t) -> Weather\n" - "\n" - "virtual cmf::atmosphere::Weather get_weather(cmf::math::Time t) const\n" - "=0\n" - "\n" - "Returns the Weather at time t. Pure virtual function. Must get\n" - "implemented by child functions. \n" - ""}, - { (char *)"Meteorology_copy", (PyCFunction)_wrap_Meteorology_copy, METH_O, (char *)"\n" - "Meteorology_copy(Meteorology self) -> Meteorology\n" - "\n" - "virtual\n" - "Meteorology* copy() const =0\n" - "\n" - "Returns a copy of the meteorology object. Pure virtual function, needs\n" - "to be implemented. \n" - ""}, - { (char *)"Meteorology_get_instrument_height", (PyCFunction)_wrap_Meteorology_get_instrument_height, METH_O, (char *)"\n" - "Meteorology_get_instrument_height(Meteorology self) -> real\n" - "\n" - "virtual real\n" - "get_instrument_height() const =0\n" - "\n" - "Returns the height of the instruments above canopy. \n" - ""}, - { (char *)"delete_Meteorology", (PyCFunction)_wrap_delete_Meteorology, METH_O, (char *)"\n" - "delete_Meteorology(Meteorology self)\n" - "\n" - "virtual ~Meteorology() \n" - ""}, - { (char *)"Meteorology_swigregister", Meteorology_swigregister, METH_VARARGS, NULL}, - { (char *)"ConstantMeteorology_weather_set", _wrap_ConstantMeteorology_weather_set, METH_VARARGS, (char *)"ConstantMeteorology_weather_set(ConstantMeteorology self, Weather weather)"}, - { (char *)"ConstantMeteorology_weather_get", (PyCFunction)_wrap_ConstantMeteorology_weather_get, METH_O, (char *)"ConstantMeteorology_weather_get(ConstantMeteorology self) -> Weather"}, - { (char *)"new_ConstantMeteorology", _wrap_new_ConstantMeteorology, METH_VARARGS, (char *)"\n" - "ConstantMeteorology()\n" - "ConstantMeteorology(Weather w)\n" - "new_ConstantMeteorology(ConstantMeteorology other) -> ConstantMeteorology\n" - "\n" - "ConstantMeteorology(const cmf::atmosphere::ConstantMeteorology &other)\n" - "\n" - "Copy constructor. \n" - ""}, - { (char *)"ConstantMeteorology_copy", (PyCFunction)_wrap_ConstantMeteorology_copy, METH_O, (char *)"\n" - "ConstantMeteorology_copy(ConstantMeteorology self) -> ConstantMeteorology\n" - "\n" - "ConstantMeteorology* copy() const\n" - "\n" - "Creates a new instannce of the ConstantMeteorology with the same\n" - "weather. \n" - ""}, - { (char *)"delete_ConstantMeteorology", (PyCFunction)_wrap_delete_ConstantMeteorology, METH_O, (char *)"delete_ConstantMeteorology(ConstantMeteorology self)"}, - { (char *)"ConstantMeteorology_swigregister", ConstantMeteorology_swigregister, METH_VARARGS, NULL}, - { (char *)"ConstantMeteorology_swiginit", ConstantMeteorology_swiginit, METH_VARARGS, NULL}, - { (char *)"MeteoStation_Latitude_set", _wrap_MeteoStation_Latitude_set, METH_VARARGS, (char *)"MeteoStation_Latitude_set(MeteoStation self, double Latitude)"}, - { (char *)"MeteoStation_Latitude_get", (PyCFunction)_wrap_MeteoStation_Latitude_get, METH_O, (char *)"MeteoStation_Latitude_get(MeteoStation self) -> double"}, - { (char *)"MeteoStation_Longitude_set", _wrap_MeteoStation_Longitude_set, METH_VARARGS, (char *)"MeteoStation_Longitude_set(MeteoStation self, double Longitude)"}, - { (char *)"MeteoStation_Longitude_get", (PyCFunction)_wrap_MeteoStation_Longitude_get, METH_O, (char *)"MeteoStation_Longitude_get(MeteoStation self) -> double"}, - { (char *)"MeteoStation_Timezone_set", _wrap_MeteoStation_Timezone_set, METH_VARARGS, (char *)"MeteoStation_Timezone_set(MeteoStation self, double Timezone)"}, - { (char *)"MeteoStation_Timezone_get", (PyCFunction)_wrap_MeteoStation_Timezone_get, METH_O, (char *)"MeteoStation_Timezone_get(MeteoStation self) -> double"}, - { (char *)"MeteoStation_x_set", _wrap_MeteoStation_x_set, METH_VARARGS, (char *)"MeteoStation_x_set(MeteoStation self, double x)"}, - { (char *)"MeteoStation_x_get", (PyCFunction)_wrap_MeteoStation_x_get, METH_O, (char *)"MeteoStation_x_get(MeteoStation self) -> double"}, - { (char *)"MeteoStation_y_set", _wrap_MeteoStation_y_set, METH_VARARGS, (char *)"MeteoStation_y_set(MeteoStation self, double y)"}, - { (char *)"MeteoStation_y_get", (PyCFunction)_wrap_MeteoStation_y_get, METH_O, (char *)"MeteoStation_y_get(MeteoStation self) -> double"}, - { (char *)"MeteoStation_z_set", _wrap_MeteoStation_z_set, METH_VARARGS, (char *)"MeteoStation_z_set(MeteoStation self, double z)"}, - { (char *)"MeteoStation_z_get", (PyCFunction)_wrap_MeteoStation_z_get, METH_O, (char *)"MeteoStation_z_get(MeteoStation self) -> double"}, - { (char *)"MeteoStation_Name_set", _wrap_MeteoStation_Name_set, METH_VARARGS, (char *)"MeteoStation_Name_set(MeteoStation self, std::string const & Name)"}, - { (char *)"MeteoStation_Name_get", (PyCFunction)_wrap_MeteoStation_Name_get, METH_O, (char *)"MeteoStation_Name_get(MeteoStation self) -> std::string const &"}, - { (char *)"MeteoStation_get_position", (PyCFunction)_wrap_MeteoStation_get_position, METH_O, (char *)"\n" - "MeteoStation_get_position(MeteoStation self) -> point\n" - "\n" - "cmf::geometry::point get_position() const \n" - ""}, - { (char *)"MeteoStation_daily_set", _wrap_MeteoStation_daily_set, METH_VARARGS, (char *)"MeteoStation_daily_set(MeteoStation self, bool daily)"}, - { (char *)"MeteoStation_daily_get", (PyCFunction)_wrap_MeteoStation_daily_get, METH_O, (char *)"MeteoStation_daily_get(MeteoStation self) -> bool"}, - { (char *)"MeteoStation_InstrumentHeight_set", _wrap_MeteoStation_InstrumentHeight_set, METH_VARARGS, (char *)"MeteoStation_InstrumentHeight_set(MeteoStation self, real InstrumentHeight)"}, - { (char *)"MeteoStation_InstrumentHeight_get", (PyCFunction)_wrap_MeteoStation_InstrumentHeight_get, METH_O, (char *)"MeteoStation_InstrumentHeight_get(MeteoStation self) -> real"}, - { (char *)"new_MeteoStation", (PyCFunction) _wrap_new_MeteoStation, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "new_MeteoStation(MeteoStation other) -> MeteoStation\n" - "\n" - "MeteoStation(const cmf::atmosphere::MeteoStation &other)\n" - "\n" - "Copy c'tor. \n" - ""}, - { (char *)"MeteoStation_get_data", (PyCFunction) _wrap_MeteoStation_get_data, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "MeteoStation_get_data(MeteoStation self, Time t, double height) -> Weather\n" - "\n" - "cmf::atmosphere::Weather get_data(cmf::math::Time t, double height)\n" - "const\n" - "\n" - "Returns the current Atmosphere state. Uses default values for missing\n" - "timeseries. \n" - ""}, - { (char *)"MeteoStation_use_for_cell", (PyCFunction) _wrap_MeteoStation_use_for_cell, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "MeteoStation_use_for_cell(MeteoStation self, Cell c)\n" - "\n" - "void use_for_cell(cmf::upslope::Cell &c)\n" - "\n" - "Connects this meteostation as a meteo data provider with the cell. \n" - ""}, - { (char *)"MeteoStation_SetSunshineFraction", (PyCFunction) _wrap_MeteoStation_SetSunshineFraction, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "MeteoStation_SetSunshineFraction(MeteoStation self, timeseries sunshine_duration)\n" - "\n" - "void\n" - "SetSunshineFraction(cmf::math::timeseries sunshine_duration)\n" - "\n" - "Calculates a timeseries of the sunshine fraction (to put into\n" - "Sunshine) from a timeseries of absolute sunshine duration.\n" - "\n" - "seehttp://www.fao.org/docrep/X0490E/x0490e07.htm#radiation\n" - "\n" - "\n" - ".. math::\n" - "\n" - " \\\\phi &=& \\\\frac{(\\\\mbox{geogr.\n" - " Latitude})^\\\\circ \\\\pi}{180^\\\\circ} \\\\mbox{ Latitude in }rad\n" - " \\\\\\\\ \\\\delta &=& 0.409 \\\\sin\\\\left(\\\\frac{2\\\\pi}{365}DOY\n" - " - 1.39\\\\right) \\\\mbox{ Declination, DOY is day of year}\\\\\\\\\n" - " \\\\omega_s &=& \\\\arccos(-\\\\tan\\\\phi\\\\tan\\\\delta) \\\\mbox{\n" - " Sunset angle in }rad \\\\\\\\ N &=& \\\\frac{24}{\\\\pi}\\\\omega_s\n" - " \\\\mbox{ potential duration of sunshine in }h \\\\\\\\ \\\\frac n N\n" - " &=& n\\\\mbox{ absolute sunshine duration in }h \n" - "\n" - "\n" - ""}, - { (char *)"MeteoStation_T_set", _wrap_MeteoStation_T_set, METH_VARARGS, (char *)"MeteoStation_T_set(MeteoStation self, timeseries T)"}, - { (char *)"MeteoStation_T_get", (PyCFunction)_wrap_MeteoStation_T_get, METH_O, (char *)"MeteoStation_T_get(MeteoStation self) -> timeseries"}, - { (char *)"MeteoStation_Tmax_set", _wrap_MeteoStation_Tmax_set, METH_VARARGS, (char *)"MeteoStation_Tmax_set(MeteoStation self, timeseries Tmax)"}, - { (char *)"MeteoStation_Tmax_get", (PyCFunction)_wrap_MeteoStation_Tmax_get, METH_O, (char *)"MeteoStation_Tmax_get(MeteoStation self) -> timeseries"}, - { (char *)"MeteoStation_Tmin_set", _wrap_MeteoStation_Tmin_set, METH_VARARGS, (char *)"MeteoStation_Tmin_set(MeteoStation self, timeseries Tmin)"}, - { (char *)"MeteoStation_Tmin_get", (PyCFunction)_wrap_MeteoStation_Tmin_get, METH_O, (char *)"MeteoStation_Tmin_get(MeteoStation self) -> timeseries"}, - { (char *)"MeteoStation_Tground_set", _wrap_MeteoStation_Tground_set, METH_VARARGS, (char *)"MeteoStation_Tground_set(MeteoStation self, timeseries Tground)"}, - { (char *)"MeteoStation_Tground_get", (PyCFunction)_wrap_MeteoStation_Tground_get, METH_O, (char *)"MeteoStation_Tground_get(MeteoStation self) -> timeseries"}, - { (char *)"MeteoStation_Windspeed_set", _wrap_MeteoStation_Windspeed_set, METH_VARARGS, (char *)"MeteoStation_Windspeed_set(MeteoStation self, timeseries Windspeed)"}, - { (char *)"MeteoStation_Windspeed_get", (PyCFunction)_wrap_MeteoStation_Windspeed_get, METH_O, (char *)"MeteoStation_Windspeed_get(MeteoStation self) -> timeseries"}, - { (char *)"MeteoStation_rHmean_set", _wrap_MeteoStation_rHmean_set, METH_VARARGS, (char *)"MeteoStation_rHmean_set(MeteoStation self, timeseries rHmean)"}, - { (char *)"MeteoStation_rHmean_get", (PyCFunction)_wrap_MeteoStation_rHmean_get, METH_O, (char *)"MeteoStation_rHmean_get(MeteoStation self) -> timeseries"}, - { (char *)"MeteoStation_rHmin_set", _wrap_MeteoStation_rHmin_set, METH_VARARGS, (char *)"MeteoStation_rHmin_set(MeteoStation self, timeseries rHmin)"}, - { (char *)"MeteoStation_rHmin_get", (PyCFunction)_wrap_MeteoStation_rHmin_get, METH_O, (char *)"MeteoStation_rHmin_get(MeteoStation self) -> timeseries"}, - { (char *)"MeteoStation_rHmax_set", _wrap_MeteoStation_rHmax_set, METH_VARARGS, (char *)"MeteoStation_rHmax_set(MeteoStation self, timeseries rHmax)"}, - { (char *)"MeteoStation_rHmax_get", (PyCFunction)_wrap_MeteoStation_rHmax_get, METH_O, (char *)"MeteoStation_rHmax_get(MeteoStation self) -> timeseries"}, - { (char *)"MeteoStation_Tdew_set", _wrap_MeteoStation_Tdew_set, METH_VARARGS, (char *)"MeteoStation_Tdew_set(MeteoStation self, timeseries Tdew)"}, - { (char *)"MeteoStation_Tdew_get", (PyCFunction)_wrap_MeteoStation_Tdew_get, METH_O, (char *)"MeteoStation_Tdew_get(MeteoStation self) -> timeseries"}, - { (char *)"MeteoStation_Sunshine_set", _wrap_MeteoStation_Sunshine_set, METH_VARARGS, (char *)"MeteoStation_Sunshine_set(MeteoStation self, timeseries Sunshine)"}, - { (char *)"MeteoStation_Sunshine_get", (PyCFunction)_wrap_MeteoStation_Sunshine_get, METH_O, (char *)"MeteoStation_Sunshine_get(MeteoStation self) -> timeseries"}, - { (char *)"MeteoStation_Rs_set", _wrap_MeteoStation_Rs_set, METH_VARARGS, (char *)"MeteoStation_Rs_set(MeteoStation self, timeseries Rs)"}, - { (char *)"MeteoStation_Rs_get", (PyCFunction)_wrap_MeteoStation_Rs_get, METH_O, (char *)"MeteoStation_Rs_get(MeteoStation self) -> timeseries"}, - { (char *)"MeteoStation_T_lapse_set", _wrap_MeteoStation_T_lapse_set, METH_VARARGS, (char *)"MeteoStation_T_lapse_set(MeteoStation self, timeseries T_lapse)"}, - { (char *)"MeteoStation_T_lapse_get", (PyCFunction)_wrap_MeteoStation_T_lapse_get, METH_O, (char *)"MeteoStation_T_lapse_get(MeteoStation self) -> timeseries"}, - { (char *)"delete_MeteoStation", (PyCFunction)_wrap_delete_MeteoStation, METH_O, (char *)"delete_MeteoStation(MeteoStation self)"}, - { (char *)"MeteoStation_swigregister", MeteoStation_swigregister, METH_VARARGS, NULL}, - { (char *)"MeteoStation_swiginit", MeteoStation_swiginit, METH_VARARGS, NULL}, - { (char *)"MeteoStationReference_get_station", (PyCFunction)_wrap_MeteoStationReference_get_station, METH_O, (char *)"\n" - "MeteoStationReference_get_station(MeteoStationReference self) -> cmf::atmosphere::MeteoStation::ptr\n" - "\n" - "MeteoStation::ptr get_station() const\n" - "\n" - "Returns the station referenced. \n" - ""}, - { (char *)"MeteoStationReference_get_position", (PyCFunction)_wrap_MeteoStationReference_get_position, METH_O, (char *)"\n" - "MeteoStationReference_get_position(MeteoStationReference self) -> point\n" - "\n" - "cmf::geometry::point get_position() const\n" - "\n" - "Returns the position of the reference. \n" - ""}, - { (char *)"new_MeteoStationReference", _wrap_new_MeteoStationReference, METH_VARARGS, (char *)"\n" - "MeteoStationReference(cmf::atmosphere::MeteoStation::ptr station, point location)\n" - "new_MeteoStationReference(MeteoStationReference copy) -> MeteoStationReference\n" - "\n" - "MeteoStationReference(const MeteoStationReference ©) \n" - ""}, - { (char *)"MeteoStationReference_copy", (PyCFunction)_wrap_MeteoStationReference_copy, METH_O, (char *)"\n" - "MeteoStationReference_copy(MeteoStationReference self) -> MeteoStationReference\n" - "\n" - "MeteoStationReference* copy() const\n" - "\n" - "Returns a copy of the meteorology object. Pure virtual function, needs\n" - "to be implemented. \n" - ""}, - { (char *)"delete_MeteoStationReference", (PyCFunction)_wrap_delete_MeteoStationReference, METH_O, (char *)"delete_MeteoStationReference(MeteoStationReference self)"}, - { (char *)"MeteoStationReference_swigregister", MeteoStationReference_swigregister, METH_VARARGS, NULL}, - { (char *)"MeteoStationReference_swiginit", MeteoStationReference_swiginit, METH_VARARGS, NULL}, - { (char *)"MeteoStationList___len__", (PyCFunction)_wrap_MeteoStationList___len__, METH_O, (char *)"\n" - "MeteoStationList___len__(MeteoStationList self) -> size_t\n" - "\n" - "size_t size() const\n" - "\n" - "Returns the number of stations. \n" - ""}, - { (char *)"MeteoStationList___getitem__", _wrap_MeteoStationList___getitem__, METH_VARARGS, (char *)"\n" - "__getitem__(ptrdiff_t index) -> cmf::atmosphere::MeteoStation::ptr\n" - "MeteoStationList___getitem__(MeteoStationList self, std::string const & Name) -> cmf::atmosphere::MeteoStation::ptr\n" - ""}, - { (char *)"MeteoStationList_calculate_Temp_lapse", (PyCFunction) _wrap_MeteoStationList_calculate_Temp_lapse, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "MeteoStationList_calculate_Temp_lapse(MeteoStationList self, Time begin, Time step, Time end) -> double\n" - "\n" - "double\n" - "calculate_Temp_lapse(cmf::math::Time begin, cmf::math::Time step,\n" - "cmf::math::Time end)\n" - "\n" - "Calculates the temperature lapse from all stations in the list and\n" - "sets the T_lapse attribute of each station.\n" - "\n" - "Returns the average lapse over the whole period. \n" - ""}, - { (char *)"MeteoStationList_add_station", (PyCFunction) _wrap_MeteoStationList_add_station, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "MeteoStationList_add_station(MeteoStationList self, std::string name, point position, double latitude=51.0, double longitude=8.0, double tz=1.0, Time startTime, Time timestep) -> cmf::atmosphere::MeteoStation::ptr\n" - "\n" - "MeteoStation::ptr add_station(std::string name, cmf::geometry::point\n" - "position, double latitude=51.0, double longitude=8.0, double tz=1.0,\n" - "cmf::math::Time startTime=cmf::math::Time(1, 1, 2001), cmf::math::Time\n" - "timestep=cmf::math::day)\n" - "\n" - "Creates a meteorological station at a certain position and adds it to\n" - "the list.\n" - "\n" - "Parameters:\n" - "-----------\n" - "\n" - "name: Name of the station\n" - "\n" - "position: The location of the station in map coordinates\n" - "\n" - "latitude: Latitude of the study area (for solar radiation)\n" - "\n" - "longitude: Longitude of the study area (for solar time)\n" - "\n" - "tz: Time zone of the study area (e.g Germany +1,U.S. Pacific time -8\n" - "\n" - "startTime: Date of the beginning of the climatic data (may be changed\n" - "for each time series later)\n" - "\n" - "timestep: Frequency of climatic data (may be changed for each time\n" - "series later) \n" - ""}, - { (char *)"MeteoStationList_remove_station", (PyCFunction) _wrap_MeteoStationList_remove_station, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "MeteoStationList_remove_station(MeteoStationList self, ptrdiff_t index) -> ptrdiff_t\n" - "\n" - "ptrdiff_t\n" - "remove_station(ptrdiff_t index)\n" - "\n" - "Removes a station and returns the number of remaining references to\n" - "the removed station. If the station is deleted, 0 is returned. \n" - ""}, - { (char *)"new_MeteoStationList", _wrap_new_MeteoStationList, METH_VARARGS, (char *)"\n" - "MeteoStationList()\n" - "new_MeteoStationList(MeteoStationList copy) -> MeteoStationList\n" - "\n" - "MeteoStationList(const MeteoStationList ©)\n" - "\n" - "Copy c'tor. \n" - ""}, - { (char *)"MeteoStationList_reference_to_nearest", (PyCFunction) _wrap_MeteoStationList_reference_to_nearest, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "MeteoStationList_reference_to_nearest(MeteoStationList self, point position, double z_weight=0) -> MeteoStationReference\n" - "\n" - "MeteoStationReference reference_to_nearest(const cmf::geometry::point\n" - "&position, double z_weight=0) const\n" - "\n" - "Creates a MeteoStationReference from the nearest station to position\n" - "at position.\n" - "\n" - "The distance is calculated as :math:`d=\\\\sqrt{(x_{s} - x_{l})^2 + (y_{s} - y_{l})^2} + \\\\lambda_z\\\\|z_{s} - z_{l}\\\\|` Where :math:`s` is the\n" - "station and :math:`l` is the locatable A Meteorology using the data of the\n" - "nearest station to position\n" - "\n" - "Parameters:\n" - "-----------\n" - "\n" - "position: The position (any locatable, like e.g. Cell possible) to\n" - "look for the station. The reference should be owned by the locatable\n" - "\n" - "z_weight: The weight of the height difference :math:`\\\\lambda_z` \n" - ""}, - { (char *)"delete_MeteoStationList", (PyCFunction)_wrap_delete_MeteoStationList, METH_O, (char *)"delete_MeteoStationList(MeteoStationList self)"}, - { (char *)"MeteoStationList_swigregister", MeteoStationList_swigregister, METH_VARARGS, NULL}, - { (char *)"MeteoStationList_swiginit", MeteoStationList_swiginit, METH_VARARGS, NULL}, - { (char *)"new_IDW_Meteorology", _wrap_new_IDW_Meteorology, METH_VARARGS, (char *)"\n" - "IDW_Meteorology(point position, MeteoStationList stations, double z_weight, double power)\n" - "new_IDW_Meteorology(IDW_Meteorology copy) -> IDW_Meteorology\n" - "\n" - "IDW_Meteorology(const IDW_Meteorology ©)\n" - "\n" - "Copy c'tor. \n" - ""}, - { (char *)"IDW_Meteorology_copy", (PyCFunction)_wrap_IDW_Meteorology_copy, METH_O, (char *)"\n" - "IDW_Meteorology_copy(IDW_Meteorology self) -> IDW_Meteorology\n" - "\n" - "virtual IDW_Meteorology* copy() const\n" - "\n" - "Returns a copy of the meteorology object. Pure virtual function, needs\n" - "to be implemented. \n" - ""}, - { (char *)"delete_IDW_Meteorology", (PyCFunction)_wrap_delete_IDW_Meteorology, METH_O, (char *)"delete_IDW_Meteorology(IDW_Meteorology self)"}, - { (char *)"IDW_Meteorology_swigregister", IDW_Meteorology_swigregister, METH_VARARGS, NULL}, - { (char *)"IDW_Meteorology_swiginit", IDW_Meteorology_swiginit, METH_VARARGS, NULL}, - { (char *)"aerodynamic_resistance_get_aerodynamic_resistance", (PyCFunction) _wrap_aerodynamic_resistance_get_aerodynamic_resistance, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "aerodynamic_resistance_get_aerodynamic_resistance(aerodynamic_resistance self, double & r_ag, double & r_ac, Time t)\n" - "\n" - "virtual void get_aerodynamic_resistance(double &r_ag, double &r_ac,\n" - "cmf::math::Time t) const =0\n" - "\n" - "aerodynamic resistance from ground to atmosphere (r_ag) and from\n" - "canopy to atmosphere (r_ac) \n" - ""}, - { (char *)"delete_aerodynamic_resistance", (PyCFunction)_wrap_delete_aerodynamic_resistance, METH_O, (char *)"\n" - "delete_aerodynamic_resistance(aerodynamic_resistance self)\n" - "\n" - "virtual ~aerodynamic_resistance() \n" - ""}, - { (char *)"aerodynamic_resistance_swigregister", aerodynamic_resistance_swigregister, METH_VARARGS, NULL}, - { (char *)"RainSource___call__", (PyCFunction) _wrap_RainSource___call__, METH_VARARGS | METH_KEYWORDS, (char *)"RainSource___call__(RainSource self, Time t) -> real"}, - { (char *)"RainSource_get_intensity", (PyCFunction) _wrap_RainSource_get_intensity, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "RainSource_get_intensity(RainSource self, Time t) -> real\n" - "\n" - "virtual real get_intensity(cmf::math::Time t) const =0\n" - "\n" - "Returns the actual rainfall intensity in mm/day. \n" - ""}, - { (char *)"delete_RainSource", (PyCFunction)_wrap_delete_RainSource, METH_O, (char *)"delete_RainSource(RainSource self)"}, - { (char *)"RainSource_swigregister", RainSource_swigregister, METH_VARARGS, NULL}, - { (char *)"ConstantRainSource_intensity_set", _wrap_ConstantRainSource_intensity_set, METH_VARARGS, (char *)"ConstantRainSource_intensity_set(ConstantRainSource self, real intensity)"}, - { (char *)"ConstantRainSource_intensity_get", (PyCFunction)_wrap_ConstantRainSource_intensity_get, METH_O, (char *)"ConstantRainSource_intensity_get(ConstantRainSource self) -> real"}, - { (char *)"new_ConstantRainSource", (PyCFunction) _wrap_new_ConstantRainSource, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "new_ConstantRainSource(project _project, point location, real _intensity) -> ConstantRainSource\n" - "\n" - "ConstantRainSource(cmf::project &_project, cmf::geometry::point\n" - "location, real _intensity)\n" - "\n" - "Creates a new ConstantRainSource.\n" - "\n" - "Consider using Cell::set_rainfall for internal creation of a constant\n" - "rain source, instead of direct use\n" - "\n" - "Parameters:\n" - "-----------\n" - "\n" - "_project: The project the rain source is belonging to.\n" - "\n" - "location: The location of the rain source\n" - "\n" - "_intensity: The constant rainfall intensity in mm/day \n" - ""}, - { (char *)"ConstantRainSource_set_conc", (PyCFunction) _wrap_ConstantRainSource_set_conc, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "ConstantRainSource_set_conc(ConstantRainSource self, solute Solute, real value)\n" - "\n" - "void set_conc(const cmf::water::solute &Solute, real value)\n" - "\n" - "Sets the concentration of a solute in the rainfall. \n" - ""}, - { (char *)"delete_ConstantRainSource", (PyCFunction)_wrap_delete_ConstantRainSource, METH_O, (char *)"delete_ConstantRainSource(ConstantRainSource self)"}, - { (char *)"ConstantRainSource_swigregister", ConstantRainSource_swigregister, METH_VARARGS, NULL}, - { (char *)"ConstantRainSource_swiginit", ConstantRainSource_swiginit, METH_VARARGS, NULL}, - { (char *)"TimeseriesRainSource_data_set", _wrap_TimeseriesRainSource_data_set, METH_VARARGS, (char *)"TimeseriesRainSource_data_set(TimeseriesRainSource self, timeseries data)"}, - { (char *)"TimeseriesRainSource_data_get", (PyCFunction)_wrap_TimeseriesRainSource_data_get, METH_O, (char *)"TimeseriesRainSource_data_get(TimeseriesRainSource self) -> timeseries"}, - { (char *)"TimeseriesRainSource_concentrations_set", _wrap_TimeseriesRainSource_concentrations_set, METH_VARARGS, (char *)"TimeseriesRainSource_concentrations_set(TimeseriesRainSource self, SoluteTimeseries concentrations)"}, - { (char *)"TimeseriesRainSource_concentrations_get", (PyCFunction)_wrap_TimeseriesRainSource_concentrations_get, METH_O, (char *)"TimeseriesRainSource_concentrations_get(TimeseriesRainSource self) -> SoluteTimeseries"}, - { (char *)"delete_TimeseriesRainSource", (PyCFunction)_wrap_delete_TimeseriesRainSource, METH_O, (char *)"delete_TimeseriesRainSource(TimeseriesRainSource self)"}, - { (char *)"TimeseriesRainSource_swigregister", TimeseriesRainSource_swigregister, METH_VARARGS, NULL}, - { (char *)"RainfallStation_Location_set", _wrap_RainfallStation_Location_set, METH_VARARGS, (char *)"RainfallStation_Location_set(RainfallStation self, point Location)"}, - { (char *)"RainfallStation_Location_get", (PyCFunction)_wrap_RainfallStation_Location_get, METH_O, (char *)"RainfallStation_Location_get(RainfallStation self) -> point"}, - { (char *)"RainfallStation_create", (PyCFunction) _wrap_RainfallStation_create, METH_VARARGS | METH_KEYWORDS, (char *)"RainfallStation_create(size_t Id, std::string Name, timeseries Data, point position) -> cmf::atmosphere::RainfallStation::ptr"}, - { (char *)"RainfallStation_id_get", (PyCFunction)_wrap_RainfallStation_id_get, METH_O, (char *)"RainfallStation_id_get(RainfallStation self) -> size_t const"}, - { (char *)"RainfallStation_name_get", (PyCFunction)_wrap_RainfallStation_name_get, METH_O, (char *)"RainfallStation_name_get(RainfallStation self) -> std::string const &"}, - { (char *)"RainfallStation_data_set", _wrap_RainfallStation_data_set, METH_VARARGS, (char *)"RainfallStation_data_set(RainfallStation self, timeseries data)"}, - { (char *)"RainfallStation_data_get", (PyCFunction)_wrap_RainfallStation_data_get, METH_O, (char *)"RainfallStation_data_get(RainfallStation self) -> timeseries"}, - { (char *)"RainfallStation___repr__", (PyCFunction)_wrap_RainfallStation___repr__, METH_O, (char *)"\n" - "RainfallStation___repr__(RainfallStation self) -> std::string\n" - "\n" - "std::string tostring() const\n" - "\n" - "Returns the name and the mean yearly rainfall. \n" - ""}, - { (char *)"RainfallStation_concentration_set", _wrap_RainfallStation_concentration_set, METH_VARARGS, (char *)"RainfallStation_concentration_set(RainfallStation self, SoluteTimeseries concentration)"}, - { (char *)"RainfallStation_concentration_get", (PyCFunction)_wrap_RainfallStation_concentration_get, METH_O, (char *)"RainfallStation_concentration_get(RainfallStation self) -> SoluteTimeseries"}, - { (char *)"RainfallStation_use_for_cell", (PyCFunction) _wrap_RainfallStation_use_for_cell, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "RainfallStation_use_for_cell(RainfallStation self, Cell c)\n" - "\n" - "void use_for_cell(cmf::upslope::Cell &c)\n" - "\n" - "Connects a cell with this rainfall station. \n" - ""}, - { (char *)"new_RainfallStation", (PyCFunction) _wrap_new_RainfallStation, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "new_RainfallStation(RainfallStation copy) -> RainfallStation\n" - "\n" - "RainfallStation(const RainfallStation ©)\n" - "\n" - "copy c'tor \n" - ""}, - { (char *)"RainfallStation___call__", (PyCFunction) _wrap_RainfallStation___call__, METH_VARARGS | METH_KEYWORDS, (char *)"RainfallStation___call__(RainfallStation self, Time t) -> double"}, - { (char *)"delete_RainfallStation", (PyCFunction)_wrap_delete_RainfallStation, METH_O, (char *)"delete_RainfallStation(RainfallStation self)"}, - { (char *)"RainfallStation_swigregister", RainfallStation_swigregister, METH_VARARGS, NULL}, - { (char *)"RainfallStation_swiginit", RainfallStation_swiginit, METH_VARARGS, NULL}, - { (char *)"RainfallStationList___len__", (PyCFunction)_wrap_RainfallStationList___len__, METH_O, (char *)"\n" - "RainfallStationList___len__(RainfallStationList self) -> size_t\n" - "\n" - "size_t size() const\n" - "\n" - "Returns the number of rainfall stations. \n" - ""}, - { (char *)"RainfallStationList___getitem__", _wrap_RainfallStationList___getitem__, METH_VARARGS, (char *)"\n" - "__getitem__(ptrdiff_t index) -> cmf::atmosphere::RainfallStation::ptr\n" - "RainfallStationList___getitem__(RainfallStationList self, ptrdiff_t index) -> cmf::atmosphere::RainfallStation::ptr const\n" - ""}, - { (char *)"RainfallStationList_add", (PyCFunction) _wrap_RainfallStationList_add, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "RainfallStationList_add(RainfallStationList self, std::string Name, timeseries Data, point Position) -> cmf::atmosphere::RainfallStation::ptr\n" - "\n" - "RainfallStation::ptr add(std::string Name, cmf::math::timeseries Data,\n" - "cmf::geometry::point Position)\n" - "\n" - "Creates a new RainfallStation and adds it to the list.\n" - "\n" - "Usage: The position of the rainfall station will be used as identifier\n" - "A new rainfall station\n" - "\n" - "Parameters:\n" - "-----------\n" - "\n" - "Name: Name of the station\n" - "\n" - "Data: Rainfall timeseries\n" - "\n" - "Position: Spatial position of the new station \n" - ""}, - { (char *)"RainfallStationList_remove", (PyCFunction) _wrap_RainfallStationList_remove, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "RainfallStationList_remove(RainfallStationList self, ptrdiff_t index)\n" - "\n" - "void remove(ptrdiff_t index)\n" - "\n" - "Removes the station at index from this list. \n" - ""}, - { (char *)"new_RainfallStationList", (PyCFunction)_wrap_new_RainfallStationList, METH_NOARGS, (char *)"new_RainfallStationList() -> RainfallStationList"}, - { (char *)"delete_RainfallStationList", (PyCFunction)_wrap_delete_RainfallStationList, METH_O, (char *)"delete_RainfallStationList(RainfallStationList self)"}, - { (char *)"RainfallStationList_swigregister", RainfallStationList_swigregister, METH_VARARGS, NULL}, - { (char *)"RainfallStationList_swiginit", RainfallStationList_swiginit, METH_VARARGS, NULL}, - { (char *)"RainfallStationReference_from_nearest_station", (PyCFunction) _wrap_RainfallStationReference_from_nearest_station, METH_VARARGS | METH_KEYWORDS, (char *)"RainfallStationReference_from_nearest_station(project project, point position, double z_weight) -> cmf::atmosphere::RainfallStationReference::ptr"}, - { (char *)"RainfallStationReference_from_station_id", (PyCFunction) _wrap_RainfallStationReference_from_station_id, METH_VARARGS | METH_KEYWORDS, (char *)"RainfallStationReference_from_station_id(project project, point position, size_t id) -> cmf::atmosphere::RainfallStationReference::ptr"}, - { (char *)"delete_RainfallStationReference", (PyCFunction)_wrap_delete_RainfallStationReference, METH_O, (char *)"delete_RainfallStationReference(RainfallStationReference self)"}, - { (char *)"RainfallStationReference_swigregister", RainfallStationReference_swigregister, METH_VARARGS, NULL}, - { (char *)"IDWRainfall_create", (PyCFunction) _wrap_IDWRainfall_create, METH_VARARGS | METH_KEYWORDS, (char *)"IDWRainfall_create(project project, point position, double z_weight, double power) -> cmf::atmosphere::RainSource::ptr"}, - { (char *)"delete_IDWRainfall", (PyCFunction)_wrap_delete_IDWRainfall, METH_O, (char *)"delete_IDWRainfall(IDWRainfall self)"}, - { (char *)"IDWRainfall_swigregister", IDWRainfall_swigregister, METH_VARARGS, NULL}, - { (char *)"Vegetation_LAI_set", _wrap_Vegetation_LAI_set, METH_VARARGS, (char *)"Vegetation_LAI_set(Vegetation self, double LAI)"}, - { (char *)"Vegetation_LAI_get", (PyCFunction)_wrap_Vegetation_LAI_get, METH_O, (char *)"Vegetation_LAI_get(Vegetation self) -> double"}, - { (char *)"Vegetation_Height_set", _wrap_Vegetation_Height_set, METH_VARARGS, (char *)"Vegetation_Height_set(Vegetation self, double Height)"}, - { (char *)"Vegetation_Height_get", (PyCFunction)_wrap_Vegetation_Height_get, METH_O, (char *)"Vegetation_Height_get(Vegetation self) -> double"}, - { (char *)"Vegetation_albedo_set", _wrap_Vegetation_albedo_set, METH_VARARGS, (char *)"Vegetation_albedo_set(Vegetation self, double albedo)"}, - { (char *)"Vegetation_albedo_get", (PyCFunction)_wrap_Vegetation_albedo_get, METH_O, (char *)"Vegetation_albedo_get(Vegetation self) -> double"}, - { (char *)"Vegetation_snow_albedo_set", _wrap_Vegetation_snow_albedo_set, METH_VARARGS, (char *)"Vegetation_snow_albedo_set(Vegetation self, double snow_albedo)"}, - { (char *)"Vegetation_snow_albedo_get", (PyCFunction)_wrap_Vegetation_snow_albedo_get, METH_O, (char *)"Vegetation_snow_albedo_get(Vegetation self) -> double"}, - { (char *)"Vegetation_CanopyCapacityPerLAI_set", _wrap_Vegetation_CanopyCapacityPerLAI_set, METH_VARARGS, (char *)"Vegetation_CanopyCapacityPerLAI_set(Vegetation self, double CanopyCapacityPerLAI)"}, - { (char *)"Vegetation_CanopyCapacityPerLAI_get", (PyCFunction)_wrap_Vegetation_CanopyCapacityPerLAI_get, METH_O, (char *)"Vegetation_CanopyCapacityPerLAI_get(Vegetation self) -> double"}, - { (char *)"Vegetation_RootDepth_set", _wrap_Vegetation_RootDepth_set, METH_VARARGS, (char *)"Vegetation_RootDepth_set(Vegetation self, double RootDepth)"}, - { (char *)"Vegetation_RootDepth_get", (PyCFunction)_wrap_Vegetation_RootDepth_get, METH_O, (char *)"Vegetation_RootDepth_get(Vegetation self) -> double"}, - { (char *)"Vegetation_RootContent_set", _wrap_Vegetation_RootContent_set, METH_VARARGS, (char *)"Vegetation_RootContent_set(Vegetation self, double RootContent)"}, - { (char *)"Vegetation_RootContent_get", (PyCFunction)_wrap_Vegetation_RootContent_get, METH_O, (char *)"Vegetation_RootContent_get(Vegetation self) -> double"}, - { (char *)"Vegetation_fraction_at_rootdepth_set", _wrap_Vegetation_fraction_at_rootdepth_set, METH_VARARGS, (char *)"Vegetation_fraction_at_rootdepth_set(Vegetation self, double fraction_at_rootdepth)"}, - { (char *)"Vegetation_fraction_at_rootdepth_get", (PyCFunction)_wrap_Vegetation_fraction_at_rootdepth_get, METH_O, (char *)"Vegetation_fraction_at_rootdepth_get(Vegetation self) -> double"}, - { (char *)"Vegetation_StomatalResistance_set", _wrap_Vegetation_StomatalResistance_set, METH_VARARGS, (char *)"Vegetation_StomatalResistance_set(Vegetation self, double StomatalResistance)"}, - { (char *)"Vegetation_StomatalResistance_get", (PyCFunction)_wrap_Vegetation_StomatalResistance_get, METH_O, (char *)"Vegetation_StomatalResistance_get(Vegetation self) -> double"}, - { (char *)"Vegetation_CanopyClosure_set", _wrap_Vegetation_CanopyClosure_set, METH_VARARGS, (char *)"Vegetation_CanopyClosure_set(Vegetation self, double CanopyClosure)"}, - { (char *)"Vegetation_CanopyClosure_get", (PyCFunction)_wrap_Vegetation_CanopyClosure_get, METH_O, (char *)"Vegetation_CanopyClosure_get(Vegetation self) -> double"}, - { (char *)"Vegetation_CanopyPARExtinction_set", _wrap_Vegetation_CanopyPARExtinction_set, METH_VARARGS, (char *)"Vegetation_CanopyPARExtinction_set(Vegetation self, double CanopyPARExtinction)"}, - { (char *)"Vegetation_CanopyPARExtinction_get", (PyCFunction)_wrap_Vegetation_CanopyPARExtinction_get, METH_O, (char *)"Vegetation_CanopyPARExtinction_get(Vegetation self) -> double"}, - { (char *)"Vegetation_LeafWidth_set", _wrap_Vegetation_LeafWidth_set, METH_VARARGS, (char *)"Vegetation_LeafWidth_set(Vegetation self, double LeafWidth)"}, - { (char *)"Vegetation_LeafWidth_get", (PyCFunction)_wrap_Vegetation_LeafWidth_get, METH_O, (char *)"Vegetation_LeafWidth_get(Vegetation self) -> double"}, - { (char *)"Vegetation_RootLength", (PyCFunction)_wrap_Vegetation_RootLength, METH_O, (char *)"\n" - "Vegetation_RootLength(Vegetation self) -> double\n" - "\n" - "double RootLength()\n" - "const\n" - "\n" - "Returns the average root length in m/m2. \n" - ""}, - { (char *)"Vegetation_RootFraction", _wrap_Vegetation_RootFraction, METH_VARARGS, (char *)"\n" - "RootFraction(double upperBoundary, double lowerBoundary) -> double\n" - "Vegetation_RootFraction(Vegetation self, cmf::math::num_array const & thickness) -> cmf::math::num_array\n" - "\n" - "cmf::math::num_array RootFraction(const cmf::math::num_array\n" - "&thickness) const \n" - ""}, - { (char *)"new_Vegetation", (PyCFunction) _wrap_new_Vegetation, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "new_Vegetation(double _LAI=2.88, double _Height=0.12, double _RootDepth=0.25, double _StomatalResistance=100, double _albedo=0.23, double _CanopyClosure=1, double _CanopyCapacityPerLAI=0.1, double _fraction_at_rootdepth=1.0) -> Vegetation\n" - "\n" - "Vegetation(double\n" - "_LAI=2.88, double _Height=0.12, double _RootDepth=0.25, double\n" - "_StomatalResistance=100, double _albedo=0.23, double _CanopyClosure=1,\n" - "double _CanopyCapacityPerLAI=0.1, double _fraction_at_rootdepth=1.0)\n" - "\n" - ""}, - { (char *)"Vegetation___repr__", (PyCFunction)_wrap_Vegetation___repr__, METH_O, (char *)"Vegetation___repr__(Vegetation self) -> std::string"}, - { (char *)"delete_Vegetation", (PyCFunction)_wrap_delete_Vegetation, METH_O, (char *)"delete_Vegetation(Vegetation self)"}, - { (char *)"Vegetation_swigregister", Vegetation_swigregister, METH_VARARGS, NULL}, - { (char *)"Vegetation_swiginit", Vegetation_swiginit, METH_VARARGS, NULL}, - { (char *)"new_CellConnector", (PyCFunction) _wrap_new_CellConnector, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "new_CellConnector(cmf::upslope::connectorfunction connector) -> CellConnector\n" - "\n" - "CellConnector(connectorfunction connector) \n" - ""}, - { (char *)"CellConnector___call__", (PyCFunction) _wrap_CellConnector___call__, METH_VARARGS | METH_KEYWORDS, (char *)"CellConnector___call__(CellConnector self, Cell cell1, Cell cell2, ptrdiff_t start_at_layer=0)"}, - { (char *)"CellConnector_connect", (PyCFunction) _wrap_CellConnector_connect, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "CellConnector_connect(CellConnector self, Cell cell1, Cell cell2, ptrdiff_t start_at_layer=0)\n" - "\n" - "void\n" - "connect(cmf::upslope::Cell &cell1, cmf::upslope::Cell &cell2,\n" - "ptrdiff_t start_at_layer=0) const \n" - ""}, - { (char *)"delete_CellConnector", (PyCFunction)_wrap_delete_CellConnector, METH_O, (char *)"delete_CellConnector(CellConnector self)"}, - { (char *)"CellConnector_swigregister", CellConnector_swigregister, METH_VARARGS, NULL}, - { (char *)"CellConnector_swiginit", CellConnector_swiginit, METH_VARARGS, NULL}, - { (char *)"Cell_x_set", _wrap_Cell_x_set, METH_VARARGS, (char *)"Cell_x_set(Cell self, double x)"}, - { (char *)"Cell_x_get", (PyCFunction)_wrap_Cell_x_get, METH_O, (char *)"Cell_x_get(Cell self) -> double"}, - { (char *)"Cell_y_set", _wrap_Cell_y_set, METH_VARARGS, (char *)"Cell_y_set(Cell self, double y)"}, - { (char *)"Cell_y_get", (PyCFunction)_wrap_Cell_y_get, METH_O, (char *)"Cell_y_get(Cell self) -> double"}, - { (char *)"Cell_z_set", _wrap_Cell_z_set, METH_VARARGS, (char *)"Cell_z_set(Cell self, double z)"}, - { (char *)"Cell_z_get", (PyCFunction)_wrap_Cell_z_get, METH_O, (char *)"Cell_z_get(Cell self) -> double"}, - { (char *)"Cell_get_position", (PyCFunction)_wrap_Cell_get_position, METH_O, (char *)"\n" - "Cell_get_position(Cell self) -> point\n" - "\n" - "cmf::geometry::point get_position() const\n" - "\n" - "Returns the location of the cell. \n" - ""}, - { (char *)"Cell_m3_to_mm", (PyCFunction) _wrap_Cell_m3_to_mm, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "Cell_m3_to_mm(Cell self, double volume) -> double\n" - "\n" - "double\n" - "m3_to_mm(double volume) const\n" - "\n" - "Converts a volume in m3 in mm for the cell area. \n" - ""}, - { (char *)"Cell_mm_to_m3", (PyCFunction) _wrap_Cell_mm_to_m3, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "Cell_mm_to_m3(Cell self, double depth) -> double\n" - "\n" - "double\n" - "mm_to_m3(double depth) const \n" - ""}, - { (char *)"Cell_InvalidateSatDepth", (PyCFunction)_wrap_Cell_InvalidateSatDepth, METH_O, (char *)"\n" - "Cell_InvalidateSatDepth(Cell self)\n" - "\n" - "void\n" - "InvalidateSatDepth() const\n" - "\n" - "Marks the saturated depth as unvalid. This is done automatically, when\n" - "the state of a layer changes. \n" - ""}, - { (char *)"Cell_vegetation_set", _wrap_Cell_vegetation_set, METH_VARARGS, (char *)"Cell_vegetation_set(Cell self, Vegetation vegetation)"}, - { (char *)"Cell_vegetation_get", (PyCFunction)_wrap_Cell_vegetation_get, METH_O, (char *)"Cell_vegetation_get(Cell self) -> Vegetation"}, - { (char *)"Cell_set_aerodynamic_resistance", (PyCFunction) _wrap_Cell_set_aerodynamic_resistance, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "Cell_set_aerodynamic_resistance(Cell self, cmf::atmosphere::aerodynamic_resistance::ptr Ra)\n" - "\n" - "void\n" - "set_aerodynamic_resistance(cmf::atmosphere::aerodynamic_resistance::ptr\n" - "Ra)\n" - "\n" - "Sets the method to calculate aerodynamic resistance against turbulent\n" - "sensible heat fluxes. \n" - ""}, - { (char *)"Cell_set_weather", (PyCFunction) _wrap_Cell_set_weather, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "Cell_set_weather(Cell self, Weather weather)\n" - "\n" - "void\n" - "set_weather(const cmf::atmosphere::Weather &weather)\n" - "\n" - "Sets the weather for this cell. Connectivity to a meteorological\n" - "station is lost. \n" - ""}, - { (char *)"Cell_set_rainfall", (PyCFunction) _wrap_Cell_set_rainfall, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "Cell_set_rainfall(Cell self, double rainfall)\n" - "\n" - "void\n" - "set_rainfall(double rainfall)\n" - "\n" - "Exchanges a timeseries of rainfall with a constant flux. \n" - ""}, - { (char *)"Cell_get_rainfall", (PyCFunction) _wrap_Cell_get_rainfall, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "Cell_get_rainfall(Cell self, Time t) -> double\n" - "\n" - "double\n" - "get_rainfall(cmf::math::Time t) const\n" - "\n" - "Returns the current rainfall flux in m3/day. \n" - ""}, - { (char *)"Cell___set_rain_source", (PyCFunction) _wrap_Cell___set_rain_source, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "Cell___set_rain_source(Cell self, cmf::atmosphere::RainSource::ptr new_source)\n" - "\n" - "void\n" - "set_rain_source(cmf::atmosphere::RainSource::ptr new_source)\n" - "\n" - "Changes the current source of rainfall. \n" - ""}, - { (char *)"Cell___get_rain_source", (PyCFunction)_wrap_Cell___get_rain_source, METH_O, (char *)"\n" - "Cell___get_rain_source(Cell self) -> cmf::atmosphere::RainSource::ptr\n" - "\n" - "cmf::atmosphere::RainSource::ptr get_rain_source()\n" - "\n" - "Returns the current source for rainfall. \n" - ""}, - { (char *)"Cell_set_uptakestress", (PyCFunction) _wrap_Cell_set_uptakestress, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "Cell_set_uptakestress(Cell self, RootUptakeStessFunction stressfunction)\n" - "\n" - "void\n" - "set_uptakestress(const ET::RootUptakeStessFunction &stressfunction)\n" - "\n" - "Uses the given WaterStressFunction for all stressedET like connections\n" - "to the transpiration target. \n" - ""}, - { (char *)"Cell___get_evaporation", (PyCFunction)_wrap_Cell___get_evaporation, METH_O, (char *)"\n" - "Cell___get_evaporation(Cell self) -> cmf::water::flux_node::ptr\n" - "\n" - "cmf::water::flux_node::ptr get_evaporation()\n" - "\n" - "Returns the end point of all evaporation of this cell (a\n" - "cmf::water::flux_node) \n" - ""}, - { (char *)"Cell___get_transpiration", (PyCFunction)_wrap_Cell___get_transpiration, METH_O, (char *)"\n" - "Cell___get_transpiration(Cell self) -> cmf::water::flux_node::ptr\n" - "\n" - "cmf::water::flux_node::ptr get_transpiration()\n" - "\n" - "Returns the end point of all transpiration of this cell (a\n" - "cmf::water::flux_node) \n" - ""}, - { (char *)"Cell_get_surfacewater", (PyCFunction)_wrap_Cell_get_surfacewater, METH_O, (char *)"\n" - "Cell_get_surfacewater(Cell self) -> cmf::water::flux_node::ptr\n" - "\n" - "cmf::water::flux_node::ptr get_surfacewater()\n" - "\n" - "returns the surface water of this cell. This is either a flux node or\n" - "a cmf::upslope::SurfaceWater \n" - ""}, - { (char *)"Cell_surfacewater_as_storage", (PyCFunction)_wrap_Cell_surfacewater_as_storage, METH_O, (char *)"\n" - "Cell_surfacewater_as_storage(Cell self)\n" - "\n" - "void surfacewater_as_storage()\n" - "\n" - "Makes the surfacewater of this cell a cmf::upslope::SurfaceWater\n" - "storage. \n" - ""}, - { (char *)"Cell_add_storage", _wrap_Cell_add_storage, METH_VARARGS, (char *)"\n" - "add_storage(std::string Name, char storage_role, bool isopenwater=False) -> cmf::water::WaterStorage::ptr\n" - "Cell_add_storage(Cell self, cmf::water::WaterStorage::ptr storage) -> ptrdiff_t\n" - "\n" - "ptrdiff_t\n" - "add_storage(cmf::water::WaterStorage::ptr storage)\n" - "\n" - "Bounds an existing storage to the cell. \n" - ""}, - { (char *)"Cell_remove_storage", (PyCFunction) _wrap_Cell_remove_storage, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "Cell_remove_storage(Cell self, cmf::water::WaterStorage::ptr storage)\n" - "\n" - "void\n" - "remove_storage(cmf::water::WaterStorage::ptr storage) \n" - ""}, - { (char *)"Cell_storage_count", (PyCFunction)_wrap_Cell_storage_count, METH_O, (char *)"\n" - "Cell_storage_count(Cell self) -> size_t\n" - "\n" - "size_t\n" - "storage_count() const \n" - ""}, - { (char *)"Cell_get_storage", (PyCFunction) _wrap_Cell_get_storage, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "Cell_get_storage(Cell self, ptrdiff_t index) -> cmf::water::WaterStorage::ptr\n" - "\n" - "cmf::water::WaterStorage::ptr get_storage(ptrdiff_t index) const \n" - ""}, - { (char *)"Cell_get_canopy", (PyCFunction)_wrap_Cell_get_canopy, METH_O, (char *)"\n" - "Cell_get_canopy(Cell self) -> cmf::water::WaterStorage::ptr\n" - "\n" - "cmf::water::WaterStorage::ptr get_canopy() const \n" - ""}, - { (char *)"Cell_get_snow", (PyCFunction)_wrap_Cell_get_snow, METH_O, (char *)"\n" - "Cell_get_snow(Cell self) -> cmf::water::WaterStorage::ptr\n" - "\n" - "cmf::water::WaterStorage::ptr get_snow() const \n" - ""}, - { (char *)"Cell_snow_coverage", (PyCFunction)_wrap_Cell_snow_coverage, METH_O, (char *)"\n" - "Cell_snow_coverage(Cell self) -> real\n" - "\n" - "real\n" - "snow_coverage() const \n" - ""}, - { (char *)"Cell_albedo", (PyCFunction)_wrap_Cell_albedo, METH_O, (char *)"\n" - "Cell_albedo(Cell self) -> real\n" - "\n" - "real albedo()\n" - "const \n" - ""}, - { (char *)"Cell_surface_amplitude_set", _wrap_Cell_surface_amplitude_set, METH_VARARGS, (char *)"Cell_surface_amplitude_set(Cell self, real surface_amplitude)"}, - { (char *)"Cell_surface_amplitude_get", (PyCFunction)_wrap_Cell_surface_amplitude_get, METH_O, (char *)"Cell_surface_amplitude_get(Cell self) -> real"}, - { (char *)"Cell_surface_water_coverage", (PyCFunction)_wrap_Cell_surface_water_coverage, METH_O, (char *)"\n" - "Cell_surface_water_coverage(Cell self) -> real\n" - "\n" - "real surface_water_coverage() const\n" - "\n" - "Returns the coverage of the surface water.\n" - "\n" - "The covered fraction (0..1) is simply modelled as a piecewise linear\n" - "function of the surface water depth. If the depth is above the\n" - "aggregate height, the coverage is 1, below it is given as \n" - "\n" - ".. math::\n" - "\n" - " c =\n" - " \\\\frac{h_{water}}{\\\\Delta h_{surface}}\n" - "\n" - "with c the coverage,\n" - ":math:`h_{water}` the depth of the surface water and :math:`\\\\Delta h_{surface}`\n" - "the amplitude of the surface roughness \n" - ""}, - { (char *)"Cell_heat_flux", (PyCFunction) _wrap_Cell_heat_flux, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "Cell_heat_flux(Cell self, Time t) -> real\n" - "\n" - "real\n" - "heat_flux(cmf::math::Time t) const\n" - "\n" - "Calculates the surface heat balance.\n" - "\n" - "Parameters:\n" - "-----------\n" - "\n" - "t: Time step \n" - ""}, - { (char *)"Cell_Tground_set", _wrap_Cell_Tground_set, METH_VARARGS, (char *)"Cell_Tground_set(Cell self, real Tground)"}, - { (char *)"Cell_Tground_get", (PyCFunction)_wrap_Cell_Tground_get, METH_O, (char *)"Cell_Tground_get(Cell self) -> real"}, - { (char *)"Cell_leave_wetness", (PyCFunction)_wrap_Cell_leave_wetness, METH_O, (char *)"\n" - "Cell_leave_wetness(Cell self) -> real\n" - "\n" - "real\n" - "leave_wetness() const\n" - "\n" - "Return the fraction of wet leaves in the canopy if a canopy water\n" - "storage exists.\n" - "\n" - "If no canopy storage is present, it returns 0.0 (=empty). The fraction\n" - "of wet leaves are calculated as the linear filling of the canopy\n" - "storage. \n" - ""}, - { (char *)"Cell_Id_set", _wrap_Cell_Id_set, METH_VARARGS, (char *)"Cell_Id_set(Cell self, ptrdiff_t Id)"}, - { (char *)"Cell_Id_get", (PyCFunction)_wrap_Cell_Id_get, METH_O, (char *)"Cell_Id_get(Cell self) -> ptrdiff_t"}, - { (char *)"Cell_get_WKB", (PyCFunction)_wrap_Cell_get_WKB, METH_O, (char *)"Cell_get_WKB(Cell self) -> cmf::bytestring"}, - { (char *)"Cell_set_WKB", (PyCFunction) _wrap_Cell_set_WKB, METH_VARARGS | METH_KEYWORDS, (char *)"Cell_set_WKB(Cell self, cmf::bytestring wkb)"}, - { (char *)"Cell_get_weather", (PyCFunction) _wrap_Cell_get_weather, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "Cell_get_weather(Cell self, Time t) -> Weather\n" - "\n" - "cmf::atmosphere::Weather get_weather(cmf::math::Time t) const\n" - "\n" - "Returns the current meteorological conditions of the cell at time t.\n" - "\n" - ""}, - { (char *)"Cell_layer_count", (PyCFunction)_wrap_Cell_layer_count, METH_O, (char *)"\n" - "Cell_layer_count(Cell self) -> size_t\n" - "\n" - "size_t\n" - "layer_count() const\n" - "\n" - "Returns the number of layers of the cell. \n" - ""}, - { (char *)"Cell_get_layer", (PyCFunction) _wrap_Cell_get_layer, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "Cell_get_layer(Cell self, ptrdiff_t ndx) -> cmf::upslope::SoilLayer::ptr\n" - "\n" - "cmf::upslope::SoilLayer::ptr get_layer(ptrdiff_t ndx) const\n" - "\n" - "Returns the layer at position ndx.\n" - "\n" - "From python this function is masked as a sequence: \n" - ""}, - { (char *)"Cell_add_layer", _wrap_Cell_add_layer, METH_VARARGS, (char *)"\n" - "add_layer(real lowerboundary, RetentionCurve r_curve, real saturateddepth=10) -> cmf::upslope::SoilLayer::ptr\n" - "Cell_add_layer(Cell self, real lowerboundary) -> cmf::upslope::SoilLayer::ptr\n" - "\n" - "cmf::upslope::SoilLayer::ptr add_layer(real lowerboundary)\n" - "\n" - "Adds a rather conceptual layer to the cell. Use this version for\n" - "conceptual models. The retention curve resambles an empty bucket. \n" - ""}, - { (char *)"Cell_remove_last_layer", (PyCFunction)_wrap_Cell_remove_last_layer, METH_O, (char *)"\n" - "Cell_remove_last_layer(Cell self)\n" - "\n" - "void\n" - "remove_last_layer()\n" - "\n" - "Remove the lowest layer from this cell. \n" - ""}, - { (char *)"Cell_remove_layers", (PyCFunction)_wrap_Cell_remove_layers, METH_O, (char *)"\n" - "Cell_remove_layers(Cell self)\n" - "\n" - "void\n" - "remove_layers()\n" - "\n" - "Removes all layers from this cell. \n" - ""}, - { (char *)"delete_Cell", (PyCFunction)_wrap_delete_Cell, METH_O, (char *)"\n" - "delete_Cell(Cell self)\n" - "\n" - "virtual ~Cell() \n" - ""}, - { (char *)"new_Cell", (PyCFunction) _wrap_new_Cell, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "new_Cell(double x, double y, double z, double area, project _project) -> Cell\n" - "\n" - "Cell(double x,\n" - "double y, double z, double area, cmf::project &_project) \n" - ""}, - { (char *)"Cell_to_string", (PyCFunction)_wrap_Cell_to_string, METH_O, (char *)"\n" - "Cell_to_string(Cell self) -> std::string\n" - "\n" - "std::string\n" - "to_string() const \n" - ""}, - { (char *)"Cell_topology_get", (PyCFunction)_wrap_Cell_topology_get, METH_O, (char *)"Cell_topology_get(Cell self) -> Topology"}, - { (char *)"Cell_meteorology_set", _wrap_Cell_meteorology_set, METH_VARARGS, (char *)"Cell_meteorology_set(Cell self, Meteorology meteorology)"}, - { (char *)"Cell_meteorology_get", (PyCFunction)_wrap_Cell_meteorology_get, METH_O, (char *)"Cell_meteorology_get(Cell self) -> Meteorology"}, - { (char *)"Cell_layers_get", (PyCFunction)_wrap_Cell_layers_get, METH_O, (char *)"Cell_layers_get(Cell self) -> layer_list"}, - { (char *)"Cell_project_get", (PyCFunction)_wrap_Cell_project_get, METH_O, (char *)"Cell_project_get(Cell self) -> project"}, - { (char *)"Cell_saturated_depth_set", _wrap_Cell_saturated_depth_set, METH_VARARGS, (char *)"Cell_saturated_depth_set(Cell self, real saturated_depth)"}, - { (char *)"Cell_saturated_depth_get", (PyCFunction)_wrap_Cell_saturated_depth_get, METH_O, (char *)"Cell_saturated_depth_get(Cell self) -> real"}, - { (char *)"Cell_area_get", (PyCFunction)_wrap_Cell_area_get, METH_O, (char *)"Cell_area_get(Cell self) -> real"}, - { (char *)"Cell_soildepth_get", (PyCFunction)_wrap_Cell_soildepth_get, METH_O, (char *)"Cell_soildepth_get(Cell self) -> real"}, - { (char *)"Cell_swigregister", Cell_swigregister, METH_VARARGS, NULL}, - { (char *)"Cell_swiginit", Cell_swiginit, METH_VARARGS, NULL}, - { (char *)"Topology_cell_get", (PyCFunction)_wrap_Topology_cell_get, METH_O, (char *)"Topology_cell_get(Topology self) -> Cell"}, - { (char *)"Topology_x_set", _wrap_Topology_x_set, METH_VARARGS, (char *)"Topology_x_set(Topology self, double & x)"}, - { (char *)"Topology_x_get", (PyCFunction)_wrap_Topology_x_get, METH_O, (char *)"Topology_x_get(Topology self) -> double &"}, - { (char *)"Topology_y_set", _wrap_Topology_y_set, METH_VARARGS, (char *)"Topology_y_set(Topology self, double & y)"}, - { (char *)"Topology_y_get", (PyCFunction)_wrap_Topology_y_get, METH_O, (char *)"Topology_y_get(Topology self) -> double &"}, - { (char *)"Topology_z_set", _wrap_Topology_z_set, METH_VARARGS, (char *)"Topology_z_set(Topology self, double & z)"}, - { (char *)"Topology_z_get", (PyCFunction)_wrap_Topology_z_get, METH_O, (char *)"Topology_z_get(Topology self) -> double &"}, - { (char *)"Topology_get_position", (PyCFunction)_wrap_Topology_get_position, METH_O, (char *)"\n" - "Topology_get_position(Topology self) -> point\n" - "\n" - "cmf::geometry::point get_position() const\n" - "\n" - "Returns the center of the cell. \n" - ""}, - { (char *)"Topology_flowwidth", _wrap_Topology_flowwidth, METH_VARARGS, (char *)"\n" - "flowwidth(Cell target) -> double\n" - "Topology_flowwidth(Topology self, Topology target) -> double\n" - "\n" - "double\n" - "flowwidth(Topology &target) \n" - ""}, - { (char *)"Topology_AddNeighbor", _wrap_Topology_AddNeighbor, METH_VARARGS, (char *)"\n" - "AddNeighbor(Cell target, double flowwidth)\n" - "Topology_AddNeighbor(Topology self, Topology target, double flowwidth)\n" - "\n" - "void\n" - "AddNeighbor(Topology &target, double flowwidth) \n" - ""}, - { (char *)"Topology_RemoveNeighbor", (PyCFunction) _wrap_Topology_RemoveNeighbor, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "Topology_RemoveNeighbor(Topology self, Topology target)\n" - "\n" - "void\n" - "RemoveNeighbor(Topology &target)\n" - "\n" - "Removes the topological relation to the given cell. \n" - ""}, - { (char *)"Topology_neighbor_count", (PyCFunction)_wrap_Topology_neighbor_count, METH_O, (char *)"\n" - "Topology_neighbor_count(Topology self) -> size_t\n" - "\n" - "size_t\n" - "neighbor_count() const\n" - "\n" - "Returns the number of neighbors. \n" - ""}, - { (char *)"Topology_MainOutlet", (PyCFunction) _wrap_Topology_MainOutlet, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "Topology_MainOutlet(Topology self, bool forceRecalc=False) -> Cell\n" - "\n" - "Cell*\n" - "MainOutlet(bool forceRecalc=false)\n" - "\n" - "Returns the mainoutlet (steepest lower neighbor) \n" - ""}, - { (char *)"Topology_ContributingArea", (PyCFunction)_wrap_Topology_ContributingArea, METH_O, (char *)"\n" - "Topology_ContributingArea(Topology self) -> double\n" - "\n" - "double ContributingArea() const\n" - "\n" - "Get the contributing area (steepest path upwards) \n" - ""}, - { (char *)"Topology_calculate_contributing_area", (PyCFunction) _wrap_Topology_calculate_contributing_area, METH_VARARGS | METH_KEYWORDS, (char *)"Topology_calculate_contributing_area(cell_vector arg2)"}, - { (char *)"Topology___eq__", (PyCFunction) _wrap_Topology___eq__, METH_VARARGS | METH_KEYWORDS, (char *)"Topology___eq__(Topology self, Topology cmp) -> bool"}, - { (char *)"delete_Topology", (PyCFunction)_wrap_delete_Topology, METH_O, (char *)"delete_Topology(Topology self)"}, - { (char *)"Topology_swigregister", Topology_swigregister, METH_VARARGS, NULL}, - { (char *)"new_neighbor_iterator", (PyCFunction) _wrap_new_neighbor_iterator, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "new_neighbor_iterator(Cell cell) -> neighbor_iterator\n" - "\n" - "neighbor_iterator(cmf::upslope::Cell *cell) \n" - ""}, - { (char *)"neighbor_iterator_cell", (PyCFunction)_wrap_neighbor_iterator_cell, METH_O, (char *)"\n" - "neighbor_iterator_cell(neighbor_iterator self) -> Cell\n" - "\n" - "Cell&\n" - "cell() \n" - ""}, - { (char *)"neighbor_iterator_flowwidth", (PyCFunction)_wrap_neighbor_iterator_flowwidth, METH_O, (char *)"\n" - "neighbor_iterator_flowwidth(neighbor_iterator self) -> double\n" - "\n" - "double flowwidth() \n" - ""}, - { (char *)"neighbor_iterator_valid", (PyCFunction)_wrap_neighbor_iterator_valid, METH_O, (char *)"\n" - "neighbor_iterator_valid(neighbor_iterator self) -> bool\n" - "\n" - "bool\n" - "valid() const \n" - ""}, - { (char *)"neighbor_iterator_next", (PyCFunction)_wrap_neighbor_iterator_next, METH_O, (char *)"\n" - "neighbor_iterator_next(neighbor_iterator self) -> neighbor_iterator\n" - "\n" - "neighbor_iterator& next()\n" - "\n" - "Points the iterator to the next neighbor. \n" - ""}, - { (char *)"neighbor_iterator___eq__", (PyCFunction) _wrap_neighbor_iterator___eq__, METH_VARARGS | METH_KEYWORDS, (char *)"neighbor_iterator___eq__(neighbor_iterator self, neighbor_iterator cmp) -> bool"}, - { (char *)"neighbor_iterator___neq__", (PyCFunction) _wrap_neighbor_iterator___neq__, METH_VARARGS | METH_KEYWORDS, (char *)"neighbor_iterator___neq__(neighbor_iterator self, neighbor_iterator cmp) -> bool"}, - { (char *)"delete_neighbor_iterator", (PyCFunction)_wrap_delete_neighbor_iterator, METH_O, (char *)"delete_neighbor_iterator(neighbor_iterator self)"}, - { (char *)"neighbor_iterator_swigregister", neighbor_iterator_swigregister, METH_VARARGS, NULL}, - { (char *)"neighbor_iterator_swiginit", neighbor_iterator_swiginit, METH_VARARGS, NULL}, - { (char *)"new_cell_vector", _wrap_new_cell_vector, METH_VARARGS, (char *)"\n" - "cell_vector()\n" - "new_cell_vector(cell_vector copy) -> cell_vector\n" - "\n" - "cell_vector(cell_const_iterator first, cell_const_iterator last) \n" - ""}, - { (char *)"cell_vector___getitem__", _wrap_cell_vector___getitem__, METH_VARARGS, (char *)"\n" - "__getitem__(ptrdiff_t index) -> Cell\n" - "cell_vector___getitem__(cell_vector self, ptrdiff_t index) -> Cell\n" - ""}, - { (char *)"cell_vector_append", (PyCFunction) _wrap_cell_vector_append, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "cell_vector_append(cell_vector self, Cell cell)\n" - "\n" - "void\n" - "append(cmf::upslope::Cell &cell) \n" - ""}, - { (char *)"cell_vector_remove", _wrap_cell_vector_remove, METH_VARARGS, (char *)"\n" - "remove(ptrdiff_t index)\n" - "cell_vector_remove(cell_vector self, Cell cell)\n" - "\n" - "void\n" - "remove(const cmf::upslope::Cell &cell) \n" - ""}, - { (char *)"cell_vector_pop", (PyCFunction)_wrap_cell_vector_pop, METH_O, (char *)"\n" - "cell_vector_pop(cell_vector self) -> Cell\n" - "\n" - "Cell& pop()\n" - "\n" - "Returns and removes the last cell. \n" - ""}, - { (char *)"cell_vector___len__", (PyCFunction)_wrap_cell_vector___len__, METH_O, (char *)"\n" - "cell_vector___len__(cell_vector self) -> size_t\n" - "\n" - "size_t size()\n" - "const \n" - ""}, - { (char *)"cell_vector___getslice__", (PyCFunction) _wrap_cell_vector___getslice__, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "cell_vector___getslice__(cell_vector self, ptrdiff_t start, ptrdiff_t end, ptrdiff_t step=1) -> cell_vector\n" - "\n" - "cell_vector get_slice(ptrdiff_t start, ptrdiff_t end, ptrdiff_t\n" - "step=1) \n" - ""}, - { (char *)"cell_vector_get_area", (PyCFunction)_wrap_cell_vector_get_area, METH_O, (char *)"\n" - "cell_vector_get_area(cell_vector self) -> double\n" - "\n" - "double\n" - "get_area() const\n" - "\n" - "Returns sum of the area of the cells. \n" - ""}, - { (char *)"cell_vector___contains__", (PyCFunction) _wrap_cell_vector___contains__, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "cell_vector___contains__(cell_vector self, Cell cell) -> bool\n" - "\n" - "bool\n" - "contains(const cmf::upslope::Cell &cell) const \n" - ""}, - { (char *)"delete_cell_vector", (PyCFunction)_wrap_delete_cell_vector, METH_O, (char *)"\n" - "delete_cell_vector(cell_vector self)\n" - "\n" - "virtual ~cell_vector() \n" - ""}, - { (char *)"cell_vector_lowest_get", (PyCFunction)_wrap_cell_vector_lowest_get, METH_O, (char *)"cell_vector_lowest_get(cell_vector self) -> Cell"}, - { (char *)"cell_vector_highest_get", (PyCFunction)_wrap_cell_vector_highest_get, METH_O, (char *)"cell_vector_highest_get(cell_vector self) -> Cell"}, - { (char *)"cell_vector_swigregister", cell_vector_swigregister, METH_VARARGS, NULL}, - { (char *)"cell_vector_swiginit", cell_vector_swiginit, METH_VARARGS, NULL}, - { (char *)"find_cell", (PyCFunction) _wrap_find_cell, METH_VARARGS | METH_KEYWORDS, (char *)"find_cell(cell_vector arg1, point p, double max_dist=1e20) -> Cell"}, - { (char *)"get_boundary_cells", (PyCFunction) _wrap_get_boundary_cells, METH_VARARGS | METH_KEYWORDS, (char *)"get_boundary_cells(cell_vector cells) -> cell_vector"}, - { (char *)"get_connections", (PyCFunction) _wrap_get_connections, METH_VARARGS | METH_KEYWORDS, (char *)"get_connections(cell_vector cells) -> connection_list"}, - { (char *)"connect_cells_with_flux", (PyCFunction) _wrap_connect_cells_with_flux, METH_VARARGS | METH_KEYWORDS, (char *)"connect_cells_with_flux(cell_vector cells, CellConnector connect, int start_at_layer=0)"}, - { (char *)"fill_sinks", (PyCFunction) _wrap_fill_sinks, METH_VARARGS | METH_KEYWORDS, (char *)"fill_sinks(cell_vector cells, double min_difference=0.001) -> int"}, - { (char *)"get_area", (PyCFunction) _wrap_get_area, METH_VARARGS | METH_KEYWORDS, (char *)"get_area(cell_vector cells) -> double"}, - { (char *)"get_center", (PyCFunction) _wrap_get_center, METH_VARARGS | METH_KEYWORDS, (char *)"get_center(cell_vector cells) -> point"}, - { (char *)"cell_positions", (PyCFunction) _wrap_cell_positions, METH_VARARGS | METH_KEYWORDS, (char *)"cell_positions(cell_vector cells) -> point_vector"}, - { (char *)"cell_flux_directions", (PyCFunction) _wrap_cell_flux_directions, METH_VARARGS | METH_KEYWORDS, (char *)"cell_flux_directions(cell_vector cells, Time arg2) -> point_vector"}, - { (char *)"cell2cellflux", (PyCFunction) _wrap_cell2cellflux, METH_VARARGS | METH_KEYWORDS, (char *)"cell2cellflux(Cell source, Cell target, Time t, bool subsurface_only=False) -> cmf::math::num_array"}, - { (char *)"cell_distance", (PyCFunction) _wrap_cell_distance, METH_VARARGS | METH_KEYWORDS, (char *)"cell_distance(Cell c1, Cell c2) -> double"}, - { (char *)"subcatchment_pourpoint_get", (PyCFunction)_wrap_subcatchment_pourpoint_get, METH_O, (char *)"subcatchment_pourpoint_get(subcatchment self) -> Cell"}, - { (char *)"subcatchment_inflowcells_set", _wrap_subcatchment_inflowcells_set, METH_VARARGS, (char *)"subcatchment_inflowcells_set(subcatchment self, cell_vector inflowcells)"}, - { (char *)"subcatchment_inflowcells_get", (PyCFunction)_wrap_subcatchment_inflowcells_get, METH_O, (char *)"subcatchment_inflowcells_get(subcatchment self) -> cell_vector"}, - { (char *)"subcatchment_cells_set", _wrap_subcatchment_cells_set, METH_VARARGS, (char *)"subcatchment_cells_set(subcatchment self, cell_vector cells)"}, - { (char *)"subcatchment_cells_get", (PyCFunction)_wrap_subcatchment_cells_get, METH_O, (char *)"subcatchment_cells_get(subcatchment self) -> cell_vector"}, - { (char *)"new_subcatchment", (PyCFunction) _wrap_new_subcatchment, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "new_subcatchment(Cell pourpoint, double area_threshold=1e308) -> subcatchment\n" - "\n" - "subcatchment(cmf::upslope::Cell &pourpoint, double\n" - "area_threshold=1e308)\n" - "\n" - "Creates a subcatchment from a pourpoint cell.\n" - "\n" - "Parameters:\n" - "-----------\n" - "\n" - "pourpoint: The pourpoint (outlet of the subcatchment)\n" - "\n" - "area_threshold: Minimum contributing area size to form a\n" - "subcatchment. When area_threshold > area(cells), all upslope cells of\n" - "pourpoint are used. \n" - ""}, - { (char *)"delete_subcatchment", (PyCFunction)_wrap_delete_subcatchment, METH_O, (char *)"delete_subcatchment(subcatchment self)"}, - { (char *)"subcatchment_swigregister", subcatchment_swigregister, METH_VARARGS, NULL}, - { (char *)"subcatchment_swiginit", subcatchment_swiginit, METH_VARARGS, NULL}, - { (char *)"pressure_to_waterhead", (PyCFunction) _wrap_pressure_to_waterhead, METH_VARARGS | METH_KEYWORDS, (char *)"pressure_to_waterhead(double Pressure) -> double"}, - { (char *)"waterhead_to_pressure", (PyCFunction) _wrap_waterhead_to_pressure, METH_VARARGS | METH_KEYWORDS, (char *)"waterhead_to_pressure(double waterhead) -> double"}, - { (char *)"pF_to_waterhead", (PyCFunction) _wrap_pF_to_waterhead, METH_VARARGS | METH_KEYWORDS, (char *)"pF_to_waterhead(double pF) -> double"}, - { (char *)"waterhead_to_pF", (PyCFunction) _wrap_waterhead_to_pF, METH_VARARGS | METH_KEYWORDS, (char *)"waterhead_to_pF(double waterhead) -> double"}, - { (char *)"RetentionCurve_K", _wrap_RetentionCurve_K, METH_VARARGS, (char *)"\n" - "K(real wetness) -> real\n" - "RetentionCurve_K(RetentionCurve self, cmf::math::num_array const & wetness) -> cmf::math::num_array\n" - "\n" - "cmf::math::num_array K(const cmf::math::num_array &wetness) const \n" - ""}, - { (char *)"RetentionCurve_Wetness_eff", (PyCFunction) _wrap_RetentionCurve_Wetness_eff, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "RetentionCurve_Wetness_eff(RetentionCurve self, real wetness, real pF_r=4.2) -> real\n" - "\n" - "virtual real Wetness_eff(real wetness, real pF_r=4.2) const\n" - "\n" - "Returns the effective wetness, using a residual pF value \n" - "\n" - ".. math::\n" - "\n" - " w_{eff}\n" - " =\n" - " \\\\frac{w_{act}-w\\\\left(pF_r\\\\right)}{1-w\\\\left(pF_r\\\\right)}\n" - "\n" - ".\n" - "\n" - ""}, - { (char *)"RetentionCurve_Porosity", (PyCFunction) _wrap_RetentionCurve_Porosity, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "RetentionCurve_Porosity(RetentionCurve self, real depth=0.0) -> real\n" - "\n" - "virtual real Porosity(real depth=0.0) const =0\n" - "\n" - "Returns the porosity at a certain depth. \n" - ""}, - { (char *)"RetentionCurve_VoidVolume", (PyCFunction) _wrap_RetentionCurve_VoidVolume, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "RetentionCurve_VoidVolume(RetentionCurve self, real upperDepth, real lowerDepth, real Area) -> real\n" - "\n" - "virtual real VoidVolume(real upperDepth, real lowerDepth, real Area)\n" - "const\n" - "\n" - "Returns the void volume of a soil column. \n" - ""}, - { (char *)"RetentionCurve_FillHeight", (PyCFunction) _wrap_RetentionCurve_FillHeight, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "RetentionCurve_FillHeight(RetentionCurve self, real lowerDepth, real Area, real Volume) -> real\n" - "\n" - "virtual real FillHeight(real lowerDepth, real Area, real Volume) const\n" - "\n" - "Returns the thickness of a soil column with a certain pore volume. \n" - ""}, - { (char *)"RetentionCurve_Diffusivity", _wrap_RetentionCurve_Diffusivity, METH_VARARGS, (char *)"\n" - "Diffusivity(real wetness) -> real\n" - "RetentionCurve_Diffusivity(RetentionCurve self, cmf::math::num_array & wetness) -> cmf::math::num_array\n" - "\n" - "cmf::math::num_array Diffusivity(cmf::math::num_array &wetness) \n" - ""}, - { (char *)"RetentionCurve_Wetness", _wrap_RetentionCurve_Wetness, METH_VARARGS, (char *)"\n" - "Wetness(real suction) -> real\n" - "RetentionCurve_Wetness(RetentionCurve self, cmf::math::num_array const & suction) -> cmf::math::num_array\n" - "\n" - "cmf::math::num_array Wetness(const cmf::math::num_array &suction)\n" - "const \n" - ""}, - { (char *)"RetentionCurve_theta", _wrap_RetentionCurve_theta, METH_VARARGS, (char *)"\n" - "theta(real wetness) -> real\n" - "RetentionCurve_theta(RetentionCurve self, cmf::math::num_array const & wetness) -> cmf::math::num_array\n" - "\n" - "cmf::math::num_array theta(const cmf::math::num_array &wetness) const\n" - "\n" - ""}, - { (char *)"RetentionCurve_dPsiM_dW", _wrap_RetentionCurve_dPsiM_dW, METH_VARARGS, (char *)"\n" - "dPsiM_dW(real wetness) -> real\n" - "RetentionCurve_dPsiM_dW(RetentionCurve self, cmf::math::num_array const & wetness) -> cmf::math::num_array\n" - "\n" - "cmf::math::num_array dPsiM_dW(const cmf::math::num_array &wetness)\n" - "const \n" - ""}, - { (char *)"RetentionCurve_Wetness_pF", _wrap_RetentionCurve_Wetness_pF, METH_VARARGS, (char *)"\n" - "Wetness_pF(real pF) -> real\n" - "RetentionCurve_Wetness_pF(RetentionCurve self, cmf::math::num_array const & pF) -> cmf::math::num_array\n" - "\n" - "cmf::math::num_array Wetness_pF(const cmf::math::num_array &pF) const\n" - "\n" - ""}, - { (char *)"RetentionCurve_MatricPotential", _wrap_RetentionCurve_MatricPotential, METH_VARARGS, (char *)"\n" - "MatricPotential(real wetness) -> real\n" - "RetentionCurve_MatricPotential(RetentionCurve self, cmf::math::num_array const & wetness) -> cmf::math::num_array\n" - "\n" - "cmf::math::num_array MatricPotential(const cmf::math::num_array\n" - "&wetness) const \n" - ""}, - { (char *)"RetentionCurve_copy", (PyCFunction)_wrap_RetentionCurve_copy, METH_O, (char *)"\n" - "RetentionCurve_copy(RetentionCurve self) -> RetentionCurve\n" - "\n" - "virtual\n" - "RetentionCurve* copy() const =0 \n" - ""}, - { (char *)"delete_RetentionCurve", (PyCFunction)_wrap_delete_RetentionCurve, METH_O, (char *)"\n" - "delete_RetentionCurve(RetentionCurve self)\n" - "\n" - "virtual ~RetentionCurve() \n" - ""}, - { (char *)"RetentionCurve_swigregister", RetentionCurve_swigregister, METH_VARARGS, NULL}, - { (char *)"BrooksCoreyRetentionCurve_Ksat_set", _wrap_BrooksCoreyRetentionCurve_Ksat_set, METH_VARARGS, (char *)"BrooksCoreyRetentionCurve_Ksat_set(BrooksCoreyRetentionCurve self, real Ksat)"}, - { (char *)"BrooksCoreyRetentionCurve_Ksat_get", (PyCFunction)_wrap_BrooksCoreyRetentionCurve_Ksat_get, METH_O, (char *)"BrooksCoreyRetentionCurve_Ksat_get(BrooksCoreyRetentionCurve self) -> real"}, - { (char *)"BrooksCoreyRetentionCurve_SetPorosity", (PyCFunction) _wrap_BrooksCoreyRetentionCurve_SetPorosity, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "BrooksCoreyRetentionCurve_SetPorosity(BrooksCoreyRetentionCurve self, real porosity, real porosity_decay=0)\n" - "\n" - "void\n" - "SetPorosity(real porosity, real porosity_decay=0)\n" - "\n" - "Sets the porosity (Volume of pores per volume of soil) and the\n" - "exponential porosity decline with depth. \n" - ""}, - { (char *)"BrooksCoreyRetentionCurve_Transmissivity", (PyCFunction) _wrap_BrooksCoreyRetentionCurve_Transmissivity, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "BrooksCoreyRetentionCurve_Transmissivity(BrooksCoreyRetentionCurve self, real upperDepth, real lowerDepth, real theta) -> real\n" - "\n" - "real\n" - "Transmissivity(real upperDepth, real lowerDepth, real theta) const \n" - ""}, - { (char *)"BrooksCoreyRetentionCurve_wetness_X_set", _wrap_BrooksCoreyRetentionCurve_wetness_X_set, METH_VARARGS, (char *)"BrooksCoreyRetentionCurve_wetness_X_set(BrooksCoreyRetentionCurve self, real wetness_X)"}, - { (char *)"BrooksCoreyRetentionCurve_wetness_X_get", (PyCFunction)_wrap_BrooksCoreyRetentionCurve_wetness_X_get, METH_O, (char *)"BrooksCoreyRetentionCurve_wetness_X_get(BrooksCoreyRetentionCurve self) -> real"}, - { (char *)"BrooksCoreyRetentionCurve_Psi_X_set", _wrap_BrooksCoreyRetentionCurve_Psi_X_set, METH_VARARGS, (char *)"BrooksCoreyRetentionCurve_Psi_X_set(BrooksCoreyRetentionCurve self, real Psi_X)"}, - { (char *)"BrooksCoreyRetentionCurve_Psi_X_get", (PyCFunction)_wrap_BrooksCoreyRetentionCurve_Psi_X_get, METH_O, (char *)"BrooksCoreyRetentionCurve_Psi_X_get(BrooksCoreyRetentionCurve self) -> real"}, - { (char *)"BrooksCoreyRetentionCurve_residual_theta_set", _wrap_BrooksCoreyRetentionCurve_residual_theta_set, METH_VARARGS, (char *)"BrooksCoreyRetentionCurve_residual_theta_set(BrooksCoreyRetentionCurve self, real residual_theta)"}, - { (char *)"BrooksCoreyRetentionCurve_residual_theta_get", (PyCFunction)_wrap_BrooksCoreyRetentionCurve_residual_theta_get, METH_O, (char *)"BrooksCoreyRetentionCurve_residual_theta_get(BrooksCoreyRetentionCurve self) -> real"}, - { (char *)"new_BrooksCoreyRetentionCurve", (PyCFunction) _wrap_new_BrooksCoreyRetentionCurve, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "new_BrooksCoreyRetentionCurve(real ksat=15, real porosity=0.5, real _b=5, real theta_x=0.2, real psi_x, real porosity_decay=0) -> BrooksCoreyRetentionCurve\n" - "\n" - "BrooksCoreyRetentionCurve(real ksat=15, real porosity=0.5, real _b=5,\n" - "real theta_x=0.2, real psi_x=pF_to_waterhead(2.5), real\n" - "porosity_decay=0)\n" - "\n" - "Creates a brooks corey retention curve.\n" - "\n" - "Parameters:\n" - "-----------\n" - "\n" - "ksat: Saturated conductivity :math:`\\\\frac{m}{day}`\n" - "\n" - "porosity: :math:`\\\\frac{m^3 Pores}{m^3 Soil}`\n" - "\n" - "_b: Shape of the retention curve (if you do not know how to\n" - "parameterize this, take a look at the other constructor)\n" - "\n" - "theta_x: :math:`\\\\theta_X` Water content at a specific suction pressure\n" - "\n" - "psi_x: Suction pressure for :math:`\\\\theta_X` in m water column, use the\n" - "conversion functions pF_to_waterhead, pressure_to_waterhead to convert\n" - "pressure in to waterhead height (default pF=2.5)\n" - "\n" - "porosity_decay: Relative decay of porosity with depth, e.g. 0.1 means\n" - "conductivity gets 10% smaller per meter \n" - ""}, - { (char *)"BrooksCoreyRetentionCurve_CreateFrom2Points", (PyCFunction) _wrap_BrooksCoreyRetentionCurve_CreateFrom2Points, METH_VARARGS | METH_KEYWORDS, (char *)"BrooksCoreyRetentionCurve_CreateFrom2Points(real ksat, real porosity, real theta1, real theta2, real psi_1, real psi_2) -> BrooksCoreyRetentionCurve"}, - { (char *)"BrooksCoreyRetentionCurve_copy", (PyCFunction)_wrap_BrooksCoreyRetentionCurve_copy, METH_O, (char *)"\n" - "BrooksCoreyRetentionCurve_copy(BrooksCoreyRetentionCurve self) -> BrooksCoreyRetentionCurve\n" - "\n" - "virtual BrooksCoreyRetentionCurve* copy() const \n" - ""}, - { (char *)"delete_BrooksCoreyRetentionCurve", (PyCFunction)_wrap_delete_BrooksCoreyRetentionCurve, METH_O, (char *)"\n" - "delete_BrooksCoreyRetentionCurve(BrooksCoreyRetentionCurve self)\n" - "\n" - "virtual ~BrooksCoreyRetentionCurve() \n" - ""}, - { (char *)"BrooksCoreyRetentionCurve_b_set", _wrap_BrooksCoreyRetentionCurve_b_set, METH_VARARGS, (char *)"BrooksCoreyRetentionCurve_b_set(BrooksCoreyRetentionCurve self, real b)"}, - { (char *)"BrooksCoreyRetentionCurve_b_get", (PyCFunction)_wrap_BrooksCoreyRetentionCurve_b_get, METH_O, (char *)"BrooksCoreyRetentionCurve_b_get(BrooksCoreyRetentionCurve self) -> real"}, - { (char *)"BrooksCoreyRetentionCurve_swigregister", BrooksCoreyRetentionCurve_swigregister, METH_VARARGS, NULL}, - { (char *)"BrooksCoreyRetentionCurve_swiginit", BrooksCoreyRetentionCurve_swiginit, METH_VARARGS, NULL}, - { (char *)"VanGenuchtenMualem_alpha_set", _wrap_VanGenuchtenMualem_alpha_set, METH_VARARGS, (char *)"VanGenuchtenMualem_alpha_set(VanGenuchtenMualem self, real alpha)"}, - { (char *)"VanGenuchtenMualem_alpha_get", (PyCFunction)_wrap_VanGenuchtenMualem_alpha_get, METH_O, (char *)"VanGenuchtenMualem_alpha_get(VanGenuchtenMualem self) -> real"}, - { (char *)"VanGenuchtenMualem_n_set", _wrap_VanGenuchtenMualem_n_set, METH_VARARGS, (char *)"VanGenuchtenMualem_n_set(VanGenuchtenMualem self, real n)"}, - { (char *)"VanGenuchtenMualem_n_get", (PyCFunction)_wrap_VanGenuchtenMualem_n_get, METH_O, (char *)"VanGenuchtenMualem_n_get(VanGenuchtenMualem self) -> real"}, - { (char *)"VanGenuchtenMualem_Ksat_set", _wrap_VanGenuchtenMualem_Ksat_set, METH_VARARGS, (char *)"VanGenuchtenMualem_Ksat_set(VanGenuchtenMualem self, real Ksat)"}, - { (char *)"VanGenuchtenMualem_Ksat_get", (PyCFunction)_wrap_VanGenuchtenMualem_Ksat_get, METH_O, (char *)"VanGenuchtenMualem_Ksat_get(VanGenuchtenMualem self) -> real"}, - { (char *)"VanGenuchtenMualem_Phi_set", _wrap_VanGenuchtenMualem_Phi_set, METH_VARARGS, (char *)"VanGenuchtenMualem_Phi_set(VanGenuchtenMualem self, real Phi)"}, - { (char *)"VanGenuchtenMualem_Phi_get", (PyCFunction)_wrap_VanGenuchtenMualem_Phi_get, METH_O, (char *)"VanGenuchtenMualem_Phi_get(VanGenuchtenMualem self) -> real"}, - { (char *)"VanGenuchtenMualem_m_set", _wrap_VanGenuchtenMualem_m_set, METH_VARARGS, (char *)"VanGenuchtenMualem_m_set(VanGenuchtenMualem self, real m)"}, - { (char *)"VanGenuchtenMualem_m_get", (PyCFunction)_wrap_VanGenuchtenMualem_m_get, METH_O, (char *)"VanGenuchtenMualem_m_get(VanGenuchtenMualem self) -> real"}, - { (char *)"VanGenuchtenMualem_l_set", _wrap_VanGenuchtenMualem_l_set, METH_VARARGS, (char *)"VanGenuchtenMualem_l_set(VanGenuchtenMualem self, real l)"}, - { (char *)"VanGenuchtenMualem_l_get", (PyCFunction)_wrap_VanGenuchtenMualem_l_get, METH_O, (char *)"VanGenuchtenMualem_l_get(VanGenuchtenMualem self) -> real"}, - { (char *)"VanGenuchtenMualem_theta_r_set", _wrap_VanGenuchtenMualem_theta_r_set, METH_VARARGS, (char *)"VanGenuchtenMualem_theta_r_set(VanGenuchtenMualem self, real theta_r)"}, - { (char *)"VanGenuchtenMualem_theta_r_get", (PyCFunction)_wrap_VanGenuchtenMualem_theta_r_get, METH_O, (char *)"VanGenuchtenMualem_theta_r_get(VanGenuchtenMualem self) -> real"}, - { (char *)"VanGenuchtenMualem_w0_set", _wrap_VanGenuchtenMualem_w0_set, METH_VARARGS, (char *)"VanGenuchtenMualem_w0_set(VanGenuchtenMualem self, real w0)"}, - { (char *)"VanGenuchtenMualem_w0_get", (PyCFunction)_wrap_VanGenuchtenMualem_w0_get, METH_O, (char *)"VanGenuchtenMualem_w0_get(VanGenuchtenMualem self) -> real"}, - { (char *)"VanGenuchtenMualem_Transmissivity", (PyCFunction) _wrap_VanGenuchtenMualem_Transmissivity, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "VanGenuchtenMualem_Transmissivity(VanGenuchtenMualem self, real upperDepth, real lowerDepth, real wetness) -> real\n" - "\n" - "virtual real\n" - "Transmissivity(real upperDepth, real lowerDepth, real wetness) const\n" - "\n" - ""}, - { (char *)"VanGenuchtenMualem_fit_w0", (PyCFunction) _wrap_VanGenuchtenMualem_fit_w0, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "VanGenuchtenMualem_fit_w0(VanGenuchtenMualem self, real w1=1.01, real Psi_p=1.0, real tolerance=0.05) -> real\n" - "\n" - "real\n" - "fit_w0(real w1=1.01, real Psi_p=1.0, real tolerance=0.05)\n" - "\n" - "Fits the break point wetness w0, to ensure a specific oversaturation\n" - "at a given hydrostatic potential.\n" - "\n" - "Parameters:\n" - "-----------\n" - "\n" - "w1: The oversaturation wetness to archieve (>1), default = 1.01\n" - "\n" - "Psi_p: the hydrostatic potential for w1, default = +1.0 m\n" - "\n" - "tolerance: \n" - ""}, - { (char *)"VanGenuchtenMualem_copy", (PyCFunction)_wrap_VanGenuchtenMualem_copy, METH_O, (char *)"\n" - "VanGenuchtenMualem_copy(VanGenuchtenMualem self) -> VanGenuchtenMualem\n" - "\n" - "VanGenuchtenMualem* copy() const \n" - ""}, - { (char *)"new_VanGenuchtenMualem", (PyCFunction) _wrap_new_VanGenuchtenMualem, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "new_VanGenuchtenMualem(real Ksat=15, real phi=0.5, real alpha=0.2178, real n=1.211, real m=-1) -> VanGenuchtenMualem\n" - "\n" - "VanGenuchtenMualem(real Ksat=15, real phi=0.5, real alpha=0.2178, real\n" - "n=1.211, real m=-1)\n" - "\n" - "Creates a van Genuchten-Mualem retention curve.\n" - "\n" - "Parameters:\n" - "-----------\n" - "\n" - "Ksat: Saturated conductivity in :math:`\\\\frac m{day}`\n" - "\n" - "phi: Porosity in :math:`\\\\frac{m^3 Pores}{m^3 Soil}`\n" - "\n" - "alpha: Van Genuchten :math:`\\\\alpha` in :math:`\\\\frac 1{cm}`\n" - "\n" - "n: Van Genuchten n\n" - "\n" - "m: Van Genuchten m parameter, if negative m is calculated as :math:`1-\\\\frac 1 n` \n" - ""}, - { (char *)"delete_VanGenuchtenMualem", (PyCFunction)_wrap_delete_VanGenuchtenMualem, METH_O, (char *)"\n" - "delete_VanGenuchtenMualem(VanGenuchtenMualem self)\n" - "\n" - "virtual\n" - "~VanGenuchtenMualem() \n" - ""}, - { (char *)"VanGenuchtenMualem_swigregister", VanGenuchtenMualem_swigregister, METH_VARARGS, NULL}, - { (char *)"VanGenuchtenMualem_swiginit", VanGenuchtenMualem_swiginit, METH_VARARGS, NULL}, - { (char *)"LinearRetention_Ksat_set", _wrap_LinearRetention_Ksat_set, METH_VARARGS, (char *)"LinearRetention_Ksat_set(LinearRetention self, real Ksat)"}, - { (char *)"LinearRetention_Ksat_get", (PyCFunction)_wrap_LinearRetention_Ksat_get, METH_O, (char *)"LinearRetention_Ksat_get(LinearRetention self) -> real"}, - { (char *)"LinearRetention_porosity_set", _wrap_LinearRetention_porosity_set, METH_VARARGS, (char *)"LinearRetention_porosity_set(LinearRetention self, real porosity)"}, - { (char *)"LinearRetention_porosity_get", (PyCFunction)_wrap_LinearRetention_porosity_get, METH_O, (char *)"LinearRetention_porosity_get(LinearRetention self) -> real"}, - { (char *)"LinearRetention_thickness_set", _wrap_LinearRetention_thickness_set, METH_VARARGS, (char *)"LinearRetention_thickness_set(LinearRetention self, real thickness)"}, - { (char *)"LinearRetention_thickness_get", (PyCFunction)_wrap_LinearRetention_thickness_get, METH_O, (char *)"LinearRetention_thickness_get(LinearRetention self) -> real"}, - { (char *)"LinearRetention_residual_wetness_set", _wrap_LinearRetention_residual_wetness_set, METH_VARARGS, (char *)"LinearRetention_residual_wetness_set(LinearRetention self, real residual_wetness)"}, - { (char *)"LinearRetention_residual_wetness_get", (PyCFunction)_wrap_LinearRetention_residual_wetness_get, METH_O, (char *)"LinearRetention_residual_wetness_get(LinearRetention self) -> real"}, - { (char *)"LinearRetention_porosity_decay_set", _wrap_LinearRetention_porosity_decay_set, METH_VARARGS, (char *)"LinearRetention_porosity_decay_set(LinearRetention self, real porosity_decay)"}, - { (char *)"LinearRetention_porosity_decay_get", (PyCFunction)_wrap_LinearRetention_porosity_decay_get, METH_O, (char *)"LinearRetention_porosity_decay_get(LinearRetention self) -> real"}, - { (char *)"LinearRetention_beta_set", _wrap_LinearRetention_beta_set, METH_VARARGS, (char *)"LinearRetention_beta_set(LinearRetention self, real beta)"}, - { (char *)"LinearRetention_beta_get", (PyCFunction)_wrap_LinearRetention_beta_get, METH_O, (char *)"LinearRetention_beta_get(LinearRetention self) -> real"}, - { (char *)"LinearRetention_Transmissivity", (PyCFunction) _wrap_LinearRetention_Transmissivity, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "LinearRetention_Transmissivity(LinearRetention self, real upperDepth, real lowerDepth, real wetness) -> real\n" - "\n" - "virtual real Transmissivity(real upperDepth, real lowerDepth, real\n" - "wetness) const \n" - ""}, - { (char *)"LinearRetention_copy", (PyCFunction)_wrap_LinearRetention_copy, METH_O, (char *)"\n" - "LinearRetention_copy(LinearRetention self) -> LinearRetention\n" - "\n" - "LinearRetention* copy() const \n" - ""}, - { (char *)"new_LinearRetention", (PyCFunction) _wrap_new_LinearRetention, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "new_LinearRetention(real ksat, real phi, real thickness, real residual_wetness=0.1) -> LinearRetention\n" - "\n" - "LinearRetention(real ksat, real phi, real thickness, real\n" - "residual_wetness=0.1) \n" - ""}, - { (char *)"delete_LinearRetention", (PyCFunction)_wrap_delete_LinearRetention, METH_O, (char *)"\n" - "delete_LinearRetention(LinearRetention self)\n" - "\n" - "virtual ~LinearRetention() \n" - ""}, - { (char *)"LinearRetention_swigregister", LinearRetention_swigregister, METH_VARARGS, NULL}, - { (char *)"LinearRetention_swiginit", LinearRetention_swiginit, METH_VARARGS, NULL}, - { (char *)"SoilLayer_Position_get", (PyCFunction)_wrap_SoilLayer_Position_get, METH_O, (char *)"SoilLayer_Position_get(SoilLayer self) -> ptrdiff_t const"}, - { (char *)"SoilLayer_cell_get", (PyCFunction)_wrap_SoilLayer_cell_get, METH_O, (char *)"SoilLayer_cell_get(SoilLayer self) -> Cell"}, - { (char *)"SoilLayer___get_upper", (PyCFunction)_wrap_SoilLayer___get_upper, METH_O, (char *)"\n" - "SoilLayer___get_upper(SoilLayer self) -> cmf::upslope::SoilLayer::ptr\n" - "\n" - "ptr\n" - "get_upper() const \n" - ""}, - { (char *)"SoilLayer___get_lower", (PyCFunction)_wrap_SoilLayer___get_lower, METH_O, (char *)"\n" - "SoilLayer___get_lower(SoilLayer self) -> cmf::upslope::SoilLayer::ptr\n" - "\n" - "ptr\n" - "get_lower() const \n" - ""}, - { (char *)"SoilLayer_get_soil", (PyCFunction)_wrap_SoilLayer_get_soil, METH_O, (char *)"\n" - "SoilLayer_get_soil(SoilLayer self) -> RetentionCurve\n" - "\n" - "virtual\n" - "cmf::upslope::RetentionCurve& get_soil() const\n" - "\n" - "Returns the soil properties of the water storage. \n" - ""}, - { (char *)"SoilLayer_set_soil", (PyCFunction) _wrap_SoilLayer_set_soil, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "SoilLayer_set_soil(SoilLayer self, RetentionCurve r_curve)\n" - "\n" - "virtual\n" - "void set_soil(const cmf::upslope::RetentionCurve &r_curve) \n" - ""}, - { (char *)"SoilLayer_get_K", (PyCFunction) _wrap_SoilLayer_get_K, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "SoilLayer_get_K(SoilLayer self, point direction) -> real\n" - "\n" - "virtual real\n" - "get_K(cmf::geometry::point direction) const\n" - "\n" - "Returns the actual anisotropic conductivity along a direction :math:`K = (k_f \\\\cdot d) K`. \n" - ""}, - { (char *)"SoilLayer_anisotropic_kf_set", _wrap_SoilLayer_anisotropic_kf_set, METH_VARARGS, (char *)"SoilLayer_anisotropic_kf_set(SoilLayer self, point anisotropic_kf)"}, - { (char *)"SoilLayer_anisotropic_kf_get", (PyCFunction)_wrap_SoilLayer_anisotropic_kf_get, METH_O, (char *)"SoilLayer_anisotropic_kf_get(SoilLayer self) -> point"}, - { (char *)"SoilLayer_get_capacity", (PyCFunction)_wrap_SoilLayer_get_capacity, METH_O, (char *)"\n" - "SoilLayer_get_capacity(SoilLayer self) -> real\n" - "\n" - "virtual\n" - "real get_capacity() const\n" - "\n" - "Returns the capacity of the water storage in m3. \n" - ""}, - { (char *)"SoilLayer_get_saturated_depth", (PyCFunction)_wrap_SoilLayer_get_saturated_depth, METH_O, (char *)"\n" - "SoilLayer_get_saturated_depth(SoilLayer self) -> real\n" - "\n" - "virtual real get_saturated_depth() const\n" - "\n" - "Returns the depth for saturation \n" - "\n" - ".. math::\n" - "\n" - " z_{sat,this} =\n" - " \\\\left\\\\{z_{cell}-\\\\Psi_{tot} \\\\mbox{ if } W<1 \\\\\\\\\n" - " z_{sat,upper layer} \\\\right. \n" - "\n" - ". \n" - ""}, - { (char *)"SoilLayer_get_flow_crosssection", (PyCFunction) _wrap_SoilLayer_get_flow_crosssection, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "SoilLayer_get_flow_crosssection(SoilLayer self, SoilLayer target, bool HorizontalLayers=False) -> real\n" - "\n" - "real get_flow_crosssection(const cmf::upslope::SoilLayer &target,\n" - "bool HorizontalLayers=false) const\n" - "\n" - "Calculates the shared crosssectional area of this and another soil\n" - "water storage.\n" - "\n" - "If both layers belong to the same cell, the area of the cell is\n" - "returned, if they belong to different cells the area of the vertical\n" - "shared boundary is returned get_area in m2\n" - "\n" - "Parameters:\n" - "-----------\n" - "\n" - "target: The other soil water storage\n" - "\n" - "HorizontalLayers: If true, the layers are assumed to be parallel to\n" - "the gravitational potential, otherwise they are assumed to be parallel\n" - "to the ground topography \n" - ""}, - { (char *)"SoilLayer_cast", (PyCFunction) _wrap_SoilLayer_cast, METH_VARARGS | METH_KEYWORDS, (char *)"SoilLayer_cast(cmf::water::flux_node::ptr node) -> cmf::upslope::SoilLayer::ptr"}, - { (char *)"SoilLayer_gravitational_potential_get", (PyCFunction)_wrap_SoilLayer_gravitational_potential_get, METH_O, (char *)"SoilLayer_gravitational_potential_get(SoilLayer self) -> real"}, - { (char *)"SoilLayer_matrix_potential_get", (PyCFunction)_wrap_SoilLayer_matrix_potential_get, METH_O, (char *)"SoilLayer_matrix_potential_get(SoilLayer self) -> real"}, - { (char *)"SoilLayer_wetness_set", _wrap_SoilLayer_wetness_set, METH_VARARGS, (char *)"SoilLayer_wetness_set(SoilLayer self, real wetness)"}, - { (char *)"SoilLayer_wetness_get", (PyCFunction)_wrap_SoilLayer_wetness_get, METH_O, (char *)"SoilLayer_wetness_get(SoilLayer self) -> real"}, - { (char *)"SoilLayer_theta_set", _wrap_SoilLayer_theta_set, METH_VARARGS, (char *)"SoilLayer_theta_set(SoilLayer self, real theta)"}, - { (char *)"SoilLayer_theta_get", (PyCFunction)_wrap_SoilLayer_theta_get, METH_O, (char *)"SoilLayer_theta_get(SoilLayer self) -> real"}, - { (char *)"SoilLayer_K_get", (PyCFunction)_wrap_SoilLayer_K_get, METH_O, (char *)"SoilLayer_K_get(SoilLayer self) -> real"}, - { (char *)"SoilLayer_Ksat_get", (PyCFunction)_wrap_SoilLayer_Ksat_get, METH_O, (char *)"SoilLayer_Ksat_get(SoilLayer self) -> real"}, - { (char *)"SoilLayer_thickness_get", (PyCFunction)_wrap_SoilLayer_thickness_get, METH_O, (char *)"SoilLayer_thickness_get(SoilLayer self) -> real"}, - { (char *)"SoilLayer_lower_boundary_get", (PyCFunction)_wrap_SoilLayer_lower_boundary_get, METH_O, (char *)"SoilLayer_lower_boundary_get(SoilLayer self) -> real"}, - { (char *)"SoilLayer_upper_boundary_get", (PyCFunction)_wrap_SoilLayer_upper_boundary_get, METH_O, (char *)"SoilLayer_upper_boundary_get(SoilLayer self) -> real"}, - { (char *)"SoilLayer_porosity_get", (PyCFunction)_wrap_SoilLayer_porosity_get, METH_O, (char *)"SoilLayer_porosity_get(SoilLayer self) -> real"}, - { (char *)"SoilLayer_ice_fraction_set", _wrap_SoilLayer_ice_fraction_set, METH_VARARGS, (char *)"SoilLayer_ice_fraction_set(SoilLayer self, real ice_fraction)"}, - { (char *)"SoilLayer_ice_fraction_get", (PyCFunction)_wrap_SoilLayer_ice_fraction_get, METH_O, (char *)"SoilLayer_ice_fraction_get(SoilLayer self) -> real"}, - { (char *)"SoilLayer_rootfraction_set", _wrap_SoilLayer_rootfraction_set, METH_VARARGS, (char *)"SoilLayer_rootfraction_set(SoilLayer self, real rootfraction)"}, - { (char *)"SoilLayer_rootfraction_get", (PyCFunction)_wrap_SoilLayer_rootfraction_get, METH_O, (char *)"SoilLayer_rootfraction_get(SoilLayer self) -> real"}, - { (char *)"delete_SoilLayer", (PyCFunction)_wrap_delete_SoilLayer, METH_O, (char *)"delete_SoilLayer(SoilLayer self)"}, - { (char *)"SoilLayer_swigregister", SoilLayer_swigregister, METH_VARARGS, NULL}, - { (char *)"new_layer_list", _wrap_new_layer_list, METH_VARARGS, (char *)"\n" - "layer_list(layer_list for_copy)\n" - "layer_list()\n" - "new_layer_list(node_list for_copy) -> layer_list\n" - "\n" - "layer_list(const cmf::water::node_list &for_copy)\n" - "\n" - "Creates a list of all soil layers from a node_list. \n" - ""}, - { (char *)"layer_list_pop", (PyCFunction)_wrap_layer_list_pop, METH_O, (char *)"\n" - "layer_list_pop(layer_list self) -> cmf::upslope::SoilLayer::ptr\n" - "\n" - "SoilLayer::ptr\n" - "pop()\n" - "\n" - "Deletes the last layer from the list and returns it. \n" - ""}, - { (char *)"layer_list_append", (PyCFunction) _wrap_layer_list_append, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "layer_list_append(layer_list self, cmf::upslope::SoilLayer::ptr l) -> layer_list\n" - "\n" - "layer_list&\n" - "append(SoilLayer::ptr l)\n" - "\n" - "Appends a soil layer to the list. \n" - ""}, - { (char *)"layer_list_extend", _wrap_layer_list_extend, METH_VARARGS, (char *)"\n" - "extend(layer_list ll) -> layer_list\n" - "layer_list_extend(layer_list self, node_list nl) -> layer_list\n" - "\n" - "layer_list&\n" - "extend(const cmf::water::node_list &nl)\n" - "\n" - "Appends all soil layers from a node_list to this. \n" - ""}, - { (char *)"layer_list_get_slice", (PyCFunction) _wrap_layer_list_get_slice, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "layer_list_get_slice(layer_list self, size_t first=0, size_t last=1000000, size_t step=1) -> layer_list\n" - "\n" - "layer_list get_slice(size_t first=0, size_t last=1000000, size_t\n" - "step=1) \n" - ""}, - { (char *)"layer_list_clear", (PyCFunction)_wrap_layer_list_clear, METH_O, (char *)"\n" - "layer_list_clear(layer_list self)\n" - "\n" - "void clear()\n" - "\n" - "Clears the list. \n" - ""}, - { (char *)"layer_list_size", (PyCFunction)_wrap_layer_list_size, METH_O, (char *)"\n" - "layer_list_size(layer_list self) -> size_t\n" - "\n" - "size_t size()\n" - "const\n" - "\n" - "Number of layers in the list. \n" - ""}, - { (char *)"layer_list_set_wetness", (PyCFunction) _wrap_layer_list_set_wetness, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "layer_list_set_wetness(layer_list self, cmf::math::num_array const & Value, size_t offset=0)\n" - "\n" - "void\n" - "set_wetness(const cmf::math::num_array &Value, size_t offset=0)\n" - "\n" - "Sets the wetness in m3/m3 of layers [offset : arraysize]. \n" - ""}, - { (char *)"layer_list_set_potential", (PyCFunction) _wrap_layer_list_set_potential, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "layer_list_set_potential(layer_list self, cmf::math::num_array const & Value, size_t offset=0)\n" - "\n" - "void\n" - "set_potential(const cmf::math::num_array &Value, size_t offset=0)\n" - "\n" - "Sets the potential (head) in m of layers [offset : arraysize]. \n" - ""}, - { (char *)"layer_list_set_volume", (PyCFunction) _wrap_layer_list_set_volume, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "layer_list_set_volume(layer_list self, cmf::math::num_array const & Value, size_t offset=0)\n" - "\n" - "void\n" - "set_volume(const cmf::math::num_array &Value, size_t offset=0)\n" - "\n" - "Sets the Volume in m3 of layers [offset : arraysize]. \n" - ""}, - { (char *)"layer_list_get_percolation", (PyCFunction) _wrap_layer_list_get_percolation, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "layer_list_get_percolation(layer_list self, Time t) -> cmf::math::num_array\n" - "\n" - "cmf::math::num_array get_percolation(cmf::math::Time t) const\n" - "\n" - "Returns the flux to each layer from the upper layer, or, in case of\n" - "the first layer from the surface water. \n" - ""}, - { (char *)"layer_list_set_theta", (PyCFunction) _wrap_layer_list_set_theta, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "layer_list_set_theta(layer_list self, cmf::math::num_array const & Value, size_t offset=0)\n" - "\n" - "void\n" - "set_theta(const cmf::math::num_array &Value, size_t offset=0)\n" - "\n" - "Sets the volumetric water content of the soil. \n" - ""}, - { (char *)"layer_list_set_ice_fraction", (PyCFunction) _wrap_layer_list_set_ice_fraction, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "layer_list_set_ice_fraction(layer_list self, cmf::math::num_array const & Value, size_t offset=0)\n" - "\n" - "void set_ice_fraction(const cmf::math::num_array &Value, size_t\n" - "offset=0)\n" - "\n" - "Sets the fraction of the ice content of the soil water. \n" - ""}, - { (char *)"layer_list_set_rootfraction", (PyCFunction) _wrap_layer_list_set_rootfraction, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "layer_list_set_rootfraction(layer_list self, cmf::math::num_array const & Value, size_t offset=0)\n" - "\n" - "void set_rootfraction(const cmf::math::num_array &Value, size_t\n" - "offset=0)\n" - "\n" - "Sets the fraction of roots in each layer. \n" - ""}, - { (char *)"layer_list_gravitational_potential_get", (PyCFunction)_wrap_layer_list_gravitational_potential_get, METH_O, (char *)"layer_list_gravitational_potential_get(layer_list self) -> cmf::math::num_array"}, - { (char *)"layer_list_matrix_potential_get", (PyCFunction)_wrap_layer_list_matrix_potential_get, METH_O, (char *)"layer_list_matrix_potential_get(layer_list self) -> cmf::math::num_array"}, - { (char *)"layer_list_wetness_get", (PyCFunction)_wrap_layer_list_wetness_get, METH_O, (char *)"layer_list_wetness_get(layer_list self) -> cmf::math::num_array"}, - { (char *)"layer_list_volume_get", (PyCFunction)_wrap_layer_list_volume_get, METH_O, (char *)"layer_list_volume_get(layer_list self) -> cmf::math::num_array"}, - { (char *)"layer_list_potential_get", (PyCFunction)_wrap_layer_list_potential_get, METH_O, (char *)"layer_list_potential_get(layer_list self) -> cmf::math::num_array"}, - { (char *)"layer_list_K_get", (PyCFunction)_wrap_layer_list_K_get, METH_O, (char *)"layer_list_K_get(layer_list self) -> cmf::math::num_array"}, - { (char *)"layer_list_Ksat_get", (PyCFunction)_wrap_layer_list_Ksat_get, METH_O, (char *)"layer_list_Ksat_get(layer_list self) -> cmf::math::num_array"}, - { (char *)"layer_list_thickness_get", (PyCFunction)_wrap_layer_list_thickness_get, METH_O, (char *)"layer_list_thickness_get(layer_list self) -> cmf::math::num_array"}, - { (char *)"layer_list_lower_boundary_get", (PyCFunction)_wrap_layer_list_lower_boundary_get, METH_O, (char *)"layer_list_lower_boundary_get(layer_list self) -> cmf::math::num_array"}, - { (char *)"layer_list_upper_boundary_get", (PyCFunction)_wrap_layer_list_upper_boundary_get, METH_O, (char *)"layer_list_upper_boundary_get(layer_list self) -> cmf::math::num_array"}, - { (char *)"layer_list_porosity_get", (PyCFunction)_wrap_layer_list_porosity_get, METH_O, (char *)"layer_list_porosity_get(layer_list self) -> cmf::math::num_array"}, - { (char *)"layer_list_ice_fraction_get", (PyCFunction)_wrap_layer_list_ice_fraction_get, METH_O, (char *)"layer_list_ice_fraction_get(layer_list self) -> cmf::math::num_array"}, - { (char *)"layer_list_theta_get", (PyCFunction)_wrap_layer_list_theta_get, METH_O, (char *)"layer_list_theta_get(layer_list self) -> cmf::math::num_array"}, - { (char *)"layer_list_root_get", (PyCFunction)_wrap_layer_list_root_get, METH_O, (char *)"layer_list_root_get(layer_list self) -> cmf::math::num_array"}, - { (char *)"layer_list___get", (PyCFunction) _wrap_layer_list___get, METH_VARARGS | METH_KEYWORDS, (char *)"layer_list___get(layer_list self, int index) -> cmf::upslope::SoilLayer::ptr"}, - { (char *)"delete_layer_list", (PyCFunction)_wrap_delete_layer_list, METH_O, (char *)"delete_layer_list(layer_list self)"}, - { (char *)"layer_list_swigregister", layer_list_swigregister, METH_VARARGS, NULL}, - { (char *)"layer_list_swiginit", layer_list_swiginit, METH_VARARGS, NULL}, - { (char *)"MacroPore_porefraction_min_set", _wrap_MacroPore_porefraction_min_set, METH_VARARGS, (char *)"MacroPore_porefraction_min_set(MacroPore self, real porefraction_min)"}, - { (char *)"MacroPore_porefraction_min_get", (PyCFunction)_wrap_MacroPore_porefraction_min_get, METH_O, (char *)"MacroPore_porefraction_min_get(MacroPore self) -> real"}, - { (char *)"MacroPore_porefraction_max_set", _wrap_MacroPore_porefraction_max_set, METH_VARARGS, (char *)"MacroPore_porefraction_max_set(MacroPore self, real porefraction_max)"}, - { (char *)"MacroPore_porefraction_max_get", (PyCFunction)_wrap_MacroPore_porefraction_max_get, METH_O, (char *)"MacroPore_porefraction_max_get(MacroPore self) -> real"}, - { (char *)"MacroPore___get_layer", (PyCFunction)_wrap_MacroPore___get_layer, METH_O, (char *)"\n" - "MacroPore___get_layer(MacroPore self) -> cmf::upslope::SoilLayer::ptr\n" - "\n" - "SoilLayer::ptr get_layer() const\n" - "\n" - "Gets the soil layer (matrix water storage) for this macropore storage.\n" - "\n" - ""}, - { (char *)"MacroPore_get_porefraction", (PyCFunction)_wrap_MacroPore_get_porefraction, METH_O, (char *)"\n" - "MacroPore_get_porefraction(MacroPore self) -> real\n" - "\n" - "real get_porefraction() const\n" - "\n" - "The fraction of the macro pores in m3/m3. This adds to the porosity of\n" - "the layer. \n" - ""}, - { (char *)"MacroPore_density_set", _wrap_MacroPore_density_set, METH_VARARGS, (char *)"MacroPore_density_set(MacroPore self, real density)"}, - { (char *)"MacroPore_density_get", (PyCFunction)_wrap_MacroPore_density_get, METH_O, (char *)"MacroPore_density_get(MacroPore self) -> real"}, - { (char *)"MacroPore_Ksat_set", _wrap_MacroPore_Ksat_set, METH_VARARGS, (char *)"MacroPore_Ksat_set(MacroPore self, real Ksat)"}, - { (char *)"MacroPore_Ksat_get", (PyCFunction)_wrap_MacroPore_Ksat_get, METH_O, (char *)"MacroPore_Ksat_get(MacroPore self) -> real"}, - { (char *)"MacroPore_crack_wetness_set", _wrap_MacroPore_crack_wetness_set, METH_VARARGS, (char *)"MacroPore_crack_wetness_set(MacroPore self, real crack_wetness)"}, - { (char *)"MacroPore_crack_wetness_get", (PyCFunction)_wrap_MacroPore_crack_wetness_get, METH_O, (char *)"MacroPore_crack_wetness_get(MacroPore self) -> real"}, - { (char *)"MacroPore_get_K", (PyCFunction) _wrap_MacroPore_get_K, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "MacroPore_get_K(MacroPore self, point direction) -> real\n" - "\n" - "virtual real\n" - "get_K(cmf::geometry::point direction) const\n" - "\n" - "Returns the actual anisotropic conductivity along a direction :math:`K = (k_f \\\\cdot d) K`. \n" - ""}, - { (char *)"MacroPore_get_crackwidth", (PyCFunction)_wrap_MacroPore_get_crackwidth, METH_O, (char *)"\n" - "MacroPore_get_crackwidth(MacroPore self) -> real\n" - "\n" - "virtual real get_crackwidth() const\n" - "\n" - "Returns the crack width for a prismatic crackstructure.\n" - "\n" - "For a prismatic crack structure, the porefraction in m3/m3 equals the\n" - "vertical crack area in m2/m2. The length of equally spaced cracks is\n" - "in one direction the inverse of the density and twice the length for\n" - "two directions. \n" - "\n" - ".. math::\n" - "\n" - " l_{crack} [m/m^2]= 2 \\\\frac {1}{d[m]}\n" - "\n" - "If\n" - "we again ignore the fact that the spacing of the cracking crossings is\n" - "counted double, the crack width is: \n" - "\n" - ".. math::\n" - "\n" - " w_{crack}[m] =\n" - " \\\\frac{A_{crack}[m^2/m^2]}{l_{crack}[m/m^2]} \n" - "\n" - "Combining both\n" - "eq. above: \n" - "\n" - ".. math::\n" - "\n" - " w_{crack}[m] = A_{crack}[m^2/m^2]\\\\frac{d[m]}{2}\n" - "\n" - "\n" - "\n" - ""}, - { (char *)"MacroPore_get_flowwidth", (PyCFunction)_wrap_MacroPore_get_flowwidth, METH_O, (char *)"\n" - "MacroPore_get_flowwidth(MacroPore self) -> real\n" - "\n" - "real\n" - "get_flowwidth() const\n" - "\n" - "The approximate length of the aggregate boundaries.\n" - "\n" - "\n" - "\n" - ".. math::\n" - "\n" - " l = \\\\frac{2}{d_{macro}} A\n" - "\n" - "where: :math:`l` is the length of\n" - "the aggregate boundaries (in m)\n" - "\n" - ":math:`2` is the number of directions\n" - "\n" - ":math:`d_{macro}` is the mean distance between macropores (density) in m\n" - "\n" - ":math:`A` is the area of the cell \n" - ""}, - { (char *)"MacroPore_K_shape_set", _wrap_MacroPore_K_shape_set, METH_VARARGS, (char *)"MacroPore_K_shape_set(MacroPore self, real K_shape)"}, - { (char *)"MacroPore_K_shape_get", (PyCFunction)_wrap_MacroPore_K_shape_get, METH_O, (char *)"MacroPore_K_shape_get(MacroPore self) -> real"}, - { (char *)"MacroPore_create", (PyCFunction) _wrap_MacroPore_create, METH_VARARGS | METH_KEYWORDS, (char *)"MacroPore_create(cmf::upslope::SoilLayer::ptr layer, real porefraction=0.05, real Ksat=10, real density=0.05, real porefraction_wilt=-1., real K_shape=0.0) -> cmf::upslope::MacroPore::ptr"}, - { (char *)"MacroPore_cast", (PyCFunction) _wrap_MacroPore_cast, METH_VARARGS | METH_KEYWORDS, (char *)"MacroPore_cast(cmf::water::flux_node::ptr node) -> cmf::upslope::MacroPore::ptr"}, - { (char *)"MacroPore_filled_fraction_get", (PyCFunction)_wrap_MacroPore_filled_fraction_get, METH_O, (char *)"MacroPore_filled_fraction_get(MacroPore self) -> real"}, - { (char *)"MacroPore_K_get", (PyCFunction)_wrap_MacroPore_K_get, METH_O, (char *)"MacroPore_K_get(MacroPore self) -> real"}, - { (char *)"MacroPore_capacity_get", (PyCFunction)_wrap_MacroPore_capacity_get, METH_O, (char *)"MacroPore_capacity_get(MacroPore self) -> real"}, - { (char *)"MacroPore_cell_get", (PyCFunction)_wrap_MacroPore_cell_get, METH_O, (char *)"MacroPore_cell_get(MacroPore self) -> Cell"}, - { (char *)"delete_MacroPore", (PyCFunction)_wrap_delete_MacroPore, METH_O, (char *)"delete_MacroPore(MacroPore self)"}, - { (char *)"MacroPore_swigregister", MacroPore_swigregister, METH_VARARGS, NULL}, - { (char *)"delete_BaseMacroFlow", (PyCFunction)_wrap_delete_BaseMacroFlow, METH_O, (char *)"delete_BaseMacroFlow(BaseMacroFlow self)"}, - { (char *)"BaseMacroFlow_swigregister", BaseMacroFlow_swigregister, METH_VARARGS, NULL}, - { (char *)"new_GradientMacroFlow", (PyCFunction) _wrap_new_GradientMacroFlow, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "new_GradientMacroFlow(cmf::upslope::MacroPore::ptr left, cmf::water::flux_node::ptr right) -> GradientMacroFlow\n" - "\n" - "GradientMacroFlow(cmf::upslope::MacroPore::ptr left,\n" - "cmf::water::flux_node::ptr right) \n" - ""}, - { (char *)"delete_GradientMacroFlow", (PyCFunction)_wrap_delete_GradientMacroFlow, METH_O, (char *)"delete_GradientMacroFlow(GradientMacroFlow self)"}, - { (char *)"GradientMacroFlow_swigregister", GradientMacroFlow_swigregister, METH_VARARGS, NULL}, - { (char *)"GradientMacroFlow_swiginit", GradientMacroFlow_swiginit, METH_VARARGS, NULL}, - { (char *)"new_KinematicMacroFlow", (PyCFunction) _wrap_new_KinematicMacroFlow, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "new_KinematicMacroFlow(cmf::water::WaterStorage::ptr left, cmf::water::flux_node::ptr right, real beta=1.) -> KinematicMacroFlow\n" - "\n" - "KinematicMacroFlow(cmf::water::WaterStorage::ptr left,\n" - "cmf::water::flux_node::ptr right, real beta=1.)\n" - "\n" - "Creates the connection.\n" - "\n" - "Parameters:\n" - "-----------\n" - "\n" - "left: right: the nodes between the connection should be created.\n" - "\n" - "beta: a conceptional curve shape parameter for the relation between\n" - "storage and outflow\n" - "\n" - "Either left or right needs to be a MacroPore, left needs to be a water\n" - "storage \n" - ""}, - { (char *)"delete_KinematicMacroFlow", (PyCFunction)_wrap_delete_KinematicMacroFlow, METH_O, (char *)"delete_KinematicMacroFlow(KinematicMacroFlow self)"}, - { (char *)"KinematicMacroFlow_swigregister", KinematicMacroFlow_swigregister, METH_VARARGS, NULL}, - { (char *)"KinematicMacroFlow_swiginit", KinematicMacroFlow_swiginit, METH_VARARGS, NULL}, - { (char *)"JarvisMacroFlow_beta_set", _wrap_JarvisMacroFlow_beta_set, METH_VARARGS, (char *)"JarvisMacroFlow_beta_set(JarvisMacroFlow self, real beta)"}, - { (char *)"JarvisMacroFlow_beta_get", (PyCFunction)_wrap_JarvisMacroFlow_beta_get, METH_O, (char *)"JarvisMacroFlow_beta_get(JarvisMacroFlow self) -> real"}, - { (char *)"JarvisMacroFlow_porefraction_r_set", _wrap_JarvisMacroFlow_porefraction_r_set, METH_VARARGS, (char *)"JarvisMacroFlow_porefraction_r_set(JarvisMacroFlow self, real porefraction_r)"}, - { (char *)"JarvisMacroFlow_porefraction_r_get", (PyCFunction)_wrap_JarvisMacroFlow_porefraction_r_get, METH_O, (char *)"JarvisMacroFlow_porefraction_r_get(JarvisMacroFlow self) -> real"}, - { (char *)"new_JarvisMacroFlow", (PyCFunction) _wrap_new_JarvisMacroFlow, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "new_JarvisMacroFlow(cmf::water::WaterStorage::ptr left, cmf::water::flux_node::ptr right, real beta=1., real porefraction_r=0.0) -> JarvisMacroFlow\n" - "\n" - "JarvisMacroFlow(cmf::water::WaterStorage::ptr left,\n" - "cmf::water::flux_node::ptr right, real beta=1., real\n" - "porefraction_r=0.0)\n" - "\n" - "Constructs the connection.\n" - "\n" - "Parameters:\n" - "-----------\n" - "\n" - "left: right: the connected macropores\n" - "\n" - "beta: User defined parameter for the swelling reaction\n" - "\n" - "porefraction_r: Porefraction at which flow starts. For swelling soils\n" - "that are closing completely th \n" - ""}, - { (char *)"delete_JarvisMacroFlow", (PyCFunction)_wrap_delete_JarvisMacroFlow, METH_O, (char *)"delete_JarvisMacroFlow(JarvisMacroFlow self)"}, - { (char *)"JarvisMacroFlow_swigregister", JarvisMacroFlow_swigregister, METH_VARARGS, NULL}, - { (char *)"JarvisMacroFlow_swiginit", JarvisMacroFlow_swiginit, METH_VARARGS, NULL}, - { (char *)"new_GradientMacroMicroExchange", (PyCFunction) _wrap_new_GradientMacroMicroExchange, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "new_GradientMacroMicroExchange(cmf::upslope::SoilLayer::ptr left, cmf::upslope::MacroPore::ptr right) -> GradientMacroMicroExchange\n" - "\n" - "GradientMacroMicroExchange(cmf::upslope::SoilLayer::ptr left,\n" - "cmf::upslope::MacroPore::ptr right) \n" - ""}, - { (char *)"delete_GradientMacroMicroExchange", (PyCFunction)_wrap_delete_GradientMacroMicroExchange, METH_O, (char *)"delete_GradientMacroMicroExchange(GradientMacroMicroExchange self)"}, - { (char *)"GradientMacroMicroExchange_swigregister", GradientMacroMicroExchange_swigregister, METH_VARARGS, NULL}, - { (char *)"GradientMacroMicroExchange_swiginit", GradientMacroMicroExchange_swiginit, METH_VARARGS, NULL}, - { (char *)"DiffusiveMacroMicroExchange_omega_set", _wrap_DiffusiveMacroMicroExchange_omega_set, METH_VARARGS, (char *)"DiffusiveMacroMicroExchange_omega_set(DiffusiveMacroMicroExchange self, real omega)"}, - { (char *)"DiffusiveMacroMicroExchange_omega_get", (PyCFunction)_wrap_DiffusiveMacroMicroExchange_omega_get, METH_O, (char *)"DiffusiveMacroMicroExchange_omega_get(DiffusiveMacroMicroExchange self) -> real"}, - { (char *)"DiffusiveMacroMicroExchange_pFrmi_set", _wrap_DiffusiveMacroMicroExchange_pFrmi_set, METH_VARARGS, (char *)"DiffusiveMacroMicroExchange_pFrmi_set(DiffusiveMacroMicroExchange self, real pFrmi)"}, - { (char *)"DiffusiveMacroMicroExchange_pFrmi_get", (PyCFunction)_wrap_DiffusiveMacroMicroExchange_pFrmi_get, METH_O, (char *)"DiffusiveMacroMicroExchange_pFrmi_get(DiffusiveMacroMicroExchange self) -> real"}, - { (char *)"new_DiffusiveMacroMicroExchange", (PyCFunction) _wrap_new_DiffusiveMacroMicroExchange, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "new_DiffusiveMacroMicroExchange(cmf::upslope::MacroPore::ptr left, cmf::upslope::SoilLayer::ptr right, real omega, real pFrmi=4.2) -> DiffusiveMacroMicroExchange\n" - "\n" - "DiffusiveMacroMicroExchange(cmf::upslope::MacroPore::ptr left,\n" - "cmf::upslope::SoilLayer::ptr right, real omega, real pFrmi=4.2) \n" - ""}, - { (char *)"delete_DiffusiveMacroMicroExchange", (PyCFunction)_wrap_delete_DiffusiveMacroMicroExchange, METH_O, (char *)"delete_DiffusiveMacroMicroExchange(DiffusiveMacroMicroExchange self)"}, - { (char *)"DiffusiveMacroMicroExchange_swigregister", DiffusiveMacroMicroExchange_swigregister, METH_VARARGS, NULL}, - { (char *)"DiffusiveMacroMicroExchange_swiginit", DiffusiveMacroMicroExchange_swiginit, METH_VARARGS, NULL}, - { (char *)"MACROlikeMacroMicroExchange_Gf_set", _wrap_MACROlikeMacroMicroExchange_Gf_set, METH_VARARGS, (char *)"MACROlikeMacroMicroExchange_Gf_set(MACROlikeMacroMicroExchange self, real Gf)"}, - { (char *)"MACROlikeMacroMicroExchange_Gf_get", (PyCFunction)_wrap_MACROlikeMacroMicroExchange_Gf_get, METH_O, (char *)"MACROlikeMacroMicroExchange_Gf_get(MACROlikeMacroMicroExchange self) -> real"}, - { (char *)"MACROlikeMacroMicroExchange_gamma_w_set", _wrap_MACROlikeMacroMicroExchange_gamma_w_set, METH_VARARGS, (char *)"MACROlikeMacroMicroExchange_gamma_w_set(MACROlikeMacroMicroExchange self, real gamma_w)"}, - { (char *)"MACROlikeMacroMicroExchange_gamma_w_get", (PyCFunction)_wrap_MACROlikeMacroMicroExchange_gamma_w_get, METH_O, (char *)"MACROlikeMacroMicroExchange_gamma_w_get(MACROlikeMacroMicroExchange self) -> real"}, - { (char *)"new_MACROlikeMacroMicroExchange", (PyCFunction) _wrap_new_MACROlikeMacroMicroExchange, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "new_MACROlikeMacroMicroExchange(cmf::upslope::SoilLayer::ptr left, cmf::upslope::MacroPore::ptr right, real _gamma_w=0.4, real _Gf=3) -> MACROlikeMacroMicroExchange\n" - "\n" - "MACROlikeMacroMicroExchange(cmf::upslope::SoilLayer::ptr left,\n" - "cmf::upslope::MacroPore::ptr right, real _gamma_w=0.4, real _Gf=3) \n" - ""}, - { (char *)"delete_MACROlikeMacroMicroExchange", (PyCFunction)_wrap_delete_MACROlikeMacroMicroExchange, METH_O, (char *)"delete_MACROlikeMacroMicroExchange(MACROlikeMacroMicroExchange self)"}, - { (char *)"MACROlikeMacroMicroExchange_swigregister", MACROlikeMacroMicroExchange_swigregister, METH_VARARGS, NULL}, - { (char *)"MACROlikeMacroMicroExchange_swiginit", MACROlikeMacroMicroExchange_swiginit, METH_VARARGS, NULL}, - { (char *)"IVolumeHeightFunction_h", (PyCFunction) _wrap_IVolumeHeightFunction_h, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "IVolumeHeightFunction_h(IVolumeHeightFunction self, double V) -> double\n" - "\n" - "virtual\n" - "double h(double V) const =0\n" - "\n" - "Returns the depth of a given volume. \n" - ""}, - { (char *)"IVolumeHeightFunction_A", (PyCFunction) _wrap_IVolumeHeightFunction_A, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "IVolumeHeightFunction_A(IVolumeHeightFunction self, double V) -> double\n" - "\n" - "virtual\n" - "double A(double V) const =0\n" - "\n" - "Returns the area of the surface for a given volume. \n" - ""}, - { (char *)"IVolumeHeightFunction_V", (PyCFunction) _wrap_IVolumeHeightFunction_V, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "IVolumeHeightFunction_V(IVolumeHeightFunction self, double h) -> double\n" - "\n" - "virtual\n" - "double V(double h) const =0 \n" - ""}, - { (char *)"IVolumeHeightFunction_copy", (PyCFunction)_wrap_IVolumeHeightFunction_copy, METH_O, (char *)"\n" - "IVolumeHeightFunction_copy(IVolumeHeightFunction self) -> IVolumeHeightFunction\n" - "\n" - "virtual IVolumeHeightFunction* copy() const =0 \n" - ""}, - { (char *)"IVolumeHeightFunction_q", (PyCFunction) _wrap_IVolumeHeightFunction_q, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "IVolumeHeightFunction_q(IVolumeHeightFunction self, double h, double slope) -> double\n" - "\n" - "virtual\n" - "double q(double h, double slope) const \n" - ""}, - { (char *)"delete_IVolumeHeightFunction", (PyCFunction)_wrap_delete_IVolumeHeightFunction, METH_O, (char *)"\n" - "delete_IVolumeHeightFunction(IVolumeHeightFunction self)\n" - "\n" - "virtual\n" - "~IVolumeHeightFunction() \n" - ""}, - { (char *)"IVolumeHeightFunction_swigregister", IVolumeHeightFunction_swigregister, METH_VARARGS, NULL}, - { (char *)"Prism_Area_set", _wrap_Prism_Area_set, METH_VARARGS, (char *)"Prism_Area_set(Prism self, double Area)"}, - { (char *)"Prism_Area_get", (PyCFunction)_wrap_Prism_Area_get, METH_O, (char *)"Prism_Area_get(Prism self) -> double"}, - { (char *)"Prism_RoughThickness_set", _wrap_Prism_RoughThickness_set, METH_VARARGS, (char *)"Prism_RoughThickness_set(Prism self, double RoughThickness)"}, - { (char *)"Prism_RoughThickness_get", (PyCFunction)_wrap_Prism_RoughThickness_get, METH_O, (char *)"Prism_RoughThickness_get(Prism self) -> double"}, - { (char *)"new_Prism", (PyCFunction) _wrap_new_Prism, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "new_Prism(double base_area, double thickness_of_rough_ground=0.01) -> Prism\n" - "\n" - "Prism(double\n" - "base_area, double thickness_of_rough_ground=0.01) \n" - ""}, - { (char *)"Prism_copy", (PyCFunction)_wrap_Prism_copy, METH_O, (char *)"\n" - "Prism_copy(Prism self) -> Prism\n" - "\n" - "Prism* copy() const\n" - "\n" - ""}, - { (char *)"delete_Prism", (PyCFunction)_wrap_delete_Prism, METH_O, (char *)"\n" - "delete_Prism(Prism self)\n" - "\n" - "~Prism() \n" - ""}, - { (char *)"Prism_swigregister", Prism_swigregister, METH_VARARGS, NULL}, - { (char *)"Prism_swiginit", Prism_swiginit, METH_VARARGS, NULL}, - { (char *)"new_volume_height_function", _wrap_new_volume_height_function, METH_VARARGS, (char *)"\n" - "volume_height_function(volume_height_function for_copy)\n" - "new_volume_height_function(IVolumeHeightFunction for_copy) -> volume_height_function\n" - "\n" - "volume_height_function(const IVolumeHeightFunction &for_copy)\n" - "\n" - "Wrapper for any IVolumeHeightFunction. \n" - ""}, - { (char *)"volume_height_function_copy", (PyCFunction)_wrap_volume_height_function_copy, METH_O, (char *)"\n" - "volume_height_function_copy(volume_height_function self) -> volume_height_function\n" - "\n" - "volume_height_function* copy() const \n" - ""}, - { (char *)"delete_volume_height_function", (PyCFunction)_wrap_delete_volume_height_function, METH_O, (char *)"\n" - "delete_volume_height_function(volume_height_function self)\n" - "\n" - "virtual\n" - "~volume_height_function() \n" - ""}, - { (char *)"volume_height_function_swigregister", volume_height_function_swigregister, METH_VARARGS, NULL}, - { (char *)"volume_height_function_swiginit", volume_height_function_swiginit, METH_VARARGS, NULL}, - { (char *)"IChannel_get_nManning", (PyCFunction)_wrap_IChannel_get_nManning, METH_O, (char *)"\n" - "IChannel_get_nManning(IChannel self) -> double\n" - "\n" - "virtual\n" - "double get_nManning() const =0 \n" - ""}, - { (char *)"IChannel_set_nManning", (PyCFunction) _wrap_IChannel_set_nManning, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "IChannel_set_nManning(IChannel self, double val)\n" - "\n" - "virtual\n" - "void set_nManning(double val)=0 \n" - ""}, - { (char *)"IChannel_get_length", (PyCFunction)_wrap_IChannel_get_length, METH_O, (char *)"\n" - "IChannel_get_length(IChannel self) -> double\n" - "\n" - "virtual\n" - "double get_length() const =0\n" - "\n" - "Length of the reach. \n" - ""}, - { (char *)"IChannel_typecode", (PyCFunction)_wrap_IChannel_typecode, METH_O, (char *)"\n" - "IChannel_typecode(IChannel self) -> char\n" - "\n" - "virtual char\n" - "typecode() const =0 \n" - ""}, - { (char *)"IChannel_get_channel_width", (PyCFunction) _wrap_IChannel_get_channel_width, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "IChannel_get_channel_width(IChannel self, double depth) -> double\n" - "\n" - "virtual double get_channel_width(double depth) const =0\n" - "\n" - "Calculates the flow width from a given actual depth [m] using the\n" - "actual IChannel geometry. \n" - ""}, - { (char *)"IChannel_get_wetted_perimeter", (PyCFunction) _wrap_IChannel_get_wetted_perimeter, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "IChannel_get_wetted_perimeter(IChannel self, double depth) -> double\n" - "\n" - "virtual double get_wetted_perimeter(double depth) const =0\n" - "\n" - "Calculates the wetted perimeter from a given actual depth [m] using\n" - "the actual IChannel geometry. \n" - ""}, - { (char *)"IChannel_get_depth", (PyCFunction) _wrap_IChannel_get_depth, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "IChannel_get_depth(IChannel self, double area) -> double\n" - "\n" - "virtual\n" - "double get_depth(double area) const =0\n" - "\n" - "Calculates the actual depth of the reach using the IChannel geometry.\n" - "\n" - "get_depth of the reach [m]\n" - "\n" - "Parameters:\n" - "-----------\n" - "\n" - "area: Wetted area of a river cross section [m2], can be obtained by\n" - "V/l, where V is the stored volume and l is the reach length \n" - ""}, - { (char *)"IChannel_get_flux_crossection", (PyCFunction) _wrap_IChannel_get_flux_crossection, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "IChannel_get_flux_crossection(IChannel self, double depth) -> double\n" - "\n" - "virtual double get_flux_crossection(double depth) const =0\n" - "\n" - "Calculates the wetted area from a given depth using the IChannel\n" - "geometry.\n" - "\n" - "In most cases use get_flux_crossection=V/l, where V is the stored\n" - "volume and l is the reach length Wetted area of a river cross section\n" - "[m2]\n" - "\n" - "Parameters:\n" - "-----------\n" - "\n" - "depth: depth of the reach [m] \n" - ""}, - { (char *)"IChannel_copy", (PyCFunction)_wrap_IChannel_copy, METH_O, (char *)"\n" - "IChannel_copy(IChannel self) -> IChannel\n" - "\n" - "virtual IChannel*\n" - "copy() const =0 \n" - ""}, - { (char *)"IChannel_qManning", (PyCFunction) _wrap_IChannel_qManning, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "IChannel_qManning(IChannel self, double A, double slope) -> double\n" - "\n" - "virtual double\n" - "qManning(double A, double slope) const\n" - "\n" - "Calculates the flow rate from a given water volume in the reach\n" - "\n" - "\n" - ".. math::\n" - "\n" - " q_{Manning}&=& A R^{\\\\frac 2 3}\n" - " \\\\sqrt{\\\\frac {\\\\Delta_z} n} \\\\\\\\ A &=& \\\\frac V l\n" - " \\\\mbox{, (Crosssectional area of the wetted crossection, Volume per\n" - " length)} \\\\\\\\ R &=& \\\\frac A {P(d)} \\\\\\\\ P(d) &=& \\\\mbox{\n" - " the perimeter of the wetted crosssection, a function of reach depth}\n" - " \\\\\\\\ d(V) &=& \\\\mbox{ the depth of the reach a function of the\n" - " volume} \\\\\\\\ \\\\Delta_z &=& \\\\frac{z_{max} - z_{min}}{l}\n" - " \\\\mbox{ Slope of the reach} \n" - "\n" - ".\n" - "\n" - "Flow rate [m3/s]\n" - "\n" - "Parameters:\n" - "-----------\n" - "\n" - "A: The area of the cross section [m2]\n" - "\n" - "slope: The slope of the reach [m/m] \n" - ""}, - { (char *)"delete_IChannel", (PyCFunction)_wrap_delete_IChannel, METH_O, (char *)"\n" - "delete_IChannel(IChannel self)\n" - "\n" - "virtual\n" - "~IChannel() \n" - ""}, - { (char *)"IChannel_swigregister", IChannel_swigregister, METH_VARARGS, NULL}, - { (char *)"SWATReachType_BottomWidth_set", _wrap_SWATReachType_BottomWidth_set, METH_VARARGS, (char *)"SWATReachType_BottomWidth_set(SWATReachType self, double BottomWidth)"}, - { (char *)"SWATReachType_BottomWidth_get", (PyCFunction)_wrap_SWATReachType_BottomWidth_get, METH_O, (char *)"SWATReachType_BottomWidth_get(SWATReachType self) -> double"}, - { (char *)"SWATReachType_ChannelDepth_set", _wrap_SWATReachType_ChannelDepth_set, METH_VARARGS, (char *)"SWATReachType_ChannelDepth_set(SWATReachType self, double ChannelDepth)"}, - { (char *)"SWATReachType_ChannelDepth_get", (PyCFunction)_wrap_SWATReachType_ChannelDepth_get, METH_O, (char *)"SWATReachType_ChannelDepth_get(SWATReachType self) -> double"}, - { (char *)"SWATReachType_BankSlope_set", _wrap_SWATReachType_BankSlope_set, METH_VARARGS, (char *)"SWATReachType_BankSlope_set(SWATReachType self, double BankSlope)"}, - { (char *)"SWATReachType_BankSlope_get", (PyCFunction)_wrap_SWATReachType_BankSlope_get, METH_O, (char *)"SWATReachType_BankSlope_get(SWATReachType self) -> double"}, - { (char *)"SWATReachType_FloodPlainSlope_set", _wrap_SWATReachType_FloodPlainSlope_set, METH_VARARGS, (char *)"SWATReachType_FloodPlainSlope_set(SWATReachType self, double FloodPlainSlope)"}, - { (char *)"SWATReachType_FloodPlainSlope_get", (PyCFunction)_wrap_SWATReachType_FloodPlainSlope_get, METH_O, (char *)"SWATReachType_FloodPlainSlope_get(SWATReachType self) -> double"}, - { (char *)"new_SWATReachType", _wrap_new_SWATReachType, METH_VARARGS, (char *)"\n" - "SWATReachType(SWATReachType copy)\n" - "SWATReachType(double l)\n" - "new_SWATReachType(double l, double BankWidth, double Depth) -> SWATReachType\n" - "\n" - "SWATReachType(double l, double BankWidth, double Depth)\n" - "\n" - "Creates a new reach structure from a give width and depth.\n" - "\n" - "Parameters:\n" - "-----------\n" - "\n" - "l: length of the channel [m]\n" - "\n" - "BankWidth: get_channel_width of the reach from bank to bank [m]\n" - "\n" - "Depth: Depth of the reach [m] \n" - ""}, - { (char *)"SWATReachType_copy", (PyCFunction)_wrap_SWATReachType_copy, METH_O, (char *)"\n" - "SWATReachType_copy(SWATReachType self) -> SWATReachType\n" - "\n" - "SWATReachType* copy() const \n" - ""}, - { (char *)"delete_SWATReachType", (PyCFunction)_wrap_delete_SWATReachType, METH_O, (char *)"\n" - "delete_SWATReachType(SWATReachType self)\n" - "\n" - "virtual ~SWATReachType() \n" - ""}, - { (char *)"SWATReachType_swigregister", SWATReachType_swigregister, METH_VARARGS, NULL}, - { (char *)"SWATReachType_swiginit", SWATReachType_swiginit, METH_VARARGS, NULL}, - { (char *)"TriangularReach_BankSlope_set", _wrap_TriangularReach_BankSlope_set, METH_VARARGS, (char *)"TriangularReach_BankSlope_set(TriangularReach self, double BankSlope)"}, - { (char *)"TriangularReach_BankSlope_get", (PyCFunction)_wrap_TriangularReach_BankSlope_get, METH_O, (char *)"TriangularReach_BankSlope_get(TriangularReach self) -> double"}, - { (char *)"new_TriangularReach", _wrap_new_TriangularReach, METH_VARARGS, (char *)"\n" - "TriangularReach(double l, double bankSlope=2)\n" - "new_TriangularReach(TriangularReach copy) -> TriangularReach\n" - "\n" - "TriangularReach(const TriangularReach ©) \n" - ""}, - { (char *)"TriangularReach_copy", (PyCFunction)_wrap_TriangularReach_copy, METH_O, (char *)"\n" - "TriangularReach_copy(TriangularReach self) -> TriangularReach\n" - "\n" - "TriangularReach* copy() const \n" - ""}, - { (char *)"delete_TriangularReach", (PyCFunction)_wrap_delete_TriangularReach, METH_O, (char *)"\n" - "delete_TriangularReach(TriangularReach self)\n" - "\n" - "virtual ~TriangularReach() \n" - ""}, - { (char *)"TriangularReach_swigregister", TriangularReach_swigregister, METH_VARARGS, NULL}, - { (char *)"TriangularReach_swiginit", TriangularReach_swiginit, METH_VARARGS, NULL}, - { (char *)"new_RectangularReach", _wrap_new_RectangularReach, METH_VARARGS, (char *)"\n" - "RectangularReach(double l, double width)\n" - "new_RectangularReach(RectangularReach copy) -> RectangularReach\n" - "\n" - "RectangularReach(const RectangularReach ©) \n" - ""}, - { (char *)"RectangularReach_copy", (PyCFunction)_wrap_RectangularReach_copy, METH_O, (char *)"\n" - "RectangularReach_copy(RectangularReach self) -> RectangularReach\n" - "\n" - "RectangularReach* copy() const \n" - ""}, - { (char *)"delete_RectangularReach", (PyCFunction)_wrap_delete_RectangularReach, METH_O, (char *)"\n" - "delete_RectangularReach(RectangularReach self)\n" - "\n" - "virtual ~RectangularReach() \n" - ""}, - { (char *)"RectangularReach_swigregister", RectangularReach_swigregister, METH_VARARGS, NULL}, - { (char *)"RectangularReach_swiginit", RectangularReach_swiginit, METH_VARARGS, NULL}, - { (char *)"PipeReach_radius_set", _wrap_PipeReach_radius_set, METH_VARARGS, (char *)"PipeReach_radius_set(PipeReach self, double radius)"}, - { (char *)"PipeReach_radius_get", (PyCFunction)_wrap_PipeReach_radius_get, METH_O, (char *)"PipeReach_radius_get(PipeReach self) -> double"}, - { (char *)"new_PipeReach", _wrap_new_PipeReach, METH_VARARGS, (char *)"\n" - "PipeReach(double l, double diameter)\n" - "new_PipeReach(PipeReach copy) -> PipeReach\n" - "\n" - "PipeReach(const PipeReach ©) \n" - ""}, - { (char *)"PipeReach_copy", (PyCFunction)_wrap_PipeReach_copy, METH_O, (char *)"\n" - "PipeReach_copy(PipeReach self) -> PipeReach\n" - "\n" - "PipeReach* copy()\n" - "const \n" - ""}, - { (char *)"delete_PipeReach", (PyCFunction)_wrap_delete_PipeReach, METH_O, (char *)"\n" - "delete_PipeReach(PipeReach self)\n" - "\n" - "virtual\n" - "~PipeReach() \n" - ""}, - { (char *)"PipeReach_swigregister", PipeReach_swigregister, METH_VARARGS, NULL}, - { (char *)"PipeReach_swiginit", PipeReach_swiginit, METH_VARARGS, NULL}, - { (char *)"new_Channel", _wrap_new_Channel, METH_VARARGS, (char *)"\n" - "Channel()\n" - "Channel(double length)\n" - "Channel(IChannel for_wrapping)\n" - "Channel(IVolumeHeightFunction for_casting)\n" - "Channel(Channel for_copy)\n" - "new_Channel(char typecode, double length, double width=1., double depth=0.25) -> Channel\n" - "\n" - "Channel(char\n" - "typecode, double length, double width=1., double depth=0.25)\n" - "\n" - "Creates a reachtype using a short cut character.\n" - "\n" - "Acceptes one of the following characters: 'T' TriangularReach, width\n" - "and depth are ignored.\n" - "\n" - "'R' RectangularReach, depth is ignored\n" - "\n" - "'P' PipeReach, depth is ignored, width is the diameter of the pipe\n" - "\n" - "'S' SWATReachType, a trapezoid flow cross section, as used in the SWAT\n" - "model, width (bank width) and depth are used the reach type\n" - "\n" - "Parameters:\n" - "-----------\n" - "\n" - "typecode: Describes the geometry of the reach cross section.\n" - "\n" - "length: The length of the channel in m\n" - "\n" - "width: width of the reach cross section in m (ignored for typecode\n" - "'T')\n" - "\n" - "depth: depth of the reach (ignored for typecode 'T','R','P','S') \n" - ""}, - { (char *)"Channel_copy", (PyCFunction)_wrap_Channel_copy, METH_O, (char *)"\n" - "Channel_copy(Channel self) -> Channel\n" - "\n" - "Channel* copy()\n" - "const \n" - ""}, - { (char *)"delete_Channel", (PyCFunction)_wrap_delete_Channel, METH_O, (char *)"\n" - "delete_Channel(Channel self)\n" - "\n" - "virtual\n" - "~Channel() \n" - ""}, - { (char *)"Channel_swigregister", Channel_swigregister, METH_VARARGS, NULL}, - { (char *)"Channel_swiginit", Channel_swiginit, METH_VARARGS, NULL}, - { (char *)"new_MeanChannel", _wrap_new_MeanChannel, METH_VARARGS, (char *)"\n" - "MeanChannel(IChannel channel1, IChannel channel2)\n" - "new_MeanChannel(MeanChannel meanChannel) -> MeanChannel\n" - "\n" - "MeanChannel(const MeanChannel &meanChannel) \n" - ""}, - { (char *)"MeanChannel_copy", (PyCFunction)_wrap_MeanChannel_copy, METH_O, (char *)"\n" - "MeanChannel_copy(MeanChannel self) -> MeanChannel\n" - "\n" - "MeanChannel*\n" - "copy() const \n" - ""}, - { (char *)"delete_MeanChannel", (PyCFunction)_wrap_delete_MeanChannel, METH_O, (char *)"\n" - "delete_MeanChannel(MeanChannel self)\n" - "\n" - "virtual\n" - "~MeanChannel() \n" - ""}, - { (char *)"MeanChannel_swigregister", MeanChannel_swigregister, METH_VARARGS, NULL}, - { (char *)"MeanChannel_swiginit", MeanChannel_swiginit, METH_VARARGS, NULL}, - { (char *)"OpenWaterStorage_get_height_function", (PyCFunction)_wrap_OpenWaterStorage_get_height_function, METH_O, (char *)"\n" - "OpenWaterStorage_get_height_function(OpenWaterStorage self) -> IVolumeHeightFunction\n" - "\n" - "virtual const\n" - "IVolumeHeightFunction& get_height_function() const\n" - "\n" - "The functional relation between volume, depth and exposed area. \n" - ""}, - { (char *)"OpenWaterStorage_set_height_function", (PyCFunction) _wrap_OpenWaterStorage_set_height_function, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "OpenWaterStorage_set_height_function(OpenWaterStorage self, IVolumeHeightFunction val)\n" - "\n" - "virtual void\n" - "set_height_function(const IVolumeHeightFunction &val) \n" - ""}, - { (char *)"OpenWaterStorage_wet_area", (PyCFunction)_wrap_OpenWaterStorage_wet_area, METH_O, (char *)"\n" - "OpenWaterStorage_wet_area(OpenWaterStorage self) -> real\n" - "\n" - "real\n" - "wet_area() const\n" - "\n" - "Returns the exposed surface area in m2. \n" - ""}, - { (char *)"OpenWaterStorage_create", _wrap_OpenWaterStorage_create, METH_VARARGS, (char *)"\n" - "create(project _project, real Area) -> cmf::river::OpenWaterStorage::ptr\n" - "OpenWaterStorage_create(project _project, IVolumeHeightFunction base_geo) -> cmf::river::OpenWaterStorage::ptr\n" - ""}, - { (char *)"OpenWaterStorage_cast", (PyCFunction) _wrap_OpenWaterStorage_cast, METH_VARARGS | METH_KEYWORDS, (char *)"OpenWaterStorage_cast(cmf::water::flux_node::ptr node) -> cmf::river::OpenWaterStorage::ptr"}, - { (char *)"OpenWaterStorage_depth_set", _wrap_OpenWaterStorage_depth_set, METH_VARARGS, (char *)"OpenWaterStorage_depth_set(OpenWaterStorage self, real depth)"}, - { (char *)"OpenWaterStorage_depth_get", (PyCFunction)_wrap_OpenWaterStorage_depth_get, METH_O, (char *)"OpenWaterStorage_depth_get(OpenWaterStorage self) -> real"}, - { (char *)"delete_OpenWaterStorage", (PyCFunction)_wrap_delete_OpenWaterStorage, METH_O, (char *)"delete_OpenWaterStorage(OpenWaterStorage self)"}, - { (char *)"OpenWaterStorage_swigregister", OpenWaterStorage_swigregister, METH_VARARGS, NULL}, - { (char *)"Reach_get_reachtype", (PyCFunction)_wrap_Reach_get_reachtype, METH_O, (char *)"\n" - "Reach_get_reachtype(Reach self) -> Channel\n" - "\n" - "Channel\n" - "get_reachtype() const\n" - "\n" - "Returns the channel shape. \n" - ""}, - { (char *)"Reach_set_height_function", (PyCFunction) _wrap_Reach_set_height_function, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "Reach_set_height_function(Reach self, IChannel val)\n" - "\n" - "void\n" - "set_height_function(const IChannel &val)\n" - "\n" - "Sets the channel shape. \n" - ""}, - { (char *)"Reach_set_outlet", (PyCFunction) _wrap_Reach_set_outlet, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "Reach_set_outlet(Reach self, cmf::water::flux_node::ptr outlet)\n" - "\n" - "void\n" - "set_outlet(cmf::water::flux_node::ptr outlet)\n" - "\n" - "Connects the reach to an outlet, e.g. a boundary condition. \n" - ""}, - { (char *)"Reach_set_dead_end", (PyCFunction)_wrap_Reach_set_dead_end, METH_O, (char *)"\n" - "Reach_set_dead_end(Reach self)\n" - "\n" - "void\n" - "set_dead_end()\n" - "\n" - "Deletes any downstream connection. \n" - ""}, - { (char *)"Reach_set_downstream", (PyCFunction) _wrap_Reach_set_downstream, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "Reach_set_downstream(Reach self, cmf::river::Reach::ptr new_downstream, bool use_meanchannel=False)\n" - "\n" - "void\n" - "set_downstream(ptr new_downstream, bool use_meanchannel=false)\n" - "\n" - "Connects the reach to another one downstream. \n" - ""}, - { (char *)"Reach___get_downstream", (PyCFunction)_wrap_Reach___get_downstream, METH_O, (char *)"\n" - "Reach___get_downstream(Reach self) -> cmf::water::flux_node::ptr\n" - "\n" - "cmf::water::flux_node::ptr get_downstream() const\n" - "\n" - "Returns the reach downstream of this (or null if there is no reach\n" - "downstream) \n" - ""}, - { (char *)"Reach_get_upstream", (PyCFunction) _wrap_Reach_get_upstream, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "Reach_get_upstream(Reach self, int index) -> cmf::river::Reach::ptr\n" - "\n" - "ptr\n" - "get_upstream(int index) const\n" - "\n" - "Returns a reach upstream of this. \n" - ""}, - { (char *)"Reach_connect_to_surfacewater", (PyCFunction) _wrap_Reach_connect_to_surfacewater, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "Reach_connect_to_surfacewater(Reach self, Cell cell, real width, bool diffusive)\n" - "\n" - "void connect_to_surfacewater(cmf::upslope::Cell *cell, real width,\n" - "bool diffusive)\n" - "\n" - "Connects the surfacewater of a cell with this reach.\n" - "\n" - "Parameters:\n" - "-----------\n" - "\n" - "cell: The cell with the surface water to be connected with this reach\n" - "\n" - "width: The flow width from cell to this reach\n" - "\n" - "diffusive: If diffusive is false, a ManningKinematic connection is\n" - "used, else a ManningDiffusive connection \n" - ""}, - { (char *)"Reach_distance_to_cell", (PyCFunction) _wrap_Reach_distance_to_cell, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "Reach_distance_to_cell(Reach self, Cell cell) -> double\n" - "\n" - "double\n" - "distance_to_cell(cmf::upslope::Cell *cell) const\n" - "\n" - "Returns the distance (d) for connections between this reach and a\n" - "cell.\n" - "\n" - "If the effective inner cell distance (defined as :math:`R_{Cell} = 0.5\\\\frac{\\\\sqrt{A}}{\\\\pi}`) is smaller than the distance\n" - "between the center points, the cell radius is returned \n" - ""}, - { (char *)"Reach___get_root", (PyCFunction)_wrap_Reach___get_root, METH_O, (char *)"\n" - "Reach___get_root(Reach self) -> cmf::river::Reach::ptr\n" - "\n" - "ptr get_root()\n" - "\n" - "Returns the reach most downstream from this reach. \n" - ""}, - { (char *)"delete_Reach", (PyCFunction)_wrap_delete_Reach, METH_O, (char *)"\n" - "delete_Reach(Reach self)\n" - "\n" - "virtual ~Reach() \n" - ""}, - { (char *)"Reach_create", (PyCFunction) _wrap_Reach_create, METH_VARARGS | METH_KEYWORDS, (char *)"Reach_create(project project, IChannel shape, bool diffusive=False) -> cmf::river::Reach::ptr"}, - { (char *)"Reach_length_get", (PyCFunction)_wrap_Reach_length_get, METH_O, (char *)"Reach_length_get(Reach self) -> real"}, - { (char *)"Reach_width_get", (PyCFunction)_wrap_Reach_width_get, METH_O, (char *)"Reach_width_get(Reach self) -> real"}, - { (char *)"Reach_channel_get", (PyCFunction)_wrap_Reach_channel_get, METH_O, (char *)"Reach_channel_get(Reach self) -> IChannel"}, - { (char *)"Reach_upstream_count_get", (PyCFunction)_wrap_Reach_upstream_count_get, METH_O, (char *)"\n" - "Reach_upstream_count_get(Reach self) -> int\n" - "\n" - "int\n" - "upstream_count() const\n" - "\n" - "Returns the number of reaches upstream of this. \n" - ""}, - { (char *)"Reach_diffusive_set", _wrap_Reach_diffusive_set, METH_VARARGS, (char *)"Reach_diffusive_set(Reach self, bool diffusive)"}, - { (char *)"Reach_diffusive_get", (PyCFunction)_wrap_Reach_diffusive_get, METH_O, (char *)"Reach_diffusive_get(Reach self) -> bool"}, - { (char *)"Reach_swigregister", Reach_swigregister, METH_VARARGS, NULL}, - { (char *)"ReachIterator_next", (PyCFunction)_wrap_ReachIterator_next, METH_O, (char *)"\n" - "ReachIterator_next(ReachIterator self) -> cmf::river::Reach::ptr\n" - "\n" - "Reach::ptr\n" - "next()\n" - "\n" - "Returns the next reach in the upstream queue. \n" - ""}, - { (char *)"ReachIterator_valid", (PyCFunction)_wrap_ReachIterator_valid, METH_O, (char *)"\n" - "ReachIterator_valid(ReachIterator self) -> bool\n" - "\n" - "bool valid()\n" - "const\n" - "\n" - "Returns true, if reaches are left to iterate over. \n" - ""}, - { (char *)"new_ReachIterator", (PyCFunction) _wrap_new_ReachIterator, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "new_ReachIterator(cmf::river::Reach::ptr first) -> ReachIterator\n" - "\n" - "ReachIterator(Reach::ptr first)\n" - "\n" - "Creates a ReachIterator from a first reach. \n" - ""}, - { (char *)"ReachIterator___reach", (PyCFunction)_wrap_ReachIterator___reach, METH_O, (char *)"\n" - "ReachIterator___reach(ReachIterator self) -> cmf::river::Reach::ptr\n" - "\n" - "Reach::ptr\n" - "reach() const\n" - "\n" - "Returns the current reach. \n" - ""}, - { (char *)"ReachIterator_position_get", (PyCFunction)_wrap_ReachIterator_position_get, METH_O, (char *)"\n" - "ReachIterator_position_get(ReachIterator self) -> double\n" - "\n" - "double\n" - "position() const\n" - "\n" - "Returns the distance to the root reach. \n" - ""}, - { (char *)"delete_ReachIterator", (PyCFunction)_wrap_delete_ReachIterator, METH_O, (char *)"delete_ReachIterator(ReachIterator self)"}, - { (char *)"ReachIterator_swigregister", ReachIterator_swigregister, METH_VARARGS, NULL}, - { (char *)"ReachIterator_swiginit", ReachIterator_swiginit, METH_VARARGS, NULL}, - { (char *)"make_river_gap", (PyCFunction) _wrap_make_river_gap, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "make_river_gap(cmf::river::Reach::ptr root_reach) -> double\n" - "\n" - "double\n" - "cmf::river::make_river_gap(Reach::ptr root_reach)\n" - "\n" - "Ensures that rivers have a monotone downward flow direction.\n" - "\n" - "Reaches with a bottom higher than any upstream reach are lowered to\n" - "the minimum height of any (possibly distant) upstream reach. \n" - ""}, - { (char *)"SurfaceWater_get_height_function", (PyCFunction)_wrap_SurfaceWater_get_height_function, METH_O, (char *)"\n" - "SurfaceWater_get_height_function(SurfaceWater self) -> Prism\n" - "\n" - "virtual const cmf::river::Prism& get_height_function() const\n" - "\n" - "Gets the height function (a cmf::river::Prism) for further reference.\n" - "\n" - ""}, - { (char *)"SurfaceWater_get_cell", (PyCFunction)_wrap_SurfaceWater_get_cell, METH_O, (char *)"\n" - "SurfaceWater_get_cell(SurfaceWater self) -> Cell\n" - "\n" - "Cell&\n" - "get_cell() const\n" - "\n" - "Get the cell of the surface. \n" - ""}, - { (char *)"SurfaceWater_cast", (PyCFunction) _wrap_SurfaceWater_cast, METH_VARARGS | METH_KEYWORDS, (char *)"SurfaceWater_cast(cmf::water::flux_node::ptr node) -> cmf::upslope::SurfaceWater::ptr"}, - { (char *)"SurfaceWater_puddledepth_set", _wrap_SurfaceWater_puddledepth_set, METH_VARARGS, (char *)"SurfaceWater_puddledepth_set(SurfaceWater self, real puddledepth)"}, - { (char *)"SurfaceWater_puddledepth_get", (PyCFunction)_wrap_SurfaceWater_puddledepth_get, METH_O, (char *)"SurfaceWater_puddledepth_get(SurfaceWater self) -> real"}, - { (char *)"SurfaceWater_nManning_set", _wrap_SurfaceWater_nManning_set, METH_VARARGS, (char *)"SurfaceWater_nManning_set(SurfaceWater self, real nManning)"}, - { (char *)"SurfaceWater_nManning_get", (PyCFunction)_wrap_SurfaceWater_nManning_get, METH_O, (char *)"SurfaceWater_nManning_get(SurfaceWater self) -> real"}, - { (char *)"delete_SurfaceWater", (PyCFunction)_wrap_delete_SurfaceWater, METH_O, (char *)"delete_SurfaceWater(SurfaceWater self)"}, - { (char *)"SurfaceWater_swigregister", SurfaceWater_swigregister, METH_VARARGS, NULL}, - { (char *)"new_KinematicSurfaceRunoff", (PyCFunction) _wrap_new_KinematicSurfaceRunoff, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "new_KinematicSurfaceRunoff(cmf::upslope::SurfaceWater::ptr left, cmf::water::flux_node::ptr right, real flowwidth, real distance=-1) -> KinematicSurfaceRunoff\n" - "\n" - "KinematicSurfaceRunoff(cmf::upslope::SurfaceWater::ptr left,\n" - "cmf::water::flux_node::ptr right, real flowwidth, real distance=-1)\n" - "\n" - "Creates a KinematicSurfaceRunoff between a SurfaceWater (left) with\n" - "another (right) node.\n" - "\n" - "Parameters:\n" - "-----------\n" - "\n" - "left: A surfacewater storage\n" - "\n" - "right: The target node\n" - "\n" - "flowwidth: the length of the shared boundary between left and right\n" - "in m\n" - "\n" - "distance: the distance between left and right in m. If d<=0m, the\n" - "distance is calculated according to the position of left and right \n" - ""}, - { (char *)"delete_KinematicSurfaceRunoff", (PyCFunction)_wrap_delete_KinematicSurfaceRunoff, METH_O, (char *)"delete_KinematicSurfaceRunoff(KinematicSurfaceRunoff self)"}, - { (char *)"KinematicSurfaceRunoff_swigregister", KinematicSurfaceRunoff_swigregister, METH_VARARGS, NULL}, - { (char *)"KinematicSurfaceRunoff_swiginit", KinematicSurfaceRunoff_swiginit, METH_VARARGS, NULL}, - { (char *)"DiffusiveSurfaceRunoff_set_linear_slope", (PyCFunction) _wrap_DiffusiveSurfaceRunoff_set_linear_slope, METH_VARARGS | METH_KEYWORDS, (char *)"DiffusiveSurfaceRunoff_set_linear_slope(real width)"}, - { (char *)"DiffusiveSurfaceRunoff_get_linear_slope", (PyCFunction)_wrap_DiffusiveSurfaceRunoff_get_linear_slope, METH_NOARGS, (char *)"DiffusiveSurfaceRunoff_get_linear_slope() -> real"}, - { (char *)"new_DiffusiveSurfaceRunoff", (PyCFunction) _wrap_new_DiffusiveSurfaceRunoff, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "new_DiffusiveSurfaceRunoff(cmf::upslope::SurfaceWater::ptr left, cmf::water::flux_node::ptr right, real flowwidth, real distance=-1) -> DiffusiveSurfaceRunoff\n" - "\n" - "DiffusiveSurfaceRunoff(cmf::upslope::SurfaceWater::ptr left,\n" - "cmf::water::flux_node::ptr right, real flowwidth, real distance=-1) \n" - ""}, - { (char *)"delete_DiffusiveSurfaceRunoff", (PyCFunction)_wrap_delete_DiffusiveSurfaceRunoff, METH_O, (char *)"delete_DiffusiveSurfaceRunoff(DiffusiveSurfaceRunoff self)"}, - { (char *)"DiffusiveSurfaceRunoff_swigregister", DiffusiveSurfaceRunoff_swigregister, METH_VARARGS, NULL}, - { (char *)"DiffusiveSurfaceRunoff_swiginit", DiffusiveSurfaceRunoff_swiginit, METH_VARARGS, NULL}, - { (char *)"aquifer_area_set", _wrap_aquifer_area_set, METH_VARARGS, (char *)"aquifer_area_set(aquifer self, real area)"}, - { (char *)"aquifer_area_get", (PyCFunction)_wrap_aquifer_area_get, METH_O, (char *)"aquifer_area_get(aquifer self) -> real"}, - { (char *)"aquifer_thickness_set", _wrap_aquifer_thickness_set, METH_VARARGS, (char *)"aquifer_thickness_set(aquifer self, real thickness)"}, - { (char *)"aquifer_thickness_get", (PyCFunction)_wrap_aquifer_thickness_get, METH_O, (char *)"aquifer_thickness_get(aquifer self) -> real"}, - { (char *)"aquifer_porosity_set", _wrap_aquifer_porosity_set, METH_VARARGS, (char *)"aquifer_porosity_set(aquifer self, real porosity)"}, - { (char *)"aquifer_porosity_get", (PyCFunction)_wrap_aquifer_porosity_get, METH_O, (char *)"aquifer_porosity_get(aquifer self) -> real"}, - { (char *)"aquifer_K_set", _wrap_aquifer_K_set, METH_VARARGS, (char *)"aquifer_K_set(aquifer self, point K)"}, - { (char *)"aquifer_K_get", (PyCFunction)_wrap_aquifer_K_get, METH_O, (char *)"aquifer_K_get(aquifer self) -> point"}, - { (char *)"aquifer_get_K", (PyCFunction) _wrap_aquifer_get_K, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "aquifer_get_K(aquifer self, point direction) -> real\n" - "\n" - "virtual real\n" - "get_K(cmf::geometry::point direction) const\n" - "\n" - "Returns the conductivity in m/day for a specific direction.\n" - "\n" - "Takes account for anisotropy \n" - "\n" - ".. math::\n" - "\n" - " \\\\|K\\\\|(d) =\n" - " \\\\frac{d}{\\\\|d\\\\|} \\\\bullet K\n" - "\n" - "\n" - ""}, - { (char *)"aquifer_get_abs_errtol", (PyCFunction) _wrap_aquifer_get_abs_errtol, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "aquifer_get_abs_errtol(aquifer self, real rel_errtol) -> real\n" - "\n" - "virtual\n" - "real get_abs_errtol(real rel_errtol) const \n" - ""}, - { (char *)"new_aquifer", _wrap_new_aquifer, METH_VARARGS, (char *)"\n" - "aquifer(project p, point position, real area, real thickness, real porosity, real K=1e-4)\n" - "new_aquifer(cell_vector cells, real thickness, real porosity, real K=1e-4) -> aquifer\n" - "\n" - "aquifer(cmf::upslope::cell_vector &cells, real thickness, real\n" - "porosity, real K=1e-4)\n" - "\n" - "Creates an aquifer below a collection of cells.\n" - "\n" - "Parameters:\n" - "-----------\n" - "\n" - "cells: The cells above the aquifer. The area of the aquifer equals\n" - "the area of the cells, and the upper boundary equals the soildepth of\n" - "the lowest cell\n" - "\n" - "thickness: The thickness of the aquifer in m\n" - "\n" - "porosity: Porosity of the aquifer\n" - "\n" - "K: Conductivity of the aquifer in m/day. If the conductivity should\n" - "be anisotropic, change the x,y and z values of the member K \n" - ""}, - { (char *)"aquifer_cast", (PyCFunction) _wrap_aquifer_cast, METH_VARARGS | METH_KEYWORDS, (char *)"aquifer_cast(cmf::water::flux_node::ptr for_cast) -> cmf::upslope::aquifer::ptr"}, - { (char *)"aquifer_base_height_get", (PyCFunction)_wrap_aquifer_base_height_get, METH_O, (char *)"aquifer_base_height_get(aquifer self) -> double"}, - { (char *)"aquifer_top_height_get", (PyCFunction)_wrap_aquifer_top_height_get, METH_O, (char *)"aquifer_top_height_get(aquifer self) -> double"}, - { (char *)"delete_aquifer", (PyCFunction)_wrap_delete_aquifer, METH_O, (char *)"delete_aquifer(aquifer self)"}, - { (char *)"aquifer_swigregister", aquifer_swigregister, METH_VARARGS, NULL}, - { (char *)"aquifer_swiginit", aquifer_swiginit, METH_VARARGS, NULL}, - { (char *)"aquifer_Darcy_flux_width_set", _wrap_aquifer_Darcy_flux_width_set, METH_VARARGS, (char *)"aquifer_Darcy_flux_width_set(aquifer_Darcy self, real flux_width)"}, - { (char *)"aquifer_Darcy_flux_width_get", (PyCFunction)_wrap_aquifer_Darcy_flux_width_get, METH_O, (char *)"aquifer_Darcy_flux_width_get(aquifer_Darcy self) -> real"}, - { (char *)"new_aquifer_Darcy", (PyCFunction) _wrap_new_aquifer_Darcy, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "new_aquifer_Darcy(cmf::upslope::aquifer::ptr left, cmf::water::flux_node::ptr right, real width) -> aquifer_Darcy\n" - "\n" - "aquifer_Darcy(aquifer::ptr left, cmf::water::flux_node::ptr right,\n" - "real width)\n" - "\n" - "Creates a new Darcy flow connection between two aquifers, or an\n" - "aquifer and another node acting as Dirichlet boundary condition.\n" - "\n" - "Parameters:\n" - "-----------\n" - "\n" - "left: One aquifer\n" - "\n" - "right: Another aquifer, or a flux node that can be interpreted as an\n" - "Dirichlet boundary\n" - "\n" - "width: Width of the connection \n" - ""}, - { (char *)"delete_aquifer_Darcy", (PyCFunction)_wrap_delete_aquifer_Darcy, METH_O, (char *)"delete_aquifer_Darcy(aquifer_Darcy self)"}, - { (char *)"aquifer_Darcy_swigregister", aquifer_Darcy_swigregister, METH_VARARGS, NULL}, - { (char *)"aquifer_Darcy_swiginit", aquifer_Darcy_swiginit, METH_VARARGS, NULL}, - { (char *)"delete_lateral_sub_surface_flux", (PyCFunction)_wrap_delete_lateral_sub_surface_flux, METH_O, (char *)"delete_lateral_sub_surface_flux(lateral_sub_surface_flux self)"}, - { (char *)"lateral_sub_surface_flux_swigregister", lateral_sub_surface_flux_swigregister, METH_VARARGS, NULL}, - { (char *)"new_Darcy", (PyCFunction) _wrap_new_Darcy, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "new_Darcy(cmf::upslope::SoilLayer::ptr left, cmf::water::flux_node::ptr right, real FlowWidth, real Distance=0) -> Darcy\n" - "\n" - "Darcy(cmf::upslope::SoilLayer::ptr left, cmf::water::flux_node::ptr\n" - "right, real FlowWidth, real Distance=0) \n" - ""}, - { (char *)"delete_Darcy", (PyCFunction)_wrap_delete_Darcy, METH_O, (char *)"delete_Darcy(Darcy self)"}, - { (char *)"Darcy_swigregister", Darcy_swigregister, METH_VARARGS, NULL}, - { (char *)"Darcy_swiginit", Darcy_swiginit, METH_VARARGS, NULL}, - { (char *)"new_TopographicGradientDarcy", (PyCFunction) _wrap_new_TopographicGradientDarcy, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "new_TopographicGradientDarcy(cmf::upslope::SoilLayer::ptr left, cmf::water::flux_node::ptr right, real FlowWidth, real Distance=0) -> TopographicGradientDarcy\n" - "\n" - "TopographicGradientDarcy(cmf::upslope::SoilLayer::ptr left,\n" - "cmf::water::flux_node::ptr right, real FlowWidth, real Distance=0)\n" - "\n" - "Creates the connection.\n" - "\n" - "Parameters:\n" - "-----------\n" - "\n" - "left: Left node of the connection (needs to be soil water storage)\n" - "\n" - "right: Right node of the connection (can be any node)\n" - "\n" - "FlowWidth: the width of the connection - is multiplied by layer\n" - "thickness to get the interface area\n" - "\n" - "Distance: the length of the connection. If 0, the distance is\n" - "calculated from the position of the nodes \n" - ""}, - { (char *)"delete_TopographicGradientDarcy", (PyCFunction)_wrap_delete_TopographicGradientDarcy, METH_O, (char *)"delete_TopographicGradientDarcy(TopographicGradientDarcy self)"}, - { (char *)"TopographicGradientDarcy_swigregister", TopographicGradientDarcy_swigregister, METH_VARARGS, NULL}, - { (char *)"TopographicGradientDarcy_swiginit", TopographicGradientDarcy_swiginit, METH_VARARGS, NULL}, - { (char *)"new_DarcyKinematic", (PyCFunction) _wrap_new_DarcyKinematic, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "new_DarcyKinematic(cmf::upslope::SoilLayer::ptr left, cmf::water::flux_node::ptr right, real FlowWidth, real Distance=0) -> DarcyKinematic\n" - "\n" - "DarcyKinematic(cmf::upslope::SoilLayer::ptr left,\n" - "cmf::water::flux_node::ptr right, real FlowWidth, real Distance=0)\n" - "\n" - "Creates the connection.\n" - "\n" - "Parameters:\n" - "-----------\n" - "\n" - "left: Left node of the connection (needs to be soil water storage)\n" - "\n" - "right: Right node of the connection (can be any node)\n" - "\n" - "FlowWidth: the width of the connection - is multiplied by layer\n" - "thickness to get the interface area\n" - "\n" - "Distance: the length of the connection. If 0, the distance is\n" - "calculated from the position of the nodes \n" - ""}, - { (char *)"delete_DarcyKinematic", (PyCFunction)_wrap_delete_DarcyKinematic, METH_O, (char *)"delete_DarcyKinematic(DarcyKinematic self)"}, - { (char *)"DarcyKinematic_swigregister", DarcyKinematic_swigregister, METH_VARARGS, NULL}, - { (char *)"DarcyKinematic_swiginit", DarcyKinematic_swiginit, METH_VARARGS, NULL}, - { (char *)"Richards_lateral_flow_thickness_set", _wrap_Richards_lateral_flow_thickness_set, METH_VARARGS, (char *)"Richards_lateral_flow_thickness_set(Richards_lateral self, real flow_thickness)"}, - { (char *)"Richards_lateral_flow_thickness_get", (PyCFunction)_wrap_Richards_lateral_flow_thickness_get, METH_O, (char *)"Richards_lateral_flow_thickness_get(Richards_lateral self) -> real"}, - { (char *)"Richards_lateral_wet_right_node_set", _wrap_Richards_lateral_wet_right_node_set, METH_VARARGS, (char *)"Richards_lateral_wet_right_node_set(Richards_lateral self, bool wet_right_node)"}, - { (char *)"Richards_lateral_wet_right_node_get", (PyCFunction)_wrap_Richards_lateral_wet_right_node_get, METH_O, (char *)"Richards_lateral_wet_right_node_get(Richards_lateral self) -> bool"}, - { (char *)"new_Richards_lateral", (PyCFunction) _wrap_new_Richards_lateral, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "new_Richards_lateral(cmf::upslope::SoilLayer::ptr left, cmf::water::flux_node::ptr right, real FlowWidth=0, real Distance=0) -> Richards_lateral\n" - "\n" - "Richards_lateral(cmf::upslope::SoilLayer::ptr left,\n" - "cmf::water::flux_node::ptr right, real FlowWidth=0, real Distance=0)\n" - "\n" - "Creates the connection.\n" - "\n" - "Parameters:\n" - "-----------\n" - "\n" - "left: Left node of the connection (needs to be soil water storage)\n" - "\n" - "right: Right node of the connection (can be any node)\n" - "\n" - "FlowWidth: the width of the connection - is multiplied by layer\n" - "thickness to get the interface area\n" - "\n" - "Distance: the length of the connection. If 0, the distance is\n" - "calculated from the position of the nodes \n" - ""}, - { (char *)"Richards_lateral_usebaseflow", (PyCFunction) _wrap_Richards_lateral_usebaseflow, METH_VARARGS | METH_KEYWORDS, (char *)"Richards_lateral_usebaseflow(bool use)"}, - { (char *)"delete_Richards_lateral", (PyCFunction)_wrap_delete_Richards_lateral, METH_O, (char *)"delete_Richards_lateral(Richards_lateral self)"}, - { (char *)"Richards_lateral_swigregister", Richards_lateral_swigregister, METH_VARARGS, NULL}, - { (char *)"Richards_lateral_swiginit", Richards_lateral_swiginit, METH_VARARGS, NULL}, - { (char *)"TOPModelFlow_flow_width_set", _wrap_TOPModelFlow_flow_width_set, METH_VARARGS, (char *)"TOPModelFlow_flow_width_set(TOPModelFlow self, real flow_width)"}, - { (char *)"TOPModelFlow_flow_width_get", (PyCFunction)_wrap_TOPModelFlow_flow_width_get, METH_O, (char *)"TOPModelFlow_flow_width_get(TOPModelFlow self) -> real"}, - { (char *)"TOPModelFlow_distance_set", _wrap_TOPModelFlow_distance_set, METH_VARARGS, (char *)"TOPModelFlow_distance_set(TOPModelFlow self, real distance)"}, - { (char *)"TOPModelFlow_distance_get", (PyCFunction)_wrap_TOPModelFlow_distance_get, METH_O, (char *)"TOPModelFlow_distance_get(TOPModelFlow self) -> real"}, - { (char *)"TOPModelFlow_T0_set", _wrap_TOPModelFlow_T0_set, METH_VARARGS, (char *)"TOPModelFlow_T0_set(TOPModelFlow self, real T0)"}, - { (char *)"TOPModelFlow_T0_get", (PyCFunction)_wrap_TOPModelFlow_T0_get, METH_O, (char *)"TOPModelFlow_T0_get(TOPModelFlow self) -> real"}, - { (char *)"TOPModelFlow_m_set", _wrap_TOPModelFlow_m_set, METH_VARARGS, (char *)"TOPModelFlow_m_set(TOPModelFlow self, real m)"}, - { (char *)"TOPModelFlow_m_get", (PyCFunction)_wrap_TOPModelFlow_m_get, METH_O, (char *)"TOPModelFlow_m_get(TOPModelFlow self) -> real"}, - { (char *)"new_TOPModelFlow", (PyCFunction) _wrap_new_TOPModelFlow, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "new_TOPModelFlow(cmf::upslope::SoilLayer::ptr left, cmf::water::flux_node::ptr right, real T0, real m, real flowwidth, real distance=0) -> TOPModelFlow\n" - "\n" - "TOPModelFlow(cmf::upslope::SoilLayer::ptr left,\n" - "cmf::water::flux_node::ptr right, real T0, real m, real flowwidth,\n" - "real distance=0) \n" - ""}, - { (char *)"delete_TOPModelFlow", (PyCFunction)_wrap_delete_TOPModelFlow, METH_O, (char *)"delete_TOPModelFlow(TOPModelFlow self)"}, - { (char *)"TOPModelFlow_swigregister", TOPModelFlow_swigregister, METH_VARARGS, NULL}, - { (char *)"TOPModelFlow_swiginit", TOPModelFlow_swiginit, METH_VARARGS, NULL}, - { (char *)"Manning_is_diffusive_wave_set", _wrap_Manning_is_diffusive_wave_set, METH_VARARGS, (char *)"Manning_is_diffusive_wave_set(Manning self, bool is_diffusive_wave)"}, - { (char *)"Manning_is_diffusive_wave_get", (PyCFunction)_wrap_Manning_is_diffusive_wave_get, METH_O, (char *)"Manning_is_diffusive_wave_get(Manning self) -> bool"}, - { (char *)"Manning_flux_geometry_set", _wrap_Manning_flux_geometry_set, METH_VARARGS, (char *)"Manning_flux_geometry_set(Manning self, volume_height_function flux_geometry)"}, - { (char *)"Manning_flux_geometry_get", (PyCFunction)_wrap_Manning_flux_geometry_get, METH_O, (char *)"Manning_flux_geometry_get(Manning self) -> volume_height_function"}, - { (char *)"delete_Manning", (PyCFunction)_wrap_delete_Manning, METH_O, (char *)"delete_Manning(Manning self)"}, - { (char *)"Manning_swigregister", Manning_swigregister, METH_VARARGS, NULL}, - { (char *)"Manning_Diffusive_linear_slope_width_set", _wrap_Manning_Diffusive_linear_slope_width_set, METH_VARARGS, (char *)"Manning_Diffusive_linear_slope_width_set(Manning_Diffusive self, real linear_slope_width)"}, - { (char *)"Manning_Diffusive_linear_slope_width_get", (PyCFunction)_wrap_Manning_Diffusive_linear_slope_width_get, METH_O, (char *)"Manning_Diffusive_linear_slope_width_get(Manning_Diffusive self) -> real"}, - { (char *)"new_Manning_Diffusive", (PyCFunction) _wrap_new_Manning_Diffusive, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "new_Manning_Diffusive(cmf::river::OpenWaterStorage::ptr left, cmf::water::flux_node::ptr right, IChannel reachtype) -> Manning_Diffusive\n" - "\n" - "Manning_Diffusive(cmf::river::OpenWaterStorage::ptr left,\n" - "cmf::water::flux_node::ptr right, const cmf::river::IChannel\n" - "&reachtype)\n" - "\n" - "Creates a diffusive wave connection between to open water storages.\n" - "\n" - "Parameters:\n" - "-----------\n" - "\n" - "left: right: The nodes to be connected by the diffusive wave. Left\n" - "needs to be an open water storage\n" - "\n" - "reachtype: The channel geometry \n" - ""}, - { (char *)"delete_Manning_Diffusive", (PyCFunction)_wrap_delete_Manning_Diffusive, METH_O, (char *)"delete_Manning_Diffusive(Manning_Diffusive self)"}, - { (char *)"Manning_Diffusive_swigregister", Manning_Diffusive_swigregister, METH_VARARGS, NULL}, - { (char *)"Manning_Diffusive_swiginit", Manning_Diffusive_swiginit, METH_VARARGS, NULL}, - { (char *)"new_Manning_Kinematic", (PyCFunction) _wrap_new_Manning_Kinematic, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "new_Manning_Kinematic(cmf::river::OpenWaterStorage::ptr left, cmf::water::flux_node::ptr right, IChannel reachtype) -> Manning_Kinematic\n" - "\n" - "Manning_Kinematic(cmf::river::OpenWaterStorage::ptr left,\n" - "cmf::water::flux_node::ptr right, const cmf::river::IChannel\n" - "&reachtype)\n" - "\n" - "Creates a kinematic wave connection between to open water storages.\n" - "\n" - "Parameters:\n" - "-----------\n" - "\n" - "left: right: The nodes to be connected by the kinematic wave. Left\n" - "needs to be an open water storage\n" - "\n" - "reachtype: The channel geometry \n" - ""}, - { (char *)"delete_Manning_Kinematic", (PyCFunction)_wrap_delete_Manning_Kinematic, METH_O, (char *)"delete_Manning_Kinematic(Manning_Kinematic self)"}, - { (char *)"Manning_Kinematic_swigregister", Manning_Kinematic_swigregister, METH_VARARGS, NULL}, - { (char *)"Manning_Kinematic_swiginit", Manning_Kinematic_swiginit, METH_VARARGS, NULL}, - { (char *)"new_CanopyOverflow", (PyCFunction) _wrap_new_CanopyOverflow, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "new_CanopyOverflow(cmf::water::WaterStorage::ptr Canopy, cmf::water::flux_node::ptr target, Cell cell) -> CanopyOverflow\n" - "\n" - "CanopyOverflow(cmf::water::WaterStorage::ptr Canopy,\n" - "cmf::water::flux_node::ptr target, cmf::upslope::Cell &cell) \n" - ""}, - { (char *)"CanopyOverflow_use_for_cell", (PyCFunction) _wrap_CanopyOverflow_use_for_cell, METH_VARARGS | METH_KEYWORDS, (char *)"CanopyOverflow_use_for_cell(Cell cell) -> CanopyOverflow"}, - { (char *)"delete_CanopyOverflow", (PyCFunction)_wrap_delete_CanopyOverflow, METH_O, (char *)"delete_CanopyOverflow(CanopyOverflow self)"}, - { (char *)"CanopyOverflow_swigregister", CanopyOverflow_swigregister, METH_VARARGS, NULL}, - { (char *)"CanopyOverflow_swiginit", CanopyOverflow_swiginit, METH_VARARGS, NULL}, - { (char *)"new_RutterInterception", (PyCFunction) _wrap_new_RutterInterception, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "new_RutterInterception(cmf::water::WaterStorage::ptr Canopy, cmf::water::flux_node::ptr target, Cell cell) -> RutterInterception\n" - "\n" - "RutterInterception(cmf::water::WaterStorage::ptr Canopy,\n" - "cmf::water::flux_node::ptr target, cmf::upslope::Cell &cell) \n" - ""}, - { (char *)"RutterInterception_use_for_cell", (PyCFunction) _wrap_RutterInterception_use_for_cell, METH_VARARGS | METH_KEYWORDS, (char *)"RutterInterception_use_for_cell(Cell cell) -> RutterInterception"}, - { (char *)"delete_RutterInterception", (PyCFunction)_wrap_delete_RutterInterception, METH_O, (char *)"delete_RutterInterception(RutterInterception self)"}, - { (char *)"RutterInterception_swigregister", RutterInterception_swigregister, METH_VARARGS, NULL}, - { (char *)"RutterInterception_swiginit", RutterInterception_swiginit, METH_VARARGS, NULL}, - { (char *)"SimpleTindexSnowMelt_SnowMeltRate_set", _wrap_SimpleTindexSnowMelt_SnowMeltRate_set, METH_VARARGS, (char *)"SimpleTindexSnowMelt_SnowMeltRate_set(SimpleTindexSnowMelt self, real SnowMeltRate)"}, - { (char *)"SimpleTindexSnowMelt_SnowMeltRate_get", (PyCFunction)_wrap_SimpleTindexSnowMelt_SnowMeltRate_get, METH_O, (char *)"SimpleTindexSnowMelt_SnowMeltRate_get(SimpleTindexSnowMelt self) -> real"}, - { (char *)"new_SimpleTindexSnowMelt", (PyCFunction) _wrap_new_SimpleTindexSnowMelt, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "new_SimpleTindexSnowMelt(cmf::water::WaterStorage::ptr snow, cmf::water::flux_node::ptr surface_water, Cell cell, real rate=7.0) -> SimpleTindexSnowMelt\n" - "\n" - "SimpleTindexSnowMelt(cmf::water::WaterStorage::ptr snow,\n" - "cmf::water::flux_node::ptr surface_water, cmf::upslope::Cell &cell,\n" - "real rate=7.0)\n" - "\n" - "Creates a new snow melt connection.\n" - "\n" - "Parameters:\n" - "-----------\n" - "\n" - "snow: Snow storage, usually cel.snow\n" - "\n" - "surface_water: target of the melted water (usually cell.surfacewater)\n" - "\n" - "cell: The cell, needed to get weather and area\n" - "\n" - "rate: The rate of snow melt, given in mm/(degC day), default = 7.0 \n" - ""}, - { (char *)"SimpleTindexSnowMelt_use_for_cell", (PyCFunction) _wrap_SimpleTindexSnowMelt_use_for_cell, METH_VARARGS | METH_KEYWORDS, (char *)"SimpleTindexSnowMelt_use_for_cell(Cell cell)"}, - { (char *)"delete_SimpleTindexSnowMelt", (PyCFunction)_wrap_delete_SimpleTindexSnowMelt, METH_O, (char *)"delete_SimpleTindexSnowMelt(SimpleTindexSnowMelt self)"}, - { (char *)"SimpleTindexSnowMelt_swigregister", SimpleTindexSnowMelt_swigregister, METH_VARARGS, NULL}, - { (char *)"SimpleTindexSnowMelt_swiginit", SimpleTindexSnowMelt_swiginit, METH_VARARGS, NULL}, - { (char *)"new_EnergyBudgetSnowMelt", (PyCFunction) _wrap_new_EnergyBudgetSnowMelt, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "new_EnergyBudgetSnowMelt(cmf::water::WaterStorage::ptr snow, cmf::water::flux_node::ptr surface_water, Cell cell) -> EnergyBudgetSnowMelt\n" - "\n" - "EnergyBudgetSnowMelt(cmf::water::WaterStorage::ptr snow,\n" - "cmf::water::flux_node::ptr surface_water, cmf::upslope::Cell &cell) \n" - ""}, - { (char *)"EnergyBudgetSnowMelt_use_for_cell", (PyCFunction) _wrap_EnergyBudgetSnowMelt_use_for_cell, METH_VARARGS | METH_KEYWORDS, (char *)"EnergyBudgetSnowMelt_use_for_cell(Cell cell)"}, - { (char *)"delete_EnergyBudgetSnowMelt", (PyCFunction)_wrap_delete_EnergyBudgetSnowMelt, METH_O, (char *)"delete_EnergyBudgetSnowMelt(EnergyBudgetSnowMelt self)"}, - { (char *)"EnergyBudgetSnowMelt_swigregister", EnergyBudgetSnowMelt_swigregister, METH_VARARGS, NULL}, - { (char *)"EnergyBudgetSnowMelt_swiginit", EnergyBudgetSnowMelt_swiginit, METH_VARARGS, NULL}, - { (char *)"snowfraction", (PyCFunction) _wrap_snowfraction, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "snowfraction(real T) -> real\n" - "\n" - "real\n" - "cmf::upslope::connections::snowfraction(real T)\n" - "\n" - "A function to calculate the snow fraction of the precipitation\n" - "according to the air temperature.\n" - "\n" - "Returns 0.0 for T>+1 degC, 1.0 for T<-1degC and interpolates linear\n" - "between. Values between 0 and 1 can be interpreted as sleet \n" - ""}, - { (char *)"Rainfall_Throughfall_set", _wrap_Rainfall_Throughfall_set, METH_VARARGS, (char *)"Rainfall_Throughfall_set(Rainfall self, bool Throughfall)"}, - { (char *)"Rainfall_Throughfall_get", (PyCFunction)_wrap_Rainfall_Throughfall_get, METH_O, (char *)"Rainfall_Throughfall_get(Rainfall self) -> bool"}, - { (char *)"Rainfall_InterceptedRainfall_set", _wrap_Rainfall_InterceptedRainfall_set, METH_VARARGS, (char *)"Rainfall_InterceptedRainfall_set(Rainfall self, bool InterceptedRainfall)"}, - { (char *)"Rainfall_InterceptedRainfall_get", (PyCFunction)_wrap_Rainfall_InterceptedRainfall_get, METH_O, (char *)"Rainfall_InterceptedRainfall_get(Rainfall self) -> bool"}, - { (char *)"new_Rainfall", (PyCFunction) _wrap_new_Rainfall, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "new_Rainfall(cmf::water::flux_node::ptr target, Cell cell, bool getthroughfall=True, bool getintercepted=True) -> Rainfall\n" - "\n" - "Rainfall(cmf::water::flux_node::ptr target, cmf::upslope::Cell &cell,\n" - "bool getthroughfall=true, bool getintercepted=true)\n" - "\n" - "Creates a new Rainfall connection. \n" - ""}, - { (char *)"delete_Rainfall", (PyCFunction)_wrap_delete_Rainfall, METH_O, (char *)"delete_Rainfall(Rainfall self)"}, - { (char *)"Rainfall_swigregister", Rainfall_swigregister, METH_VARARGS, NULL}, - { (char *)"Rainfall_swiginit", Rainfall_swiginit, METH_VARARGS, NULL}, - { (char *)"new_Snowfall", (PyCFunction) _wrap_new_Snowfall, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "new_Snowfall(cmf::water::flux_node::ptr target, Cell cell) -> Snowfall\n" - "\n" - "Snowfall(cmf::water::flux_node::ptr target, cmf::upslope::Cell &cell)\n" - "\n" - ""}, - { (char *)"delete_Snowfall", (PyCFunction)_wrap_delete_Snowfall, METH_O, (char *)"delete_Snowfall(Snowfall self)"}, - { (char *)"Snowfall_swigregister", Snowfall_swigregister, METH_VARARGS, NULL}, - { (char *)"Snowfall_swiginit", Snowfall_swiginit, METH_VARARGS, NULL}, - { (char *)"new_MatrixInfiltration", (PyCFunction) _wrap_new_MatrixInfiltration, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "new_MatrixInfiltration(cmf::upslope::SoilLayer::ptr soilwater, cmf::water::flux_node::ptr surfacewater) -> MatrixInfiltration\n" - "\n" - "MatrixInfiltration(cmf::upslope::SoilLayer::ptr soilwater,\n" - "cmf::water::flux_node::ptr surfacewater) \n" - ""}, - { (char *)"MatrixInfiltration_use_for_cell", (PyCFunction) _wrap_MatrixInfiltration_use_for_cell, METH_VARARGS | METH_KEYWORDS, (char *)"MatrixInfiltration_use_for_cell(Cell c)"}, - { (char *)"delete_MatrixInfiltration", (PyCFunction)_wrap_delete_MatrixInfiltration, METH_O, (char *)"delete_MatrixInfiltration(MatrixInfiltration self)"}, - { (char *)"MatrixInfiltration_swigregister", MatrixInfiltration_swigregister, METH_VARARGS, NULL}, - { (char *)"MatrixInfiltration_swiginit", MatrixInfiltration_swiginit, METH_VARARGS, NULL}, - { (char *)"new_GreenAmptInfiltration", (PyCFunction) _wrap_new_GreenAmptInfiltration, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "new_GreenAmptInfiltration(cmf::upslope::SoilLayer::ptr soilwater, cmf::water::flux_node::ptr surfacewater) -> GreenAmptInfiltration\n" - "\n" - "GreenAmptInfiltration(cmf::upslope::SoilLayer::ptr soilwater,\n" - "cmf::water::flux_node::ptr surfacewater) \n" - ""}, - { (char *)"GreenAmptInfiltration_use_for_cell", (PyCFunction) _wrap_GreenAmptInfiltration_use_for_cell, METH_VARARGS | METH_KEYWORDS, (char *)"GreenAmptInfiltration_use_for_cell(Cell c)"}, - { (char *)"delete_GreenAmptInfiltration", (PyCFunction)_wrap_delete_GreenAmptInfiltration, METH_O, (char *)"delete_GreenAmptInfiltration(GreenAmptInfiltration self)"}, - { (char *)"GreenAmptInfiltration_swigregister", GreenAmptInfiltration_swigregister, METH_VARARGS, NULL}, - { (char *)"GreenAmptInfiltration_swiginit", GreenAmptInfiltration_swiginit, METH_VARARGS, NULL}, - { (char *)"SimpleInfiltration_W0_set", _wrap_SimpleInfiltration_W0_set, METH_VARARGS, (char *)"SimpleInfiltration_W0_set(SimpleInfiltration self, real W0)"}, - { (char *)"SimpleInfiltration_W0_get", (PyCFunction)_wrap_SimpleInfiltration_W0_get, METH_O, (char *)"SimpleInfiltration_W0_get(SimpleInfiltration self) -> real"}, - { (char *)"new_SimpleInfiltration", (PyCFunction) _wrap_new_SimpleInfiltration, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "new_SimpleInfiltration(cmf::upslope::SoilLayer::ptr soilwater, cmf::water::flux_node::ptr surfacewater, real W0=0.9) -> SimpleInfiltration\n" - "\n" - "SimpleInfiltration(cmf::upslope::SoilLayer::ptr soilwater,\n" - "cmf::water::flux_node::ptr surfacewater, real W0=0.9)\n" - "\n" - "Creates the connection between surfacewater and first soil layer.\n" - "\n" - "Parameters:\n" - "-----------\n" - "\n" - "soilwater: the infiltration target\n" - "\n" - "surfacewater: the infiltration source\n" - "\n" - "W0: the 50% saturation value \n" - ""}, - { (char *)"SimpleInfiltration_use_for_cell", (PyCFunction) _wrap_SimpleInfiltration_use_for_cell, METH_VARARGS | METH_KEYWORDS, (char *)"SimpleInfiltration_use_for_cell(Cell c)"}, - { (char *)"delete_SimpleInfiltration", (PyCFunction)_wrap_delete_SimpleInfiltration, METH_O, (char *)"delete_SimpleInfiltration(SimpleInfiltration self)"}, - { (char *)"SimpleInfiltration_swigregister", SimpleInfiltration_swigregister, METH_VARARGS, NULL}, - { (char *)"SimpleInfiltration_swiginit", SimpleInfiltration_swiginit, METH_VARARGS, NULL}, - { (char *)"SWATPercolation_use_for_cell", (PyCFunction) _wrap_SWATPercolation_use_for_cell, METH_VARARGS | METH_KEYWORDS, (char *)"SWATPercolation_use_for_cell(Cell cell, bool no_override=True)"}, - { (char *)"new_SWATPercolation", (PyCFunction) _wrap_new_SWATPercolation, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "new_SWATPercolation(cmf::upslope::SoilLayer::ptr upperLayer, cmf::upslope::SoilLayer::ptr lowerLayer) -> SWATPercolation\n" - "\n" - "SWATPercolation(cmf::upslope::SoilLayer::ptr upperLayer,\n" - "cmf::upslope::SoilLayer::ptr lowerLayer) \n" - ""}, - { (char *)"delete_SWATPercolation", (PyCFunction)_wrap_delete_SWATPercolation, METH_O, (char *)"delete_SWATPercolation(SWATPercolation self)"}, - { (char *)"SWATPercolation_swigregister", SWATPercolation_swigregister, METH_VARARGS, NULL}, - { (char *)"SWATPercolation_swiginit", SWATPercolation_swiginit, METH_VARARGS, NULL}, - { (char *)"new_Richards", (PyCFunction) _wrap_new_Richards, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "new_Richards(cmf::upslope::SoilLayer::ptr left, cmf::water::flux_node::ptr right) -> Richards\n" - "\n" - "Richards(cmf::upslope::SoilLayer::ptr left, cmf::water::flux_node::ptr\n" - "right)\n" - "\n" - "Creates a Richards equation connection between two soil layers (left\n" - "and right, rather top and bottom) of the same cell. \n" - ""}, - { (char *)"Richards_use_for_cell", (PyCFunction) _wrap_Richards_use_for_cell, METH_VARARGS | METH_KEYWORDS, (char *)"Richards_use_for_cell(Cell cell, bool no_override=True)"}, - { (char *)"delete_Richards", (PyCFunction)_wrap_delete_Richards, METH_O, (char *)"delete_Richards(Richards self)"}, - { (char *)"Richards_swigregister", Richards_swigregister, METH_VARARGS, NULL}, - { (char *)"Richards_swiginit", Richards_swiginit, METH_VARARGS, NULL}, - { (char *)"new_SimplRichards", (PyCFunction) _wrap_new_SimplRichards, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "new_SimplRichards(cmf::upslope::SoilLayer::ptr left, cmf::water::flux_node::ptr right) -> SimplRichards\n" - "\n" - "SimplRichards(cmf::upslope::SoilLayer::ptr left,\n" - "cmf::water::flux_node::ptr right) \n" - ""}, - { (char *)"SimplRichards_use_for_cell", (PyCFunction) _wrap_SimplRichards_use_for_cell, METH_VARARGS | METH_KEYWORDS, (char *)"SimplRichards_use_for_cell(Cell cell, bool no_override=True)"}, - { (char *)"delete_SimplRichards", (PyCFunction)_wrap_delete_SimplRichards, METH_O, (char *)"delete_SimplRichards(SimplRichards self)"}, - { (char *)"SimplRichards_swigregister", SimplRichards_swigregister, METH_VARARGS, NULL}, - { (char *)"SimplRichards_swiginit", SimplRichards_swiginit, METH_VARARGS, NULL}, - { (char *)"new_FreeDrainagePercolation", (PyCFunction) _wrap_new_FreeDrainagePercolation, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "new_FreeDrainagePercolation(cmf::upslope::SoilLayer::ptr left, cmf::water::flux_node::ptr right) -> FreeDrainagePercolation\n" - "\n" - "FreeDrainagePercolation(cmf::upslope::SoilLayer::ptr left,\n" - "cmf::water::flux_node::ptr right) \n" - ""}, - { (char *)"delete_FreeDrainagePercolation", (PyCFunction)_wrap_delete_FreeDrainagePercolation, METH_O, (char *)"delete_FreeDrainagePercolation(FreeDrainagePercolation self)"}, - { (char *)"FreeDrainagePercolation_swigregister", FreeDrainagePercolation_swigregister, METH_VARARGS, NULL}, - { (char *)"FreeDrainagePercolation_swiginit", FreeDrainagePercolation_swiginit, METH_VARARGS, NULL}, - { (char *)"LayerBypass_Kmax_set", _wrap_LayerBypass_Kmax_set, METH_VARARGS, (char *)"LayerBypass_Kmax_set(LayerBypass self, real Kmax)"}, - { (char *)"LayerBypass_Kmax_get", (PyCFunction)_wrap_LayerBypass_Kmax_get, METH_O, (char *)"LayerBypass_Kmax_get(LayerBypass self) -> real"}, - { (char *)"LayerBypass_w0_set", _wrap_LayerBypass_w0_set, METH_VARARGS, (char *)"LayerBypass_w0_set(LayerBypass self, real w0)"}, - { (char *)"LayerBypass_w0_get", (PyCFunction)_wrap_LayerBypass_w0_get, METH_O, (char *)"LayerBypass_w0_get(LayerBypass self) -> real"}, - { (char *)"LayerBypass_beta_set", _wrap_LayerBypass_beta_set, METH_VARARGS, (char *)"LayerBypass_beta_set(LayerBypass self, real beta)"}, - { (char *)"LayerBypass_beta_get", (PyCFunction)_wrap_LayerBypass_beta_get, METH_O, (char *)"LayerBypass_beta_get(LayerBypass self) -> real"}, - { (char *)"LayerBypass_K", (PyCFunction) _wrap_LayerBypass_K, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "LayerBypass_K(LayerBypass self, real w) -> real\n" - "\n" - "real K(real w)\n" - "\n" - "the actual crack conductivity\n" - "\n" - "Parameters:\n" - "-----------\n" - "\n" - "w: the wetness of the target layer \n" - ""}, - { (char *)"new_LayerBypass", (PyCFunction) _wrap_new_LayerBypass, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "new_LayerBypass(cmf::water::flux_node::ptr left, cmf::upslope::SoilLayer::ptr right, real Kmax=100., real w0=0.0, real beta=1.0) -> LayerBypass\n" - "\n" - "LayerBypass(cmf::water::flux_node::ptr left,\n" - "cmf::upslope::SoilLayer::ptr right, real Kmax=100., real w0=0.0, real\n" - "beta=1.0)\n" - "\n" - "Creates a layer bypass connection.\n" - "\n" - "Parameters:\n" - "-----------\n" - "\n" - "left: The source of the flux, usually the surfacewater of the cell\n" - "\n" - "right: The target soil layer\n" - "\n" - "Kmax: maximum conductivity of the cracks in m/day\n" - "\n" - "w0: is the actual wetness of the target layer\n" - "\n" - "beta: is an empirical shape parameter of the crack size/wetness\n" - "relation \n" - ""}, - { (char *)"delete_LayerBypass", (PyCFunction)_wrap_delete_LayerBypass, METH_O, (char *)"delete_LayerBypass(LayerBypass self)"}, - { (char *)"LayerBypass_swigregister", LayerBypass_swigregister, METH_VARARGS, NULL}, - { (char *)"LayerBypass_swiginit", LayerBypass_swiginit, METH_VARARGS, NULL}, - { (char *)"RootUptakeStessFunction_Tact", (PyCFunction) _wrap_RootUptakeStessFunction_Tact, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "RootUptakeStessFunction_Tact(RootUptakeStessFunction self, stressedET connection, real Tpot) -> real\n" - "\n" - "virtual real Tact(const stressedET *connection, real Tpot) const =0\n" - "\n" - "Calculates the water stress for a layer.\n" - "\n" - "Parameters:\n" - "-----------\n" - "\n" - "connection: The stressedET connection this stress function belongs to\n" - "\n" - "Tpot: Potential Transpiration in mm/day (for the full profile)\n" - "\n" - "Actual flux from layer in m3/day \n" - ""}, - { (char *)"RootUptakeStessFunction_copy", (PyCFunction)_wrap_RootUptakeStessFunction_copy, METH_O, (char *)"\n" - "RootUptakeStessFunction_copy(RootUptakeStessFunction self) -> RootUptakeStessFunction\n" - "\n" - "virtual cmf::upslope::ET::RootUptakeStessFunction* copy() const =0\n" - "\n" - "Creates a new copy of this wetness. \n" - ""}, - { (char *)"RootUptakeStessFunction_to_string", (PyCFunction)_wrap_RootUptakeStessFunction_to_string, METH_O, (char *)"\n" - "RootUptakeStessFunction_to_string(RootUptakeStessFunction self) -> std::string\n" - "\n" - "virtual\n" - "std::string to_string() const =0 \n" - ""}, - { (char *)"delete_RootUptakeStessFunction", (PyCFunction)_wrap_delete_RootUptakeStessFunction, METH_O, (char *)"\n" - "delete_RootUptakeStessFunction(RootUptakeStessFunction self)\n" - "\n" - "virtual ~RootUptakeStessFunction() \n" - ""}, - { (char *)"RootUptakeStessFunction_swigregister", RootUptakeStessFunction_swigregister, METH_VARARGS, NULL}, - { (char *)"SuctionStress_P0_set", _wrap_SuctionStress_P0_set, METH_VARARGS, (char *)"SuctionStress_P0_set(SuctionStress self, real P0)"}, - { (char *)"SuctionStress_P0_get", (PyCFunction)_wrap_SuctionStress_P0_get, METH_O, (char *)"SuctionStress_P0_get(SuctionStress self) -> real"}, - { (char *)"SuctionStress_P1_set", _wrap_SuctionStress_P1_set, METH_VARARGS, (char *)"SuctionStress_P1_set(SuctionStress self, real P1)"}, - { (char *)"SuctionStress_P1_get", (PyCFunction)_wrap_SuctionStress_P1_get, METH_O, (char *)"SuctionStress_P1_get(SuctionStress self) -> real"}, - { (char *)"SuctionStress_P2_set", _wrap_SuctionStress_P2_set, METH_VARARGS, (char *)"SuctionStress_P2_set(SuctionStress self, real P2)"}, - { (char *)"SuctionStress_P2_get", (PyCFunction)_wrap_SuctionStress_P2_get, METH_O, (char *)"SuctionStress_P2_get(SuctionStress self) -> real"}, - { (char *)"SuctionStress_P3_set", _wrap_SuctionStress_P3_set, METH_VARARGS, (char *)"SuctionStress_P3_set(SuctionStress self, real P3)"}, - { (char *)"SuctionStress_P3_get", (PyCFunction)_wrap_SuctionStress_P3_get, METH_O, (char *)"SuctionStress_P3_get(SuctionStress self) -> real"}, - { (char *)"new_SuctionStress", _wrap_new_SuctionStress, METH_VARARGS, (char *)"\n" - "SuctionStress(real P0=1e308, real P1=1e307, real P2=-5, real P3=-160)\n" - "new_SuctionStress(SuctionStress other) -> SuctionStress\n" - "\n" - "SuctionStress(const SuctionStress &other) \n" - ""}, - { (char *)"SuctionStress_copy", (PyCFunction)_wrap_SuctionStress_copy, METH_O, (char *)"\n" - "SuctionStress_copy(SuctionStress self) -> SuctionStress\n" - "\n" - "cmf::upslope::ET::SuctionStress* copy() const\n" - "\n" - "Creates a new copy of this wetness. \n" - ""}, - { (char *)"delete_SuctionStress", (PyCFunction)_wrap_delete_SuctionStress, METH_O, (char *)"\n" - "delete_SuctionStress(SuctionStress self)\n" - "\n" - "virtual ~SuctionStress() \n" - ""}, - { (char *)"SuctionStress_swigregister", SuctionStress_swigregister, METH_VARARGS, NULL}, - { (char *)"SuctionStress_swiginit", SuctionStress_swiginit, METH_VARARGS, NULL}, - { (char *)"ContentStress_theta_d_set", _wrap_ContentStress_theta_d_set, METH_VARARGS, (char *)"ContentStress_theta_d_set(ContentStress self, real theta_d)"}, - { (char *)"ContentStress_theta_d_get", (PyCFunction)_wrap_ContentStress_theta_d_get, METH_O, (char *)"ContentStress_theta_d_get(ContentStress self) -> real"}, - { (char *)"ContentStress_theta_w_set", _wrap_ContentStress_theta_w_set, METH_VARARGS, (char *)"ContentStress_theta_w_set(ContentStress self, real theta_w)"}, - { (char *)"ContentStress_theta_w_get", (PyCFunction)_wrap_ContentStress_theta_w_get, METH_O, (char *)"ContentStress_theta_w_get(ContentStress self) -> real"}, - { (char *)"ContentStress_copy", (PyCFunction)_wrap_ContentStress_copy, METH_O, (char *)"\n" - "ContentStress_copy(ContentStress self) -> ContentStress\n" - "\n" - "cmf::upslope::ET::ContentStress* copy() const\n" - "\n" - "Creates a new copy of this wetness. \n" - ""}, - { (char *)"new_ContentStress", (PyCFunction) _wrap_new_ContentStress, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "new_ContentStress(real theta_d=-1, real theta_w=-1) -> ContentStress\n" - "\n" - "ContentStress(real theta_d=-1, real theta_w=-1)\n" - "\n" - "Creates a new ContentStress for critical water content theta_d in vol\n" - "Water/vol Soil and wilting point theta_w. \n" - ""}, - { (char *)"delete_ContentStress", (PyCFunction)_wrap_delete_ContentStress, METH_O, (char *)"\n" - "delete_ContentStress(ContentStress self)\n" - "\n" - "virtual ~ContentStress() \n" - ""}, - { (char *)"ContentStress_swigregister", ContentStress_swigregister, METH_VARARGS, NULL}, - { (char *)"ContentStress_swiginit", ContentStress_swiginit, METH_VARARGS, NULL}, - { (char *)"VolumeStress_V1_set", _wrap_VolumeStress_V1_set, METH_VARARGS, (char *)"VolumeStress_V1_set(VolumeStress self, real V1)"}, - { (char *)"VolumeStress_V1_get", (PyCFunction)_wrap_VolumeStress_V1_get, METH_O, (char *)"VolumeStress_V1_get(VolumeStress self) -> real"}, - { (char *)"VolumeStress_V0_set", _wrap_VolumeStress_V0_set, METH_VARARGS, (char *)"VolumeStress_V0_set(VolumeStress self, real V0)"}, - { (char *)"VolumeStress_V0_get", (PyCFunction)_wrap_VolumeStress_V0_get, METH_O, (char *)"VolumeStress_V0_get(VolumeStress self) -> real"}, - { (char *)"new_VolumeStress", _wrap_new_VolumeStress, METH_VARARGS, (char *)"\n" - "VolumeStress(real V1, real V0)\n" - "new_VolumeStress(VolumeStress other) -> VolumeStress\n" - "\n" - "VolumeStress(const VolumeStress &other) \n" - ""}, - { (char *)"VolumeStress_copy", (PyCFunction)_wrap_VolumeStress_copy, METH_O, (char *)"\n" - "VolumeStress_copy(VolumeStress self) -> VolumeStress\n" - "\n" - "cmf::upslope::ET::VolumeStress* copy() const\n" - "\n" - "Creates a new copy of this wetness. \n" - ""}, - { (char *)"delete_VolumeStress", (PyCFunction)_wrap_delete_VolumeStress, METH_O, (char *)"\n" - "delete_VolumeStress(VolumeStress self)\n" - "\n" - "virtual ~VolumeStress() \n" - ""}, - { (char *)"VolumeStress_swigregister", VolumeStress_swigregister, METH_VARARGS, NULL}, - { (char *)"VolumeStress_swiginit", VolumeStress_swiginit, METH_VARARGS, NULL}, - { (char *)"new_log_wind_profile", (PyCFunction) _wrap_new_log_wind_profile, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "new_log_wind_profile(Cell _cell) -> log_wind_profile\n" - "\n" - "log_wind_profile(cmf::upslope::Cell &_cell) \n" - ""}, - { (char *)"delete_log_wind_profile", (PyCFunction)_wrap_delete_log_wind_profile, METH_O, (char *)"\n" - "delete_log_wind_profile(log_wind_profile self)\n" - "\n" - "virtual\n" - "~log_wind_profile() \n" - ""}, - { (char *)"log_wind_profile_swigregister", log_wind_profile_swigregister, METH_VARARGS, NULL}, - { (char *)"log_wind_profile_swiginit", log_wind_profile_swiginit, METH_VARARGS, NULL}, - { (char *)"transpiration_method_transp_from_layer", (PyCFunction) _wrap_transpiration_method_transp_from_layer, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "transpiration_method_transp_from_layer(transpiration_method self, cmf::upslope::SoilLayer::ptr arg3, Time t) -> double\n" - "\n" - "virtual\n" - "double transp_from_layer(cmf::upslope::SoilLayer::ptr, cmf::math::Time\n" - "t)=0\n" - "\n" - "returns the transpiration rate from one layer in m3/day \n" - ""}, - { (char *)"delete_transpiration_method", (PyCFunction)_wrap_delete_transpiration_method, METH_O, (char *)"\n" - "delete_transpiration_method(transpiration_method self)\n" - "\n" - "virtual ~transpiration_method() \n" - ""}, - { (char *)"transpiration_method_swigregister", transpiration_method_swigregister, METH_VARARGS, NULL}, - { (char *)"soil_evaporation_method_evap_from_layer", (PyCFunction) _wrap_soil_evaporation_method_evap_from_layer, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "soil_evaporation_method_evap_from_layer(soil_evaporation_method self, cmf::upslope::SoilLayer::ptr arg3, Time t) -> double\n" - "\n" - "virtual\n" - "double evap_from_layer(cmf::upslope::SoilLayer::ptr, cmf::math::Time\n" - "t)=0\n" - "\n" - "returns the soil evaporation rate from one layer in m3/day \n" - ""}, - { (char *)"delete_soil_evaporation_method", (PyCFunction)_wrap_delete_soil_evaporation_method, METH_O, (char *)"\n" - "delete_soil_evaporation_method(soil_evaporation_method self)\n" - "\n" - "virtual ~soil_evaporation_method() \n" - ""}, - { (char *)"soil_evaporation_method_swigregister", soil_evaporation_method_swigregister, METH_VARARGS, NULL}, - { (char *)"surface_water_evaporation_method_evap_from_openwater", (PyCFunction) _wrap_surface_water_evaporation_method_evap_from_openwater, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "surface_water_evaporation_method_evap_from_openwater(surface_water_evaporation_method self, cmf::river::OpenWaterStorage::ptr arg3, Time arg4) -> double\n" - "\n" - "virtual double\n" - "evap_from_openwater(cmf::river::OpenWaterStorage::ptr,\n" - "cmf::math::Time)=0 \n" - ""}, - { (char *)"delete_surface_water_evaporation_method", (PyCFunction)_wrap_delete_surface_water_evaporation_method, METH_O, (char *)"\n" - "delete_surface_water_evaporation_method(surface_water_evaporation_method self)\n" - "\n" - "virtual ~surface_water_evaporation_method() \n" - ""}, - { (char *)"surface_water_evaporation_method_swigregister", surface_water_evaporation_method_swigregister, METH_VARARGS, NULL}, - { (char *)"canopy_evaporation_method_evap_from_canopy", (PyCFunction) _wrap_canopy_evaporation_method_evap_from_canopy, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "canopy_evaporation_method_evap_from_canopy(canopy_evaporation_method self, cmf::water::WaterStorage::ptr arg3, Time arg4) -> double\n" - "\n" - "virtual double evap_from_canopy(cmf::water::WaterStorage::ptr,\n" - "cmf::math::Time)=0 \n" - ""}, - { (char *)"delete_canopy_evaporation_method", (PyCFunction)_wrap_delete_canopy_evaporation_method, METH_O, (char *)"\n" - "delete_canopy_evaporation_method(canopy_evaporation_method self)\n" - "\n" - "virtual ~canopy_evaporation_method() \n" - ""}, - { (char *)"canopy_evaporation_method_swigregister", canopy_evaporation_method_swigregister, METH_VARARGS, NULL}, - { (char *)"snow_evaporation_method_evap_from_snow", (PyCFunction) _wrap_snow_evaporation_method_evap_from_snow, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "snow_evaporation_method_evap_from_snow(snow_evaporation_method self, cmf::water::WaterStorage::ptr snow, Time t) -> double\n" - "\n" - "virtual\n" - "double evap_from_snow(cmf::water::WaterStorage::ptr snow,\n" - "cmf::math::Time t)=0 \n" - ""}, - { (char *)"delete_snow_evaporation_method", (PyCFunction)_wrap_delete_snow_evaporation_method, METH_O, (char *)"\n" - "delete_snow_evaporation_method(snow_evaporation_method self)\n" - "\n" - "virtual ~snow_evaporation_method() \n" - ""}, - { (char *)"snow_evaporation_method_swigregister", snow_evaporation_method_swigregister, METH_VARARGS, NULL}, - { (char *)"new_transpiration", (PyCFunction) _wrap_new_transpiration, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "new_transpiration(cmf::upslope::SoilLayer::ptr source, cmf::water::flux_node::ptr ET_target, std::shared_ptr< cmf::upslope::ET::transpiration_method > _method, std::string method_name) -> transpiration\n" - "\n" - "transpiration(cmf::upslope::SoilLayer::ptr source,\n" - "cmf::water::flux_node::ptr ET_target, std::shared_ptr<\n" - "transpiration_method > _method, std::string method_name) \n" - ""}, - { (char *)"delete_transpiration", (PyCFunction)_wrap_delete_transpiration, METH_O, (char *)"delete_transpiration(transpiration self)"}, - { (char *)"transpiration_swigregister", transpiration_swigregister, METH_VARARGS, NULL}, - { (char *)"transpiration_swiginit", transpiration_swiginit, METH_VARARGS, NULL}, - { (char *)"new_soil_evaporation", (PyCFunction) _wrap_new_soil_evaporation, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "new_soil_evaporation(cmf::upslope::SoilLayer::ptr source, cmf::water::flux_node::ptr ET_target, std::shared_ptr< cmf::upslope::ET::soil_evaporation_method > _method, std::string method_name) -> soil_evaporation\n" - "\n" - "soil_evaporation(cmf::upslope::SoilLayer::ptr source,\n" - "cmf::water::flux_node::ptr ET_target, std::shared_ptr<\n" - "soil_evaporation_method > _method, std::string method_name) \n" - ""}, - { (char *)"delete_soil_evaporation", (PyCFunction)_wrap_delete_soil_evaporation, METH_O, (char *)"delete_soil_evaporation(soil_evaporation self)"}, - { (char *)"soil_evaporation_swigregister", soil_evaporation_swigregister, METH_VARARGS, NULL}, - { (char *)"soil_evaporation_swiginit", soil_evaporation_swiginit, METH_VARARGS, NULL}, - { (char *)"new_canopy_evaporation", (PyCFunction) _wrap_new_canopy_evaporation, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "new_canopy_evaporation(cmf::water::WaterStorage::ptr source, cmf::water::flux_node::ptr ET_target, std::shared_ptr< cmf::upslope::ET::canopy_evaporation_method > _method, std::string method_name) -> canopy_evaporation\n" - "\n" - "canopy_evaporation(cmf::water::WaterStorage::ptr source,\n" - "cmf::water::flux_node::ptr ET_target, std::shared_ptr<\n" - "canopy_evaporation_method > _method, std::string method_name) \n" - ""}, - { (char *)"delete_canopy_evaporation", (PyCFunction)_wrap_delete_canopy_evaporation, METH_O, (char *)"delete_canopy_evaporation(canopy_evaporation self)"}, - { (char *)"canopy_evaporation_swigregister", canopy_evaporation_swigregister, METH_VARARGS, NULL}, - { (char *)"canopy_evaporation_swiginit", canopy_evaporation_swiginit, METH_VARARGS, NULL}, - { (char *)"new_snow_evaporation", (PyCFunction) _wrap_new_snow_evaporation, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "new_snow_evaporation(cmf::water::WaterStorage::ptr source, cmf::water::flux_node::ptr ET_target, std::shared_ptr< cmf::upslope::ET::snow_evaporation_method > _method, std::string method_name) -> snow_evaporation\n" - "\n" - "snow_evaporation(cmf::water::WaterStorage::ptr source,\n" - "cmf::water::flux_node::ptr ET_target, std::shared_ptr<\n" - "snow_evaporation_method > _method, std::string method_name) \n" - ""}, - { (char *)"delete_snow_evaporation", (PyCFunction)_wrap_delete_snow_evaporation, METH_O, (char *)"delete_snow_evaporation(snow_evaporation self)"}, - { (char *)"snow_evaporation_swigregister", snow_evaporation_swigregister, METH_VARARGS, NULL}, - { (char *)"snow_evaporation_swiginit", snow_evaporation_swiginit, METH_VARARGS, NULL}, - { (char *)"new_surface_water_evaporation", (PyCFunction) _wrap_new_surface_water_evaporation, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "new_surface_water_evaporation(cmf::river::OpenWaterStorage::ptr source, cmf::water::flux_node::ptr ET_target, std::shared_ptr< cmf::upslope::ET::surface_water_evaporation_method > _method, std::string method_name) -> surface_water_evaporation\n" - "\n" - "surface_water_evaporation(cmf::river::OpenWaterStorage::ptr source,\n" - "cmf::water::flux_node::ptr ET_target, std::shared_ptr<\n" - "surface_water_evaporation_method > _method, std::string method_name)\n" - "\n" - ""}, - { (char *)"delete_surface_water_evaporation", (PyCFunction)_wrap_delete_surface_water_evaporation, METH_O, (char *)"delete_surface_water_evaporation(surface_water_evaporation self)"}, - { (char *)"surface_water_evaporation_swigregister", surface_water_evaporation_swigregister, METH_VARARGS, NULL}, - { (char *)"surface_water_evaporation_swiginit", surface_water_evaporation_swiginit, METH_VARARGS, NULL}, - { (char *)"PenmanMonteith", _wrap_PenmanMonteith, METH_VARARGS, (char *)"\n" - "PenmanMonteith(real Rn, real ra, real rs, real T, real vap_press_deficit) -> real\n" - "PenmanMonteith(Weather A, Vegetation veg, double h) -> real\n" - "\n" - "real\n" - "cmf::upslope::ET::PenmanMonteith(cmf::atmosphere::Weather A, const\n" - "cmf::upslope::vegetation::Vegetation &veg, double h)\n" - "\n" - "Returns the potential ET after Penman-Monteith using some\n" - "simplifications for a weather and a vegetation object.\n" - "\n" - "aerodynamic and surface resistances, and a vapor pressure deficit\n" - "\n" - "Parameters:\n" - "-----------\n" - "\n" - "A: Current weather\n" - "\n" - "veg: Vegetation data\n" - "\n" - "h: Height above sea level in m (for air pressure estimation) \n" - ""}, - { (char *)"stressedET_set_stressfunction", (PyCFunction) _wrap_stressedET_set_stressfunction, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "stressedET_set_stressfunction(stressedET self, RootUptakeStessFunction stressfunction)\n" - "\n" - "void\n" - "set_stressfunction(const RootUptakeStessFunction &stressfunction)\n" - "\n" - "Sets the stress function to limit water uptake. \n" - ""}, - { (char *)"stressedET_get_layer", (PyCFunction)_wrap_stressedET_get_layer, METH_O, (char *)"\n" - "stressedET_get_layer(stressedET self) -> cmf::upslope::SoilLayer::ptr\n" - "\n" - "SoilLayer::ptr get_layer() const \n" - ""}, - { (char *)"stressedET_ETpot", (PyCFunction) _wrap_stressedET_ETpot, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "stressedET_ETpot(stressedET self, Time t) -> real\n" - "\n" - "virtual\n" - "real ETpot(cmf::math::Time t) const \n" - ""}, - { (char *)"delete_stressedET", (PyCFunction)_wrap_delete_stressedET, METH_O, (char *)"delete_stressedET(stressedET self)"}, - { (char *)"stressedET_swigregister", stressedET_swigregister, METH_VARARGS, NULL}, - { (char *)"constantETpot_ETpot_value_set", _wrap_constantETpot_ETpot_value_set, METH_VARARGS, (char *)"constantETpot_ETpot_value_set(constantETpot self, real ETpot_value)"}, - { (char *)"constantETpot_ETpot_value_get", (PyCFunction)_wrap_constantETpot_ETpot_value_get, METH_O, (char *)"constantETpot_ETpot_value_get(constantETpot self) -> real"}, - { (char *)"constantETpot_GetETpot", (PyCFunction) _wrap_constantETpot_GetETpot, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "constantETpot_GetETpot(constantETpot self, Time t) -> real\n" - "\n" - "real GetETpot(cmf::math::Time t) const \n" - ""}, - { (char *)"new_constantETpot", (PyCFunction) _wrap_new_constantETpot, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "new_constantETpot(cmf::upslope::SoilLayer::ptr source, cmf::water::flux_node::ptr ET_target, double constantETpot_value) -> constantETpot\n" - "\n" - "constantETpot(cmf::upslope::SoilLayer::ptr source,\n" - "cmf::water::flux_node::ptr ET_target, double constantETpot_value) \n" - ""}, - { (char *)"delete_constantETpot", (PyCFunction)_wrap_delete_constantETpot, METH_O, (char *)"delete_constantETpot(constantETpot self)"}, - { (char *)"constantETpot_swigregister", constantETpot_swigregister, METH_VARARGS, NULL}, - { (char *)"constantETpot_swiginit", constantETpot_swiginit, METH_VARARGS, NULL}, - { (char *)"timeseriesETpot_ETpot_data_set", _wrap_timeseriesETpot_ETpot_data_set, METH_VARARGS, (char *)"timeseriesETpot_ETpot_data_set(timeseriesETpot self, timeseries ETpot_data)"}, - { (char *)"timeseriesETpot_ETpot_data_get", (PyCFunction)_wrap_timeseriesETpot_ETpot_data_get, METH_O, (char *)"timeseriesETpot_ETpot_data_get(timeseriesETpot self) -> timeseries"}, - { (char *)"new_timeseriesETpot", (PyCFunction) _wrap_new_timeseriesETpot, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "new_timeseriesETpot(cmf::upslope::SoilLayer::ptr source, cmf::water::flux_node::ptr ET_target, timeseries ETpot_values) -> timeseriesETpot\n" - "\n" - "timeseriesETpot(cmf::upslope::SoilLayer::ptr source,\n" - "cmf::water::flux_node::ptr ET_target, cmf::math::timeseries\n" - "ETpot_values) \n" - ""}, - { (char *)"delete_timeseriesETpot", (PyCFunction)_wrap_delete_timeseriesETpot, METH_O, (char *)"delete_timeseriesETpot(timeseriesETpot self)"}, - { (char *)"timeseriesETpot_swigregister", timeseriesETpot_swigregister, METH_VARARGS, NULL}, - { (char *)"timeseriesETpot_swiginit", timeseriesETpot_swiginit, METH_VARARGS, NULL}, - { (char *)"PenmanMonteithET_daily_set", _wrap_PenmanMonteithET_daily_set, METH_VARARGS, (char *)"PenmanMonteithET_daily_set(PenmanMonteithET self, bool daily)"}, - { (char *)"PenmanMonteithET_daily_get", (PyCFunction)_wrap_PenmanMonteithET_daily_get, METH_O, (char *)"PenmanMonteithET_daily_get(PenmanMonteithET self) -> bool"}, - { (char *)"new_PenmanMonteithET", (PyCFunction) _wrap_new_PenmanMonteithET, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "new_PenmanMonteithET(cmf::upslope::SoilLayer::ptr source, cmf::water::flux_node::ptr ET_target) -> PenmanMonteithET\n" - "\n" - "PenmanMonteithET(cmf::upslope::SoilLayer::ptr source,\n" - "cmf::water::flux_node::ptr ET_target) \n" - ""}, - { (char *)"PenmanMonteithET_r_s", (PyCFunction) _wrap_PenmanMonteithET_r_s, METH_VARARGS | METH_KEYWORDS, (char *)"PenmanMonteithET_r_s(Vegetation veg) -> real"}, - { (char *)"PenmanMonteithET_r_a", (PyCFunction) _wrap_PenmanMonteithET_r_a, METH_VARARGS | METH_KEYWORDS, (char *)"PenmanMonteithET_r_a(Weather A, real veg_height) -> real"}, - { (char *)"PenmanMonteithET_use_for_cell", (PyCFunction) _wrap_PenmanMonteithET_use_for_cell, METH_VARARGS | METH_KEYWORDS, (char *)"PenmanMonteithET_use_for_cell(Cell cell)"}, - { (char *)"delete_PenmanMonteithET", (PyCFunction)_wrap_delete_PenmanMonteithET, METH_O, (char *)"delete_PenmanMonteithET(PenmanMonteithET self)"}, - { (char *)"PenmanMonteithET_swigregister", PenmanMonteithET_swigregister, METH_VARARGS, NULL}, - { (char *)"PenmanMonteithET_swiginit", PenmanMonteithET_swiginit, METH_VARARGS, NULL}, - { (char *)"PriestleyTaylorET_daily_set", _wrap_PriestleyTaylorET_daily_set, METH_VARARGS, (char *)"PriestleyTaylorET_daily_set(PriestleyTaylorET self, bool daily)"}, - { (char *)"PriestleyTaylorET_daily_get", (PyCFunction)_wrap_PriestleyTaylorET_daily_get, METH_O, (char *)"PriestleyTaylorET_daily_get(PriestleyTaylorET self) -> bool"}, - { (char *)"PriestleyTaylorET_alpha_set", _wrap_PriestleyTaylorET_alpha_set, METH_VARARGS, (char *)"PriestleyTaylorET_alpha_set(PriestleyTaylorET self, real alpha)"}, - { (char *)"PriestleyTaylorET_alpha_get", (PyCFunction)_wrap_PriestleyTaylorET_alpha_get, METH_O, (char *)"PriestleyTaylorET_alpha_get(PriestleyTaylorET self) -> real"}, - { (char *)"new_PriestleyTaylorET", (PyCFunction) _wrap_new_PriestleyTaylorET, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "new_PriestleyTaylorET(cmf::upslope::SoilLayer::ptr source, cmf::water::flux_node::ptr ET_target, real alpha=1.26) -> PriestleyTaylorET\n" - "\n" - "PriestleyTaylorET(cmf::upslope::SoilLayer::ptr source,\n" - "cmf::water::flux_node::ptr ET_target, real alpha=1.26) \n" - ""}, - { (char *)"PriestleyTaylorET_use_for_cell", (PyCFunction) _wrap_PriestleyTaylorET_use_for_cell, METH_VARARGS | METH_KEYWORDS, (char *)"PriestleyTaylorET_use_for_cell(Cell cell)"}, - { (char *)"delete_PriestleyTaylorET", (PyCFunction)_wrap_delete_PriestleyTaylorET, METH_O, (char *)"delete_PriestleyTaylorET(PriestleyTaylorET self)"}, - { (char *)"PriestleyTaylorET_swigregister", PriestleyTaylorET_swigregister, METH_VARARGS, NULL}, - { (char *)"PriestleyTaylorET_swiginit", PriestleyTaylorET_swiginit, METH_VARARGS, NULL}, - { (char *)"new_HargreaveET", (PyCFunction) _wrap_new_HargreaveET, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "new_HargreaveET(cmf::upslope::SoilLayer::ptr source, cmf::water::flux_node::ptr ET_target, real latitude=51.0) -> HargreaveET\n" - "\n" - "HargreaveET(cmf::upslope::SoilLayer::ptr source,\n" - "cmf::water::flux_node::ptr ET_target, real latitude=51.0) \n" - ""}, - { (char *)"HargreaveET_lat_set", _wrap_HargreaveET_lat_set, METH_VARARGS, (char *)"HargreaveET_lat_set(HargreaveET self, real lat)"}, - { (char *)"HargreaveET_lat_get", (PyCFunction)_wrap_HargreaveET_lat_get, METH_O, (char *)"HargreaveET_lat_get(HargreaveET self) -> real"}, - { (char *)"HargreaveET_use_for_cell", (PyCFunction) _wrap_HargreaveET_use_for_cell, METH_VARARGS | METH_KEYWORDS, (char *)"HargreaveET_use_for_cell(Cell cell)"}, - { (char *)"delete_HargreaveET", (PyCFunction)_wrap_delete_HargreaveET, METH_O, (char *)"delete_HargreaveET(HargreaveET self)"}, - { (char *)"HargreaveET_swigregister", HargreaveET_swigregister, METH_VARARGS, NULL}, - { (char *)"HargreaveET_swiginit", HargreaveET_swiginit, METH_VARARGS, NULL}, - { (char *)"new_TurcET", (PyCFunction) _wrap_new_TurcET, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "new_TurcET(cmf::upslope::SoilLayer::ptr source, cmf::water::flux_node::ptr ET_target) -> TurcET\n" - "\n" - "TurcET(cmf::upslope::SoilLayer::ptr source, cmf::water::flux_node::ptr\n" - "ET_target) \n" - ""}, - { (char *)"TurcET_use_for_cell", (PyCFunction) _wrap_TurcET_use_for_cell, METH_VARARGS | METH_KEYWORDS, (char *)"TurcET_use_for_cell(Cell cell)"}, - { (char *)"delete_TurcET", (PyCFunction)_wrap_delete_TurcET, METH_O, (char *)"delete_TurcET(TurcET self)"}, - { (char *)"TurcET_swigregister", TurcET_swigregister, METH_VARARGS, NULL}, - { (char *)"TurcET_swiginit", TurcET_swiginit, METH_VARARGS, NULL}, - { (char *)"new_CanopyStorageEvaporation", (PyCFunction) _wrap_new_CanopyStorageEvaporation, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "new_CanopyStorageEvaporation(cmf::water::WaterStorage::ptr CanopyStorage, cmf::water::flux_node::ptr ET_target, Cell cell) -> CanopyStorageEvaporation\n" - "\n" - "CanopyStorageEvaporation(cmf::water::WaterStorage::ptr CanopyStorage,\n" - "cmf::water::flux_node::ptr ET_target, cmf::upslope::Cell &cell) \n" - ""}, - { (char *)"delete_CanopyStorageEvaporation", (PyCFunction)_wrap_delete_CanopyStorageEvaporation, METH_O, (char *)"delete_CanopyStorageEvaporation(CanopyStorageEvaporation self)"}, - { (char *)"CanopyStorageEvaporation_swigregister", CanopyStorageEvaporation_swigregister, METH_VARARGS, NULL}, - { (char *)"CanopyStorageEvaporation_swiginit", CanopyStorageEvaporation_swiginit, METH_VARARGS, NULL}, - { (char *)"new_PenmanEvaporation", (PyCFunction) _wrap_new_PenmanEvaporation, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "new_PenmanEvaporation(cmf::river::OpenWaterStorage::ptr source, cmf::water::flux_node::ptr Evap_target, Meteorology meteo) -> PenmanEvaporation\n" - "\n" - "PenmanEvaporation(cmf::river::OpenWaterStorage::ptr source,\n" - "cmf::water::flux_node::ptr Evap_target, const\n" - "cmf::atmosphere::Meteorology &meteo) \n" - ""}, - { (char *)"delete_PenmanEvaporation", (PyCFunction)_wrap_delete_PenmanEvaporation, METH_O, (char *)"delete_PenmanEvaporation(PenmanEvaporation self)"}, - { (char *)"PenmanEvaporation_swigregister", PenmanEvaporation_swigregister, METH_VARARGS, NULL}, - { (char *)"PenmanEvaporation_swiginit", PenmanEvaporation_swiginit, METH_VARARGS, NULL}, - { (char *)"ShuttleworthWallace_RAA_set", _wrap_ShuttleworthWallace_RAA_set, METH_VARARGS, (char *)"ShuttleworthWallace_RAA_set(ShuttleworthWallace self, double RAA)"}, - { (char *)"ShuttleworthWallace_RAA_get", (PyCFunction)_wrap_ShuttleworthWallace_RAA_get, METH_O, (char *)"ShuttleworthWallace_RAA_get(ShuttleworthWallace self) -> double"}, - { (char *)"ShuttleworthWallace_RAC_set", _wrap_ShuttleworthWallace_RAC_set, METH_VARARGS, (char *)"ShuttleworthWallace_RAC_set(ShuttleworthWallace self, double RAC)"}, - { (char *)"ShuttleworthWallace_RAC_get", (PyCFunction)_wrap_ShuttleworthWallace_RAC_get, METH_O, (char *)"ShuttleworthWallace_RAC_get(ShuttleworthWallace self) -> double"}, - { (char *)"ShuttleworthWallace_RAS_set", _wrap_ShuttleworthWallace_RAS_set, METH_VARARGS, (char *)"ShuttleworthWallace_RAS_set(ShuttleworthWallace self, double RAS)"}, - { (char *)"ShuttleworthWallace_RAS_get", (PyCFunction)_wrap_ShuttleworthWallace_RAS_get, METH_O, (char *)"ShuttleworthWallace_RAS_get(ShuttleworthWallace self) -> double"}, - { (char *)"ShuttleworthWallace_RSS_set", _wrap_ShuttleworthWallace_RSS_set, METH_VARARGS, (char *)"ShuttleworthWallace_RSS_set(ShuttleworthWallace self, double RSS)"}, - { (char *)"ShuttleworthWallace_RSS_get", (PyCFunction)_wrap_ShuttleworthWallace_RSS_get, METH_O, (char *)"ShuttleworthWallace_RSS_get(ShuttleworthWallace self) -> double"}, - { (char *)"ShuttleworthWallace_RSC_set", _wrap_ShuttleworthWallace_RSC_set, METH_VARARGS, (char *)"ShuttleworthWallace_RSC_set(ShuttleworthWallace self, double RSC)"}, - { (char *)"ShuttleworthWallace_RSC_get", (PyCFunction)_wrap_ShuttleworthWallace_RSC_get, METH_O, (char *)"ShuttleworthWallace_RSC_get(ShuttleworthWallace self) -> double"}, - { (char *)"ShuttleworthWallace_refresh_counter_set", _wrap_ShuttleworthWallace_refresh_counter_set, METH_VARARGS, (char *)"ShuttleworthWallace_refresh_counter_set(ShuttleworthWallace self, int refresh_counter)"}, - { (char *)"ShuttleworthWallace_refresh_counter_get", (PyCFunction)_wrap_ShuttleworthWallace_refresh_counter_get, METH_O, (char *)"ShuttleworthWallace_refresh_counter_get(ShuttleworthWallace self) -> int"}, - { (char *)"ShuttleworthWallace_refresh", _wrap_ShuttleworthWallace_refresh, METH_VARARGS, (char *)"\n" - "refresh(Time t)\n" - "ShuttleworthWallace_refresh(ShuttleworthWallace self)\n" - "\n" - "void refresh() \n" - ""}, - { (char *)"ShuttleworthWallace_PTR_set", _wrap_ShuttleworthWallace_PTR_set, METH_VARARGS, (char *)"ShuttleworthWallace_PTR_set(ShuttleworthWallace self, double PTR)"}, - { (char *)"ShuttleworthWallace_PTR_get", (PyCFunction)_wrap_ShuttleworthWallace_PTR_get, METH_O, (char *)"ShuttleworthWallace_PTR_get(ShuttleworthWallace self) -> double"}, - { (char *)"ShuttleworthWallace_PSNVP_set", _wrap_ShuttleworthWallace_PSNVP_set, METH_VARARGS, (char *)"ShuttleworthWallace_PSNVP_set(ShuttleworthWallace self, double PSNVP)"}, - { (char *)"ShuttleworthWallace_PSNVP_get", (PyCFunction)_wrap_ShuttleworthWallace_PSNVP_get, METH_O, (char *)"ShuttleworthWallace_PSNVP_get(ShuttleworthWallace self) -> double"}, - { (char *)"ShuttleworthWallace_ASNVP_set", _wrap_ShuttleworthWallace_ASNVP_set, METH_VARARGS, (char *)"ShuttleworthWallace_ASNVP_set(ShuttleworthWallace self, double ASNVP)"}, - { (char *)"ShuttleworthWallace_ASNVP_get", (PyCFunction)_wrap_ShuttleworthWallace_ASNVP_get, METH_O, (char *)"ShuttleworthWallace_ASNVP_get(ShuttleworthWallace self) -> double"}, - { (char *)"ShuttleworthWallace_GER_set", _wrap_ShuttleworthWallace_GER_set, METH_VARARGS, (char *)"ShuttleworthWallace_GER_set(ShuttleworthWallace self, double GER)"}, - { (char *)"ShuttleworthWallace_GER_get", (PyCFunction)_wrap_ShuttleworthWallace_GER_get, METH_O, (char *)"ShuttleworthWallace_GER_get(ShuttleworthWallace self) -> double"}, - { (char *)"ShuttleworthWallace_PIR_set", _wrap_ShuttleworthWallace_PIR_set, METH_VARARGS, (char *)"ShuttleworthWallace_PIR_set(ShuttleworthWallace self, double PIR)"}, - { (char *)"ShuttleworthWallace_PIR_get", (PyCFunction)_wrap_ShuttleworthWallace_PIR_get, METH_O, (char *)"ShuttleworthWallace_PIR_get(ShuttleworthWallace self) -> double"}, - { (char *)"ShuttleworthWallace_AIR_set", _wrap_ShuttleworthWallace_AIR_set, METH_VARARGS, (char *)"ShuttleworthWallace_AIR_set(ShuttleworthWallace self, double AIR)"}, - { (char *)"ShuttleworthWallace_AIR_get", (PyCFunction)_wrap_ShuttleworthWallace_AIR_get, METH_O, (char *)"ShuttleworthWallace_AIR_get(ShuttleworthWallace self) -> double"}, - { (char *)"ShuttleworthWallace_GIR_set", _wrap_ShuttleworthWallace_GIR_set, METH_VARARGS, (char *)"ShuttleworthWallace_GIR_set(ShuttleworthWallace self, double GIR)"}, - { (char *)"ShuttleworthWallace_GIR_get", (PyCFunction)_wrap_ShuttleworthWallace_GIR_get, METH_O, (char *)"ShuttleworthWallace_GIR_get(ShuttleworthWallace self) -> double"}, - { (char *)"ShuttleworthWallace_ATR_sum_set", _wrap_ShuttleworthWallace_ATR_sum_set, METH_VARARGS, (char *)"ShuttleworthWallace_ATR_sum_set(ShuttleworthWallace self, double ATR_sum)"}, - { (char *)"ShuttleworthWallace_ATR_sum_get", (PyCFunction)_wrap_ShuttleworthWallace_ATR_sum_get, METH_O, (char *)"ShuttleworthWallace_ATR_sum_get(ShuttleworthWallace self) -> double"}, - { (char *)"ShuttleworthWallace_ATR_set", _wrap_ShuttleworthWallace_ATR_set, METH_VARARGS, (char *)"ShuttleworthWallace_ATR_set(ShuttleworthWallace self, cmf::math::num_array ATR)"}, - { (char *)"ShuttleworthWallace_ATR_get", (PyCFunction)_wrap_ShuttleworthWallace_ATR_get, METH_O, (char *)"ShuttleworthWallace_ATR_get(ShuttleworthWallace self) -> cmf::math::num_array"}, - { (char *)"ShuttleworthWallace_KSNVP_set", _wrap_ShuttleworthWallace_KSNVP_set, METH_VARARGS, (char *)"ShuttleworthWallace_KSNVP_set(ShuttleworthWallace self, double KSNVP)"}, - { (char *)"ShuttleworthWallace_KSNVP_get", (PyCFunction)_wrap_ShuttleworthWallace_KSNVP_get, METH_O, (char *)"ShuttleworthWallace_KSNVP_get(ShuttleworthWallace self) -> double"}, - { (char *)"ShuttleworthWallace_allow_dew_set", _wrap_ShuttleworthWallace_allow_dew_set, METH_VARARGS, (char *)"ShuttleworthWallace_allow_dew_set(ShuttleworthWallace self, bool allow_dew)"}, - { (char *)"ShuttleworthWallace_allow_dew_get", (PyCFunction)_wrap_ShuttleworthWallace_allow_dew_get, METH_O, (char *)"ShuttleworthWallace_allow_dew_get(ShuttleworthWallace self) -> bool"}, - { (char *)"ShuttleworthWallace_set_RSS_parameters", (PyCFunction) _wrap_ShuttleworthWallace_set_RSS_parameters, METH_VARARGS | METH_KEYWORDS, (char *)"ShuttleworthWallace_set_RSS_parameters(double _RSSa=500., double _RSSb=1.0, double _RSSa_pot=-3.22)"}, - { (char *)"new_ShuttleworthWallace", (PyCFunction) _wrap_new_ShuttleworthWallace, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "new_ShuttleworthWallace(Cell cell, bool allow_dew=True) -> ShuttleworthWallace\n" - "\n" - "ShuttleworthWallace(cmf::upslope::Cell &cell, bool allow_dew=true)\n" - "\n" - "Calculates the transpiration and the soil evaporation from dry\n" - "surfaces. \n" - ""}, - { (char *)"ShuttleworthWallace_use_for_cell", (PyCFunction) _wrap_ShuttleworthWallace_use_for_cell, METH_VARARGS | METH_KEYWORDS, (char *)"ShuttleworthWallace_use_for_cell(Cell cell) -> ShuttleworthWallace"}, - { (char *)"delete_ShuttleworthWallace", (PyCFunction)_wrap_delete_ShuttleworthWallace, METH_O, (char *)"\n" - "delete_ShuttleworthWallace(ShuttleworthWallace self)\n" - "\n" - "virtual\n" - "~ShuttleworthWallace() \n" - ""}, - { (char *)"ShuttleworthWallace_swigregister", ShuttleworthWallace_swigregister, METH_VARARGS, NULL}, - { (char *)"ShuttleworthWallace_swiginit", ShuttleworthWallace_swiginit, METH_VARARGS, NULL}, - { (char *)"project_remove_node", (PyCFunction) _wrap_project_remove_node, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "project_remove_node(project self, cmf::water::flux_node::ptr node) -> size_t\n" - "\n" - "size_t\n" - "remove_node(cmf::water::flux_node::ptr node)\n" - "\n" - "Removes a node from the repository.\n" - "\n" - "Removes a node (boundary condition or water storage) from the node\n" - "repository of the project. NOTE: If you have other references to this\n" - "node, the node is not deleted. If you are creating a new solver, the\n" - "node will not be part of the solver. \n" - ""}, - { (char *)"project_solutes_get", (PyCFunction)_wrap_project_solutes_get, METH_O, (char *)"project_solutes_get(project self) -> solute_vector"}, - { (char *)"project_meteo_stations_set", _wrap_project_meteo_stations_set, METH_VARARGS, (char *)"project_meteo_stations_set(project self, MeteoStationList meteo_stations)"}, - { (char *)"project_meteo_stations_get", (PyCFunction)_wrap_project_meteo_stations_get, METH_O, (char *)"project_meteo_stations_get(project self) -> MeteoStationList"}, - { (char *)"project_rainfall_stations_set", _wrap_project_rainfall_stations_set, METH_VARARGS, (char *)"project_rainfall_stations_set(project self, RainfallStationList rainfall_stations)"}, - { (char *)"project_rainfall_stations_get", (PyCFunction)_wrap_project_rainfall_stations_get, METH_O, (char *)"project_rainfall_stations_get(project self) -> RainfallStationList"}, - { (char *)"project_use_IDW_meteo", (PyCFunction) _wrap_project_use_IDW_meteo, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "project_use_IDW_meteo(project self, double z_weight=0, double power=2)\n" - "\n" - "void\n" - "use_IDW_meteo(double z_weight=0, double power=2)\n" - "\n" - "Uses IDW interpolation to generate meterological data for each cell of\n" - "project.\n" - "\n" - "Creates a meteo-data source for each cell, using spatial interpolated\n" - "data from all meteorological stations of the project using Inverse\n" - "Distance Weighted (IDW) interpolation. The meteorolgical value f is\n" - "calculated with IDW for position x,y,z and time t as follows:\n" - "\n" - "\n" - ".. math::\n" - "\n" - " f(x,y,z,t) &=& \\\\sum^N_{i=1}{f_i(t) w_i(x,y,z)}\n" - " \\\\\\\\ w_i(x,y,z) &=&\n" - " \\\\frac{d_i(x,y,z)^{-p}}{\\\\sum^N_{j=0}{d_j(x,y,z)^{-p}}} \\\\\\\\\n" - " d_i(x,y,z) &=& w_z \\\\left|z-z_i\\\\right| +\n" - " \\\\sqrt{\\\\left(x-x_i\\\\right)^2 + \\\\left(y-y_i\\\\right)^2}\n" - "\n" - "\n" - " :math:`N` is the number of stations\n" - "\n" - ":math:`f_i(t)` the meteorological value at time t, eg. Temperature, Humidity\n" - "\n" - ":math:`w_i` is the weight of station i\n" - "\n" - ":math:`d_i` is the distance from x,y,z to station i\n" - "\n" - ":math:`p` the power of the weighting function, usually 2.\n" - "\n" - ":math:`x_i,y_i,z_i` is the position of station i in space\n" - "\n" - ":math:`w_z` is a factor to weight the vertical distance between stations and\n" - "the cell. 0 results in a pure horizontal interpolation (normal IDW).\n" - "If :math:`w_z=1`, height difference is as important as horizontal distance,\n" - "and with :math:`w_z>1` the height difference is weighted more important than\n" - "horizontal distance See: IDW_Meteorology\n" - "\n" - "Parameters:\n" - "-----------\n" - "\n" - "z_weight: :math:`w_z` the weight of height difference between cell and\n" - "station\n" - "\n" - "power: the power of the distance weight \n" - ""}, - { (char *)"project_use_nearest_meteo", (PyCFunction) _wrap_project_use_nearest_meteo, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "project_use_nearest_meteo(project self, double z_weight=0)\n" - "\n" - "void\n" - "use_nearest_meteo(double z_weight=0)\n" - "\n" - "Connects all cells of the project with its nearest meteorological\n" - "station.\n" - "\n" - "Distance is calculated as follows: \n" - "\n" - ".. math::\n" - "\n" - " d_i(x,y,z) = w_z\n" - " \\\\left|z-z_i\\\\right| + \\\\sqrt{\\\\left(x-x_i\\\\right)^2 +\n" - " \\\\left(y-y_i\\\\right)^2} \n" - "\n" - ":math:`d_i` is the distance from x,y,z to\n" - "station i\n" - "\n" - ":math:`p` the power of the weighting function, usually 2.\n" - "\n" - ":math:`x_i,y_i,z_i` is the position of station i in space\n" - "\n" - ":math:`w_z` is a factor to weight the vertical distance between stations and\n" - "the cell. 0 results in a pure horizontal interpolation (normal IDW).\n" - "If :math:`w_z=1`, height difference is as important as horizontal distance,\n" - "and with :math:`w_z>1` the height difference is weighted more important than\n" - "horizontal distance\n" - "\n" - "Parameters:\n" - "-----------\n" - "\n" - "z_weight: :math:`w_z` the weight of height difference between cell and\n" - "station \n" - ""}, - { (char *)"project_use_IDW_rainfall", (PyCFunction) _wrap_project_use_IDW_rainfall, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "project_use_IDW_rainfall(project self, double z_weight=0, double power=2)\n" - "\n" - "void\n" - "use_IDW_rainfall(double z_weight=0, double power=2)\n" - "\n" - "Uses IDW interpolation to generate rainfall data for each cell of\n" - "project.\n" - "\n" - "Creates a rainfall-data source for each cell, using spatial\n" - "interpolated data from all meteorological stations of the project\n" - "using Inverse Distance Weighted (IDW) interpolation. The rainfall\n" - "intensity P is calculated with IDW for position x,y,z and time t as\n" - "follows: \n" - "\n" - ".. math::\n" - "\n" - " P(x,y,z,t) &=& \\\\sum^N_{i=1}{P_i(t)\n" - " w_i(x,y,z)} \\\\\\\\ w_i(x,y,z) &=&\n" - " \\\\frac{d_i(x,y,z)^{-p}}{\\\\sum^N_{j=0}{d_j(x,y,z)^{-p}}} \\\\\\\\\n" - " d_i(x,y,z) &=& w_z \\\\left|z-z_i\\\\right| +\n" - " \\\\sqrt{\\\\left(x-x_i\\\\right)^2 + \\\\left(y-y_i\\\\right)^2}\n" - "\n" - "\n" - " :math:`N` is the number of stations\n" - "\n" - ":math:`P_i(t)` the meteorological value at time t, eg. Temperature, Humidity\n" - "\n" - ":math:`w_i` is the weight of station i\n" - "\n" - ":math:`d_i` is the distance from x,y,z to station i\n" - "\n" - ":math:`p` the power of the weighting function, usually 2.\n" - "\n" - ":math:`x_i,y_i,z_i` is the position of station i in space\n" - "\n" - ":math:`w_z` is a factor to weight the vertical distance between stations and\n" - "the cell. 0 results in a pure horizontal interpolation (normal IDW).\n" - "If :math:`w_z=1`, height difference is as important as horizontal distance,\n" - "and with :math:`w_z>1` the height difference is weighted more important than\n" - "horizontal distance See: IDW_Meteorology\n" - "\n" - "Parameters:\n" - "-----------\n" - "\n" - "z_weight: :math:`w_z` the weight of height difference between cell and\n" - "station\n" - "\n" - "power: the power of the distance weight \n" - ""}, - { (char *)"project_use_nearest_rainfall", (PyCFunction) _wrap_project_use_nearest_rainfall, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "project_use_nearest_rainfall(project self, double z_weight=0)\n" - "\n" - "void\n" - "use_nearest_rainfall(double z_weight=0)\n" - "\n" - "Connects all cells of the project with its nearest rainfall station.\n" - "\n" - "Distance is calculated as follows: \n" - "\n" - ".. math::\n" - "\n" - " d_i(x,y,z) = w_z\n" - " \\\\left|z-z_i\\\\right| + \\\\sqrt{\\\\left(x-x_i\\\\right)^2 +\n" - " \\\\left(y-y_i\\\\right)^2} \n" - "\n" - ":math:`d_i` is the distance from x,y,z to\n" - "station i\n" - "\n" - ":math:`p` the power of the weighting function, usually 2.\n" - "\n" - ":math:`x_i,y_i,z_i` is the position of station i in space\n" - "\n" - ":math:`w_z` is a factor to weight the vertical distance between stations and\n" - "the cell. 0 results in a pure horizontal interpolation (normal IDW).\n" - "If :math:`w_z=1`, height difference is as important as horizontal distance,\n" - "and with :math:`w_z>1` the height difference is weighted more important than\n" - "horizontal distance\n" - "\n" - "Parameters:\n" - "-----------\n" - "\n" - "z_weight: :math:`w_z` the weight of height difference between cell and\n" - "station \n" - ""}, - { (char *)"project_get_cell", (PyCFunction) _wrap_project_get_cell, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "project_get_cell(project self, ptrdiff_t index) -> Cell\n" - "\n" - "upslope::Cell&\n" - "get_cell(ptrdiff_t index)\n" - "\n" - "Returns the reference to the cell at index in the project. \n" - ""}, - { (char *)"project_size", (PyCFunction)_wrap_project_size, METH_O, (char *)"\n" - "project_size(project self) -> size_t\n" - "\n" - "size_t size() const\n" - "\n" - "The number of cells in the project. \n" - ""}, - { (char *)"new_project", (PyCFunction) _wrap_new_project, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "new_project(std::string solute_names) -> project\n" - "\n" - "project(std::string\n" - "solute_names=\"\")\n" - "\n" - "Creates a new project.\n" - "\n" - "Parameters:\n" - "-----------\n" - "\n" - "solute_names: A string representing the names of the solutes to be\n" - "used in the project. Sepereate solute names with space. \n" - ""}, - { (char *)"delete_project", (PyCFunction)_wrap_delete_project, METH_O, (char *)"\n" - "delete_project(project self)\n" - "\n" - "~project() \n" - ""}, - { (char *)"project_NewCell", (PyCFunction) _wrap_project_NewCell, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "project_NewCell(project self, double x, double y, double z, double area, bool with_surfacewater=False) -> Cell\n" - "\n" - "cmf::upslope::Cell*\n" - "NewCell(double x, double y, double z, double area, bool\n" - "with_surfacewater=false)\n" - "\n" - "Creates a new cell.\n" - "\n" - "A new cell, owned by the project\n" - "\n" - "Parameters:\n" - "-----------\n" - "\n" - "x: y: z: Position of the cell center in project coordinates (m)\n" - "\n" - "area: Area of the cell in m^2\n" - "\n" - "with_surfacewater: If true, the cell will own a surfacewater storage\n" - "upon creation \n" - ""}, - { (char *)"project_NewOutlet", (PyCFunction) _wrap_project_NewOutlet, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "project_NewOutlet(project self, std::string name, double x=0, double y=0, double z=0) -> cmf::water::DirichletBoundary::ptr\n" - "\n" - "cmf::water::DirichletBoundary::ptr NewOutlet(std::string name, double\n" - "x=0, double y=0, double z=0)\n" - "\n" - "Creates a new Dirichlet boundary condition and adds it to the list of\n" - "outlets The potential of the Dirichlet boundary equals z, but can be\n" - "changed.\n" - "\n" - "Parameters:\n" - "-----------\n" - "\n" - "name: Name of the boundary condition for output\n" - "\n" - "x: y: z: Position of the boundary condition in project coordinates\n" - "\n" - ""}, - { (char *)"project_NewStorage", (PyCFunction) _wrap_project_NewStorage, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "project_NewStorage(project self, std::string name, double x=0, double y=0, double z=0) -> cmf::water::WaterStorage::ptr\n" - "\n" - "cmf::water::WaterStorage::ptr NewStorage(std::string name, double x=0,\n" - "double y=0, double z=0)\n" - "\n" - "Creates a new generic water storage at position x,y,z.\n" - "\n" - "The storage is added to the project nodes A new water storage, owned\n" - "by the project\n" - "\n" - "Parameters:\n" - "-----------\n" - "\n" - "name: Name of the generic water storage for output\n" - "\n" - "x: y: z: Position of the generic water storage condition in project\n" - "coordinates \n" - ""}, - { (char *)"project_NewOpenStorage", (PyCFunction) _wrap_project_NewOpenStorage, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "project_NewOpenStorage(project self, std::string name, double x, double y, double z, double area) -> cmf::river::OpenWaterStorage::ptr\n" - "\n" - "cmf::river::OpenWaterStorage::ptr NewOpenStorage(std::string name,\n" - "double x, double y, double z, double area)\n" - "\n" - "Creates a new open water storage with a prism geometry.\n" - "\n" - "The open water storage is added to the project nodes A new open water\n" - "storage, owned by the project\n" - "\n" - "Parameters:\n" - "-----------\n" - "\n" - "name: Name of the open water storage for output\n" - "\n" - "x: y: z: Position of the open water storage in project coordinates\n" - "\n" - "area: Surface area of the open water storage \n" - ""}, - { (char *)"project_NewNeumannBoundary", (PyCFunction) _wrap_project_NewNeumannBoundary, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "project_NewNeumannBoundary(project self, std::string name, cmf::water::WaterStorage::ptr target) -> cmf::water::NeumannBoundary::ptr\n" - "\n" - "cmf::water::NeumannBoundary::ptr NewNeumannBoundary(std::string name,\n" - "cmf::water::WaterStorage::ptr target)\n" - "\n" - "Creates a new Neumann boundary for a target water storage.\n" - "\n" - "The boundary is stored with the project A new Neumann boundary\n" - "\n" - "Parameters:\n" - "-----------\n" - "\n" - "name: The name of the boundary condition\n" - "\n" - "target: The water storage to which the Neumann boundary is bound \n" - ""}, - { (char *)"project_NewReach", (PyCFunction) _wrap_project_NewReach, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "project_NewReach(project self, double x, double y, double z, IChannel shape, bool diffusive=False) -> cmf::river::Reach::ptr\n" - "\n" - "cmf::river::Reach::ptr\n" - "NewReach(double x, double y, double z, cmf::river::IChannel &shape,\n" - "bool diffusive=false)\n" - "\n" - "Creates a new reach.\n" - "\n" - "A new reach, owned by the project\n" - "\n" - "Parameters:\n" - "-----------\n" - "\n" - "x: y: z: Position of the reach in project coordinates\n" - "\n" - "shape: Crossectional geometry of the river. Any class inheriting from\n" - "cmf::water::IChannel\n" - "\n" - "diffusive: If true, this reach uses by default a diffusive wave\n" - "connection \n" - ""}, - { (char *)"project_get_reach", (PyCFunction) _wrap_project_get_reach, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "project_get_reach(project self, ptrdiff_t index) -> cmf::river::Reach::ptr\n" - "\n" - "cmf::river::Reach::ptr get_reach(ptrdiff_t index)\n" - "\n" - "Returns the reach at index. \n" - ""}, - { (char *)"project_reach_count", (PyCFunction)_wrap_project_reach_count, METH_O, (char *)"\n" - "project_reach_count(project self) -> size_t\n" - "\n" - "size_t\n" - "reach_count() const\n" - "\n" - "Returns the number of reaches in this project. \n" - ""}, - { (char *)"project_get_node", (PyCFunction) _wrap_project_get_node, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "project_get_node(project self, ptrdiff_t index) -> cmf::water::flux_node::ptr\n" - "\n" - "cmf::water::flux_node::ptr get_node(ptrdiff_t index)\n" - "\n" - "Returns the node from the project nodes at index. \n" - ""}, - { (char *)"project_node_count", (PyCFunction)_wrap_project_node_count, METH_O, (char *)"\n" - "project_node_count(project self) -> size_t\n" - "\n" - "size_t node_count()\n" - "const\n" - "\n" - "Returns the number of nodes saved with this project. \n" - ""}, - { (char *)"project_get_storages", (PyCFunction)_wrap_project_get_storages, METH_O, (char *)"\n" - "project_get_storages(project self) -> node_list\n" - "\n" - "cmf::water::node_list get_storages()\n" - "\n" - "Returns a list of all storages of this project. \n" - ""}, - { (char *)"project_cells_get", (PyCFunction)_wrap_project_cells_get, METH_O, (char *)"project_cells_get(project self) -> cell_vector"}, - { (char *)"project_swigregister", project_swigregister, METH_VARARGS, NULL}, - { (char *)"project_swiginit", project_swiginit, METH_VARARGS, NULL}, - { (char *)"SoluteWaterIntegrator_copy", (PyCFunction)_wrap_SoluteWaterIntegrator_copy, METH_O, (char *)"\n" - "SoluteWaterIntegrator_copy(SoluteWaterIntegrator self) -> SoluteWaterIntegrator\n" - "\n" - "virtual cmf::math::SoluteWaterIntegrator* copy() const\n" - "\n" - "Polymorphic copy constructor. \n" - ""}, - { (char *)"new_SoluteWaterIntegrator", _wrap_new_SoluteWaterIntegrator, METH_VARARGS, (char *)"\n" - "SoluteWaterIntegrator(solute_vector solutes, Integrator water_integrator, Integrator solute_integrator)\n" - "new_SoluteWaterIntegrator(solute_vector solutes, Integrator water_integrator, Integrator solute_integrator, StateVariableOwner states) -> SoluteWaterIntegrator\n" - "\n" - "SoluteWaterIntegrator(cmf::water::solute_vector solutes, const\n" - "cmf::math::Integrator &water_integrator, const cmf::math::Integrator\n" - "&solute_integrator, cmf::math::StateVariableOwner &states)\n" - "\n" - "Creates a new SoluteWaterIntegrator.\n" - "\n" - "Parameters:\n" - "-----------\n" - "\n" - "solutes: Solutes of the project\n" - "\n" - "water_integrator: Template for the integrator of WaterStorage state\n" - "variables\n" - "\n" - "solute_integrator: Template for the integrator of soluteStorage state\n" - "variables\n" - "\n" - "states: States to be added to the integrators \n" - ""}, - { (char *)"delete_SoluteWaterIntegrator", (PyCFunction)_wrap_delete_SoluteWaterIntegrator, METH_O, (char *)"\n" - "delete_SoluteWaterIntegrator(SoluteWaterIntegrator self)\n" - "\n" - "~SoluteWaterIntegrator() \n" - ""}, - { (char *)"SoluteWaterIntegrator_to_string", (PyCFunction)_wrap_SoluteWaterIntegrator_to_string, METH_O, (char *)"\n" - "SoluteWaterIntegrator_to_string(SoluteWaterIntegrator self) -> std::string\n" - "\n" - "std::string to_string() const \n" - ""}, - { (char *)"SoluteWaterIntegrator_swigregister", SoluteWaterIntegrator_swigregister, METH_VARARGS, NULL}, - { (char *)"SoluteWaterIntegrator_swiginit", SoluteWaterIntegrator_swiginit, METH_VARARGS, NULL}, - { NULL, NULL, 0, NULL } -}; - - -/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ - -static void *_p_std__shared_ptrT_cmf__water__flux_integrator_tTo_p_std__shared_ptrT_cmf__math__integratable_t(void *x, int *newmemory) { - *newmemory = SWIG_CAST_NEW_MEMORY; - return (void *) new std::shared_ptr< cmf::math::integratable >(*(std::shared_ptr< cmf::water::flux_integrator > *)x); -} -static void *_p_std__shared_ptrT_cmf__water__waterbalance_integrator_tTo_p_std__shared_ptrT_cmf__math__integratable_t(void *x, int *newmemory) { - *newmemory = SWIG_CAST_NEW_MEMORY; - return (void *) new std::shared_ptr< cmf::math::integratable >(*(std::shared_ptr< cmf::water::waterbalance_integrator > *)x); -} -static void *_p_cmf__upslope__connections__GradientMacroMicroExchangeTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::water::flux_connection *) ((cmf::upslope::connections::GradientMacroMicroExchange *) x)); -} -static void *_p_cmf__upslope__connections__TOPModelFlowTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::water::flux_connection *) ((cmf::upslope::connections::TOPModelFlow *) x)); -} -static void *_p_cmf__upslope__connections__SWATPercolationTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::water::flux_connection *) ((cmf::upslope::connections::SWATPercolation *) x)); -} -static void *_p_cmf__upslope__connections__FreeDrainagePercolationTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::water::flux_connection *) ((cmf::upslope::connections::FreeDrainagePercolation *) x)); -} -static void *_p_cmf__upslope__ET__HargreaveETTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::water::flux_connection *) (cmf::upslope::ET::stressedET *) ((cmf::upslope::ET::HargreaveET *) x)); -} -static void *_p_cmf__river__Manning_DiffusiveTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::water::flux_connection *) (cmf::river::Manning *) ((cmf::river::Manning_Diffusive *) x)); -} -static void *_p_cmf__upslope__connections__TopographicGradientDarcyTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::water::flux_connection *) (cmf::upslope::connections::lateral_sub_surface_flux *) ((cmf::upslope::connections::TopographicGradientDarcy *) x)); -} -static void *_p_cmf__water__bidirectional_kinematic_exchangeTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::water::flux_connection *) ((cmf::water::bidirectional_kinematic_exchange *) x)); -} -static void *_p_cmf__upslope__connections__MACROlikeMacroMicroExchangeTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::water::flux_connection *) ((cmf::upslope::connections::MACROlikeMacroMicroExchange *) x)); -} -static void *_p_cmf__upslope__connections__DiffusiveMacroMicroExchangeTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::water::flux_connection *) ((cmf::upslope::connections::DiffusiveMacroMicroExchange *) x)); -} -static void *_p_cmf__upslope__ET__stressedETTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::water::flux_connection *) ((cmf::upslope::ET::stressedET *) x)); -} -static void *_p_cmf__upslope__connections__SimpleTindexSnowMeltTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::water::flux_connection *) ((cmf::upslope::connections::SimpleTindexSnowMelt *) x)); -} -static void *_p_cmf__upslope__connections__EnergyBudgetSnowMeltTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::water::flux_connection *) ((cmf::upslope::connections::EnergyBudgetSnowMelt *) x)); -} -static void *_p_cmf__upslope__connections__DarcyTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::water::flux_connection *) (cmf::upslope::connections::lateral_sub_surface_flux *) ((cmf::upslope::connections::Darcy *) x)); -} -static void *_p_cmf__upslope__connections__lateral_sub_surface_fluxTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::water::flux_connection *) ((cmf::upslope::connections::lateral_sub_surface_flux *) x)); -} -static void *_p_cmf__upslope__connections__RainfallTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::water::flux_connection *) ((cmf::upslope::connections::Rainfall *) x)); -} -static void *_p_cmf__upslope__connections__CanopyOverflowTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::water::flux_connection *) ((cmf::upslope::connections::CanopyOverflow *) x)); -} -static void *_p_cmf__upslope__ET__transpirationTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::water::flux_connection *) ((cmf::upslope::ET::transpiration *) x)); -} -static void *_p_cmf__upslope__ET__soil_evaporationTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::water::flux_connection *) ((cmf::upslope::ET::soil_evaporation *) x)); -} -static void *_p_cmf__upslope__ET__canopy_evaporationTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::water::flux_connection *) ((cmf::upslope::ET::canopy_evaporation *) x)); -} -static void *_p_cmf__upslope__ET__snow_evaporationTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::water::flux_connection *) ((cmf::upslope::ET::snow_evaporation *) x)); -} -static void *_p_cmf__upslope__ET__surface_water_evaporationTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::water::flux_connection *) ((cmf::upslope::ET::surface_water_evaporation *) x)); -} -static void *_p_cmf__upslope__ET__CanopyStorageEvaporationTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::water::flux_connection *) ((cmf::upslope::ET::CanopyStorageEvaporation *) x)); -} -static void *_p_cmf__upslope__ET__PenmanEvaporationTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::water::flux_connection *) ((cmf::upslope::ET::PenmanEvaporation *) x)); -} -static void *_p_cmf__upslope__connections__RichardsTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::water::flux_connection *) ((cmf::upslope::connections::Richards *) x)); -} -static void *_p_cmf__upslope__connections__SimplRichardsTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::water::flux_connection *) ((cmf::upslope::connections::SimplRichards *) x)); -} -static void *_p_cmf__water__waterbalance_connectionTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::water::flux_connection *) ((cmf::water::waterbalance_connection *) x)); -} -static void *_p_cmf__water__external_control_connectionTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::water::flux_connection *) ((cmf::water::external_control_connection *) x)); -} -static void *_p_cmf__water__LinearStorageConnectionTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::water::flux_connection *) ((cmf::water::LinearStorageConnection *) x)); -} -static void *_p_cmf__water__PowerLawConnectionTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::water::flux_connection *) ((cmf::water::PowerLawConnection *) x)); -} -static void *_p_cmf__water__ExponentialDeclineConnectionTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::water::flux_connection *) ((cmf::water::ExponentialDeclineConnection *) x)); -} -static void *_p_cmf__water__ConstraintLinearStorageConnectionTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::water::flux_connection *) ((cmf::water::ConstraintLinearStorageConnection *) x)); -} -static void *_p_cmf__water__generic_gradient_connectionTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::water::flux_connection *) ((cmf::water::generic_gradient_connection *) x)); -} -static void *_p_cmf__water__statecontrol_connectionTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::water::flux_connection *) ((cmf::water::statecontrol_connection *) x)); -} -static void *_p_cmf__water__SystemBridgeConnectionTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::water::flux_connection *) ((cmf::water::SystemBridgeConnection *) x)); -} -static void *_p_cmf__river__Manning_KinematicTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::water::flux_connection *) (cmf::river::Manning *) ((cmf::river::Manning_Kinematic *) x)); -} -static void *_p_cmf__upslope__connections__DarcyKinematicTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::water::flux_connection *) (cmf::upslope::connections::lateral_sub_surface_flux *) ((cmf::upslope::connections::DarcyKinematic *) x)); -} -static void *_p_cmf__upslope__connections__JarvisMacroFlowTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::water::flux_connection *) (cmf::upslope::connections::BaseMacroFlow *) ((cmf::upslope::connections::JarvisMacroFlow *) x)); -} -static void *_p_cmf__upslope__connections__KinematicMacroFlowTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::water::flux_connection *) (cmf::upslope::connections::BaseMacroFlow *) ((cmf::upslope::connections::KinematicMacroFlow *) x)); -} -static void *_p_cmf__upslope__connections__GradientMacroFlowTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::water::flux_connection *) (cmf::upslope::connections::BaseMacroFlow *) ((cmf::upslope::connections::GradientMacroFlow *) x)); -} -static void *_p_cmf__upslope__connections__BaseMacroFlowTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::water::flux_connection *) ((cmf::upslope::connections::BaseMacroFlow *) x)); -} -static void *_p_cmf__upslope__connections__MatrixInfiltrationTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::water::flux_connection *) ((cmf::upslope::connections::MatrixInfiltration *) x)); -} -static void *_p_cmf__upslope__connections__GreenAmptInfiltrationTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::water::flux_connection *) ((cmf::upslope::connections::GreenAmptInfiltration *) x)); -} -static void *_p_cmf__upslope__connections__SimpleInfiltrationTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::water::flux_connection *) ((cmf::upslope::connections::SimpleInfiltration *) x)); -} -static void *_p_cmf__water__NeumannFluxTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::water::flux_connection *) ((cmf::water::NeumannFlux *) x)); -} -static void *_p_cmf__upslope__aquifer_DarcyTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::water::flux_connection *) ((cmf::upslope::aquifer_Darcy *) x)); -} -static void *_p_cmf__upslope__connections__RutterInterceptionTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::water::flux_connection *) ((cmf::upslope::connections::RutterInterception *) x)); -} -static void *_p_cmf__water__kinematic_waveTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::water::flux_connection *) ((cmf::water::kinematic_wave *) x)); -} -static void *_p_cmf__water__constraint_kinematic_waveTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::water::flux_connection *) ((cmf::water::constraint_kinematic_wave *) x)); -} -static void *_p_cmf__upslope__ET__constantETpotTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::water::flux_connection *) (cmf::upslope::ET::stressedET *) ((cmf::upslope::ET::constantETpot *) x)); -} -static void *_p_cmf__upslope__connections__DiffusiveSurfaceRunoffTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::water::flux_connection *) ((cmf::upslope::connections::DiffusiveSurfaceRunoff *) x)); -} -static void *_p_cmf__upslope__connections__KinematicSurfaceRunoffTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::water::flux_connection *) ((cmf::upslope::connections::KinematicSurfaceRunoff *) x)); -} -static void *_p_cmf__upslope__connections__LayerBypassTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::water::flux_connection *) ((cmf::upslope::connections::LayerBypass *) x)); -} -static void *_p_cmf__water__TechnicalFluxTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::water::flux_connection *) ((cmf::water::TechnicalFlux *) x)); -} -static void *_p_cmf__upslope__connections__SnowfallTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::water::flux_connection *) ((cmf::upslope::connections::Snowfall *) x)); -} -static void *_p_cmf__upslope__ET__PriestleyTaylorETTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::water::flux_connection *) (cmf::upslope::ET::stressedET *) ((cmf::upslope::ET::PriestleyTaylorET *) x)); -} -static void *_p_cmf__upslope__ET__timeseriesETpotTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::water::flux_connection *) (cmf::upslope::ET::stressedET *) ((cmf::upslope::ET::timeseriesETpot *) x)); -} -static void *_p_cmf__upslope__ET__TurcETTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::water::flux_connection *) (cmf::upslope::ET::stressedET *) ((cmf::upslope::ET::TurcET *) x)); -} -static void *_p_cmf__river__ManningTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::water::flux_connection *) ((cmf::river::Manning *) x)); -} -static void *_p_cmf__upslope__connections__Richards_lateralTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::water::flux_connection *) (cmf::upslope::connections::lateral_sub_surface_flux *) ((cmf::upslope::connections::Richards_lateral *) x)); -} -static void *_p_cmf__upslope__ET__PenmanMonteithETTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::water::flux_connection *) (cmf::upslope::ET::stressedET *) ((cmf::upslope::ET::PenmanMonteithET *) x)); -} -static void *_p_cmf__upslope__LinearRetentionTo_p_cmf__upslope__RetentionCurve(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::upslope::RetentionCurve *) ((cmf::upslope::LinearRetention *) x)); -} -static void *_p_cmf__upslope__BrooksCoreyRetentionCurveTo_p_cmf__upslope__RetentionCurve(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::upslope::RetentionCurve *) ((cmf::upslope::BrooksCoreyRetentionCurve *) x)); -} -static void *_p_cmf__upslope__VanGenuchtenMualemTo_p_cmf__upslope__RetentionCurve(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::upslope::RetentionCurve *) ((cmf::upslope::VanGenuchtenMualem *) x)); -} -static void *_p_cmf__atmosphere__IDWRainfallTo_p_cmf__water__flux_node(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::water::flux_node *) (cmf::atmosphere::RainSource *) ((cmf::atmosphere::IDWRainfall *) x)); -} -static void *_p_cmf__water__SystemBridgeTo_p_cmf__water__flux_node(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::water::flux_node *) ((cmf::water::SystemBridge *) x)); -} -static void *_p_cmf__atmosphere__RainfallStationReferenceTo_p_cmf__water__flux_node(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::water::flux_node *) (cmf::atmosphere::RainSource *) ((cmf::atmosphere::RainfallStationReference *) x)); -} -static void *_p_cmf__water__NeumannBoundaryTo_p_cmf__water__flux_node(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::water::flux_node *) ((cmf::water::NeumannBoundary *) x)); -} -static void *_p_cmf__water__DirichletBoundaryTo_p_cmf__water__flux_node(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::water::flux_node *) ((cmf::water::DirichletBoundary *) x)); -} -static void *_p_cmf__upslope__aquiferTo_p_cmf__water__flux_node(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::water::flux_node *) (cmf::water::WaterStorage *) ((cmf::upslope::aquifer *) x)); -} -static void *_p_cmf__upslope__MacroPoreTo_p_cmf__water__flux_node(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::water::flux_node *) (cmf::water::WaterStorage *) ((cmf::upslope::MacroPore *) x)); -} -static void *_p_cmf__upslope__SoilLayerTo_p_cmf__water__flux_node(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::water::flux_node *) (cmf::water::WaterStorage *) ((cmf::upslope::SoilLayer *) x)); -} -static void *_p_cmf__atmosphere__TimeseriesRainSourceTo_p_cmf__water__flux_node(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::water::flux_node *) (cmf::atmosphere::RainSource *) ((cmf::atmosphere::TimeseriesRainSource *) x)); -} -static void *_p_cmf__atmosphere__ConstantRainSourceTo_p_cmf__water__flux_node(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::water::flux_node *) (cmf::atmosphere::RainSource *) ((cmf::atmosphere::ConstantRainSource *) x)); -} -static void *_p_cmf__atmosphere__RainSourceTo_p_cmf__water__flux_node(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::water::flux_node *) ((cmf::atmosphere::RainSource *) x)); -} -static void *_p_cmf__river__ReachTo_p_cmf__water__flux_node(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::water::flux_node *) (cmf::water::WaterStorage *)(cmf::river::OpenWaterStorage *) ((cmf::river::Reach *) x)); -} -static void *_p_cmf__river__OpenWaterStorageTo_p_cmf__water__flux_node(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::water::flux_node *) (cmf::water::WaterStorage *) ((cmf::river::OpenWaterStorage *) x)); -} -static void *_p_cmf__water__WaterStorageTo_p_cmf__water__flux_node(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::water::flux_node *) ((cmf::water::WaterStorage *) x)); -} -static void *_p_cmf__upslope__SurfaceWaterTo_p_cmf__water__flux_node(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::water::flux_node *) (cmf::water::WaterStorage *)(cmf::river::OpenWaterStorage *) ((cmf::upslope::SurfaceWater *) x)); -} -static void *_p_cmf__upslope__ET__HargreaveETTo_p_cmf__upslope__ET__stressedET(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::upslope::ET::stressedET *) ((cmf::upslope::ET::HargreaveET *) x)); -} -static void *_p_cmf__upslope__ET__constantETpotTo_p_cmf__upslope__ET__stressedET(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::upslope::ET::stressedET *) ((cmf::upslope::ET::constantETpot *) x)); -} -static void *_p_cmf__upslope__ET__PenmanMonteithETTo_p_cmf__upslope__ET__stressedET(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::upslope::ET::stressedET *) ((cmf::upslope::ET::PenmanMonteithET *) x)); -} -static void *_p_cmf__upslope__ET__TurcETTo_p_cmf__upslope__ET__stressedET(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::upslope::ET::stressedET *) ((cmf::upslope::ET::TurcET *) x)); -} -static void *_p_cmf__upslope__ET__PriestleyTaylorETTo_p_cmf__upslope__ET__stressedET(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::upslope::ET::stressedET *) ((cmf::upslope::ET::PriestleyTaylorET *) x)); -} -static void *_p_cmf__upslope__ET__timeseriesETpotTo_p_cmf__upslope__ET__stressedET(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::upslope::ET::stressedET *) ((cmf::upslope::ET::timeseriesETpot *) x)); -} -static void *_p_cmf__upslope__ET__ShuttleworthWallaceTo_p_cmf__upslope__ET__surface_water_evaporation_method(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::upslope::ET::surface_water_evaporation_method *) ((cmf::upslope::ET::ShuttleworthWallace *) x)); -} -static void *_p_cmf__river__PipeReachTo_p_cmf__river__IChannel(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::river::IChannel *) ((cmf::river::PipeReach *) x)); -} -static void *_p_cmf__river__ChannelTo_p_cmf__river__IChannel(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::river::IChannel *) ((cmf::river::Channel *) x)); -} -static void *_p_cmf__river__MeanChannelTo_p_cmf__river__IChannel(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::river::IChannel *) ((cmf::river::MeanChannel *) x)); -} -static void *_p_cmf__river__SWATReachTypeTo_p_cmf__river__IChannel(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::river::IChannel *) ((cmf::river::SWATReachType *) x)); -} -static void *_p_cmf__river__TriangularReachTo_p_cmf__river__IChannel(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::river::IChannel *) ((cmf::river::TriangularReach *) x)); -} -static void *_p_cmf__river__RectangularReachTo_p_cmf__river__IChannel(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::river::IChannel *) ((cmf::river::RectangularReach *) x)); -} -static void *_p_std__shared_ptrT_cmf__atmosphere__RainfallStationReference_tTo_p_std__shared_ptrT_cmf__atmosphere__RainSource_t(void *x, int *newmemory) { - *newmemory = SWIG_CAST_NEW_MEMORY; - return (void *) new std::shared_ptr< cmf::atmosphere::RainSource >(*(std::shared_ptr< cmf::atmosphere::RainfallStationReference > *)x); -} -static void *_p_std__shared_ptrT_cmf__atmosphere__ConstantRainSource_tTo_p_std__shared_ptrT_cmf__atmosphere__RainSource_t(void *x, int *newmemory) { - *newmemory = SWIG_CAST_NEW_MEMORY; - return (void *) new std::shared_ptr< cmf::atmosphere::RainSource >(*(std::shared_ptr< cmf::atmosphere::ConstantRainSource > *)x); -} -static void *_p_std__shared_ptrT_cmf__atmosphere__TimeseriesRainSource_tTo_p_std__shared_ptrT_cmf__atmosphere__RainSource_t(void *x, int *newmemory) { - *newmemory = SWIG_CAST_NEW_MEMORY; - return (void *) new std::shared_ptr< cmf::atmosphere::RainSource >(*(std::shared_ptr< cmf::atmosphere::TimeseriesRainSource > *)x); -} -static void *_p_std__shared_ptrT_cmf__atmosphere__IDWRainfall_tTo_p_std__shared_ptrT_cmf__atmosphere__RainSource_t(void *x, int *newmemory) { - *newmemory = SWIG_CAST_NEW_MEMORY; - return (void *) new std::shared_ptr< cmf::atmosphere::RainSource >(*(std::shared_ptr< cmf::atmosphere::IDWRainfall > *)x); -} -static void *_p_cmf__upslope__connections__GradientMacroFlowTo_p_cmf__upslope__connections__BaseMacroFlow(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::upslope::connections::BaseMacroFlow *) ((cmf::upslope::connections::GradientMacroFlow *) x)); -} -static void *_p_cmf__upslope__connections__KinematicMacroFlowTo_p_cmf__upslope__connections__BaseMacroFlow(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::upslope::connections::BaseMacroFlow *) ((cmf::upslope::connections::KinematicMacroFlow *) x)); -} -static void *_p_cmf__upslope__connections__JarvisMacroFlowTo_p_cmf__upslope__connections__BaseMacroFlow(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::upslope::connections::BaseMacroFlow *) ((cmf::upslope::connections::JarvisMacroFlow *) x)); -} -static void *_p_cmf__atmosphere__ConstantRainSourceTo_p_cmf__atmosphere__RainSource(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::atmosphere::RainSource *) ((cmf::atmosphere::ConstantRainSource *) x)); -} -static void *_p_cmf__atmosphere__TimeseriesRainSourceTo_p_cmf__atmosphere__RainSource(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::atmosphere::RainSource *) ((cmf::atmosphere::TimeseriesRainSource *) x)); -} -static void *_p_cmf__atmosphere__RainfallStationReferenceTo_p_cmf__atmosphere__RainSource(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::atmosphere::RainSource *) ((cmf::atmosphere::RainfallStationReference *) x)); -} -static void *_p_cmf__atmosphere__IDWRainfallTo_p_cmf__atmosphere__RainSource(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::atmosphere::RainSource *) ((cmf::atmosphere::IDWRainfall *) x)); -} -static void *_p_cmf__upslope__ET__SuctionStressTo_p_cmf__upslope__ET__RootUptakeStessFunction(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::upslope::ET::RootUptakeStessFunction *) ((cmf::upslope::ET::SuctionStress *) x)); -} -static void *_p_cmf__upslope__ET__ContentStressTo_p_cmf__upslope__ET__RootUptakeStessFunction(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::upslope::ET::RootUptakeStessFunction *) ((cmf::upslope::ET::ContentStress *) x)); -} -static void *_p_cmf__upslope__ET__VolumeStressTo_p_cmf__upslope__ET__RootUptakeStessFunction(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::upslope::ET::RootUptakeStessFunction *) ((cmf::upslope::ET::VolumeStress *) x)); -} -static void *_p_cmf__river__IChannelTo_p_cmf__river__IVolumeHeightFunction(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::river::IVolumeHeightFunction *) ((cmf::river::IChannel *) x)); -} -static void *_p_cmf__river__PipeReachTo_p_cmf__river__IVolumeHeightFunction(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::river::IVolumeHeightFunction *) (cmf::river::IChannel *) ((cmf::river::PipeReach *) x)); -} -static void *_p_cmf__river__ChannelTo_p_cmf__river__IVolumeHeightFunction(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::river::IVolumeHeightFunction *) (cmf::river::IChannel *) ((cmf::river::Channel *) x)); -} -static void *_p_cmf__river__MeanChannelTo_p_cmf__river__IVolumeHeightFunction(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::river::IVolumeHeightFunction *) (cmf::river::IChannel *) ((cmf::river::MeanChannel *) x)); -} -static void *_p_cmf__river__volume_height_functionTo_p_cmf__river__IVolumeHeightFunction(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::river::IVolumeHeightFunction *) ((cmf::river::volume_height_function *) x)); -} -static void *_p_cmf__river__SWATReachTypeTo_p_cmf__river__IVolumeHeightFunction(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::river::IVolumeHeightFunction *) (cmf::river::IChannel *) ((cmf::river::SWATReachType *) x)); -} -static void *_p_cmf__river__TriangularReachTo_p_cmf__river__IVolumeHeightFunction(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::river::IVolumeHeightFunction *) (cmf::river::IChannel *) ((cmf::river::TriangularReach *) x)); -} -static void *_p_cmf__river__RectangularReachTo_p_cmf__river__IVolumeHeightFunction(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::river::IVolumeHeightFunction *) (cmf::river::IChannel *) ((cmf::river::RectangularReach *) x)); -} -static void *_p_cmf__river__PrismTo_p_cmf__river__IVolumeHeightFunction(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::river::IVolumeHeightFunction *) ((cmf::river::Prism *) x)); -} -static void *_p_cmf__river__Manning_DiffusiveTo_p_cmf__river__Manning(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::river::Manning *) ((cmf::river::Manning_Diffusive *) x)); -} -static void *_p_cmf__river__Manning_KinematicTo_p_cmf__river__Manning(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::river::Manning *) ((cmf::river::Manning_Kinematic *) x)); -} -static void *_p_cmf__upslope__connections__TopographicGradientDarcyTo_p_cmf__upslope__connections__lateral_sub_surface_flux(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::upslope::connections::lateral_sub_surface_flux *) ((cmf::upslope::connections::TopographicGradientDarcy *) x)); -} -static void *_p_cmf__upslope__connections__DarcyKinematicTo_p_cmf__upslope__connections__lateral_sub_surface_flux(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::upslope::connections::lateral_sub_surface_flux *) ((cmf::upslope::connections::DarcyKinematic *) x)); -} -static void *_p_cmf__upslope__connections__Richards_lateralTo_p_cmf__upslope__connections__lateral_sub_surface_flux(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::upslope::connections::lateral_sub_surface_flux *) ((cmf::upslope::connections::Richards_lateral *) x)); -} -static void *_p_cmf__upslope__connections__DarcyTo_p_cmf__upslope__connections__lateral_sub_surface_flux(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::upslope::connections::lateral_sub_surface_flux *) ((cmf::upslope::connections::Darcy *) x)); -} -static void *_p_std__shared_ptrT_cmf__river__Reach_tTo_p_std__shared_ptrT_cmf__river__OpenWaterStorage_t(void *x, int *newmemory) { - *newmemory = SWIG_CAST_NEW_MEMORY; - return (void *) new std::shared_ptr< cmf::river::OpenWaterStorage >(*(std::shared_ptr< cmf::river::Reach > *)x); -} -static void *_p_std__shared_ptrT_cmf__upslope__SurfaceWater_tTo_p_std__shared_ptrT_cmf__river__OpenWaterStorage_t(void *x, int *newmemory) { - *newmemory = SWIG_CAST_NEW_MEMORY; - return (void *) new std::shared_ptr< cmf::river::OpenWaterStorage >(*(std::shared_ptr< cmf::upslope::SurfaceWater > *)x); -} -static void *_p_std__shared_ptrT_cmf__river__Reach_tTo_p_std__shared_ptrT_cmf__water__WaterStorage_t(void *x, int *newmemory) { - *newmemory = SWIG_CAST_NEW_MEMORY; - return (void *) new std::shared_ptr< cmf::water::WaterStorage >(*(std::shared_ptr< cmf::river::Reach > *)x); -} -static void *_p_std__shared_ptrT_cmf__upslope__aquifer_tTo_p_std__shared_ptrT_cmf__water__WaterStorage_t(void *x, int *newmemory) { - *newmemory = SWIG_CAST_NEW_MEMORY; - return (void *) new std::shared_ptr< cmf::water::WaterStorage >(*(std::shared_ptr< cmf::upslope::aquifer > *)x); -} -static void *_p_std__shared_ptrT_cmf__river__OpenWaterStorage_tTo_p_std__shared_ptrT_cmf__water__WaterStorage_t(void *x, int *newmemory) { - *newmemory = SWIG_CAST_NEW_MEMORY; - return (void *) new std::shared_ptr< cmf::water::WaterStorage >(*(std::shared_ptr< cmf::river::OpenWaterStorage > *)x); -} -static void *_p_std__shared_ptrT_cmf__upslope__MacroPore_tTo_p_std__shared_ptrT_cmf__water__WaterStorage_t(void *x, int *newmemory) { - *newmemory = SWIG_CAST_NEW_MEMORY; - return (void *) new std::shared_ptr< cmf::water::WaterStorage >(*(std::shared_ptr< cmf::upslope::MacroPore > *)x); -} -static void *_p_std__shared_ptrT_cmf__upslope__SoilLayer_tTo_p_std__shared_ptrT_cmf__water__WaterStorage_t(void *x, int *newmemory) { - *newmemory = SWIG_CAST_NEW_MEMORY; - return (void *) new std::shared_ptr< cmf::water::WaterStorage >(*(std::shared_ptr< cmf::upslope::SoilLayer > *)x); -} -static void *_p_std__shared_ptrT_cmf__upslope__SurfaceWater_tTo_p_std__shared_ptrT_cmf__water__WaterStorage_t(void *x, int *newmemory) { - *newmemory = SWIG_CAST_NEW_MEMORY; - return (void *) new std::shared_ptr< cmf::water::WaterStorage >(*(std::shared_ptr< cmf::upslope::SurfaceWater > *)x); -} -static void *_p_std__shared_ptrT_cmf__water__SystemBridge_tTo_p_std__shared_ptrT_cmf__water__flux_node_t(void *x, int *newmemory) { - *newmemory = SWIG_CAST_NEW_MEMORY; - return (void *) new std::shared_ptr< cmf::water::flux_node >(*(std::shared_ptr< cmf::water::SystemBridge > *)x); -} -static void *_p_std__shared_ptrT_cmf__upslope__MacroPore_tTo_p_std__shared_ptrT_cmf__water__flux_node_t(void *x, int *newmemory) { - *newmemory = SWIG_CAST_NEW_MEMORY; - return (void *) new std::shared_ptr< cmf::water::flux_node >(*(std::shared_ptr< cmf::upslope::MacroPore > *)x); -} -static void *_p_std__shared_ptrT_cmf__atmosphere__IDWRainfall_tTo_p_std__shared_ptrT_cmf__water__flux_node_t(void *x, int *newmemory) { - *newmemory = SWIG_CAST_NEW_MEMORY; - return (void *) new std::shared_ptr< cmf::water::flux_node >(*(std::shared_ptr< cmf::atmosphere::IDWRainfall > *)x); -} -static void *_p_std__shared_ptrT_cmf__water__NeumannBoundary_tTo_p_std__shared_ptrT_cmf__water__flux_node_t(void *x, int *newmemory) { - *newmemory = SWIG_CAST_NEW_MEMORY; - return (void *) new std::shared_ptr< cmf::water::flux_node >(*(std::shared_ptr< cmf::water::NeumannBoundary > *)x); -} -static void *_p_std__shared_ptrT_cmf__water__DirichletBoundary_tTo_p_std__shared_ptrT_cmf__water__flux_node_t(void *x, int *newmemory) { - *newmemory = SWIG_CAST_NEW_MEMORY; - return (void *) new std::shared_ptr< cmf::water::flux_node >(*(std::shared_ptr< cmf::water::DirichletBoundary > *)x); -} -static void *_p_std__shared_ptrT_cmf__upslope__aquifer_tTo_p_std__shared_ptrT_cmf__water__flux_node_t(void *x, int *newmemory) { - *newmemory = SWIG_CAST_NEW_MEMORY; - return (void *) new std::shared_ptr< cmf::water::flux_node >(*(std::shared_ptr< cmf::upslope::aquifer > *)x); -} -static void *_p_std__shared_ptrT_cmf__river__Reach_tTo_p_std__shared_ptrT_cmf__water__flux_node_t(void *x, int *newmemory) { - *newmemory = SWIG_CAST_NEW_MEMORY; - return (void *) new std::shared_ptr< cmf::water::flux_node >(*(std::shared_ptr< cmf::river::Reach > *)x); -} -static void *_p_std__shared_ptrT_cmf__upslope__SurfaceWater_tTo_p_std__shared_ptrT_cmf__water__flux_node_t(void *x, int *newmemory) { - *newmemory = SWIG_CAST_NEW_MEMORY; - return (void *) new std::shared_ptr< cmf::water::flux_node >(*(std::shared_ptr< cmf::upslope::SurfaceWater > *)x); -} -static void *_p_std__shared_ptrT_cmf__atmosphere__TimeseriesRainSource_tTo_p_std__shared_ptrT_cmf__water__flux_node_t(void *x, int *newmemory) { - *newmemory = SWIG_CAST_NEW_MEMORY; - return (void *) new std::shared_ptr< cmf::water::flux_node >(*(std::shared_ptr< cmf::atmosphere::TimeseriesRainSource > *)x); -} -static void *_p_std__shared_ptrT_cmf__river__OpenWaterStorage_tTo_p_std__shared_ptrT_cmf__water__flux_node_t(void *x, int *newmemory) { - *newmemory = SWIG_CAST_NEW_MEMORY; - return (void *) new std::shared_ptr< cmf::water::flux_node >(*(std::shared_ptr< cmf::river::OpenWaterStorage > *)x); -} -static void *_p_std__shared_ptrT_cmf__water__WaterStorage_tTo_p_std__shared_ptrT_cmf__water__flux_node_t(void *x, int *newmemory) { - *newmemory = SWIG_CAST_NEW_MEMORY; - return (void *) new std::shared_ptr< cmf::water::flux_node >(*(std::shared_ptr< cmf::water::WaterStorage > *)x); -} -static void *_p_std__shared_ptrT_cmf__atmosphere__ConstantRainSource_tTo_p_std__shared_ptrT_cmf__water__flux_node_t(void *x, int *newmemory) { - *newmemory = SWIG_CAST_NEW_MEMORY; - return (void *) new std::shared_ptr< cmf::water::flux_node >(*(std::shared_ptr< cmf::atmosphere::ConstantRainSource > *)x); -} -static void *_p_std__shared_ptrT_cmf__atmosphere__RainfallStationReference_tTo_p_std__shared_ptrT_cmf__water__flux_node_t(void *x, int *newmemory) { - *newmemory = SWIG_CAST_NEW_MEMORY; - return (void *) new std::shared_ptr< cmf::water::flux_node >(*(std::shared_ptr< cmf::atmosphere::RainfallStationReference > *)x); -} -static void *_p_std__shared_ptrT_cmf__atmosphere__RainSource_tTo_p_std__shared_ptrT_cmf__water__flux_node_t(void *x, int *newmemory) { - *newmemory = SWIG_CAST_NEW_MEMORY; - return (void *) new std::shared_ptr< cmf::water::flux_node >(*(std::shared_ptr< cmf::atmosphere::RainSource > *)x); -} -static void *_p_std__shared_ptrT_cmf__upslope__SoilLayer_tTo_p_std__shared_ptrT_cmf__water__flux_node_t(void *x, int *newmemory) { - *newmemory = SWIG_CAST_NEW_MEMORY; - return (void *) new std::shared_ptr< cmf::water::flux_node >(*(std::shared_ptr< cmf::upslope::SoilLayer > *)x); -} -static void *_p_cmf__upslope__ET__ShuttleworthWallaceTo_p_cmf__atmosphere__aerodynamic_resistance(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::atmosphere::aerodynamic_resistance *) ((cmf::upslope::ET::ShuttleworthWallace *) x)); -} -static void *_p_cmf__atmosphere__log_wind_profileTo_p_cmf__atmosphere__aerodynamic_resistance(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::atmosphere::aerodynamic_resistance *) ((cmf::atmosphere::log_wind_profile *) x)); -} -static void *_p_cmf__upslope__ET__ShuttleworthWallaceTo_p_cmf__upslope__ET__snow_evaporation_method(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::upslope::ET::snow_evaporation_method *) ((cmf::upslope::ET::ShuttleworthWallace *) x)); -} -static void *_p_cmf__upslope__ET__ShuttleworthWallaceTo_p_cmf__upslope__ET__canopy_evaporation_method(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::upslope::ET::canopy_evaporation_method *) ((cmf::upslope::ET::ShuttleworthWallace *) x)); -} -static void *_p_cmf__upslope__ET__ShuttleworthWallaceTo_p_cmf__upslope__ET__soil_evaporation_method(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::upslope::ET::soil_evaporation_method *) ((cmf::upslope::ET::ShuttleworthWallace *) x)); -} -static void *_p_cmf__upslope__ET__ShuttleworthWallaceTo_p_cmf__upslope__ET__transpiration_method(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::upslope::ET::transpiration_method *) ((cmf::upslope::ET::ShuttleworthWallace *) x)); -} -static void *_p_std__shared_ptrT_cmf__river__Reach_tTo_p_std__shared_ptrT_cmf__math__StateVariable_t(void *x, int *newmemory) { - *newmemory = SWIG_CAST_NEW_MEMORY; - return (void *) new std::shared_ptr< cmf::math::StateVariable >(*(std::shared_ptr< cmf::river::Reach > *)x); -} -static void *_p_std__shared_ptrT_cmf__upslope__aquifer_tTo_p_std__shared_ptrT_cmf__math__StateVariable_t(void *x, int *newmemory) { - *newmemory = SWIG_CAST_NEW_MEMORY; - return (void *) new std::shared_ptr< cmf::math::StateVariable >(*(std::shared_ptr< cmf::upslope::aquifer > *)x); -} -static void *_p_std__shared_ptrT_cmf__water__SoluteStorage_tTo_p_std__shared_ptrT_cmf__math__StateVariable_t(void *x, int *newmemory) { - *newmemory = SWIG_CAST_NEW_MEMORY; - return (void *) new std::shared_ptr< cmf::math::StateVariable >(*(std::shared_ptr< cmf::water::SoluteStorage > *)x); -} -static void *_p_std__shared_ptrT_cmf__water__WaterStorage_tTo_p_std__shared_ptrT_cmf__math__StateVariable_t(void *x, int *newmemory) { - *newmemory = SWIG_CAST_NEW_MEMORY; - return (void *) new std::shared_ptr< cmf::math::StateVariable >(*(std::shared_ptr< cmf::water::WaterStorage > *)x); -} -static void *_p_std__shared_ptrT_cmf__river__OpenWaterStorage_tTo_p_std__shared_ptrT_cmf__math__StateVariable_t(void *x, int *newmemory) { - *newmemory = SWIG_CAST_NEW_MEMORY; - return (void *) new std::shared_ptr< cmf::math::StateVariable >(*(std::shared_ptr< cmf::river::OpenWaterStorage > *)x); -} -static void *_p_std__shared_ptrT_cmf__upslope__MacroPore_tTo_p_std__shared_ptrT_cmf__math__StateVariable_t(void *x, int *newmemory) { - *newmemory = SWIG_CAST_NEW_MEMORY; - return (void *) new std::shared_ptr< cmf::math::StateVariable >(*(std::shared_ptr< cmf::upslope::MacroPore > *)x); -} -static void *_p_std__shared_ptrT_cmf__upslope__SoilLayer_tTo_p_std__shared_ptrT_cmf__math__StateVariable_t(void *x, int *newmemory) { - *newmemory = SWIG_CAST_NEW_MEMORY; - return (void *) new std::shared_ptr< cmf::math::StateVariable >(*(std::shared_ptr< cmf::upslope::SoilLayer > *)x); -} -static void *_p_std__shared_ptrT_cmf__upslope__SurfaceWater_tTo_p_std__shared_ptrT_cmf__math__StateVariable_t(void *x, int *newmemory) { - *newmemory = SWIG_CAST_NEW_MEMORY; - return (void *) new std::shared_ptr< cmf::math::StateVariable >(*(std::shared_ptr< cmf::upslope::SurfaceWater > *)x); -} -static void *_p_cmf__water__waterbalance_integratorTo_p_cmf__math__integratable(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::math::integratable *) ((cmf::water::waterbalance_integrator *) x)); -} -static void *_p_cmf__water__flux_integratorTo_p_cmf__math__integratable(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::math::integratable *) ((cmf::water::flux_integrator *) x)); -} -static void *_p_cmf__river__ReachTo_p_cmf__river__OpenWaterStorage(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::river::OpenWaterStorage *) ((cmf::river::Reach *) x)); -} -static void *_p_cmf__upslope__SurfaceWaterTo_p_cmf__river__OpenWaterStorage(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::river::OpenWaterStorage *) ((cmf::upslope::SurfaceWater *) x)); -} -static void *_p_cmf__river__ReachTo_p_cmf__water__WaterStorage(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::water::WaterStorage *) (cmf::river::OpenWaterStorage *) ((cmf::river::Reach *) x)); -} -static void *_p_cmf__upslope__SurfaceWaterTo_p_cmf__water__WaterStorage(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::water::WaterStorage *) (cmf::river::OpenWaterStorage *) ((cmf::upslope::SurfaceWater *) x)); -} -static void *_p_cmf__upslope__SoilLayerTo_p_cmf__water__WaterStorage(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::water::WaterStorage *) ((cmf::upslope::SoilLayer *) x)); -} -static void *_p_cmf__upslope__MacroPoreTo_p_cmf__water__WaterStorage(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::water::WaterStorage *) ((cmf::upslope::MacroPore *) x)); -} -static void *_p_cmf__river__OpenWaterStorageTo_p_cmf__water__WaterStorage(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::water::WaterStorage *) ((cmf::river::OpenWaterStorage *) x)); -} -static void *_p_cmf__upslope__aquiferTo_p_cmf__water__WaterStorage(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::water::WaterStorage *) ((cmf::upslope::aquifer *) x)); -} -static void *_p_cmf__river__ReachTo_p_cmf__math__StateVariable(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::math::StateVariable *) (cmf::water::WaterStorage *)(cmf::river::OpenWaterStorage *) ((cmf::river::Reach *) x)); -} -static void *_p_cmf__upslope__SurfaceWaterTo_p_cmf__math__StateVariable(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::math::StateVariable *) (cmf::water::WaterStorage *)(cmf::river::OpenWaterStorage *) ((cmf::upslope::SurfaceWater *) x)); -} -static void *_p_cmf__upslope__SoilLayerTo_p_cmf__math__StateVariable(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::math::StateVariable *) (cmf::water::WaterStorage *) ((cmf::upslope::SoilLayer *) x)); -} -static void *_p_cmf__upslope__MacroPoreTo_p_cmf__math__StateVariable(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::math::StateVariable *) (cmf::water::WaterStorage *) ((cmf::upslope::MacroPore *) x)); -} -static void *_p_cmf__water__SoluteStorageTo_p_cmf__math__StateVariable(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::math::StateVariable *) ((cmf::water::SoluteStorage *) x)); -} -static void *_p_cmf__water__WaterStorageTo_p_cmf__math__StateVariable(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::math::StateVariable *) ((cmf::water::WaterStorage *) x)); -} -static void *_p_cmf__river__OpenWaterStorageTo_p_cmf__math__StateVariable(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::math::StateVariable *) (cmf::water::WaterStorage *) ((cmf::river::OpenWaterStorage *) x)); -} -static void *_p_cmf__upslope__aquiferTo_p_cmf__math__StateVariable(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::math::StateVariable *) (cmf::water::WaterStorage *) ((cmf::upslope::aquifer *) x)); -} -static void *_p_cmf__atmosphere__MeteoStationReferenceTo_p_cmf__atmosphere__Meteorology(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::atmosphere::Meteorology *) ((cmf::atmosphere::MeteoStationReference *) x)); -} -static void *_p_cmf__atmosphere__ConstantMeteorologyTo_p_cmf__atmosphere__Meteorology(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::atmosphere::Meteorology *) ((cmf::atmosphere::ConstantMeteorology *) x)); -} -static void *_p_cmf__atmosphere__IDW_MeteorologyTo_p_cmf__atmosphere__Meteorology(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::atmosphere::Meteorology *) ((cmf::atmosphere::IDW_Meteorology *) x)); -} -static void *_p_cmf__upslope__cell_vectorTo_p_cmf__math__StateVariableOwner(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::math::StateVariableOwner *) ((cmf::upslope::cell_vector *) x)); -} -static void *_p_cmf__math__BDF2To_p_cmf__math__StateVariableOwner(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::math::StateVariableOwner *) (cmf::math::Integrator *) ((cmf::math::BDF2 *) x)); -} -static void *_p_cmf__math__MultiIntegratorTo_p_cmf__math__StateVariableOwner(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::math::StateVariableOwner *) (cmf::math::Integrator *) ((cmf::math::MultiIntegrator *) x)); -} -static void *_p_cmf__math__CVodeIntegratorTo_p_cmf__math__StateVariableOwner(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::math::StateVariableOwner *) (cmf::math::Integrator *) ((cmf::math::CVodeIntegrator *) x)); -} -static void *_p_cmf__math__RKFIntegratorTo_p_cmf__math__StateVariableOwner(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::math::StateVariableOwner *) (cmf::math::Integrator *) ((cmf::math::RKFIntegrator *) x)); -} -static void *_p_cmf__math__HeunIntegratorTo_p_cmf__math__StateVariableOwner(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::math::StateVariableOwner *) (cmf::math::Integrator *) ((cmf::math::HeunIntegrator *) x)); -} -static void *_p_cmf__math__IntegratorTo_p_cmf__math__StateVariableOwner(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::math::StateVariableOwner *) ((cmf::math::Integrator *) x)); -} -static void *_p_cmf__projectTo_p_cmf__math__StateVariableOwner(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::math::StateVariableOwner *) ((cmf::project *) x)); -} -static void *_p_cmf__math__SoluteWaterIntegratorTo_p_cmf__math__StateVariableOwner(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::math::StateVariableOwner *) (cmf::math::Integrator *) ((cmf::math::SoluteWaterIntegrator *) x)); -} -static void *_p_cmf__math__ImplicitEulerTo_p_cmf__math__StateVariableOwner(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::math::StateVariableOwner *) (cmf::math::Integrator *) ((cmf::math::ImplicitEuler *) x)); -} -static void *_p_cmf__math__ExplicitEuler_fixedTo_p_cmf__math__StateVariableOwner(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::math::StateVariableOwner *) (cmf::math::Integrator *) ((cmf::math::ExplicitEuler_fixed *) x)); -} -static void *_p_cmf__math__StateVariableListTo_p_cmf__math__StateVariableOwner(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::math::StateVariableOwner *) ((cmf::math::StateVariableList *) x)); -} -static void *_p_cmf__upslope__CellTo_p_cmf__math__StateVariableOwner(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::math::StateVariableOwner *) ((cmf::upslope::Cell *) x)); -} -static void *_p_cmf__upslope__aquiferTo_p_cmf__math__StateVariableOwner(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::math::StateVariableOwner *) (cmf::water::WaterStorage *) ((cmf::upslope::aquifer *) x)); -} -static void *_p_cmf__upslope__SoilLayerTo_p_cmf__math__StateVariableOwner(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::math::StateVariableOwner *) (cmf::water::WaterStorage *) ((cmf::upslope::SoilLayer *) x)); -} -static void *_p_cmf__upslope__MacroPoreTo_p_cmf__math__StateVariableOwner(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::math::StateVariableOwner *) (cmf::water::WaterStorage *) ((cmf::upslope::MacroPore *) x)); -} -static void *_p_cmf__river__ReachTo_p_cmf__math__StateVariableOwner(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::math::StateVariableOwner *) (cmf::water::WaterStorage *)(cmf::river::OpenWaterStorage *) ((cmf::river::Reach *) x)); -} -static void *_p_cmf__water__WaterStorageTo_p_cmf__math__StateVariableOwner(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::math::StateVariableOwner *) ((cmf::water::WaterStorage *) x)); -} -static void *_p_cmf__river__OpenWaterStorageTo_p_cmf__math__StateVariableOwner(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::math::StateVariableOwner *) (cmf::water::WaterStorage *) ((cmf::river::OpenWaterStorage *) x)); -} -static void *_p_cmf__water__node_listTo_p_cmf__math__StateVariableOwner(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::math::StateVariableOwner *) ((cmf::water::node_list *) x)); -} -static void *_p_cmf__upslope__SurfaceWaterTo_p_cmf__math__StateVariableOwner(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::math::StateVariableOwner *) (cmf::water::WaterStorage *)(cmf::river::OpenWaterStorage *) ((cmf::upslope::SurfaceWater *) x)); -} -static void *_p_cmf__math__ExplicitEuler_fixedTo_p_cmf__math__Integrator(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::math::Integrator *) ((cmf::math::ExplicitEuler_fixed *) x)); -} -static void *_p_cmf__math__BDF2To_p_cmf__math__Integrator(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::math::Integrator *) ((cmf::math::BDF2 *) x)); -} -static void *_p_cmf__math__ImplicitEulerTo_p_cmf__math__Integrator(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::math::Integrator *) ((cmf::math::ImplicitEuler *) x)); -} -static void *_p_cmf__math__HeunIntegratorTo_p_cmf__math__Integrator(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::math::Integrator *) ((cmf::math::HeunIntegrator *) x)); -} -static void *_p_cmf__math__RKFIntegratorTo_p_cmf__math__Integrator(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::math::Integrator *) ((cmf::math::RKFIntegrator *) x)); -} -static void *_p_cmf__math__CVodeIntegratorTo_p_cmf__math__Integrator(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::math::Integrator *) ((cmf::math::CVodeIntegrator *) x)); -} -static void *_p_cmf__math__MultiIntegratorTo_p_cmf__math__Integrator(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::math::Integrator *) ((cmf::math::MultiIntegrator *) x)); -} -static void *_p_cmf__math__SoluteWaterIntegratorTo_p_cmf__math__Integrator(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::math::Integrator *) ((cmf::math::SoluteWaterIntegrator *) x)); -} -static void *_p_cmf__water__NullAdsorptionTo_p_cmf__water__Adsorption(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::water::Adsorption *) ((cmf::water::NullAdsorption *) x)); -} -static void *_p_cmf__water__LinearAdsorptionTo_p_cmf__water__Adsorption(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::water::Adsorption *) ((cmf::water::LinearAdsorption *) x)); -} -static void *_p_cmf__water__FreundlichAdsorbtionTo_p_cmf__water__Adsorption(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::water::Adsorption *) ((cmf::water::FreundlichAdsorbtion *) x)); -} -static void *_p_cmf__water__LangmuirAdsorptionTo_p_cmf__water__Adsorption(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((cmf::water::Adsorption *) ((cmf::water::LangmuirAdsorption *) x)); -} -static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__atmosphere__ConstantMeteorology = {"_p_cmf__atmosphere__ConstantMeteorology", "cmf::atmosphere::ConstantMeteorology *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__atmosphere__ConstantRainSource = {"_p_cmf__atmosphere__ConstantRainSource", "cmf::atmosphere::ConstantRainSource *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__atmosphere__IDWRainfall = {"_p_cmf__atmosphere__IDWRainfall", "cmf::atmosphere::IDWRainfall *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__atmosphere__IDW_Meteorology = {"_p_cmf__atmosphere__IDW_Meteorology", "cmf::atmosphere::IDW_Meteorology *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__atmosphere__MeteoStation = {"_p_cmf__atmosphere__MeteoStation", "cmf::atmosphere::MeteoStation *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__atmosphere__MeteoStationList = {"_p_cmf__atmosphere__MeteoStationList", "cmf::atmosphere::MeteoStationList *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__atmosphere__MeteoStationReference = {"_p_cmf__atmosphere__MeteoStationReference", "cmf::atmosphere::MeteoStationReference *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__atmosphere__Meteorology = {"_p_cmf__atmosphere__Meteorology", "cmf::atmosphere::Meteorology *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__atmosphere__RainSource = {"_p_cmf__atmosphere__RainSource", "cmf::atmosphere::RainSource *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__atmosphere__RainfallStation = {"_p_cmf__atmosphere__RainfallStation", "cmf::atmosphere::RainfallStation *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__atmosphere__RainfallStationList = {"_p_cmf__atmosphere__RainfallStationList", "cmf::atmosphere::RainfallStationList *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__atmosphere__RainfallStationReference = {"_p_cmf__atmosphere__RainfallStationReference", "cmf::atmosphere::RainfallStationReference *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__atmosphere__TimeseriesRainSource = {"_p_cmf__atmosphere__TimeseriesRainSource", "cmf::atmosphere::TimeseriesRainSource *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__atmosphere__Weather = {"_p_cmf__atmosphere__Weather", "cmf::atmosphere::Weather *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__atmosphere__aerodynamic_resistance = {"_p_cmf__atmosphere__aerodynamic_resistance", "cmf::atmosphere::aerodynamic_resistance *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__atmosphere__log_wind_profile = {"_p_cmf__atmosphere__log_wind_profile", "cmf::atmosphere::log_wind_profile *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__geometry__point = {"_p_cmf__geometry__point", "cmf::geometry::point *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__geometry__point_vector = {"_p_cmf__geometry__point_vector", "cmf::geometry::point_vector *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__math__BDF2 = {"_p_cmf__math__BDF2", "cmf::math::BDF2 *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__math__CVodeIntegrator = {"_p_cmf__math__CVodeIntegrator", "cmf::math::CVodeIntegrator *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__math__Date = {"_p_cmf__math__Date", "cmf::math::Date *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__math__ExplicitEuler_fixed = {"_p_cmf__math__ExplicitEuler_fixed", "cmf::math::ExplicitEuler_fixed *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__math__HeunIntegrator = {"_p_cmf__math__HeunIntegrator", "cmf::math::HeunIntegrator *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__math__ImplicitEuler = {"_p_cmf__math__ImplicitEuler", "cmf::math::ImplicitEuler *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__math__Integrator = {"_p_cmf__math__Integrator", "cmf::math::Integrator *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__math__MultiIntegrator = {"_p_cmf__math__MultiIntegrator", "cmf::math::MultiIntegrator *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__math__RKFIntegrator = {"_p_cmf__math__RKFIntegrator", "cmf::math::RKFIntegrator *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__math__SoluteWaterIntegrator = {"_p_cmf__math__SoluteWaterIntegrator", "cmf::math::SoluteWaterIntegrator *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__math__StateVariable = {"_p_cmf__math__StateVariable", "cmf::math::StateVariable *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__math__StateVariableList = {"_p_cmf__math__StateVariableList", "cmf::math::StateVariableList *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__math__StateVariableOwner = {"_p_cmf__math__StateVariableOwner", "cmf::math::StateVariableOwner *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__math__Time = {"_p_cmf__math__Time", "cmf::math::Time *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__math__cubicspline = {"_p_cmf__math__cubicspline", "cmf::math::cubicspline *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__math__integratable = {"_p_cmf__math__integratable", "cmf::math::integratable *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__math__integratable_list = {"_p_cmf__math__integratable_list", "cmf::math::integratable_list *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__math__num_array = {"_p_cmf__math__num_array", "cmf::math::num_array *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__math__timeseries = {"_p_cmf__math__timeseries", "cmf::math::timeseries *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__project = {"_p_cmf__project", "cmf::project *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__river__Channel = {"_p_cmf__river__Channel", "cmf::river::Channel *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__river__IChannel = {"_p_cmf__river__IChannel", "cmf::river::IChannel *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__river__IVolumeHeightFunction = {"_p_cmf__river__IVolumeHeightFunction", "cmf::river::IVolumeHeightFunction *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__river__Manning = {"_p_cmf__river__Manning", "cmf::river::Manning *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__river__Manning_Diffusive = {"_p_cmf__river__Manning_Diffusive", "cmf::river::Manning_Diffusive *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__river__Manning_Kinematic = {"_p_cmf__river__Manning_Kinematic", "cmf::river::Manning_Kinematic *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__river__MeanChannel = {"_p_cmf__river__MeanChannel", "cmf::river::MeanChannel *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__river__OpenWaterStorage = {"_p_cmf__river__OpenWaterStorage", "cmf::river::OpenWaterStorage *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__river__PipeReach = {"_p_cmf__river__PipeReach", "cmf::river::PipeReach *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__river__Prism = {"_p_cmf__river__Prism", "cmf::river::Prism *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__river__Reach = {"_p_cmf__river__Reach", "cmf::river::Reach *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__river__ReachIterator = {"_p_cmf__river__ReachIterator", "cmf::river::ReachIterator *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__river__RectangularReach = {"_p_cmf__river__RectangularReach", "cmf::river::RectangularReach *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__river__SWATReachType = {"_p_cmf__river__SWATReachType", "cmf::river::SWATReachType *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__river__TriangularReach = {"_p_cmf__river__TriangularReach", "cmf::river::TriangularReach *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__river__volume_height_function = {"_p_cmf__river__volume_height_function", "cmf::river::volume_height_function *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__upslope__BrooksCoreyRetentionCurve = {"_p_cmf__upslope__BrooksCoreyRetentionCurve", "cmf::upslope::BrooksCoreyRetentionCurve *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__upslope__Cell = {"_p_cmf__upslope__Cell", "cmf::upslope::Cell *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__upslope__CellConnector = {"_p_cmf__upslope__CellConnector", "cmf::upslope::CellConnector *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__upslope__ET__CanopyStorageEvaporation = {"_p_cmf__upslope__ET__CanopyStorageEvaporation", "cmf::upslope::ET::CanopyStorageEvaporation *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__upslope__ET__ContentStress = {"_p_cmf__upslope__ET__ContentStress", "cmf::upslope::ET::ContentStress *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__upslope__ET__HargreaveET = {"_p_cmf__upslope__ET__HargreaveET", "cmf::upslope::ET::HargreaveET *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__upslope__ET__PenmanEvaporation = {"_p_cmf__upslope__ET__PenmanEvaporation", "cmf::upslope::ET::PenmanEvaporation *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__upslope__ET__PenmanMonteithET = {"_p_cmf__upslope__ET__PenmanMonteithET", "cmf::upslope::ET::PenmanMonteithET *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__upslope__ET__PriestleyTaylorET = {"_p_cmf__upslope__ET__PriestleyTaylorET", "cmf::upslope::ET::PriestleyTaylorET *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__upslope__ET__RootUptakeStessFunction = {"_p_cmf__upslope__ET__RootUptakeStessFunction", "cmf::upslope::ET::RootUptakeStessFunction *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__upslope__ET__ShuttleworthWallace = {"_p_cmf__upslope__ET__ShuttleworthWallace", "cmf::upslope::ET::ShuttleworthWallace *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__upslope__ET__SuctionStress = {"_p_cmf__upslope__ET__SuctionStress", "cmf::upslope::ET::SuctionStress *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__upslope__ET__TurcET = {"_p_cmf__upslope__ET__TurcET", "cmf::upslope::ET::TurcET *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__upslope__ET__VolumeStress = {"_p_cmf__upslope__ET__VolumeStress", "cmf::upslope::ET::VolumeStress *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__upslope__ET__canopy_evaporation = {"_p_cmf__upslope__ET__canopy_evaporation", "cmf::upslope::ET::canopy_evaporation *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__upslope__ET__canopy_evaporation_method = {"_p_cmf__upslope__ET__canopy_evaporation_method", "cmf::upslope::ET::canopy_evaporation_method *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__upslope__ET__constantETpot = {"_p_cmf__upslope__ET__constantETpot", "cmf::upslope::ET::constantETpot *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__upslope__ET__snow_evaporation = {"_p_cmf__upslope__ET__snow_evaporation", "cmf::upslope::ET::snow_evaporation *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__upslope__ET__snow_evaporation_method = {"_p_cmf__upslope__ET__snow_evaporation_method", "cmf::upslope::ET::snow_evaporation_method *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__upslope__ET__soil_evaporation = {"_p_cmf__upslope__ET__soil_evaporation", "cmf::upslope::ET::soil_evaporation *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__upslope__ET__soil_evaporation_method = {"_p_cmf__upslope__ET__soil_evaporation_method", "cmf::upslope::ET::soil_evaporation_method *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__upslope__ET__stressedET = {"_p_cmf__upslope__ET__stressedET", "cmf::upslope::ET::stressedET *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__upslope__ET__surface_water_evaporation = {"_p_cmf__upslope__ET__surface_water_evaporation", "cmf::upslope::ET::surface_water_evaporation *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__upslope__ET__surface_water_evaporation_method = {"_p_cmf__upslope__ET__surface_water_evaporation_method", "cmf::upslope::ET::surface_water_evaporation_method *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__upslope__ET__timeseriesETpot = {"_p_cmf__upslope__ET__timeseriesETpot", "cmf::upslope::ET::timeseriesETpot *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__upslope__ET__transpiration = {"_p_cmf__upslope__ET__transpiration", "cmf::upslope::ET::transpiration *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__upslope__ET__transpiration_method = {"_p_cmf__upslope__ET__transpiration_method", "cmf::upslope::ET::transpiration_method *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__upslope__LinearRetention = {"_p_cmf__upslope__LinearRetention", "cmf::upslope::LinearRetention *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__upslope__MacroPore = {"_p_cmf__upslope__MacroPore", "cmf::upslope::MacroPore *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__upslope__RetentionCurve = {"_p_cmf__upslope__RetentionCurve", "cmf::upslope::RetentionCurve *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__upslope__SoilLayer = {"_p_cmf__upslope__SoilLayer", "cmf::upslope::SoilLayer *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__upslope__SurfaceWater = {"_p_cmf__upslope__SurfaceWater", "cmf::upslope::SurfaceWater *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__upslope__Topology = {"_p_cmf__upslope__Topology", "cmf::upslope::Topology *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__upslope__VanGenuchtenMualem = {"_p_cmf__upslope__VanGenuchtenMualem", "cmf::upslope::VanGenuchtenMualem *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__upslope__aquifer = {"_p_cmf__upslope__aquifer", "cmf::upslope::aquifer *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__upslope__aquifer_Darcy = {"_p_cmf__upslope__aquifer_Darcy", "cmf::upslope::aquifer_Darcy *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__upslope__cell_vector = {"_p_cmf__upslope__cell_vector", "cmf::upslope::cell_vector *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__upslope__connections__BaseMacroFlow = {"_p_cmf__upslope__connections__BaseMacroFlow", "cmf::upslope::connections::BaseMacroFlow *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__upslope__connections__CanopyOverflow = {"_p_cmf__upslope__connections__CanopyOverflow", "cmf::upslope::connections::CanopyOverflow *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__upslope__connections__Darcy = {"_p_cmf__upslope__connections__Darcy", "cmf::upslope::connections::Darcy *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__upslope__connections__DarcyKinematic = {"_p_cmf__upslope__connections__DarcyKinematic", "cmf::upslope::connections::DarcyKinematic *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__upslope__connections__DiffusiveMacroMicroExchange = {"_p_cmf__upslope__connections__DiffusiveMacroMicroExchange", "cmf::upslope::connections::DiffusiveMacroMicroExchange *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__upslope__connections__DiffusiveSurfaceRunoff = {"_p_cmf__upslope__connections__DiffusiveSurfaceRunoff", "cmf::upslope::connections::DiffusiveSurfaceRunoff *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__upslope__connections__EnergyBudgetSnowMelt = {"_p_cmf__upslope__connections__EnergyBudgetSnowMelt", "cmf::upslope::connections::EnergyBudgetSnowMelt *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__upslope__connections__FreeDrainagePercolation = {"_p_cmf__upslope__connections__FreeDrainagePercolation", "cmf::upslope::connections::FreeDrainagePercolation *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__upslope__connections__GradientMacroFlow = {"_p_cmf__upslope__connections__GradientMacroFlow", "cmf::upslope::connections::GradientMacroFlow *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__upslope__connections__GradientMacroMicroExchange = {"_p_cmf__upslope__connections__GradientMacroMicroExchange", "cmf::upslope::connections::GradientMacroMicroExchange *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__upslope__connections__GreenAmptInfiltration = {"_p_cmf__upslope__connections__GreenAmptInfiltration", "cmf::upslope::connections::GreenAmptInfiltration *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__upslope__connections__JarvisMacroFlow = {"_p_cmf__upslope__connections__JarvisMacroFlow", "cmf::upslope::connections::JarvisMacroFlow *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__upslope__connections__KinematicMacroFlow = {"_p_cmf__upslope__connections__KinematicMacroFlow", "cmf::upslope::connections::KinematicMacroFlow *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__upslope__connections__KinematicSurfaceRunoff = {"_p_cmf__upslope__connections__KinematicSurfaceRunoff", "cmf::upslope::connections::KinematicSurfaceRunoff *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__upslope__connections__LayerBypass = {"_p_cmf__upslope__connections__LayerBypass", "cmf::upslope::connections::LayerBypass *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__upslope__connections__MACROlikeMacroMicroExchange = {"_p_cmf__upslope__connections__MACROlikeMacroMicroExchange", "cmf::upslope::connections::MACROlikeMacroMicroExchange *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__upslope__connections__MatrixInfiltration = {"_p_cmf__upslope__connections__MatrixInfiltration", "cmf::upslope::connections::MatrixInfiltration *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__upslope__connections__Rainfall = {"_p_cmf__upslope__connections__Rainfall", "cmf::upslope::connections::Rainfall *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__upslope__connections__Richards = {"_p_cmf__upslope__connections__Richards", "cmf::upslope::connections::Richards *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__upslope__connections__Richards_lateral = {"_p_cmf__upslope__connections__Richards_lateral", "cmf::upslope::connections::Richards_lateral *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__upslope__connections__RutterInterception = {"_p_cmf__upslope__connections__RutterInterception", "cmf::upslope::connections::RutterInterception *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__upslope__connections__SWATPercolation = {"_p_cmf__upslope__connections__SWATPercolation", "cmf::upslope::connections::SWATPercolation *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__upslope__connections__SimplRichards = {"_p_cmf__upslope__connections__SimplRichards", "cmf::upslope::connections::SimplRichards *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__upslope__connections__SimpleInfiltration = {"_p_cmf__upslope__connections__SimpleInfiltration", "cmf::upslope::connections::SimpleInfiltration *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__upslope__connections__SimpleTindexSnowMelt = {"_p_cmf__upslope__connections__SimpleTindexSnowMelt", "cmf::upslope::connections::SimpleTindexSnowMelt *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__upslope__connections__Snowfall = {"_p_cmf__upslope__connections__Snowfall", "cmf::upslope::connections::Snowfall *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__upslope__connections__TOPModelFlow = {"_p_cmf__upslope__connections__TOPModelFlow", "cmf::upslope::connections::TOPModelFlow *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__upslope__connections__TopographicGradientDarcy = {"_p_cmf__upslope__connections__TopographicGradientDarcy", "cmf::upslope::connections::TopographicGradientDarcy *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__upslope__connections__lateral_sub_surface_flux = {"_p_cmf__upslope__connections__lateral_sub_surface_flux", "cmf::upslope::connections::lateral_sub_surface_flux *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__upslope__layer_list = {"_p_cmf__upslope__layer_list", "cmf::upslope::layer_list *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__upslope__neighbor_iterator = {"_p_cmf__upslope__neighbor_iterator", "cmf::upslope::neighbor_iterator *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__upslope__subcatchment = {"_p_cmf__upslope__subcatchment", "cmf::upslope::subcatchment *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__upslope__vegetation__Vegetation = {"_p_cmf__upslope__vegetation__Vegetation", "cmf::upslope::vegetation::Vegetation *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__water__Adsorption = {"_p_cmf__water__Adsorption", "cmf::water::Adsorption *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__water__ConstraintLinearStorageConnection = {"_p_cmf__water__ConstraintLinearStorageConnection", "cmf::water::ConstraintLinearStorageConnection *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__water__DirichletBoundary = {"_p_cmf__water__DirichletBoundary", "cmf::water::DirichletBoundary *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__water__ExponentialDeclineConnection = {"_p_cmf__water__ExponentialDeclineConnection", "cmf::water::ExponentialDeclineConnection *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__water__FreundlichAdsorbtion = {"_p_cmf__water__FreundlichAdsorbtion", "cmf::water::FreundlichAdsorbtion *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__water__LangmuirAdsorption = {"_p_cmf__water__LangmuirAdsorption", "cmf::water::LangmuirAdsorption *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__water__LinearAdsorption = {"_p_cmf__water__LinearAdsorption", "cmf::water::LinearAdsorption *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__water__LinearStorageConnection = {"_p_cmf__water__LinearStorageConnection", "cmf::water::LinearStorageConnection *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__water__NeumannBoundary = {"_p_cmf__water__NeumannBoundary", "cmf::water::NeumannBoundary *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__water__NeumannBoundary_list = {"_p_cmf__water__NeumannBoundary_list", "cmf::water::NeumannBoundary_list *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__water__NeumannFlux = {"_p_cmf__water__NeumannFlux", "cmf::water::NeumannFlux *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__water__NullAdsorption = {"_p_cmf__water__NullAdsorption", "cmf::water::NullAdsorption *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__water__PowerLawConnection = {"_p_cmf__water__PowerLawConnection", "cmf::water::PowerLawConnection *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__water__SoluteStorage = {"_p_cmf__water__SoluteStorage", "cmf::water::SoluteStorage *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__water__SoluteTimeseries = {"_p_cmf__water__SoluteTimeseries", "cmf::water::SoluteTimeseries *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__water__SystemBridge = {"_p_cmf__water__SystemBridge", "cmf::water::SystemBridge *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__water__SystemBridgeConnection = {"_p_cmf__water__SystemBridgeConnection", "cmf::water::SystemBridgeConnection *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__water__TechnicalFlux = {"_p_cmf__water__TechnicalFlux", "cmf::water::TechnicalFlux *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__water__WaterStorage = {"_p_cmf__water__WaterStorage", "cmf::water::WaterStorage *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__water__bidirectional_kinematic_exchange = {"_p_cmf__water__bidirectional_kinematic_exchange", "cmf::water::bidirectional_kinematic_exchange *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__water__connection_list = {"_p_cmf__water__connection_list", "cmf::water::connection_list *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__water__constraint_kinematic_wave = {"_p_cmf__water__constraint_kinematic_wave", "cmf::water::constraint_kinematic_wave *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__water__external_control_connection = {"_p_cmf__water__external_control_connection", "cmf::water::external_control_connection *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__water__flux_connection = {"_p_cmf__water__flux_connection", "cmf::water::flux_connection *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__water__flux_integrator = {"_p_cmf__water__flux_integrator", "cmf::water::flux_integrator *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__water__flux_node = {"_p_cmf__water__flux_node", "cmf::water::flux_node *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__water__generic_gradient_connection = {"_p_cmf__water__generic_gradient_connection", "cmf::water::generic_gradient_connection *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__water__kinematic_wave = {"_p_cmf__water__kinematic_wave", "cmf::water::kinematic_wave *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__water__linear_scale = {"_p_cmf__water__linear_scale", "cmf::water::linear_scale *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__water__node_list = {"_p_cmf__water__node_list", "cmf::water::node_list *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__water__solute = {"_p_cmf__water__solute", "cmf::water::solute *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__water__solute_vector = {"_p_cmf__water__solute_vector", "cmf::water::solute_vector *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__water__statecontrol_connection = {"_p_cmf__water__statecontrol_connection", "cmf::water::statecontrol_connection *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__water__waterbalance_connection = {"_p_cmf__water__waterbalance_connection", "cmf::water::waterbalance_connection *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_cmf__water__waterbalance_integrator = {"_p_cmf__water__waterbalance_integrator", "cmf::water::waterbalance_integrator *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_const_iterator = {"_p_const_iterator", "const_iterator *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_double = {"_p_double", "real *|double *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_f_r_cmf__upslope__Cell_r_cmf__upslope__Cell_ptrdiff_t__void = {"_p_f_r_cmf__upslope__Cell_r_cmf__upslope__Cell_ptrdiff_t__void", "cmf::upslope::connectorfunction|void (*)(cmf::upslope::Cell &,cmf::upslope::Cell &,ptrdiff_t)", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_iterator = {"_p_iterator", "iterator *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_ptr = {"_p_ptr", "ptr *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__shared_ptrT_SoilLayer_t = {"_p_std__shared_ptrT_SoilLayer_t", "std::shared_ptr< SoilLayer > *|cmf::upslope::layer_ptr *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__shared_ptrT_cmf__atmosphere__ConstantRainSource_t = {"_p_std__shared_ptrT_cmf__atmosphere__ConstantRainSource_t", "std::shared_ptr< cmf::atmosphere::ConstantRainSource > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__shared_ptrT_cmf__atmosphere__IDWRainfall_t = {"_p_std__shared_ptrT_cmf__atmosphere__IDWRainfall_t", "std::shared_ptr< cmf::atmosphere::IDWRainfall > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t = {"_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t", "std::shared_ptr< cmf::atmosphere::MeteoStation > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__shared_ptrT_cmf__atmosphere__RainSource_t = {"_p_std__shared_ptrT_cmf__atmosphere__RainSource_t", "std::shared_ptr< cmf::atmosphere::RainSource > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__shared_ptrT_cmf__atmosphere__RainfallStationReference_t = {"_p_std__shared_ptrT_cmf__atmosphere__RainfallStationReference_t", "std::shared_ptr< cmf::atmosphere::RainfallStationReference > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__shared_ptrT_cmf__atmosphere__RainfallStation_t = {"_p_std__shared_ptrT_cmf__atmosphere__RainfallStation_t", "std::shared_ptr< cmf::atmosphere::RainfallStation > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__shared_ptrT_cmf__atmosphere__TimeseriesRainSource_t = {"_p_std__shared_ptrT_cmf__atmosphere__TimeseriesRainSource_t", "std::shared_ptr< cmf::atmosphere::TimeseriesRainSource > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__shared_ptrT_cmf__atmosphere__aerodynamic_resistance_t = {"_p_std__shared_ptrT_cmf__atmosphere__aerodynamic_resistance_t", "std::shared_ptr< cmf::atmosphere::aerodynamic_resistance > *|cmf::atmosphere::aerodynamic_resistance::ptr *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__shared_ptrT_cmf__math__StateVariable_t = {"_p_std__shared_ptrT_cmf__math__StateVariable_t", "cmf::math::StateVariable::ptr *|std::shared_ptr< cmf::math::StateVariable > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__shared_ptrT_cmf__math__integratable_t = {"_p_std__shared_ptrT_cmf__math__integratable_t", "cmf::math::integratable::ptr *|std::shared_ptr< cmf::math::integratable > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__shared_ptrT_cmf__river__OpenWaterStorage_t = {"_p_std__shared_ptrT_cmf__river__OpenWaterStorage_t", "std::shared_ptr< cmf::river::OpenWaterStorage > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__shared_ptrT_cmf__river__Reach_t = {"_p_std__shared_ptrT_cmf__river__Reach_t", "std::shared_ptr< cmf::river::Reach > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__shared_ptrT_cmf__upslope__ET__canopy_evaporation_method_t = {"_p_std__shared_ptrT_cmf__upslope__ET__canopy_evaporation_method_t", "std::shared_ptr< cmf::upslope::ET::canopy_evaporation_method > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__shared_ptrT_cmf__upslope__ET__snow_evaporation_method_t = {"_p_std__shared_ptrT_cmf__upslope__ET__snow_evaporation_method_t", "std::shared_ptr< cmf::upslope::ET::snow_evaporation_method > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__shared_ptrT_cmf__upslope__ET__soil_evaporation_method_t = {"_p_std__shared_ptrT_cmf__upslope__ET__soil_evaporation_method_t", "std::shared_ptr< cmf::upslope::ET::soil_evaporation_method > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__shared_ptrT_cmf__upslope__ET__surface_water_evaporation_method_t = {"_p_std__shared_ptrT_cmf__upslope__ET__surface_water_evaporation_method_t", "std::shared_ptr< cmf::upslope::ET::surface_water_evaporation_method > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__shared_ptrT_cmf__upslope__ET__transpiration_method_t = {"_p_std__shared_ptrT_cmf__upslope__ET__transpiration_method_t", "std::shared_ptr< cmf::upslope::ET::transpiration_method > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__shared_ptrT_cmf__upslope__MacroPore_t = {"_p_std__shared_ptrT_cmf__upslope__MacroPore_t", "std::shared_ptr< cmf::upslope::MacroPore > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__shared_ptrT_cmf__upslope__SoilLayer_t = {"_p_std__shared_ptrT_cmf__upslope__SoilLayer_t", "cmf::upslope::SoilLayer::ptr *|std::shared_ptr< cmf::upslope::SoilLayer > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__shared_ptrT_cmf__upslope__SurfaceWater_t = {"_p_std__shared_ptrT_cmf__upslope__SurfaceWater_t", "std::shared_ptr< cmf::upslope::SurfaceWater > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__shared_ptrT_cmf__upslope__aquifer_t = {"_p_std__shared_ptrT_cmf__upslope__aquifer_t", "std::shared_ptr< cmf::upslope::aquifer > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__shared_ptrT_cmf__water__DirichletBoundary_t = {"_p_std__shared_ptrT_cmf__water__DirichletBoundary_t", "std::shared_ptr< cmf::water::DirichletBoundary > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__shared_ptrT_cmf__water__NeumannBoundary_t = {"_p_std__shared_ptrT_cmf__water__NeumannBoundary_t", "cmf::water::NeumannBoundary::ptr *|std::shared_ptr< cmf::water::NeumannBoundary > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__shared_ptrT_cmf__water__SoluteStorage_t = {"_p_std__shared_ptrT_cmf__water__SoluteStorage_t", "std::shared_ptr< cmf::water::SoluteStorage > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__shared_ptrT_cmf__water__SystemBridge_t = {"_p_std__shared_ptrT_cmf__water__SystemBridge_t", "std::shared_ptr< cmf::water::SystemBridge > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__shared_ptrT_cmf__water__WaterStorage_t = {"_p_std__shared_ptrT_cmf__water__WaterStorage_t", "std::shared_ptr< cmf::water::WaterStorage > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__shared_ptrT_cmf__water__flux_connection_t = {"_p_std__shared_ptrT_cmf__water__flux_connection_t", "cmf::water::flux_connection::ptr *|std::shared_ptr< cmf::water::flux_connection > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__shared_ptrT_cmf__water__flux_integrator_t = {"_p_std__shared_ptrT_cmf__water__flux_integrator_t", "std::shared_ptr< cmf::water::flux_integrator > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__shared_ptrT_cmf__water__flux_node_t = {"_p_std__shared_ptrT_cmf__water__flux_node_t", "cmf::water::flux_node::ptr *|std::shared_ptr< cmf::water::flux_node > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__shared_ptrT_cmf__water__waterbalance_integrator_t = {"_p_std__shared_ptrT_cmf__water__waterbalance_integrator_t", "std::shared_ptr< cmf::water::waterbalance_integrator > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__shared_ptrT_std__shared_ptrT_cmf__atmosphere__ConstantRainSource_t_t = {"_p_std__shared_ptrT_std__shared_ptrT_cmf__atmosphere__ConstantRainSource_t_t", "std::shared_ptr< std::shared_ptr< cmf::atmosphere::ConstantRainSource > > *|std::shared_ptr< cmf::atmosphere::ConstantRainSource::ptr > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__shared_ptrT_std__shared_ptrT_cmf__atmosphere__RainfallStationReference_t_t = {"_p_std__shared_ptrT_std__shared_ptrT_cmf__atmosphere__RainfallStationReference_t_t", "std::shared_ptr< std::shared_ptr< cmf::atmosphere::RainfallStationReference > > *|std::shared_ptr< cmf::atmosphere::RainfallStationReference::ptr > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__string = {"_p_std__string", "std::string *|cmf::bytestring *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__vectorT_std__shared_ptrT_cmf__water__WaterStorage_t_t = {"_p_std__vectorT_std__shared_ptrT_cmf__water__WaterStorage_t_t", "std::vector< std::shared_ptr< cmf::water::WaterStorage > > *|cmf::water::storage_vector *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__vectorT_std__shared_ptrT_cmf__water__flux_connection_t_t__const_iterator = {"_p_std__vectorT_std__shared_ptrT_cmf__water__flux_connection_t_t__const_iterator", "cmf::water::connection_list::const_iterator *|std::vector< std::shared_ptr< cmf::water::flux_connection > >::const_iterator *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__vectorT_std__shared_ptrT_cmf__water__flux_connection_t_t__iterator = {"_p_std__vectorT_std__shared_ptrT_cmf__water__flux_connection_t_t__iterator", "cmf::water::connection_list::iterator *|std::vector< std::shared_ptr< cmf::water::flux_connection > >::iterator *", 0, 0, (void*)0, 0}; - -static swig_type_info *swig_type_initial[] = { - &_swigt__p_char, - &_swigt__p_cmf__atmosphere__ConstantMeteorology, - &_swigt__p_cmf__atmosphere__ConstantRainSource, - &_swigt__p_cmf__atmosphere__IDWRainfall, - &_swigt__p_cmf__atmosphere__IDW_Meteorology, - &_swigt__p_cmf__atmosphere__MeteoStation, - &_swigt__p_cmf__atmosphere__MeteoStationList, - &_swigt__p_cmf__atmosphere__MeteoStationReference, - &_swigt__p_cmf__atmosphere__Meteorology, - &_swigt__p_cmf__atmosphere__RainSource, - &_swigt__p_cmf__atmosphere__RainfallStation, - &_swigt__p_cmf__atmosphere__RainfallStationList, - &_swigt__p_cmf__atmosphere__RainfallStationReference, - &_swigt__p_cmf__atmosphere__TimeseriesRainSource, - &_swigt__p_cmf__atmosphere__Weather, - &_swigt__p_cmf__atmosphere__aerodynamic_resistance, - &_swigt__p_cmf__atmosphere__log_wind_profile, - &_swigt__p_cmf__geometry__point, - &_swigt__p_cmf__geometry__point_vector, - &_swigt__p_cmf__math__BDF2, - &_swigt__p_cmf__math__CVodeIntegrator, - &_swigt__p_cmf__math__Date, - &_swigt__p_cmf__math__ExplicitEuler_fixed, - &_swigt__p_cmf__math__HeunIntegrator, - &_swigt__p_cmf__math__ImplicitEuler, - &_swigt__p_cmf__math__Integrator, - &_swigt__p_cmf__math__MultiIntegrator, - &_swigt__p_cmf__math__RKFIntegrator, - &_swigt__p_cmf__math__SoluteWaterIntegrator, - &_swigt__p_cmf__math__StateVariable, - &_swigt__p_cmf__math__StateVariableList, - &_swigt__p_cmf__math__StateVariableOwner, - &_swigt__p_cmf__math__Time, - &_swigt__p_cmf__math__cubicspline, - &_swigt__p_cmf__math__integratable, - &_swigt__p_cmf__math__integratable_list, - &_swigt__p_cmf__math__num_array, - &_swigt__p_cmf__math__timeseries, - &_swigt__p_cmf__project, - &_swigt__p_cmf__river__Channel, - &_swigt__p_cmf__river__IChannel, - &_swigt__p_cmf__river__IVolumeHeightFunction, - &_swigt__p_cmf__river__Manning, - &_swigt__p_cmf__river__Manning_Diffusive, - &_swigt__p_cmf__river__Manning_Kinematic, - &_swigt__p_cmf__river__MeanChannel, - &_swigt__p_cmf__river__OpenWaterStorage, - &_swigt__p_cmf__river__PipeReach, - &_swigt__p_cmf__river__Prism, - &_swigt__p_cmf__river__Reach, - &_swigt__p_cmf__river__ReachIterator, - &_swigt__p_cmf__river__RectangularReach, - &_swigt__p_cmf__river__SWATReachType, - &_swigt__p_cmf__river__TriangularReach, - &_swigt__p_cmf__river__volume_height_function, - &_swigt__p_cmf__upslope__BrooksCoreyRetentionCurve, - &_swigt__p_cmf__upslope__Cell, - &_swigt__p_cmf__upslope__CellConnector, - &_swigt__p_cmf__upslope__ET__CanopyStorageEvaporation, - &_swigt__p_cmf__upslope__ET__ContentStress, - &_swigt__p_cmf__upslope__ET__HargreaveET, - &_swigt__p_cmf__upslope__ET__PenmanEvaporation, - &_swigt__p_cmf__upslope__ET__PenmanMonteithET, - &_swigt__p_cmf__upslope__ET__PriestleyTaylorET, - &_swigt__p_cmf__upslope__ET__RootUptakeStessFunction, - &_swigt__p_cmf__upslope__ET__ShuttleworthWallace, - &_swigt__p_cmf__upslope__ET__SuctionStress, - &_swigt__p_cmf__upslope__ET__TurcET, - &_swigt__p_cmf__upslope__ET__VolumeStress, - &_swigt__p_cmf__upslope__ET__canopy_evaporation, - &_swigt__p_cmf__upslope__ET__canopy_evaporation_method, - &_swigt__p_cmf__upslope__ET__constantETpot, - &_swigt__p_cmf__upslope__ET__snow_evaporation, - &_swigt__p_cmf__upslope__ET__snow_evaporation_method, - &_swigt__p_cmf__upslope__ET__soil_evaporation, - &_swigt__p_cmf__upslope__ET__soil_evaporation_method, - &_swigt__p_cmf__upslope__ET__stressedET, - &_swigt__p_cmf__upslope__ET__surface_water_evaporation, - &_swigt__p_cmf__upslope__ET__surface_water_evaporation_method, - &_swigt__p_cmf__upslope__ET__timeseriesETpot, - &_swigt__p_cmf__upslope__ET__transpiration, - &_swigt__p_cmf__upslope__ET__transpiration_method, - &_swigt__p_cmf__upslope__LinearRetention, - &_swigt__p_cmf__upslope__MacroPore, - &_swigt__p_cmf__upslope__RetentionCurve, - &_swigt__p_cmf__upslope__SoilLayer, - &_swigt__p_cmf__upslope__SurfaceWater, - &_swigt__p_cmf__upslope__Topology, - &_swigt__p_cmf__upslope__VanGenuchtenMualem, - &_swigt__p_cmf__upslope__aquifer, - &_swigt__p_cmf__upslope__aquifer_Darcy, - &_swigt__p_cmf__upslope__cell_vector, - &_swigt__p_cmf__upslope__connections__BaseMacroFlow, - &_swigt__p_cmf__upslope__connections__CanopyOverflow, - &_swigt__p_cmf__upslope__connections__Darcy, - &_swigt__p_cmf__upslope__connections__DarcyKinematic, - &_swigt__p_cmf__upslope__connections__DiffusiveMacroMicroExchange, - &_swigt__p_cmf__upslope__connections__DiffusiveSurfaceRunoff, - &_swigt__p_cmf__upslope__connections__EnergyBudgetSnowMelt, - &_swigt__p_cmf__upslope__connections__FreeDrainagePercolation, - &_swigt__p_cmf__upslope__connections__GradientMacroFlow, - &_swigt__p_cmf__upslope__connections__GradientMacroMicroExchange, - &_swigt__p_cmf__upslope__connections__GreenAmptInfiltration, - &_swigt__p_cmf__upslope__connections__JarvisMacroFlow, - &_swigt__p_cmf__upslope__connections__KinematicMacroFlow, - &_swigt__p_cmf__upslope__connections__KinematicSurfaceRunoff, - &_swigt__p_cmf__upslope__connections__LayerBypass, - &_swigt__p_cmf__upslope__connections__MACROlikeMacroMicroExchange, - &_swigt__p_cmf__upslope__connections__MatrixInfiltration, - &_swigt__p_cmf__upslope__connections__Rainfall, - &_swigt__p_cmf__upslope__connections__Richards, - &_swigt__p_cmf__upslope__connections__Richards_lateral, - &_swigt__p_cmf__upslope__connections__RutterInterception, - &_swigt__p_cmf__upslope__connections__SWATPercolation, - &_swigt__p_cmf__upslope__connections__SimplRichards, - &_swigt__p_cmf__upslope__connections__SimpleInfiltration, - &_swigt__p_cmf__upslope__connections__SimpleTindexSnowMelt, - &_swigt__p_cmf__upslope__connections__Snowfall, - &_swigt__p_cmf__upslope__connections__TOPModelFlow, - &_swigt__p_cmf__upslope__connections__TopographicGradientDarcy, - &_swigt__p_cmf__upslope__connections__lateral_sub_surface_flux, - &_swigt__p_cmf__upslope__layer_list, - &_swigt__p_cmf__upslope__neighbor_iterator, - &_swigt__p_cmf__upslope__subcatchment, - &_swigt__p_cmf__upslope__vegetation__Vegetation, - &_swigt__p_cmf__water__Adsorption, - &_swigt__p_cmf__water__ConstraintLinearStorageConnection, - &_swigt__p_cmf__water__DirichletBoundary, - &_swigt__p_cmf__water__ExponentialDeclineConnection, - &_swigt__p_cmf__water__FreundlichAdsorbtion, - &_swigt__p_cmf__water__LangmuirAdsorption, - &_swigt__p_cmf__water__LinearAdsorption, - &_swigt__p_cmf__water__LinearStorageConnection, - &_swigt__p_cmf__water__NeumannBoundary, - &_swigt__p_cmf__water__NeumannBoundary_list, - &_swigt__p_cmf__water__NeumannFlux, - &_swigt__p_cmf__water__NullAdsorption, - &_swigt__p_cmf__water__PowerLawConnection, - &_swigt__p_cmf__water__SoluteStorage, - &_swigt__p_cmf__water__SoluteTimeseries, - &_swigt__p_cmf__water__SystemBridge, - &_swigt__p_cmf__water__SystemBridgeConnection, - &_swigt__p_cmf__water__TechnicalFlux, - &_swigt__p_cmf__water__WaterStorage, - &_swigt__p_cmf__water__bidirectional_kinematic_exchange, - &_swigt__p_cmf__water__connection_list, - &_swigt__p_cmf__water__constraint_kinematic_wave, - &_swigt__p_cmf__water__external_control_connection, - &_swigt__p_cmf__water__flux_connection, - &_swigt__p_cmf__water__flux_integrator, - &_swigt__p_cmf__water__flux_node, - &_swigt__p_cmf__water__generic_gradient_connection, - &_swigt__p_cmf__water__kinematic_wave, - &_swigt__p_cmf__water__linear_scale, - &_swigt__p_cmf__water__node_list, - &_swigt__p_cmf__water__solute, - &_swigt__p_cmf__water__solute_vector, - &_swigt__p_cmf__water__statecontrol_connection, - &_swigt__p_cmf__water__waterbalance_connection, - &_swigt__p_cmf__water__waterbalance_integrator, - &_swigt__p_const_iterator, - &_swigt__p_double, - &_swigt__p_f_r_cmf__upslope__Cell_r_cmf__upslope__Cell_ptrdiff_t__void, - &_swigt__p_iterator, - &_swigt__p_ptr, - &_swigt__p_std__shared_ptrT_SoilLayer_t, - &_swigt__p_std__shared_ptrT_cmf__atmosphere__ConstantRainSource_t, - &_swigt__p_std__shared_ptrT_cmf__atmosphere__IDWRainfall_t, - &_swigt__p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, - &_swigt__p_std__shared_ptrT_cmf__atmosphere__RainSource_t, - &_swigt__p_std__shared_ptrT_cmf__atmosphere__RainfallStationReference_t, - &_swigt__p_std__shared_ptrT_cmf__atmosphere__RainfallStation_t, - &_swigt__p_std__shared_ptrT_cmf__atmosphere__TimeseriesRainSource_t, - &_swigt__p_std__shared_ptrT_cmf__atmosphere__aerodynamic_resistance_t, - &_swigt__p_std__shared_ptrT_cmf__math__StateVariable_t, - &_swigt__p_std__shared_ptrT_cmf__math__integratable_t, - &_swigt__p_std__shared_ptrT_cmf__river__OpenWaterStorage_t, - &_swigt__p_std__shared_ptrT_cmf__river__Reach_t, - &_swigt__p_std__shared_ptrT_cmf__upslope__ET__canopy_evaporation_method_t, - &_swigt__p_std__shared_ptrT_cmf__upslope__ET__snow_evaporation_method_t, - &_swigt__p_std__shared_ptrT_cmf__upslope__ET__soil_evaporation_method_t, - &_swigt__p_std__shared_ptrT_cmf__upslope__ET__surface_water_evaporation_method_t, - &_swigt__p_std__shared_ptrT_cmf__upslope__ET__transpiration_method_t, - &_swigt__p_std__shared_ptrT_cmf__upslope__MacroPore_t, - &_swigt__p_std__shared_ptrT_cmf__upslope__SoilLayer_t, - &_swigt__p_std__shared_ptrT_cmf__upslope__SurfaceWater_t, - &_swigt__p_std__shared_ptrT_cmf__upslope__aquifer_t, - &_swigt__p_std__shared_ptrT_cmf__water__DirichletBoundary_t, - &_swigt__p_std__shared_ptrT_cmf__water__NeumannBoundary_t, - &_swigt__p_std__shared_ptrT_cmf__water__SoluteStorage_t, - &_swigt__p_std__shared_ptrT_cmf__water__SystemBridge_t, - &_swigt__p_std__shared_ptrT_cmf__water__WaterStorage_t, - &_swigt__p_std__shared_ptrT_cmf__water__flux_connection_t, - &_swigt__p_std__shared_ptrT_cmf__water__flux_integrator_t, - &_swigt__p_std__shared_ptrT_cmf__water__flux_node_t, - &_swigt__p_std__shared_ptrT_cmf__water__waterbalance_integrator_t, - &_swigt__p_std__shared_ptrT_std__shared_ptrT_cmf__atmosphere__ConstantRainSource_t_t, - &_swigt__p_std__shared_ptrT_std__shared_ptrT_cmf__atmosphere__RainfallStationReference_t_t, - &_swigt__p_std__string, - &_swigt__p_std__vectorT_std__shared_ptrT_cmf__water__WaterStorage_t_t, - &_swigt__p_std__vectorT_std__shared_ptrT_cmf__water__flux_connection_t_t__const_iterator, - &_swigt__p_std__vectorT_std__shared_ptrT_cmf__water__flux_connection_t_t__iterator, -}; - -static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__atmosphere__ConstantMeteorology[] = { {&_swigt__p_cmf__atmosphere__ConstantMeteorology, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__atmosphere__ConstantRainSource[] = { {&_swigt__p_cmf__atmosphere__ConstantRainSource, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__atmosphere__IDWRainfall[] = { {&_swigt__p_cmf__atmosphere__IDWRainfall, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__atmosphere__IDW_Meteorology[] = { {&_swigt__p_cmf__atmosphere__IDW_Meteorology, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__atmosphere__MeteoStation[] = { {&_swigt__p_cmf__atmosphere__MeteoStation, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__atmosphere__MeteoStationList[] = { {&_swigt__p_cmf__atmosphere__MeteoStationList, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__atmosphere__MeteoStationReference[] = { {&_swigt__p_cmf__atmosphere__MeteoStationReference, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__atmosphere__Meteorology[] = { {&_swigt__p_cmf__atmosphere__MeteoStationReference, _p_cmf__atmosphere__MeteoStationReferenceTo_p_cmf__atmosphere__Meteorology, 0, 0}, {&_swigt__p_cmf__atmosphere__Meteorology, 0, 0, 0}, {&_swigt__p_cmf__atmosphere__ConstantMeteorology, _p_cmf__atmosphere__ConstantMeteorologyTo_p_cmf__atmosphere__Meteorology, 0, 0}, {&_swigt__p_cmf__atmosphere__IDW_Meteorology, _p_cmf__atmosphere__IDW_MeteorologyTo_p_cmf__atmosphere__Meteorology, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__atmosphere__RainSource[] = { {&_swigt__p_cmf__atmosphere__RainSource, 0, 0, 0}, {&_swigt__p_cmf__atmosphere__ConstantRainSource, _p_cmf__atmosphere__ConstantRainSourceTo_p_cmf__atmosphere__RainSource, 0, 0}, {&_swigt__p_cmf__atmosphere__TimeseriesRainSource, _p_cmf__atmosphere__TimeseriesRainSourceTo_p_cmf__atmosphere__RainSource, 0, 0}, {&_swigt__p_cmf__atmosphere__RainfallStationReference, _p_cmf__atmosphere__RainfallStationReferenceTo_p_cmf__atmosphere__RainSource, 0, 0}, {&_swigt__p_cmf__atmosphere__IDWRainfall, _p_cmf__atmosphere__IDWRainfallTo_p_cmf__atmosphere__RainSource, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__atmosphere__RainfallStation[] = { {&_swigt__p_cmf__atmosphere__RainfallStation, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__atmosphere__RainfallStationList[] = { {&_swigt__p_cmf__atmosphere__RainfallStationList, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__atmosphere__RainfallStationReference[] = { {&_swigt__p_cmf__atmosphere__RainfallStationReference, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__atmosphere__TimeseriesRainSource[] = { {&_swigt__p_cmf__atmosphere__TimeseriesRainSource, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__atmosphere__Weather[] = { {&_swigt__p_cmf__atmosphere__Weather, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__atmosphere__aerodynamic_resistance[] = { {&_swigt__p_cmf__atmosphere__aerodynamic_resistance, 0, 0, 0}, {&_swigt__p_cmf__upslope__ET__ShuttleworthWallace, _p_cmf__upslope__ET__ShuttleworthWallaceTo_p_cmf__atmosphere__aerodynamic_resistance, 0, 0}, {&_swigt__p_cmf__atmosphere__log_wind_profile, _p_cmf__atmosphere__log_wind_profileTo_p_cmf__atmosphere__aerodynamic_resistance, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__atmosphere__log_wind_profile[] = { {&_swigt__p_cmf__atmosphere__log_wind_profile, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__geometry__point[] = { {&_swigt__p_cmf__geometry__point, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__geometry__point_vector[] = { {&_swigt__p_cmf__geometry__point_vector, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__math__BDF2[] = { {&_swigt__p_cmf__math__BDF2, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__math__CVodeIntegrator[] = { {&_swigt__p_cmf__math__CVodeIntegrator, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__math__Date[] = { {&_swigt__p_cmf__math__Date, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__math__ExplicitEuler_fixed[] = { {&_swigt__p_cmf__math__ExplicitEuler_fixed, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__math__HeunIntegrator[] = { {&_swigt__p_cmf__math__HeunIntegrator, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__math__ImplicitEuler[] = { {&_swigt__p_cmf__math__ImplicitEuler, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__math__Integrator[] = { {&_swigt__p_cmf__math__BDF2, _p_cmf__math__BDF2To_p_cmf__math__Integrator, 0, 0}, {&_swigt__p_cmf__math__ExplicitEuler_fixed, _p_cmf__math__ExplicitEuler_fixedTo_p_cmf__math__Integrator, 0, 0}, {&_swigt__p_cmf__math__ImplicitEuler, _p_cmf__math__ImplicitEulerTo_p_cmf__math__Integrator, 0, 0}, {&_swigt__p_cmf__math__Integrator, 0, 0, 0}, {&_swigt__p_cmf__math__HeunIntegrator, _p_cmf__math__HeunIntegratorTo_p_cmf__math__Integrator, 0, 0}, {&_swigt__p_cmf__math__RKFIntegrator, _p_cmf__math__RKFIntegratorTo_p_cmf__math__Integrator, 0, 0}, {&_swigt__p_cmf__math__CVodeIntegrator, _p_cmf__math__CVodeIntegratorTo_p_cmf__math__Integrator, 0, 0}, {&_swigt__p_cmf__math__MultiIntegrator, _p_cmf__math__MultiIntegratorTo_p_cmf__math__Integrator, 0, 0}, {&_swigt__p_cmf__math__SoluteWaterIntegrator, _p_cmf__math__SoluteWaterIntegratorTo_p_cmf__math__Integrator, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__math__MultiIntegrator[] = { {&_swigt__p_cmf__math__MultiIntegrator, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__math__RKFIntegrator[] = { {&_swigt__p_cmf__math__RKFIntegrator, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__math__SoluteWaterIntegrator[] = { {&_swigt__p_cmf__math__SoluteWaterIntegrator, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__math__StateVariable[] = { {&_swigt__p_cmf__math__StateVariable, 0, 0, 0}, {&_swigt__p_cmf__river__Reach, _p_cmf__river__ReachTo_p_cmf__math__StateVariable, 0, 0}, {&_swigt__p_cmf__upslope__SurfaceWater, _p_cmf__upslope__SurfaceWaterTo_p_cmf__math__StateVariable, 0, 0}, {&_swigt__p_cmf__upslope__SoilLayer, _p_cmf__upslope__SoilLayerTo_p_cmf__math__StateVariable, 0, 0}, {&_swigt__p_cmf__upslope__MacroPore, _p_cmf__upslope__MacroPoreTo_p_cmf__math__StateVariable, 0, 0}, {&_swigt__p_cmf__water__SoluteStorage, _p_cmf__water__SoluteStorageTo_p_cmf__math__StateVariable, 0, 0}, {&_swigt__p_cmf__water__WaterStorage, _p_cmf__water__WaterStorageTo_p_cmf__math__StateVariable, 0, 0}, {&_swigt__p_cmf__river__OpenWaterStorage, _p_cmf__river__OpenWaterStorageTo_p_cmf__math__StateVariable, 0, 0}, {&_swigt__p_cmf__upslope__aquifer, _p_cmf__upslope__aquiferTo_p_cmf__math__StateVariable, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__math__StateVariableList[] = { {&_swigt__p_cmf__math__StateVariableList, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__math__StateVariableOwner[] = { {&_swigt__p_cmf__upslope__cell_vector, _p_cmf__upslope__cell_vectorTo_p_cmf__math__StateVariableOwner, 0, 0}, {&_swigt__p_cmf__upslope__Cell, _p_cmf__upslope__CellTo_p_cmf__math__StateVariableOwner, 0, 0}, {&_swigt__p_cmf__math__MultiIntegrator, _p_cmf__math__MultiIntegratorTo_p_cmf__math__StateVariableOwner, 0, 0}, {&_swigt__p_cmf__math__CVodeIntegrator, _p_cmf__math__CVodeIntegratorTo_p_cmf__math__StateVariableOwner, 0, 0}, {&_swigt__p_cmf__math__RKFIntegrator, _p_cmf__math__RKFIntegratorTo_p_cmf__math__StateVariableOwner, 0, 0}, {&_swigt__p_cmf__math__HeunIntegrator, _p_cmf__math__HeunIntegratorTo_p_cmf__math__StateVariableOwner, 0, 0}, {&_swigt__p_cmf__math__Integrator, _p_cmf__math__IntegratorTo_p_cmf__math__StateVariableOwner, 0, 0}, {&_swigt__p_cmf__project, _p_cmf__projectTo_p_cmf__math__StateVariableOwner, 0, 0}, {&_swigt__p_cmf__math__SoluteWaterIntegrator, _p_cmf__math__SoluteWaterIntegratorTo_p_cmf__math__StateVariableOwner, 0, 0}, {&_swigt__p_cmf__math__StateVariableOwner, 0, 0, 0}, {&_swigt__p_cmf__math__ImplicitEuler, _p_cmf__math__ImplicitEulerTo_p_cmf__math__StateVariableOwner, 0, 0}, {&_swigt__p_cmf__math__StateVariableList, _p_cmf__math__StateVariableListTo_p_cmf__math__StateVariableOwner, 0, 0}, {&_swigt__p_cmf__math__ExplicitEuler_fixed, _p_cmf__math__ExplicitEuler_fixedTo_p_cmf__math__StateVariableOwner, 0, 0}, {&_swigt__p_cmf__upslope__aquifer, _p_cmf__upslope__aquiferTo_p_cmf__math__StateVariableOwner, 0, 0}, {&_swigt__p_cmf__upslope__SoilLayer, _p_cmf__upslope__SoilLayerTo_p_cmf__math__StateVariableOwner, 0, 0}, {&_swigt__p_cmf__upslope__MacroPore, _p_cmf__upslope__MacroPoreTo_p_cmf__math__StateVariableOwner, 0, 0}, {&_swigt__p_cmf__math__BDF2, _p_cmf__math__BDF2To_p_cmf__math__StateVariableOwner, 0, 0}, {&_swigt__p_cmf__river__Reach, _p_cmf__river__ReachTo_p_cmf__math__StateVariableOwner, 0, 0}, {&_swigt__p_cmf__water__WaterStorage, _p_cmf__water__WaterStorageTo_p_cmf__math__StateVariableOwner, 0, 0}, {&_swigt__p_cmf__river__OpenWaterStorage, _p_cmf__river__OpenWaterStorageTo_p_cmf__math__StateVariableOwner, 0, 0}, {&_swigt__p_cmf__upslope__SurfaceWater, _p_cmf__upslope__SurfaceWaterTo_p_cmf__math__StateVariableOwner, 0, 0}, {&_swigt__p_cmf__water__node_list, _p_cmf__water__node_listTo_p_cmf__math__StateVariableOwner, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__math__Time[] = { {&_swigt__p_cmf__math__Time, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__math__cubicspline[] = { {&_swigt__p_cmf__math__cubicspline, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__math__integratable[] = { {&_swigt__p_cmf__math__integratable, 0, 0, 0}, {&_swigt__p_cmf__water__waterbalance_integrator, _p_cmf__water__waterbalance_integratorTo_p_cmf__math__integratable, 0, 0}, {&_swigt__p_cmf__water__flux_integrator, _p_cmf__water__flux_integratorTo_p_cmf__math__integratable, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__math__integratable_list[] = { {&_swigt__p_cmf__math__integratable_list, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__math__num_array[] = { {&_swigt__p_cmf__math__num_array, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__math__timeseries[] = { {&_swigt__p_cmf__math__timeseries, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__project[] = { {&_swigt__p_cmf__project, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__river__Channel[] = { {&_swigt__p_cmf__river__Channel, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__river__IChannel[] = { {&_swigt__p_cmf__river__IChannel, 0, 0, 0}, {&_swigt__p_cmf__river__PipeReach, _p_cmf__river__PipeReachTo_p_cmf__river__IChannel, 0, 0}, {&_swigt__p_cmf__river__Channel, _p_cmf__river__ChannelTo_p_cmf__river__IChannel, 0, 0}, {&_swigt__p_cmf__river__MeanChannel, _p_cmf__river__MeanChannelTo_p_cmf__river__IChannel, 0, 0}, {&_swigt__p_cmf__river__SWATReachType, _p_cmf__river__SWATReachTypeTo_p_cmf__river__IChannel, 0, 0}, {&_swigt__p_cmf__river__TriangularReach, _p_cmf__river__TriangularReachTo_p_cmf__river__IChannel, 0, 0}, {&_swigt__p_cmf__river__RectangularReach, _p_cmf__river__RectangularReachTo_p_cmf__river__IChannel, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__river__IVolumeHeightFunction[] = { {&_swigt__p_cmf__river__IChannel, _p_cmf__river__IChannelTo_p_cmf__river__IVolumeHeightFunction, 0, 0}, {&_swigt__p_cmf__river__PipeReach, _p_cmf__river__PipeReachTo_p_cmf__river__IVolumeHeightFunction, 0, 0}, {&_swigt__p_cmf__river__Channel, _p_cmf__river__ChannelTo_p_cmf__river__IVolumeHeightFunction, 0, 0}, {&_swigt__p_cmf__river__MeanChannel, _p_cmf__river__MeanChannelTo_p_cmf__river__IVolumeHeightFunction, 0, 0}, {&_swigt__p_cmf__river__Prism, _p_cmf__river__PrismTo_p_cmf__river__IVolumeHeightFunction, 0, 0}, {&_swigt__p_cmf__river__IVolumeHeightFunction, 0, 0, 0}, {&_swigt__p_cmf__river__SWATReachType, _p_cmf__river__SWATReachTypeTo_p_cmf__river__IVolumeHeightFunction, 0, 0}, {&_swigt__p_cmf__river__volume_height_function, _p_cmf__river__volume_height_functionTo_p_cmf__river__IVolumeHeightFunction, 0, 0}, {&_swigt__p_cmf__river__TriangularReach, _p_cmf__river__TriangularReachTo_p_cmf__river__IVolumeHeightFunction, 0, 0}, {&_swigt__p_cmf__river__RectangularReach, _p_cmf__river__RectangularReachTo_p_cmf__river__IVolumeHeightFunction, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__river__Manning[] = { {&_swigt__p_cmf__river__Manning_Diffusive, _p_cmf__river__Manning_DiffusiveTo_p_cmf__river__Manning, 0, 0}, {&_swigt__p_cmf__river__Manning_Kinematic, _p_cmf__river__Manning_KinematicTo_p_cmf__river__Manning, 0, 0}, {&_swigt__p_cmf__river__Manning, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__river__Manning_Diffusive[] = { {&_swigt__p_cmf__river__Manning_Diffusive, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__river__Manning_Kinematic[] = { {&_swigt__p_cmf__river__Manning_Kinematic, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__river__MeanChannel[] = { {&_swigt__p_cmf__river__MeanChannel, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__river__OpenWaterStorage[] = { {&_swigt__p_cmf__river__Reach, _p_cmf__river__ReachTo_p_cmf__river__OpenWaterStorage, 0, 0}, {&_swigt__p_cmf__upslope__SurfaceWater, _p_cmf__upslope__SurfaceWaterTo_p_cmf__river__OpenWaterStorage, 0, 0}, {&_swigt__p_cmf__river__OpenWaterStorage, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__river__PipeReach[] = { {&_swigt__p_cmf__river__PipeReach, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__river__Prism[] = { {&_swigt__p_cmf__river__Prism, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__river__Reach[] = { {&_swigt__p_cmf__river__Reach, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__river__ReachIterator[] = { {&_swigt__p_cmf__river__ReachIterator, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__river__RectangularReach[] = { {&_swigt__p_cmf__river__RectangularReach, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__river__SWATReachType[] = { {&_swigt__p_cmf__river__SWATReachType, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__river__TriangularReach[] = { {&_swigt__p_cmf__river__TriangularReach, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__river__volume_height_function[] = { {&_swigt__p_cmf__river__volume_height_function, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__upslope__BrooksCoreyRetentionCurve[] = { {&_swigt__p_cmf__upslope__BrooksCoreyRetentionCurve, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__upslope__Cell[] = { {&_swigt__p_cmf__upslope__Cell, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__upslope__CellConnector[] = { {&_swigt__p_cmf__upslope__CellConnector, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__upslope__ET__CanopyStorageEvaporation[] = { {&_swigt__p_cmf__upslope__ET__CanopyStorageEvaporation, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__upslope__ET__ContentStress[] = { {&_swigt__p_cmf__upslope__ET__ContentStress, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__upslope__ET__HargreaveET[] = { {&_swigt__p_cmf__upslope__ET__HargreaveET, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__upslope__ET__PenmanEvaporation[] = { {&_swigt__p_cmf__upslope__ET__PenmanEvaporation, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__upslope__ET__PenmanMonteithET[] = { {&_swigt__p_cmf__upslope__ET__PenmanMonteithET, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__upslope__ET__PriestleyTaylorET[] = { {&_swigt__p_cmf__upslope__ET__PriestleyTaylorET, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__upslope__ET__RootUptakeStessFunction[] = { {&_swigt__p_cmf__upslope__ET__SuctionStress, _p_cmf__upslope__ET__SuctionStressTo_p_cmf__upslope__ET__RootUptakeStessFunction, 0, 0}, {&_swigt__p_cmf__upslope__ET__ContentStress, _p_cmf__upslope__ET__ContentStressTo_p_cmf__upslope__ET__RootUptakeStessFunction, 0, 0}, {&_swigt__p_cmf__upslope__ET__VolumeStress, _p_cmf__upslope__ET__VolumeStressTo_p_cmf__upslope__ET__RootUptakeStessFunction, 0, 0}, {&_swigt__p_cmf__upslope__ET__RootUptakeStessFunction, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__upslope__ET__ShuttleworthWallace[] = { {&_swigt__p_cmf__upslope__ET__ShuttleworthWallace, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__upslope__ET__SuctionStress[] = { {&_swigt__p_cmf__upslope__ET__SuctionStress, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__upslope__ET__TurcET[] = { {&_swigt__p_cmf__upslope__ET__TurcET, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__upslope__ET__VolumeStress[] = { {&_swigt__p_cmf__upslope__ET__VolumeStress, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__upslope__ET__canopy_evaporation[] = { {&_swigt__p_cmf__upslope__ET__canopy_evaporation, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__upslope__ET__canopy_evaporation_method[] = { {&_swigt__p_cmf__upslope__ET__ShuttleworthWallace, _p_cmf__upslope__ET__ShuttleworthWallaceTo_p_cmf__upslope__ET__canopy_evaporation_method, 0, 0}, {&_swigt__p_cmf__upslope__ET__canopy_evaporation_method, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__upslope__ET__constantETpot[] = { {&_swigt__p_cmf__upslope__ET__constantETpot, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__upslope__ET__snow_evaporation[] = { {&_swigt__p_cmf__upslope__ET__snow_evaporation, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__upslope__ET__snow_evaporation_method[] = { {&_swigt__p_cmf__upslope__ET__ShuttleworthWallace, _p_cmf__upslope__ET__ShuttleworthWallaceTo_p_cmf__upslope__ET__snow_evaporation_method, 0, 0}, {&_swigt__p_cmf__upslope__ET__snow_evaporation_method, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__upslope__ET__soil_evaporation[] = { {&_swigt__p_cmf__upslope__ET__soil_evaporation, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__upslope__ET__soil_evaporation_method[] = { {&_swigt__p_cmf__upslope__ET__ShuttleworthWallace, _p_cmf__upslope__ET__ShuttleworthWallaceTo_p_cmf__upslope__ET__soil_evaporation_method, 0, 0}, {&_swigt__p_cmf__upslope__ET__soil_evaporation_method, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__upslope__ET__stressedET[] = { {&_swigt__p_cmf__upslope__ET__HargreaveET, _p_cmf__upslope__ET__HargreaveETTo_p_cmf__upslope__ET__stressedET, 0, 0}, {&_swigt__p_cmf__upslope__ET__constantETpot, _p_cmf__upslope__ET__constantETpotTo_p_cmf__upslope__ET__stressedET, 0, 0}, {&_swigt__p_cmf__upslope__ET__PenmanMonteithET, _p_cmf__upslope__ET__PenmanMonteithETTo_p_cmf__upslope__ET__stressedET, 0, 0}, {&_swigt__p_cmf__upslope__ET__stressedET, 0, 0, 0}, {&_swigt__p_cmf__upslope__ET__TurcET, _p_cmf__upslope__ET__TurcETTo_p_cmf__upslope__ET__stressedET, 0, 0}, {&_swigt__p_cmf__upslope__ET__PriestleyTaylorET, _p_cmf__upslope__ET__PriestleyTaylorETTo_p_cmf__upslope__ET__stressedET, 0, 0}, {&_swigt__p_cmf__upslope__ET__timeseriesETpot, _p_cmf__upslope__ET__timeseriesETpotTo_p_cmf__upslope__ET__stressedET, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__upslope__ET__surface_water_evaporation[] = { {&_swigt__p_cmf__upslope__ET__surface_water_evaporation, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__upslope__ET__surface_water_evaporation_method[] = { {&_swigt__p_cmf__upslope__ET__surface_water_evaporation_method, 0, 0, 0}, {&_swigt__p_cmf__upslope__ET__ShuttleworthWallace, _p_cmf__upslope__ET__ShuttleworthWallaceTo_p_cmf__upslope__ET__surface_water_evaporation_method, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__upslope__ET__timeseriesETpot[] = { {&_swigt__p_cmf__upslope__ET__timeseriesETpot, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__upslope__ET__transpiration[] = { {&_swigt__p_cmf__upslope__ET__transpiration, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__upslope__ET__transpiration_method[] = { {&_swigt__p_cmf__upslope__ET__ShuttleworthWallace, _p_cmf__upslope__ET__ShuttleworthWallaceTo_p_cmf__upslope__ET__transpiration_method, 0, 0}, {&_swigt__p_cmf__upslope__ET__transpiration_method, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__upslope__LinearRetention[] = { {&_swigt__p_cmf__upslope__LinearRetention, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__upslope__MacroPore[] = { {&_swigt__p_cmf__upslope__MacroPore, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__upslope__RetentionCurve[] = { {&_swigt__p_cmf__upslope__LinearRetention, _p_cmf__upslope__LinearRetentionTo_p_cmf__upslope__RetentionCurve, 0, 0}, {&_swigt__p_cmf__upslope__RetentionCurve, 0, 0, 0}, {&_swigt__p_cmf__upslope__BrooksCoreyRetentionCurve, _p_cmf__upslope__BrooksCoreyRetentionCurveTo_p_cmf__upslope__RetentionCurve, 0, 0}, {&_swigt__p_cmf__upslope__VanGenuchtenMualem, _p_cmf__upslope__VanGenuchtenMualemTo_p_cmf__upslope__RetentionCurve, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__upslope__SoilLayer[] = { {&_swigt__p_cmf__upslope__SoilLayer, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__upslope__SurfaceWater[] = { {&_swigt__p_cmf__upslope__SurfaceWater, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__upslope__Topology[] = { {&_swigt__p_cmf__upslope__Topology, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__upslope__VanGenuchtenMualem[] = { {&_swigt__p_cmf__upslope__VanGenuchtenMualem, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__upslope__aquifer[] = { {&_swigt__p_cmf__upslope__aquifer, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__upslope__aquifer_Darcy[] = { {&_swigt__p_cmf__upslope__aquifer_Darcy, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__upslope__cell_vector[] = { {&_swigt__p_cmf__upslope__cell_vector, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__upslope__connections__BaseMacroFlow[] = { {&_swigt__p_cmf__upslope__connections__BaseMacroFlow, 0, 0, 0}, {&_swigt__p_cmf__upslope__connections__GradientMacroFlow, _p_cmf__upslope__connections__GradientMacroFlowTo_p_cmf__upslope__connections__BaseMacroFlow, 0, 0}, {&_swigt__p_cmf__upslope__connections__KinematicMacroFlow, _p_cmf__upslope__connections__KinematicMacroFlowTo_p_cmf__upslope__connections__BaseMacroFlow, 0, 0}, {&_swigt__p_cmf__upslope__connections__JarvisMacroFlow, _p_cmf__upslope__connections__JarvisMacroFlowTo_p_cmf__upslope__connections__BaseMacroFlow, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__upslope__connections__CanopyOverflow[] = { {&_swigt__p_cmf__upslope__connections__CanopyOverflow, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__upslope__connections__Darcy[] = { {&_swigt__p_cmf__upslope__connections__Darcy, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__upslope__connections__DarcyKinematic[] = { {&_swigt__p_cmf__upslope__connections__DarcyKinematic, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__upslope__connections__DiffusiveMacroMicroExchange[] = { {&_swigt__p_cmf__upslope__connections__DiffusiveMacroMicroExchange, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__upslope__connections__DiffusiveSurfaceRunoff[] = { {&_swigt__p_cmf__upslope__connections__DiffusiveSurfaceRunoff, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__upslope__connections__EnergyBudgetSnowMelt[] = { {&_swigt__p_cmf__upslope__connections__EnergyBudgetSnowMelt, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__upslope__connections__FreeDrainagePercolation[] = { {&_swigt__p_cmf__upslope__connections__FreeDrainagePercolation, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__upslope__connections__GradientMacroFlow[] = { {&_swigt__p_cmf__upslope__connections__GradientMacroFlow, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__upslope__connections__GradientMacroMicroExchange[] = { {&_swigt__p_cmf__upslope__connections__GradientMacroMicroExchange, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__upslope__connections__GreenAmptInfiltration[] = { {&_swigt__p_cmf__upslope__connections__GreenAmptInfiltration, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__upslope__connections__JarvisMacroFlow[] = { {&_swigt__p_cmf__upslope__connections__JarvisMacroFlow, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__upslope__connections__KinematicMacroFlow[] = { {&_swigt__p_cmf__upslope__connections__KinematicMacroFlow, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__upslope__connections__KinematicSurfaceRunoff[] = { {&_swigt__p_cmf__upslope__connections__KinematicSurfaceRunoff, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__upslope__connections__LayerBypass[] = { {&_swigt__p_cmf__upslope__connections__LayerBypass, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__upslope__connections__MACROlikeMacroMicroExchange[] = { {&_swigt__p_cmf__upslope__connections__MACROlikeMacroMicroExchange, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__upslope__connections__MatrixInfiltration[] = { {&_swigt__p_cmf__upslope__connections__MatrixInfiltration, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__upslope__connections__Rainfall[] = { {&_swigt__p_cmf__upslope__connections__Rainfall, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__upslope__connections__Richards[] = { {&_swigt__p_cmf__upslope__connections__Richards, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__upslope__connections__Richards_lateral[] = { {&_swigt__p_cmf__upslope__connections__Richards_lateral, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__upslope__connections__RutterInterception[] = { {&_swigt__p_cmf__upslope__connections__RutterInterception, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__upslope__connections__SWATPercolation[] = { {&_swigt__p_cmf__upslope__connections__SWATPercolation, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__upslope__connections__SimplRichards[] = { {&_swigt__p_cmf__upslope__connections__SimplRichards, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__upslope__connections__SimpleInfiltration[] = { {&_swigt__p_cmf__upslope__connections__SimpleInfiltration, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__upslope__connections__SimpleTindexSnowMelt[] = { {&_swigt__p_cmf__upslope__connections__SimpleTindexSnowMelt, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__upslope__connections__Snowfall[] = { {&_swigt__p_cmf__upslope__connections__Snowfall, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__upslope__connections__TOPModelFlow[] = { {&_swigt__p_cmf__upslope__connections__TOPModelFlow, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__upslope__connections__TopographicGradientDarcy[] = { {&_swigt__p_cmf__upslope__connections__TopographicGradientDarcy, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__upslope__connections__lateral_sub_surface_flux[] = { {&_swigt__p_cmf__upslope__connections__TopographicGradientDarcy, _p_cmf__upslope__connections__TopographicGradientDarcyTo_p_cmf__upslope__connections__lateral_sub_surface_flux, 0, 0}, {&_swigt__p_cmf__upslope__connections__DarcyKinematic, _p_cmf__upslope__connections__DarcyKinematicTo_p_cmf__upslope__connections__lateral_sub_surface_flux, 0, 0}, {&_swigt__p_cmf__upslope__connections__Richards_lateral, _p_cmf__upslope__connections__Richards_lateralTo_p_cmf__upslope__connections__lateral_sub_surface_flux, 0, 0}, {&_swigt__p_cmf__upslope__connections__lateral_sub_surface_flux, 0, 0, 0}, {&_swigt__p_cmf__upslope__connections__Darcy, _p_cmf__upslope__connections__DarcyTo_p_cmf__upslope__connections__lateral_sub_surface_flux, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__upslope__layer_list[] = { {&_swigt__p_cmf__upslope__layer_list, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__upslope__neighbor_iterator[] = { {&_swigt__p_cmf__upslope__neighbor_iterator, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__upslope__subcatchment[] = { {&_swigt__p_cmf__upslope__subcatchment, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__upslope__vegetation__Vegetation[] = { {&_swigt__p_cmf__upslope__vegetation__Vegetation, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__water__Adsorption[] = { {&_swigt__p_cmf__water__Adsorption, 0, 0, 0}, {&_swigt__p_cmf__water__NullAdsorption, _p_cmf__water__NullAdsorptionTo_p_cmf__water__Adsorption, 0, 0}, {&_swigt__p_cmf__water__LinearAdsorption, _p_cmf__water__LinearAdsorptionTo_p_cmf__water__Adsorption, 0, 0}, {&_swigt__p_cmf__water__FreundlichAdsorbtion, _p_cmf__water__FreundlichAdsorbtionTo_p_cmf__water__Adsorption, 0, 0}, {&_swigt__p_cmf__water__LangmuirAdsorption, _p_cmf__water__LangmuirAdsorptionTo_p_cmf__water__Adsorption, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__water__ConstraintLinearStorageConnection[] = { {&_swigt__p_cmf__water__ConstraintLinearStorageConnection, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__water__DirichletBoundary[] = { {&_swigt__p_cmf__water__DirichletBoundary, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__water__ExponentialDeclineConnection[] = { {&_swigt__p_cmf__water__ExponentialDeclineConnection, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__water__FreundlichAdsorbtion[] = { {&_swigt__p_cmf__water__FreundlichAdsorbtion, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__water__LangmuirAdsorption[] = { {&_swigt__p_cmf__water__LangmuirAdsorption, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__water__LinearAdsorption[] = { {&_swigt__p_cmf__water__LinearAdsorption, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__water__LinearStorageConnection[] = { {&_swigt__p_cmf__water__LinearStorageConnection, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__water__NeumannBoundary[] = { {&_swigt__p_cmf__water__NeumannBoundary, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__water__NeumannBoundary_list[] = { {&_swigt__p_cmf__water__NeumannBoundary_list, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__water__NeumannFlux[] = { {&_swigt__p_cmf__water__NeumannFlux, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__water__NullAdsorption[] = { {&_swigt__p_cmf__water__NullAdsorption, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__water__PowerLawConnection[] = { {&_swigt__p_cmf__water__PowerLawConnection, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__water__SoluteStorage[] = { {&_swigt__p_cmf__water__SoluteStorage, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__water__SoluteTimeseries[] = { {&_swigt__p_cmf__water__SoluteTimeseries, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__water__SystemBridge[] = { {&_swigt__p_cmf__water__SystemBridge, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__water__SystemBridgeConnection[] = { {&_swigt__p_cmf__water__SystemBridgeConnection, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__water__TechnicalFlux[] = { {&_swigt__p_cmf__water__TechnicalFlux, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__water__WaterStorage[] = { {&_swigt__p_cmf__river__Reach, _p_cmf__river__ReachTo_p_cmf__water__WaterStorage, 0, 0}, {&_swigt__p_cmf__upslope__SurfaceWater, _p_cmf__upslope__SurfaceWaterTo_p_cmf__water__WaterStorage, 0, 0}, {&_swigt__p_cmf__upslope__SoilLayer, _p_cmf__upslope__SoilLayerTo_p_cmf__water__WaterStorage, 0, 0}, {&_swigt__p_cmf__upslope__MacroPore, _p_cmf__upslope__MacroPoreTo_p_cmf__water__WaterStorage, 0, 0}, {&_swigt__p_cmf__water__WaterStorage, 0, 0, 0}, {&_swigt__p_cmf__river__OpenWaterStorage, _p_cmf__river__OpenWaterStorageTo_p_cmf__water__WaterStorage, 0, 0}, {&_swigt__p_cmf__upslope__aquifer, _p_cmf__upslope__aquiferTo_p_cmf__water__WaterStorage, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__water__bidirectional_kinematic_exchange[] = { {&_swigt__p_cmf__water__bidirectional_kinematic_exchange, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__water__connection_list[] = { {&_swigt__p_cmf__water__connection_list, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__water__constraint_kinematic_wave[] = { {&_swigt__p_cmf__water__constraint_kinematic_wave, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__water__external_control_connection[] = { {&_swigt__p_cmf__water__external_control_connection, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__water__flux_connection[] = { {&_swigt__p_cmf__upslope__connections__FreeDrainagePercolation, _p_cmf__upslope__connections__FreeDrainagePercolationTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__upslope__connections__TOPModelFlow, _p_cmf__upslope__connections__TOPModelFlowTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__upslope__connections__SWATPercolation, _p_cmf__upslope__connections__SWATPercolationTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__upslope__ET__HargreaveET, _p_cmf__upslope__ET__HargreaveETTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__upslope__connections__TopographicGradientDarcy, _p_cmf__upslope__connections__TopographicGradientDarcyTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__river__Manning_Diffusive, _p_cmf__river__Manning_DiffusiveTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__water__bidirectional_kinematic_exchange, _p_cmf__water__bidirectional_kinematic_exchangeTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__upslope__ET__stressedET, _p_cmf__upslope__ET__stressedETTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__upslope__ET__TurcET, _p_cmf__upslope__ET__TurcETTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__upslope__connections__EnergyBudgetSnowMelt, _p_cmf__upslope__connections__EnergyBudgetSnowMeltTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__upslope__connections__SimpleTindexSnowMelt, _p_cmf__upslope__connections__SimpleTindexSnowMeltTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__upslope__connections__Rainfall, _p_cmf__upslope__connections__RainfallTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__upslope__ET__transpiration, _p_cmf__upslope__ET__transpirationTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__upslope__ET__soil_evaporation, _p_cmf__upslope__ET__soil_evaporationTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__upslope__ET__canopy_evaporation, _p_cmf__upslope__ET__canopy_evaporationTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__upslope__ET__snow_evaporation, _p_cmf__upslope__ET__snow_evaporationTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__upslope__ET__surface_water_evaporation, _p_cmf__upslope__ET__surface_water_evaporationTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__upslope__ET__CanopyStorageEvaporation, _p_cmf__upslope__ET__CanopyStorageEvaporationTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__upslope__ET__PenmanEvaporation, _p_cmf__upslope__ET__PenmanEvaporationTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__upslope__connections__GreenAmptInfiltration, _p_cmf__upslope__connections__GreenAmptInfiltrationTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__upslope__connections__CanopyOverflow, _p_cmf__upslope__connections__CanopyOverflowTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__upslope__connections__Richards, _p_cmf__upslope__connections__RichardsTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__upslope__connections__SimplRichards, _p_cmf__upslope__connections__SimplRichardsTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__upslope__connections__Darcy, _p_cmf__upslope__connections__DarcyTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__water__LinearStorageConnection, _p_cmf__water__LinearStorageConnectionTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__water__PowerLawConnection, _p_cmf__water__PowerLawConnectionTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__water__ExponentialDeclineConnection, _p_cmf__water__ExponentialDeclineConnectionTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__water__ConstraintLinearStorageConnection, _p_cmf__water__ConstraintLinearStorageConnectionTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__water__generic_gradient_connection, _p_cmf__water__generic_gradient_connectionTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__water__flux_connection, 0, 0, 0}, {&_swigt__p_cmf__water__external_control_connection, _p_cmf__water__external_control_connectionTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__water__waterbalance_connection, _p_cmf__water__waterbalance_connectionTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__water__statecontrol_connection, _p_cmf__water__statecontrol_connectionTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__water__SystemBridgeConnection, _p_cmf__water__SystemBridgeConnectionTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__river__Manning_Kinematic, _p_cmf__river__Manning_KinematicTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__upslope__connections__DarcyKinematic, _p_cmf__upslope__connections__DarcyKinematicTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__upslope__connections__MACROlikeMacroMicroExchange, _p_cmf__upslope__connections__MACROlikeMacroMicroExchangeTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__upslope__connections__DiffusiveMacroMicroExchange, _p_cmf__upslope__connections__DiffusiveMacroMicroExchangeTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__upslope__connections__JarvisMacroFlow, _p_cmf__upslope__connections__JarvisMacroFlowTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__upslope__connections__KinematicMacroFlow, _p_cmf__upslope__connections__KinematicMacroFlowTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__upslope__connections__GradientMacroFlow, _p_cmf__upslope__connections__GradientMacroFlowTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__upslope__connections__BaseMacroFlow, _p_cmf__upslope__connections__BaseMacroFlowTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__upslope__connections__MatrixInfiltration, _p_cmf__upslope__connections__MatrixInfiltrationTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__upslope__connections__SimpleInfiltration, _p_cmf__upslope__connections__SimpleInfiltrationTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__water__NeumannFlux, _p_cmf__water__NeumannFluxTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__upslope__aquifer_Darcy, _p_cmf__upslope__aquifer_DarcyTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__upslope__connections__RutterInterception, _p_cmf__upslope__connections__RutterInterceptionTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__water__kinematic_wave, _p_cmf__water__kinematic_waveTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__water__constraint_kinematic_wave, _p_cmf__water__constraint_kinematic_waveTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__upslope__ET__constantETpot, _p_cmf__upslope__ET__constantETpotTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__upslope__connections__LayerBypass, _p_cmf__upslope__connections__LayerBypassTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__water__TechnicalFlux, _p_cmf__water__TechnicalFluxTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__upslope__ET__PriestleyTaylorET, _p_cmf__upslope__ET__PriestleyTaylorETTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__upslope__connections__lateral_sub_surface_flux, _p_cmf__upslope__connections__lateral_sub_surface_fluxTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__upslope__connections__Snowfall, _p_cmf__upslope__connections__SnowfallTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__upslope__ET__timeseriesETpot, _p_cmf__upslope__ET__timeseriesETpotTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__upslope__connections__DiffusiveSurfaceRunoff, _p_cmf__upslope__connections__DiffusiveSurfaceRunoffTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__upslope__connections__KinematicSurfaceRunoff, _p_cmf__upslope__connections__KinematicSurfaceRunoffTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__river__Manning, _p_cmf__river__ManningTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__upslope__connections__Richards_lateral, _p_cmf__upslope__connections__Richards_lateralTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__upslope__connections__GradientMacroMicroExchange, _p_cmf__upslope__connections__GradientMacroMicroExchangeTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__upslope__ET__PenmanMonteithET, _p_cmf__upslope__ET__PenmanMonteithETTo_p_cmf__water__flux_connection, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__water__flux_integrator[] = { {&_swigt__p_cmf__water__flux_integrator, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__water__flux_node[] = { {&_swigt__p_cmf__atmosphere__IDWRainfall, _p_cmf__atmosphere__IDWRainfallTo_p_cmf__water__flux_node, 0, 0}, {&_swigt__p_cmf__water__SystemBridge, _p_cmf__water__SystemBridgeTo_p_cmf__water__flux_node, 0, 0}, {&_swigt__p_cmf__atmosphere__RainfallStationReference, _p_cmf__atmosphere__RainfallStationReferenceTo_p_cmf__water__flux_node, 0, 0}, {&_swigt__p_cmf__water__NeumannBoundary, _p_cmf__water__NeumannBoundaryTo_p_cmf__water__flux_node, 0, 0}, {&_swigt__p_cmf__water__DirichletBoundary, _p_cmf__water__DirichletBoundaryTo_p_cmf__water__flux_node, 0, 0}, {&_swigt__p_cmf__upslope__aquifer, _p_cmf__upslope__aquiferTo_p_cmf__water__flux_node, 0, 0}, {&_swigt__p_cmf__upslope__MacroPore, _p_cmf__upslope__MacroPoreTo_p_cmf__water__flux_node, 0, 0}, {&_swigt__p_cmf__upslope__SoilLayer, _p_cmf__upslope__SoilLayerTo_p_cmf__water__flux_node, 0, 0}, {&_swigt__p_cmf__atmosphere__TimeseriesRainSource, _p_cmf__atmosphere__TimeseriesRainSourceTo_p_cmf__water__flux_node, 0, 0}, {&_swigt__p_cmf__atmosphere__ConstantRainSource, _p_cmf__atmosphere__ConstantRainSourceTo_p_cmf__water__flux_node, 0, 0}, {&_swigt__p_cmf__atmosphere__RainSource, _p_cmf__atmosphere__RainSourceTo_p_cmf__water__flux_node, 0, 0}, {&_swigt__p_cmf__water__flux_node, 0, 0, 0}, {&_swigt__p_cmf__river__OpenWaterStorage, _p_cmf__river__OpenWaterStorageTo_p_cmf__water__flux_node, 0, 0}, {&_swigt__p_cmf__river__Reach, _p_cmf__river__ReachTo_p_cmf__water__flux_node, 0, 0}, {&_swigt__p_cmf__water__WaterStorage, _p_cmf__water__WaterStorageTo_p_cmf__water__flux_node, 0, 0}, {&_swigt__p_cmf__upslope__SurfaceWater, _p_cmf__upslope__SurfaceWaterTo_p_cmf__water__flux_node, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__water__generic_gradient_connection[] = { {&_swigt__p_cmf__water__generic_gradient_connection, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__water__kinematic_wave[] = { {&_swigt__p_cmf__water__kinematic_wave, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__water__linear_scale[] = { {&_swigt__p_cmf__water__linear_scale, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__water__node_list[] = { {&_swigt__p_cmf__water__node_list, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__water__solute[] = { {&_swigt__p_cmf__water__solute, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__water__solute_vector[] = { {&_swigt__p_cmf__water__solute_vector, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__water__statecontrol_connection[] = { {&_swigt__p_cmf__water__statecontrol_connection, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__water__waterbalance_connection[] = { {&_swigt__p_cmf__water__waterbalance_connection, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_cmf__water__waterbalance_integrator[] = { {&_swigt__p_cmf__water__waterbalance_integrator, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_const_iterator[] = { {&_swigt__p_const_iterator, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_double[] = { {&_swigt__p_double, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_f_r_cmf__upslope__Cell_r_cmf__upslope__Cell_ptrdiff_t__void[] = { {&_swigt__p_f_r_cmf__upslope__Cell_r_cmf__upslope__Cell_ptrdiff_t__void, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_iterator[] = { {&_swigt__p_iterator, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_ptr[] = { {&_swigt__p_ptr, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__shared_ptrT_SoilLayer_t[] = { {&_swigt__p_std__shared_ptrT_SoilLayer_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__shared_ptrT_cmf__atmosphere__ConstantRainSource_t[] = { {&_swigt__p_std__shared_ptrT_cmf__atmosphere__ConstantRainSource_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__shared_ptrT_cmf__atmosphere__IDWRainfall_t[] = { {&_swigt__p_std__shared_ptrT_cmf__atmosphere__IDWRainfall_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t[] = { {&_swigt__p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__shared_ptrT_cmf__atmosphere__RainSource_t[] = { {&_swigt__p_std__shared_ptrT_cmf__atmosphere__RainSource_t, 0, 0, 0}, {&_swigt__p_std__shared_ptrT_cmf__atmosphere__ConstantRainSource_t, _p_std__shared_ptrT_cmf__atmosphere__ConstantRainSource_tTo_p_std__shared_ptrT_cmf__atmosphere__RainSource_t, 0, 0}, {&_swigt__p_std__shared_ptrT_cmf__atmosphere__IDWRainfall_t, _p_std__shared_ptrT_cmf__atmosphere__IDWRainfall_tTo_p_std__shared_ptrT_cmf__atmosphere__RainSource_t, 0, 0}, {&_swigt__p_std__shared_ptrT_cmf__atmosphere__RainfallStationReference_t, _p_std__shared_ptrT_cmf__atmosphere__RainfallStationReference_tTo_p_std__shared_ptrT_cmf__atmosphere__RainSource_t, 0, 0}, {&_swigt__p_std__shared_ptrT_cmf__atmosphere__TimeseriesRainSource_t, _p_std__shared_ptrT_cmf__atmosphere__TimeseriesRainSource_tTo_p_std__shared_ptrT_cmf__atmosphere__RainSource_t, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__shared_ptrT_cmf__atmosphere__RainfallStationReference_t[] = { {&_swigt__p_std__shared_ptrT_cmf__atmosphere__RainfallStationReference_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__shared_ptrT_cmf__atmosphere__RainfallStation_t[] = { {&_swigt__p_std__shared_ptrT_cmf__atmosphere__RainfallStation_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__shared_ptrT_cmf__atmosphere__TimeseriesRainSource_t[] = { {&_swigt__p_std__shared_ptrT_cmf__atmosphere__TimeseriesRainSource_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__shared_ptrT_cmf__atmosphere__aerodynamic_resistance_t[] = { {&_swigt__p_std__shared_ptrT_cmf__atmosphere__aerodynamic_resistance_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__shared_ptrT_cmf__math__StateVariable_t[] = { {&_swigt__p_std__shared_ptrT_cmf__water__SoluteStorage_t, _p_std__shared_ptrT_cmf__water__SoluteStorage_tTo_p_std__shared_ptrT_cmf__math__StateVariable_t, 0, 0}, {&_swigt__p_std__shared_ptrT_cmf__water__WaterStorage_t, _p_std__shared_ptrT_cmf__water__WaterStorage_tTo_p_std__shared_ptrT_cmf__math__StateVariable_t, 0, 0}, {&_swigt__p_std__shared_ptrT_cmf__river__OpenWaterStorage_t, _p_std__shared_ptrT_cmf__river__OpenWaterStorage_tTo_p_std__shared_ptrT_cmf__math__StateVariable_t, 0, 0}, {&_swigt__p_std__shared_ptrT_cmf__upslope__MacroPore_t, _p_std__shared_ptrT_cmf__upslope__MacroPore_tTo_p_std__shared_ptrT_cmf__math__StateVariable_t, 0, 0}, {&_swigt__p_std__shared_ptrT_cmf__math__StateVariable_t, 0, 0, 0}, {&_swigt__p_std__shared_ptrT_cmf__upslope__SurfaceWater_t, _p_std__shared_ptrT_cmf__upslope__SurfaceWater_tTo_p_std__shared_ptrT_cmf__math__StateVariable_t, 0, 0}, {&_swigt__p_std__shared_ptrT_cmf__upslope__SoilLayer_t, _p_std__shared_ptrT_cmf__upslope__SoilLayer_tTo_p_std__shared_ptrT_cmf__math__StateVariable_t, 0, 0}, {&_swigt__p_std__shared_ptrT_cmf__river__Reach_t, _p_std__shared_ptrT_cmf__river__Reach_tTo_p_std__shared_ptrT_cmf__math__StateVariable_t, 0, 0}, {&_swigt__p_std__shared_ptrT_cmf__upslope__aquifer_t, _p_std__shared_ptrT_cmf__upslope__aquifer_tTo_p_std__shared_ptrT_cmf__math__StateVariable_t, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__shared_ptrT_cmf__math__integratable_t[] = { {&_swigt__p_std__shared_ptrT_cmf__water__flux_integrator_t, _p_std__shared_ptrT_cmf__water__flux_integrator_tTo_p_std__shared_ptrT_cmf__math__integratable_t, 0, 0}, {&_swigt__p_std__shared_ptrT_cmf__water__waterbalance_integrator_t, _p_std__shared_ptrT_cmf__water__waterbalance_integrator_tTo_p_std__shared_ptrT_cmf__math__integratable_t, 0, 0}, {&_swigt__p_std__shared_ptrT_cmf__math__integratable_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__shared_ptrT_cmf__river__OpenWaterStorage_t[] = { {&_swigt__p_std__shared_ptrT_cmf__river__OpenWaterStorage_t, 0, 0, 0}, {&_swigt__p_std__shared_ptrT_cmf__upslope__SurfaceWater_t, _p_std__shared_ptrT_cmf__upslope__SurfaceWater_tTo_p_std__shared_ptrT_cmf__river__OpenWaterStorage_t, 0, 0}, {&_swigt__p_std__shared_ptrT_cmf__river__Reach_t, _p_std__shared_ptrT_cmf__river__Reach_tTo_p_std__shared_ptrT_cmf__river__OpenWaterStorage_t, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__shared_ptrT_cmf__river__Reach_t[] = { {&_swigt__p_std__shared_ptrT_cmf__river__Reach_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__shared_ptrT_cmf__upslope__ET__canopy_evaporation_method_t[] = { {&_swigt__p_std__shared_ptrT_cmf__upslope__ET__canopy_evaporation_method_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__shared_ptrT_cmf__upslope__ET__snow_evaporation_method_t[] = { {&_swigt__p_std__shared_ptrT_cmf__upslope__ET__snow_evaporation_method_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__shared_ptrT_cmf__upslope__ET__soil_evaporation_method_t[] = { {&_swigt__p_std__shared_ptrT_cmf__upslope__ET__soil_evaporation_method_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__shared_ptrT_cmf__upslope__ET__surface_water_evaporation_method_t[] = { {&_swigt__p_std__shared_ptrT_cmf__upslope__ET__surface_water_evaporation_method_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__shared_ptrT_cmf__upslope__ET__transpiration_method_t[] = { {&_swigt__p_std__shared_ptrT_cmf__upslope__ET__transpiration_method_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__shared_ptrT_cmf__upslope__MacroPore_t[] = { {&_swigt__p_std__shared_ptrT_cmf__upslope__MacroPore_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__shared_ptrT_cmf__upslope__SoilLayer_t[] = { {&_swigt__p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__shared_ptrT_cmf__upslope__SurfaceWater_t[] = { {&_swigt__p_std__shared_ptrT_cmf__upslope__SurfaceWater_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__shared_ptrT_cmf__upslope__aquifer_t[] = { {&_swigt__p_std__shared_ptrT_cmf__upslope__aquifer_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__shared_ptrT_cmf__water__DirichletBoundary_t[] = { {&_swigt__p_std__shared_ptrT_cmf__water__DirichletBoundary_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__shared_ptrT_cmf__water__NeumannBoundary_t[] = { {&_swigt__p_std__shared_ptrT_cmf__water__NeumannBoundary_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__shared_ptrT_cmf__water__SoluteStorage_t[] = { {&_swigt__p_std__shared_ptrT_cmf__water__SoluteStorage_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__shared_ptrT_cmf__water__SystemBridge_t[] = { {&_swigt__p_std__shared_ptrT_cmf__water__SystemBridge_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__shared_ptrT_cmf__water__WaterStorage_t[] = { {&_swigt__p_std__shared_ptrT_cmf__water__WaterStorage_t, 0, 0, 0}, {&_swigt__p_std__shared_ptrT_cmf__river__OpenWaterStorage_t, _p_std__shared_ptrT_cmf__river__OpenWaterStorage_tTo_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0, 0}, {&_swigt__p_std__shared_ptrT_cmf__upslope__MacroPore_t, _p_std__shared_ptrT_cmf__upslope__MacroPore_tTo_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0, 0}, {&_swigt__p_std__shared_ptrT_cmf__upslope__SurfaceWater_t, _p_std__shared_ptrT_cmf__upslope__SurfaceWater_tTo_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0, 0}, {&_swigt__p_std__shared_ptrT_cmf__upslope__SoilLayer_t, _p_std__shared_ptrT_cmf__upslope__SoilLayer_tTo_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0, 0}, {&_swigt__p_std__shared_ptrT_cmf__river__Reach_t, _p_std__shared_ptrT_cmf__river__Reach_tTo_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0, 0}, {&_swigt__p_std__shared_ptrT_cmf__upslope__aquifer_t, _p_std__shared_ptrT_cmf__upslope__aquifer_tTo_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__shared_ptrT_cmf__water__flux_connection_t[] = { {&_swigt__p_std__shared_ptrT_cmf__water__flux_connection_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__shared_ptrT_cmf__water__flux_integrator_t[] = { {&_swigt__p_std__shared_ptrT_cmf__water__flux_integrator_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__shared_ptrT_cmf__water__flux_node_t[] = { {&_swigt__p_std__shared_ptrT_cmf__upslope__aquifer_t, _p_std__shared_ptrT_cmf__upslope__aquifer_tTo_p_std__shared_ptrT_cmf__water__flux_node_t, 0, 0}, {&_swigt__p_std__shared_ptrT_cmf__atmosphere__IDWRainfall_t, _p_std__shared_ptrT_cmf__atmosphere__IDWRainfall_tTo_p_std__shared_ptrT_cmf__water__flux_node_t, 0, 0}, {&_swigt__p_std__shared_ptrT_cmf__water__NeumannBoundary_t, _p_std__shared_ptrT_cmf__water__NeumannBoundary_tTo_p_std__shared_ptrT_cmf__water__flux_node_t, 0, 0}, {&_swigt__p_std__shared_ptrT_cmf__atmosphere__RainfallStationReference_t, _p_std__shared_ptrT_cmf__atmosphere__RainfallStationReference_tTo_p_std__shared_ptrT_cmf__water__flux_node_t, 0, 0}, {&_swigt__p_std__shared_ptrT_cmf__river__Reach_t, _p_std__shared_ptrT_cmf__river__Reach_tTo_p_std__shared_ptrT_cmf__water__flux_node_t, 0, 0}, {&_swigt__p_std__shared_ptrT_cmf__upslope__SurfaceWater_t, _p_std__shared_ptrT_cmf__upslope__SurfaceWater_tTo_p_std__shared_ptrT_cmf__water__flux_node_t, 0, 0}, {&_swigt__p_std__shared_ptrT_cmf__water__DirichletBoundary_t, _p_std__shared_ptrT_cmf__water__DirichletBoundary_tTo_p_std__shared_ptrT_cmf__water__flux_node_t, 0, 0}, {&_swigt__p_std__shared_ptrT_cmf__atmosphere__ConstantRainSource_t, _p_std__shared_ptrT_cmf__atmosphere__ConstantRainSource_tTo_p_std__shared_ptrT_cmf__water__flux_node_t, 0, 0}, {&_swigt__p_std__shared_ptrT_cmf__river__OpenWaterStorage_t, _p_std__shared_ptrT_cmf__river__OpenWaterStorage_tTo_p_std__shared_ptrT_cmf__water__flux_node_t, 0, 0}, {&_swigt__p_std__shared_ptrT_cmf__water__WaterStorage_t, _p_std__shared_ptrT_cmf__water__WaterStorage_tTo_p_std__shared_ptrT_cmf__water__flux_node_t, 0, 0}, {&_swigt__p_std__shared_ptrT_cmf__water__flux_node_t, 0, 0, 0}, {&_swigt__p_std__shared_ptrT_cmf__atmosphere__RainSource_t, _p_std__shared_ptrT_cmf__atmosphere__RainSource_tTo_p_std__shared_ptrT_cmf__water__flux_node_t, 0, 0}, {&_swigt__p_std__shared_ptrT_cmf__upslope__SoilLayer_t, _p_std__shared_ptrT_cmf__upslope__SoilLayer_tTo_p_std__shared_ptrT_cmf__water__flux_node_t, 0, 0}, {&_swigt__p_std__shared_ptrT_cmf__atmosphere__TimeseriesRainSource_t, _p_std__shared_ptrT_cmf__atmosphere__TimeseriesRainSource_tTo_p_std__shared_ptrT_cmf__water__flux_node_t, 0, 0}, {&_swigt__p_std__shared_ptrT_cmf__upslope__MacroPore_t, _p_std__shared_ptrT_cmf__upslope__MacroPore_tTo_p_std__shared_ptrT_cmf__water__flux_node_t, 0, 0}, {&_swigt__p_std__shared_ptrT_cmf__water__SystemBridge_t, _p_std__shared_ptrT_cmf__water__SystemBridge_tTo_p_std__shared_ptrT_cmf__water__flux_node_t, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__shared_ptrT_cmf__water__waterbalance_integrator_t[] = { {&_swigt__p_std__shared_ptrT_cmf__water__waterbalance_integrator_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__shared_ptrT_std__shared_ptrT_cmf__atmosphere__ConstantRainSource_t_t[] = { {&_swigt__p_std__shared_ptrT_std__shared_ptrT_cmf__atmosphere__ConstantRainSource_t_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__shared_ptrT_std__shared_ptrT_cmf__atmosphere__RainfallStationReference_t_t[] = { {&_swigt__p_std__shared_ptrT_std__shared_ptrT_cmf__atmosphere__RainfallStationReference_t_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__string[] = { {&_swigt__p_std__string, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__vectorT_std__shared_ptrT_cmf__water__WaterStorage_t_t[] = { {&_swigt__p_std__vectorT_std__shared_ptrT_cmf__water__WaterStorage_t_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__vectorT_std__shared_ptrT_cmf__water__flux_connection_t_t__const_iterator[] = { {&_swigt__p_std__vectorT_std__shared_ptrT_cmf__water__flux_connection_t_t__const_iterator, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__vectorT_std__shared_ptrT_cmf__water__flux_connection_t_t__iterator[] = { {&_swigt__p_std__vectorT_std__shared_ptrT_cmf__water__flux_connection_t_t__iterator, 0, 0, 0},{0, 0, 0, 0}}; - -static swig_cast_info *swig_cast_initial[] = { - _swigc__p_char, - _swigc__p_cmf__atmosphere__ConstantMeteorology, - _swigc__p_cmf__atmosphere__ConstantRainSource, - _swigc__p_cmf__atmosphere__IDWRainfall, - _swigc__p_cmf__atmosphere__IDW_Meteorology, - _swigc__p_cmf__atmosphere__MeteoStation, - _swigc__p_cmf__atmosphere__MeteoStationList, - _swigc__p_cmf__atmosphere__MeteoStationReference, - _swigc__p_cmf__atmosphere__Meteorology, - _swigc__p_cmf__atmosphere__RainSource, - _swigc__p_cmf__atmosphere__RainfallStation, - _swigc__p_cmf__atmosphere__RainfallStationList, - _swigc__p_cmf__atmosphere__RainfallStationReference, - _swigc__p_cmf__atmosphere__TimeseriesRainSource, - _swigc__p_cmf__atmosphere__Weather, - _swigc__p_cmf__atmosphere__aerodynamic_resistance, - _swigc__p_cmf__atmosphere__log_wind_profile, - _swigc__p_cmf__geometry__point, - _swigc__p_cmf__geometry__point_vector, - _swigc__p_cmf__math__BDF2, - _swigc__p_cmf__math__CVodeIntegrator, - _swigc__p_cmf__math__Date, - _swigc__p_cmf__math__ExplicitEuler_fixed, - _swigc__p_cmf__math__HeunIntegrator, - _swigc__p_cmf__math__ImplicitEuler, - _swigc__p_cmf__math__Integrator, - _swigc__p_cmf__math__MultiIntegrator, - _swigc__p_cmf__math__RKFIntegrator, - _swigc__p_cmf__math__SoluteWaterIntegrator, - _swigc__p_cmf__math__StateVariable, - _swigc__p_cmf__math__StateVariableList, - _swigc__p_cmf__math__StateVariableOwner, - _swigc__p_cmf__math__Time, - _swigc__p_cmf__math__cubicspline, - _swigc__p_cmf__math__integratable, - _swigc__p_cmf__math__integratable_list, - _swigc__p_cmf__math__num_array, - _swigc__p_cmf__math__timeseries, - _swigc__p_cmf__project, - _swigc__p_cmf__river__Channel, - _swigc__p_cmf__river__IChannel, - _swigc__p_cmf__river__IVolumeHeightFunction, - _swigc__p_cmf__river__Manning, - _swigc__p_cmf__river__Manning_Diffusive, - _swigc__p_cmf__river__Manning_Kinematic, - _swigc__p_cmf__river__MeanChannel, - _swigc__p_cmf__river__OpenWaterStorage, - _swigc__p_cmf__river__PipeReach, - _swigc__p_cmf__river__Prism, - _swigc__p_cmf__river__Reach, - _swigc__p_cmf__river__ReachIterator, - _swigc__p_cmf__river__RectangularReach, - _swigc__p_cmf__river__SWATReachType, - _swigc__p_cmf__river__TriangularReach, - _swigc__p_cmf__river__volume_height_function, - _swigc__p_cmf__upslope__BrooksCoreyRetentionCurve, - _swigc__p_cmf__upslope__Cell, - _swigc__p_cmf__upslope__CellConnector, - _swigc__p_cmf__upslope__ET__CanopyStorageEvaporation, - _swigc__p_cmf__upslope__ET__ContentStress, - _swigc__p_cmf__upslope__ET__HargreaveET, - _swigc__p_cmf__upslope__ET__PenmanEvaporation, - _swigc__p_cmf__upslope__ET__PenmanMonteithET, - _swigc__p_cmf__upslope__ET__PriestleyTaylorET, - _swigc__p_cmf__upslope__ET__RootUptakeStessFunction, - _swigc__p_cmf__upslope__ET__ShuttleworthWallace, - _swigc__p_cmf__upslope__ET__SuctionStress, - _swigc__p_cmf__upslope__ET__TurcET, - _swigc__p_cmf__upslope__ET__VolumeStress, - _swigc__p_cmf__upslope__ET__canopy_evaporation, - _swigc__p_cmf__upslope__ET__canopy_evaporation_method, - _swigc__p_cmf__upslope__ET__constantETpot, - _swigc__p_cmf__upslope__ET__snow_evaporation, - _swigc__p_cmf__upslope__ET__snow_evaporation_method, - _swigc__p_cmf__upslope__ET__soil_evaporation, - _swigc__p_cmf__upslope__ET__soil_evaporation_method, - _swigc__p_cmf__upslope__ET__stressedET, - _swigc__p_cmf__upslope__ET__surface_water_evaporation, - _swigc__p_cmf__upslope__ET__surface_water_evaporation_method, - _swigc__p_cmf__upslope__ET__timeseriesETpot, - _swigc__p_cmf__upslope__ET__transpiration, - _swigc__p_cmf__upslope__ET__transpiration_method, - _swigc__p_cmf__upslope__LinearRetention, - _swigc__p_cmf__upslope__MacroPore, - _swigc__p_cmf__upslope__RetentionCurve, - _swigc__p_cmf__upslope__SoilLayer, - _swigc__p_cmf__upslope__SurfaceWater, - _swigc__p_cmf__upslope__Topology, - _swigc__p_cmf__upslope__VanGenuchtenMualem, - _swigc__p_cmf__upslope__aquifer, - _swigc__p_cmf__upslope__aquifer_Darcy, - _swigc__p_cmf__upslope__cell_vector, - _swigc__p_cmf__upslope__connections__BaseMacroFlow, - _swigc__p_cmf__upslope__connections__CanopyOverflow, - _swigc__p_cmf__upslope__connections__Darcy, - _swigc__p_cmf__upslope__connections__DarcyKinematic, - _swigc__p_cmf__upslope__connections__DiffusiveMacroMicroExchange, - _swigc__p_cmf__upslope__connections__DiffusiveSurfaceRunoff, - _swigc__p_cmf__upslope__connections__EnergyBudgetSnowMelt, - _swigc__p_cmf__upslope__connections__FreeDrainagePercolation, - _swigc__p_cmf__upslope__connections__GradientMacroFlow, - _swigc__p_cmf__upslope__connections__GradientMacroMicroExchange, - _swigc__p_cmf__upslope__connections__GreenAmptInfiltration, - _swigc__p_cmf__upslope__connections__JarvisMacroFlow, - _swigc__p_cmf__upslope__connections__KinematicMacroFlow, - _swigc__p_cmf__upslope__connections__KinematicSurfaceRunoff, - _swigc__p_cmf__upslope__connections__LayerBypass, - _swigc__p_cmf__upslope__connections__MACROlikeMacroMicroExchange, - _swigc__p_cmf__upslope__connections__MatrixInfiltration, - _swigc__p_cmf__upslope__connections__Rainfall, - _swigc__p_cmf__upslope__connections__Richards, - _swigc__p_cmf__upslope__connections__Richards_lateral, - _swigc__p_cmf__upslope__connections__RutterInterception, - _swigc__p_cmf__upslope__connections__SWATPercolation, - _swigc__p_cmf__upslope__connections__SimplRichards, - _swigc__p_cmf__upslope__connections__SimpleInfiltration, - _swigc__p_cmf__upslope__connections__SimpleTindexSnowMelt, - _swigc__p_cmf__upslope__connections__Snowfall, - _swigc__p_cmf__upslope__connections__TOPModelFlow, - _swigc__p_cmf__upslope__connections__TopographicGradientDarcy, - _swigc__p_cmf__upslope__connections__lateral_sub_surface_flux, - _swigc__p_cmf__upslope__layer_list, - _swigc__p_cmf__upslope__neighbor_iterator, - _swigc__p_cmf__upslope__subcatchment, - _swigc__p_cmf__upslope__vegetation__Vegetation, - _swigc__p_cmf__water__Adsorption, - _swigc__p_cmf__water__ConstraintLinearStorageConnection, - _swigc__p_cmf__water__DirichletBoundary, - _swigc__p_cmf__water__ExponentialDeclineConnection, - _swigc__p_cmf__water__FreundlichAdsorbtion, - _swigc__p_cmf__water__LangmuirAdsorption, - _swigc__p_cmf__water__LinearAdsorption, - _swigc__p_cmf__water__LinearStorageConnection, - _swigc__p_cmf__water__NeumannBoundary, - _swigc__p_cmf__water__NeumannBoundary_list, - _swigc__p_cmf__water__NeumannFlux, - _swigc__p_cmf__water__NullAdsorption, - _swigc__p_cmf__water__PowerLawConnection, - _swigc__p_cmf__water__SoluteStorage, - _swigc__p_cmf__water__SoluteTimeseries, - _swigc__p_cmf__water__SystemBridge, - _swigc__p_cmf__water__SystemBridgeConnection, - _swigc__p_cmf__water__TechnicalFlux, - _swigc__p_cmf__water__WaterStorage, - _swigc__p_cmf__water__bidirectional_kinematic_exchange, - _swigc__p_cmf__water__connection_list, - _swigc__p_cmf__water__constraint_kinematic_wave, - _swigc__p_cmf__water__external_control_connection, - _swigc__p_cmf__water__flux_connection, - _swigc__p_cmf__water__flux_integrator, - _swigc__p_cmf__water__flux_node, - _swigc__p_cmf__water__generic_gradient_connection, - _swigc__p_cmf__water__kinematic_wave, - _swigc__p_cmf__water__linear_scale, - _swigc__p_cmf__water__node_list, - _swigc__p_cmf__water__solute, - _swigc__p_cmf__water__solute_vector, - _swigc__p_cmf__water__statecontrol_connection, - _swigc__p_cmf__water__waterbalance_connection, - _swigc__p_cmf__water__waterbalance_integrator, - _swigc__p_const_iterator, - _swigc__p_double, - _swigc__p_f_r_cmf__upslope__Cell_r_cmf__upslope__Cell_ptrdiff_t__void, - _swigc__p_iterator, - _swigc__p_ptr, - _swigc__p_std__shared_ptrT_SoilLayer_t, - _swigc__p_std__shared_ptrT_cmf__atmosphere__ConstantRainSource_t, - _swigc__p_std__shared_ptrT_cmf__atmosphere__IDWRainfall_t, - _swigc__p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, - _swigc__p_std__shared_ptrT_cmf__atmosphere__RainSource_t, - _swigc__p_std__shared_ptrT_cmf__atmosphere__RainfallStationReference_t, - _swigc__p_std__shared_ptrT_cmf__atmosphere__RainfallStation_t, - _swigc__p_std__shared_ptrT_cmf__atmosphere__TimeseriesRainSource_t, - _swigc__p_std__shared_ptrT_cmf__atmosphere__aerodynamic_resistance_t, - _swigc__p_std__shared_ptrT_cmf__math__StateVariable_t, - _swigc__p_std__shared_ptrT_cmf__math__integratable_t, - _swigc__p_std__shared_ptrT_cmf__river__OpenWaterStorage_t, - _swigc__p_std__shared_ptrT_cmf__river__Reach_t, - _swigc__p_std__shared_ptrT_cmf__upslope__ET__canopy_evaporation_method_t, - _swigc__p_std__shared_ptrT_cmf__upslope__ET__snow_evaporation_method_t, - _swigc__p_std__shared_ptrT_cmf__upslope__ET__soil_evaporation_method_t, - _swigc__p_std__shared_ptrT_cmf__upslope__ET__surface_water_evaporation_method_t, - _swigc__p_std__shared_ptrT_cmf__upslope__ET__transpiration_method_t, - _swigc__p_std__shared_ptrT_cmf__upslope__MacroPore_t, - _swigc__p_std__shared_ptrT_cmf__upslope__SoilLayer_t, - _swigc__p_std__shared_ptrT_cmf__upslope__SurfaceWater_t, - _swigc__p_std__shared_ptrT_cmf__upslope__aquifer_t, - _swigc__p_std__shared_ptrT_cmf__water__DirichletBoundary_t, - _swigc__p_std__shared_ptrT_cmf__water__NeumannBoundary_t, - _swigc__p_std__shared_ptrT_cmf__water__SoluteStorage_t, - _swigc__p_std__shared_ptrT_cmf__water__SystemBridge_t, - _swigc__p_std__shared_ptrT_cmf__water__WaterStorage_t, - _swigc__p_std__shared_ptrT_cmf__water__flux_connection_t, - _swigc__p_std__shared_ptrT_cmf__water__flux_integrator_t, - _swigc__p_std__shared_ptrT_cmf__water__flux_node_t, - _swigc__p_std__shared_ptrT_cmf__water__waterbalance_integrator_t, - _swigc__p_std__shared_ptrT_std__shared_ptrT_cmf__atmosphere__ConstantRainSource_t_t, - _swigc__p_std__shared_ptrT_std__shared_ptrT_cmf__atmosphere__RainfallStationReference_t_t, - _swigc__p_std__string, - _swigc__p_std__vectorT_std__shared_ptrT_cmf__water__WaterStorage_t_t, - _swigc__p_std__vectorT_std__shared_ptrT_cmf__water__flux_connection_t_t__const_iterator, - _swigc__p_std__vectorT_std__shared_ptrT_cmf__water__flux_connection_t_t__iterator, -}; - - -/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */ - -static swig_const_info swig_const_table[] = { -{0, 0, 0, 0.0, 0, 0}}; - -#ifdef __cplusplus -} -#endif -/* ----------------------------------------------------------------------------- - * Type initialization: - * This problem is tough by the requirement that no dynamic - * memory is used. Also, since swig_type_info structures store pointers to - * swig_cast_info structures and swig_cast_info structures store pointers back - * to swig_type_info structures, we need some lookup code at initialization. - * The idea is that swig generates all the structures that are needed. - * The runtime then collects these partially filled structures. - * The SWIG_InitializeModule function takes these initial arrays out of - * swig_module, and does all the lookup, filling in the swig_module.types - * array with the correct data and linking the correct swig_cast_info - * structures together. - * - * The generated swig_type_info structures are assigned statically to an initial - * array. We just loop through that array, and handle each type individually. - * First we lookup if this type has been already loaded, and if so, use the - * loaded structure instead of the generated one. Then we have to fill in the - * cast linked list. The cast data is initially stored in something like a - * two-dimensional array. Each row corresponds to a type (there are the same - * number of rows as there are in the swig_type_initial array). Each entry in - * a column is one of the swig_cast_info structures for that type. - * The cast_initial array is actually an array of arrays, because each row has - * a variable number of columns. So to actually build the cast linked list, - * we find the array of casts associated with the type, and loop through it - * adding the casts to the list. The one last trick we need to do is making - * sure the type pointer in the swig_cast_info struct is correct. - * - * First off, we lookup the cast->type name to see if it is already loaded. - * There are three cases to handle: - * 1) If the cast->type has already been loaded AND the type we are adding - * casting info to has not been loaded (it is in this module), THEN we - * replace the cast->type pointer with the type pointer that has already - * been loaded. - * 2) If BOTH types (the one we are adding casting info to, and the - * cast->type) are loaded, THEN the cast info has already been loaded by - * the previous module so we just ignore it. - * 3) Finally, if cast->type has not already been loaded, then we add that - * swig_cast_info to the linked list (because the cast->type) pointer will - * be correct. - * ----------------------------------------------------------------------------- */ - -#ifdef __cplusplus -extern "C" { -#if 0 -} /* c-mode */ -#endif -#endif - -#if 0 -#define SWIGRUNTIME_DEBUG -#endif - - -SWIGRUNTIME void -SWIG_InitializeModule(void *clientdata) { - size_t i; - swig_module_info *module_head, *iter; - int init; - - /* check to see if the circular list has been setup, if not, set it up */ - if (swig_module.next==0) { - /* Initialize the swig_module */ - swig_module.type_initial = swig_type_initial; - swig_module.cast_initial = swig_cast_initial; - swig_module.next = &swig_module; - init = 1; - } else { - init = 0; - } - - /* Try and load any already created modules */ - module_head = SWIG_GetModule(clientdata); - if (!module_head) { - /* This is the first module loaded for this interpreter */ - /* so set the swig module into the interpreter */ - SWIG_SetModule(clientdata, &swig_module); - } else { - /* the interpreter has loaded a SWIG module, but has it loaded this one? */ - iter=module_head; - do { - if (iter==&swig_module) { - /* Our module is already in the list, so there's nothing more to do. */ - return; - } - iter=iter->next; - } while (iter!= module_head); - - /* otherwise we must add our module into the list */ - swig_module.next = module_head->next; - module_head->next = &swig_module; - } - - /* When multiple interpreters are used, a module could have already been initialized in - a different interpreter, but not yet have a pointer in this interpreter. - In this case, we do not want to continue adding types... everything should be - set up already */ - if (init == 0) return; - - /* Now work on filling in swig_module.types */ -#ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: size %d\n", swig_module.size); -#endif - for (i = 0; i < swig_module.size; ++i) { - swig_type_info *type = 0; - swig_type_info *ret; - swig_cast_info *cast; - -#ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); -#endif - - /* if there is another module already loaded */ - if (swig_module.next != &swig_module) { - type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name); - } - if (type) { - /* Overwrite clientdata field */ -#ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: found type %s\n", type->name); -#endif - if (swig_module.type_initial[i]->clientdata) { - type->clientdata = swig_module.type_initial[i]->clientdata; -#ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name); -#endif - } - } else { - type = swig_module.type_initial[i]; - } - - /* Insert casting types */ - cast = swig_module.cast_initial[i]; - while (cast->type) { - /* Don't need to add information already in the list */ - ret = 0; -#ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: look cast %s\n", cast->type->name); -#endif - if (swig_module.next != &swig_module) { - ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name); -#ifdef SWIGRUNTIME_DEBUG - if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name); -#endif - } - if (ret) { - if (type == swig_module.type_initial[i]) { -#ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: skip old type %s\n", ret->name); -#endif - cast->type = ret; - ret = 0; - } else { - /* Check for casting already in the list */ - swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type); -#ifdef SWIGRUNTIME_DEBUG - if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name); -#endif - if (!ocast) ret = 0; - } - } - - if (!ret) { -#ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name); -#endif - if (type->cast) { - type->cast->prev = cast; - cast->next = type->cast; - } - type->cast = cast; - } - cast++; - } - /* Set entry in modules->types array equal to the type */ - swig_module.types[i] = type; - } - swig_module.types[i] = 0; - -#ifdef SWIGRUNTIME_DEBUG - printf("**** SWIG_InitializeModule: Cast List ******\n"); - for (i = 0; i < swig_module.size; ++i) { - int j = 0; - swig_cast_info *cast = swig_module.cast_initial[i]; - printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); - while (cast->type) { - printf("SWIG_InitializeModule: cast type %s\n", cast->type->name); - cast++; - ++j; - } - printf("---- Total casts: %d\n",j); - } - printf("**** SWIG_InitializeModule: Cast List ******\n"); -#endif -} - -/* This function will propagate the clientdata field of type to -* any new swig_type_info structures that have been added into the list -* of equivalent types. It is like calling -* SWIG_TypeClientData(type, clientdata) a second time. -*/ -SWIGRUNTIME void -SWIG_PropagateClientData(void) { - size_t i; - swig_cast_info *equiv; - static int init_run = 0; - - if (init_run) return; - init_run = 1; - - for (i = 0; i < swig_module.size; i++) { - if (swig_module.types[i]->clientdata) { - equiv = swig_module.types[i]->cast; - while (equiv) { - if (!equiv->converter) { - if (equiv->type && !equiv->type->clientdata) - SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata); - } - equiv = equiv->next; - } - } - } -} - -#ifdef __cplusplus -#if 0 -{ - /* c-mode */ -#endif -} -#endif - - - -#ifdef __cplusplus -extern "C" { -#endif - - /* Python-specific SWIG API */ -#define SWIG_newvarlink() SWIG_Python_newvarlink() -#define SWIG_addvarlink(p, name, get_attr, set_attr) SWIG_Python_addvarlink(p, name, get_attr, set_attr) -#define SWIG_InstallConstants(d, constants) SWIG_Python_InstallConstants(d, constants) - - /* ----------------------------------------------------------------------------- - * global variable support code. - * ----------------------------------------------------------------------------- */ - - typedef struct swig_globalvar { - char *name; /* Name of global variable */ - PyObject *(*get_attr)(void); /* Return the current value */ - int (*set_attr)(PyObject *); /* Set the value */ - struct swig_globalvar *next; - } swig_globalvar; - - typedef struct swig_varlinkobject { - PyObject_HEAD - swig_globalvar *vars; - } swig_varlinkobject; - - SWIGINTERN PyObject * - swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v)) { -#if PY_VERSION_HEX >= 0x03000000 - return PyUnicode_InternFromString(""); -#else - return PyString_FromString(""); -#endif - } - - SWIGINTERN PyObject * - swig_varlink_str(swig_varlinkobject *v) { -#if PY_VERSION_HEX >= 0x03000000 - PyObject *str = PyUnicode_InternFromString("("); - PyObject *tail; - PyObject *joined; - swig_globalvar *var; - for (var = v->vars; var; var=var->next) { - tail = PyUnicode_FromString(var->name); - joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); - str = joined; - if (var->next) { - tail = PyUnicode_InternFromString(", "); - joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); - str = joined; - } - } - tail = PyUnicode_InternFromString(")"); - joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); - str = joined; -#else - PyObject *str = PyString_FromString("("); - swig_globalvar *var; - for (var = v->vars; var; var=var->next) { - PyString_ConcatAndDel(&str,PyString_FromString(var->name)); - if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", ")); - } - PyString_ConcatAndDel(&str,PyString_FromString(")")); -#endif - return str; - } - - SWIGINTERN int - swig_varlink_print(swig_varlinkobject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) { - char *tmp; - PyObject *str = swig_varlink_str(v); - fprintf(fp,"Swig global variables "); - fprintf(fp,"%s\n", tmp = SWIG_Python_str_AsChar(str)); - SWIG_Python_str_DelForPy3(tmp); - Py_DECREF(str); - return 0; - } - - SWIGINTERN void - swig_varlink_dealloc(swig_varlinkobject *v) { - swig_globalvar *var = v->vars; - while (var) { - swig_globalvar *n = var->next; - free(var->name); - free(var); - var = n; - } - } - - SWIGINTERN PyObject * - swig_varlink_getattr(swig_varlinkobject *v, char *n) { - PyObject *res = NULL; - swig_globalvar *var = v->vars; - while (var) { - if (strcmp(var->name,n) == 0) { - res = (*var->get_attr)(); - break; - } - var = var->next; - } - if (res == NULL && !PyErr_Occurred()) { - PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n); - } - return res; - } - - SWIGINTERN int - swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) { - int res = 1; - swig_globalvar *var = v->vars; - while (var) { - if (strcmp(var->name,n) == 0) { - res = (*var->set_attr)(p); - break; - } - var = var->next; - } - if (res == 1 && !PyErr_Occurred()) { - PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n); - } - return res; - } - - SWIGINTERN PyTypeObject* - swig_varlink_type(void) { - static char varlink__doc__[] = "Swig var link object"; - static PyTypeObject varlink_type; - static int type_init = 0; - if (!type_init) { - const PyTypeObject tmp = { -#if PY_VERSION_HEX >= 0x03000000 - PyVarObject_HEAD_INIT(NULL, 0) -#else - PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ -#endif - (char *)"swigvarlink", /* tp_name */ - sizeof(swig_varlinkobject), /* tp_basicsize */ - 0, /* tp_itemsize */ - (destructor) swig_varlink_dealloc, /* tp_dealloc */ - (printfunc) swig_varlink_print, /* tp_print */ - (getattrfunc) swig_varlink_getattr, /* tp_getattr */ - (setattrfunc) swig_varlink_setattr, /* tp_setattr */ - 0, /* tp_compare */ - (reprfunc) swig_varlink_repr, /* tp_repr */ - 0, /* tp_as_number */ - 0, /* tp_as_sequence */ - 0, /* tp_as_mapping */ - 0, /* tp_hash */ - 0, /* tp_call */ - (reprfunc) swig_varlink_str, /* tp_str */ - 0, /* tp_getattro */ - 0, /* tp_setattro */ - 0, /* tp_as_buffer */ - 0, /* tp_flags */ - varlink__doc__, /* tp_doc */ - 0, /* tp_traverse */ - 0, /* tp_clear */ - 0, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ -#if PY_VERSION_HEX >= 0x02020000 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */ -#endif -#if PY_VERSION_HEX >= 0x02030000 - 0, /* tp_del */ -#endif -#if PY_VERSION_HEX >= 0x02060000 - 0, /* tp_version_tag */ -#endif -#if PY_VERSION_HEX >= 0x03040000 - 0, /* tp_finalize */ -#endif -#ifdef COUNT_ALLOCS - 0, /* tp_allocs */ - 0, /* tp_frees */ - 0, /* tp_maxalloc */ -#if PY_VERSION_HEX >= 0x02050000 - 0, /* tp_prev */ -#endif - 0 /* tp_next */ -#endif - }; - varlink_type = tmp; - type_init = 1; -#if PY_VERSION_HEX < 0x02020000 - varlink_type.ob_type = &PyType_Type; -#else - if (PyType_Ready(&varlink_type) < 0) - return NULL; -#endif - } - return &varlink_type; - } - - /* Create a variable linking object for use later */ - SWIGINTERN PyObject * - SWIG_Python_newvarlink(void) { - swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type()); - if (result) { - result->vars = 0; - } - return ((PyObject*) result); - } - - SWIGINTERN void - SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) { - swig_varlinkobject *v = (swig_varlinkobject *) p; - swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar)); - if (gv) { - size_t size = strlen(name)+1; - gv->name = (char *)malloc(size); - if (gv->name) { - strncpy(gv->name,name,size); - gv->get_attr = get_attr; - gv->set_attr = set_attr; - gv->next = v->vars; - } - } - v->vars = gv; - } - - SWIGINTERN PyObject * - SWIG_globals(void) { - static PyObject *_SWIG_globals = 0; - if (!_SWIG_globals) _SWIG_globals = SWIG_newvarlink(); - return _SWIG_globals; - } - - /* ----------------------------------------------------------------------------- - * constants/methods manipulation - * ----------------------------------------------------------------------------- */ - - /* Install Constants */ - SWIGINTERN void - SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) { - PyObject *obj = 0; - size_t i; - for (i = 0; constants[i].type; ++i) { - switch(constants[i].type) { - case SWIG_PY_POINTER: - obj = SWIG_InternalNewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0); - break; - case SWIG_PY_BINARY: - obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype)); - break; - default: - obj = 0; - break; - } - if (obj) { - PyDict_SetItemString(d, constants[i].name, obj); - Py_DECREF(obj); - } - } - } - - /* -----------------------------------------------------------------------------*/ - /* Fix SwigMethods to carry the callback ptrs when needed */ - /* -----------------------------------------------------------------------------*/ - - SWIGINTERN void - SWIG_Python_FixMethods(PyMethodDef *methods, - swig_const_info *const_table, - swig_type_info **types, - swig_type_info **types_initial) { - size_t i; - for (i = 0; methods[i].ml_name; ++i) { - const char *c = methods[i].ml_doc; - if (!c) continue; - c = strstr(c, "swig_ptr: "); - if (c) { - int j; - swig_const_info *ci = 0; - const char *name = c + 10; - for (j = 0; const_table[j].type; ++j) { - if (strncmp(const_table[j].name, name, - strlen(const_table[j].name)) == 0) { - ci = &(const_table[j]); - break; - } - } - if (ci) { - void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0; - if (ptr) { - size_t shift = (ci->ptype) - types; - swig_type_info *ty = types_initial[shift]; - size_t ldoc = (c - methods[i].ml_doc); - size_t lptr = strlen(ty->name)+2*sizeof(void*)+2; - char *ndoc = (char*)malloc(ldoc + lptr + 10); - if (ndoc) { - char *buff = ndoc; - strncpy(buff, methods[i].ml_doc, ldoc); - buff += ldoc; - strncpy(buff, "swig_ptr: ", 10); - buff += 10; - SWIG_PackVoidPtr(buff, ptr, ty->name, lptr); - methods[i].ml_doc = ndoc; - } - } - } - } - } - } - -#ifdef __cplusplus -} -#endif - -/* -----------------------------------------------------------------------------* - * Partial Init method - * -----------------------------------------------------------------------------*/ - -#ifdef __cplusplus -extern "C" -#endif - -SWIGEXPORT -#if PY_VERSION_HEX >= 0x03000000 -PyObject* -#else -void -#endif -SWIG_init(void) { - PyObject *m, *d, *md; -#if PY_VERSION_HEX >= 0x03000000 - static struct PyModuleDef SWIG_module = { -# if PY_VERSION_HEX >= 0x03020000 - PyModuleDef_HEAD_INIT, -# else - { - PyObject_HEAD_INIT(NULL) - NULL, /* m_init */ - 0, /* m_index */ - NULL, /* m_copy */ - }, -# endif - (char *) SWIG_name, - NULL, - -1, - SwigMethods, - NULL, - NULL, - NULL, - NULL - }; -#endif - -#if defined(SWIGPYTHON_BUILTIN) - static SwigPyClientData SwigPyObject_clientdata = { - 0, 0, 0, 0, 0, 0, 0 - }; - static PyGetSetDef this_getset_def = { - (char *)"this", &SwigPyBuiltin_ThisClosure, NULL, NULL, NULL - }; - static SwigPyGetSet thisown_getset_closure = { - (PyCFunction) SwigPyObject_own, - (PyCFunction) SwigPyObject_own - }; - static PyGetSetDef thisown_getset_def = { - (char *)"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure - }; - PyTypeObject *builtin_pytype; - int builtin_base_count; - swig_type_info *builtin_basetype; - PyObject *tuple; - PyGetSetDescrObject *static_getset; - PyTypeObject *metatype; - PyTypeObject *swigpyobject; - SwigPyClientData *cd; - PyObject *public_interface, *public_symbol; - PyObject *this_descr; - PyObject *thisown_descr; - PyObject *self = 0; - int i; - - (void)builtin_pytype; - (void)builtin_base_count; - (void)builtin_basetype; - (void)tuple; - (void)static_getset; - (void)self; - - /* Metaclass is used to implement static member variables */ - metatype = SwigPyObjectType(); - assert(metatype); -#endif - - /* Fix SwigMethods to carry the callback ptrs when needed */ - SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial); - -#if PY_VERSION_HEX >= 0x03000000 - m = PyModule_Create(&SWIG_module); -#else - m = Py_InitModule((char *) SWIG_name, SwigMethods); -#endif - - md = d = PyModule_GetDict(m); - (void)md; - - SWIG_InitializeModule(0); - -#ifdef SWIGPYTHON_BUILTIN - swigpyobject = SwigPyObject_TypeOnce(); - - SwigPyObject_stype = SWIG_MangledTypeQuery("_p_SwigPyObject"); - assert(SwigPyObject_stype); - cd = (SwigPyClientData*) SwigPyObject_stype->clientdata; - if (!cd) { - SwigPyObject_stype->clientdata = &SwigPyObject_clientdata; - SwigPyObject_clientdata.pytype = swigpyobject; - } else if (swigpyobject->tp_basicsize != cd->pytype->tp_basicsize) { - PyErr_SetString(PyExc_RuntimeError, "Import error: attempted to load two incompatible swig-generated modules."); -# if PY_VERSION_HEX >= 0x03000000 - return NULL; -# else - return; -# endif - } - - /* All objects have a 'this' attribute */ - this_descr = PyDescr_NewGetSet(SwigPyObject_type(), &this_getset_def); - (void)this_descr; - - /* All objects have a 'thisown' attribute */ - thisown_descr = PyDescr_NewGetSet(SwigPyObject_type(), &thisown_getset_def); - (void)thisown_descr; - - public_interface = PyList_New(0); - public_symbol = 0; - (void)public_symbol; - - PyDict_SetItemString(md, "__all__", public_interface); - Py_DECREF(public_interface); - for (i = 0; SwigMethods[i].ml_name != NULL; ++i) - SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name); - for (i = 0; swig_const_table[i].name != 0; ++i) - SwigPyBuiltin_AddPublicSymbol(public_interface, swig_const_table[i].name); -#endif - - SWIG_InstallConstants(d,swig_const_table); - - SWIG_Python_SetConstant(d, "SHARED_PTR_DISOWN",SWIG_From_int(static_cast< int >(0))); - import_array(); - PyDict_SetItemString(md,(char *)"cvar", SWIG_globals()); - SWIG_addvarlink(SWIG_globals(),(char *)"PI",Swig_var_PI_get, Swig_var_PI_set); - - PyDateTime_IMPORT; - - SWIG_addvarlink(SWIG_globals(),(char *)"Debug",Swig_var_Debug_get, Swig_var_Debug_set); - SWIG_addvarlink(SWIG_globals(),(char *)"__compiledate__",Swig_var___compiledate___get, Swig_var___compiledate___set); - SWIG_addvarlink(SWIG_globals(),(char *)"Pi",Swig_var_Pi_get, Swig_var_Pi_set); - SWIG_Python_SetConstant(d, "JULIANDAY_0_1_1900",SWIG_From_int(static_cast< int >(2415019))); - SWIG_Python_SetConstant(d, "Time_ms_per_day",SWIG_From_long_SS_long(static_cast< long long >(cmf::math::Time::ms_per_day))); - SWIG_addvarlink(SWIG_globals(),(char *)"ms",Swig_var_ms_get, Swig_var_ms_set); - SWIG_addvarlink(SWIG_globals(),(char *)"sec",Swig_var_sec_get, Swig_var_sec_set); - SWIG_addvarlink(SWIG_globals(),(char *)"min",Swig_var_min_get, Swig_var_min_set); - SWIG_addvarlink(SWIG_globals(),(char *)"h",Swig_var_h_get, Swig_var_h_set); - SWIG_addvarlink(SWIG_globals(),(char *)"day",Swig_var_day_get, Swig_var_day_set); - SWIG_addvarlink(SWIG_globals(),(char *)"week",Swig_var_week_get, Swig_var_week_set); - SWIG_addvarlink(SWIG_globals(),(char *)"year",Swig_var_year_get, Swig_var_year_set); - SWIG_addvarlink(SWIG_globals(),(char *)"month",Swig_var_month_get, Swig_var_month_set); - SWIG_addvarlink(SWIG_globals(),(char *)"never",Swig_var_never_get, Swig_var_never_set); - SWIG_addvarlink(SWIG_globals(),(char *)"rho_wg",Swig_var_rho_wg_get, Swig_var_rho_wg_set); - SWIG_addvarlink(SWIG_globals(),(char *)"KinematicSurfaceRunoff_cell_connector",Swig_var_KinematicSurfaceRunoff_cell_connector_get, Swig_var_KinematicSurfaceRunoff_cell_connector_set); - SWIG_addvarlink(SWIG_globals(),(char *)"DiffusiveSurfaceRunoff_cell_connector",Swig_var_DiffusiveSurfaceRunoff_cell_connector_get, Swig_var_DiffusiveSurfaceRunoff_cell_connector_set); - SWIG_addvarlink(SWIG_globals(),(char *)"Darcy_cell_connector",Swig_var_Darcy_cell_connector_get, Swig_var_Darcy_cell_connector_set); - SWIG_addvarlink(SWIG_globals(),(char *)"TopographicGradientDarcy_cell_connector",Swig_var_TopographicGradientDarcy_cell_connector_get, Swig_var_TopographicGradientDarcy_cell_connector_set); - SWIG_addvarlink(SWIG_globals(),(char *)"DarcyKinematic_cell_connector",Swig_var_DarcyKinematic_cell_connector_get, Swig_var_DarcyKinematic_cell_connector_set); - SWIG_addvarlink(SWIG_globals(),(char *)"Richards_lateral_cell_connector",Swig_var_Richards_lateral_cell_connector_get, Swig_var_Richards_lateral_cell_connector_set); - SWIG_addvarlink(SWIG_globals(),(char *)"Manning_Diffusive_cell_connector",Swig_var_Manning_Diffusive_cell_connector_get, Swig_var_Manning_Diffusive_cell_connector_set); - SWIG_addvarlink(SWIG_globals(),(char *)"Manning_Kinematic_cell_connector",Swig_var_Manning_Kinematic_cell_connector_get, Swig_var_Manning_Kinematic_cell_connector_set); -#if PY_VERSION_HEX >= 0x03000000 - return m; -#else - return; -#endif -} - +/* ---------------------------------------------------------------------------- + * This file was automatically generated by SWIG (http://www.swig.org). + * Version 3.0.12 + * + * This file is not intended to be easily readable and contains a number of + * coding conventions designed to improve portability and efficiency. Do not make + * changes to this file unless you know what you are doing--modify the SWIG + * interface file instead. + * ----------------------------------------------------------------------------- */ + + +#ifndef SWIGPYTHON +#define SWIGPYTHON +#endif + +#define SWIG_PYTHON_NO_BUILD_NONE +#define SWIG_PYTHON_DIRECTOR_NO_VTABLE +#define SWIG_CASTRANK_MODE +#define SWIG_PYTHON_CAST_MODE + + +#ifdef __cplusplus +/* SwigValueWrapper is described in swig.swg */ +template class SwigValueWrapper { + struct SwigMovePointer { + T *ptr; + SwigMovePointer(T *p) : ptr(p) { } + ~SwigMovePointer() { delete ptr; } + SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; } + } pointer; + SwigValueWrapper& operator=(const SwigValueWrapper& rhs); + SwigValueWrapper(const SwigValueWrapper& rhs); +public: + SwigValueWrapper() : pointer(0) { } + SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; } + operator T&() const { return *pointer.ptr; } + T *operator&() { return pointer.ptr; } +}; + +template T SwigValueInit() { + return T(); +} +#endif + +/* ----------------------------------------------------------------------------- + * This section contains generic SWIG labels for method/variable + * declarations/attributes, and other compiler dependent labels. + * ----------------------------------------------------------------------------- */ + +/* template workaround for compilers that cannot correctly implement the C++ standard */ +#ifndef SWIGTEMPLATEDISAMBIGUATOR +# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560) +# define SWIGTEMPLATEDISAMBIGUATOR template +# elif defined(__HP_aCC) +/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */ +/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */ +# define SWIGTEMPLATEDISAMBIGUATOR template +# else +# define SWIGTEMPLATEDISAMBIGUATOR +# endif +#endif + +/* inline attribute */ +#ifndef SWIGINLINE +# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__)) +# define SWIGINLINE inline +# else +# define SWIGINLINE +# endif +#endif + +/* attribute recognised by some compilers to avoid 'unused' warnings */ +#ifndef SWIGUNUSED +# if defined(__GNUC__) +# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) +# define SWIGUNUSED __attribute__ ((__unused__)) +# else +# define SWIGUNUSED +# endif +# elif defined(__ICC) +# define SWIGUNUSED __attribute__ ((__unused__)) +# else +# define SWIGUNUSED +# endif +#endif + +#ifndef SWIG_MSC_UNSUPPRESS_4505 +# if defined(_MSC_VER) +# pragma warning(disable : 4505) /* unreferenced local function has been removed */ +# endif +#endif + +#ifndef SWIGUNUSEDPARM +# ifdef __cplusplus +# define SWIGUNUSEDPARM(p) +# else +# define SWIGUNUSEDPARM(p) p SWIGUNUSED +# endif +#endif + +/* internal SWIG method */ +#ifndef SWIGINTERN +# define SWIGINTERN static SWIGUNUSED +#endif + +/* internal inline SWIG method */ +#ifndef SWIGINTERNINLINE +# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE +#endif + +/* exporting methods */ +#if defined(__GNUC__) +# if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) +# ifndef GCC_HASCLASSVISIBILITY +# define GCC_HASCLASSVISIBILITY +# endif +# endif +#endif + +#ifndef SWIGEXPORT +# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) +# if defined(STATIC_LINKED) +# define SWIGEXPORT +# else +# define SWIGEXPORT __declspec(dllexport) +# endif +# else +# if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY) +# define SWIGEXPORT __attribute__ ((visibility("default"))) +# else +# define SWIGEXPORT +# endif +# endif +#endif + +/* calling conventions for Windows */ +#ifndef SWIGSTDCALL +# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) +# define SWIGSTDCALL __stdcall +# else +# define SWIGSTDCALL +# endif +#endif + +/* Deal with Microsoft's attempt at deprecating C standard runtime functions */ +#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) +# define _CRT_SECURE_NO_DEPRECATE +#endif + +/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */ +#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE) +# define _SCL_SECURE_NO_DEPRECATE +#endif + +/* Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework */ +#if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES) +# define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0 +#endif + +/* Intel's compiler complains if a variable which was never initialised is + * cast to void, which is a common idiom which we use to indicate that we + * are aware a variable isn't used. So we just silence that warning. + * See: https://github.com/swig/swig/issues/192 for more discussion. + */ +#ifdef __INTEL_COMPILER +# pragma warning disable 592 +#endif + + +#if defined(_DEBUG) && defined(SWIG_PYTHON_INTERPRETER_NO_DEBUG) +/* Use debug wrappers with the Python release dll */ +# undef _DEBUG +# include +# define _DEBUG +#else +# include +#endif + +/* ----------------------------------------------------------------------------- + * swigrun.swg + * + * This file contains generic C API SWIG runtime support for pointer + * type checking. + * ----------------------------------------------------------------------------- */ + +/* This should only be incremented when either the layout of swig_type_info changes, + or for whatever reason, the runtime changes incompatibly */ +#define SWIG_RUNTIME_VERSION "4" + +/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */ +#ifdef SWIG_TYPE_TABLE +# define SWIG_QUOTE_STRING(x) #x +# define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x) +# define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE) +#else +# define SWIG_TYPE_TABLE_NAME +#endif + +/* + You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for + creating a static or dynamic library from the SWIG runtime code. + In 99.9% of the cases, SWIG just needs to declare them as 'static'. + + But only do this if strictly necessary, ie, if you have problems + with your compiler or suchlike. +*/ + +#ifndef SWIGRUNTIME +# define SWIGRUNTIME SWIGINTERN +#endif + +#ifndef SWIGRUNTIMEINLINE +# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE +#endif + +/* Generic buffer size */ +#ifndef SWIG_BUFFER_SIZE +# define SWIG_BUFFER_SIZE 1024 +#endif + +/* Flags for pointer conversions */ +#define SWIG_POINTER_DISOWN 0x1 +#define SWIG_CAST_NEW_MEMORY 0x2 + +/* Flags for new pointer objects */ +#define SWIG_POINTER_OWN 0x1 + + +/* + Flags/methods for returning states. + + The SWIG conversion methods, as ConvertPtr, return an integer + that tells if the conversion was successful or not. And if not, + an error code can be returned (see swigerrors.swg for the codes). + + Use the following macros/flags to set or process the returning + states. + + In old versions of SWIG, code such as the following was usually written: + + if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) { + // success code + } else { + //fail code + } + + Now you can be more explicit: + + int res = SWIG_ConvertPtr(obj,vptr,ty.flags); + if (SWIG_IsOK(res)) { + // success code + } else { + // fail code + } + + which is the same really, but now you can also do + + Type *ptr; + int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags); + if (SWIG_IsOK(res)) { + // success code + if (SWIG_IsNewObj(res) { + ... + delete *ptr; + } else { + ... + } + } else { + // fail code + } + + I.e., now SWIG_ConvertPtr can return new objects and you can + identify the case and take care of the deallocation. Of course that + also requires SWIG_ConvertPtr to return new result values, such as + + int SWIG_ConvertPtr(obj, ptr,...) { + if () { + if () { + *ptr = ; + return SWIG_NEWOBJ; + } else { + *ptr = ; + return SWIG_OLDOBJ; + } + } else { + return SWIG_BADOBJ; + } + } + + Of course, returning the plain '0(success)/-1(fail)' still works, but you can be + more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the + SWIG errors code. + + Finally, if the SWIG_CASTRANK_MODE is enabled, the result code + allows to return the 'cast rank', for example, if you have this + + int food(double) + int fooi(int); + + and you call + + food(1) // cast rank '1' (1 -> 1.0) + fooi(1) // cast rank '0' + + just use the SWIG_AddCast()/SWIG_CheckState() +*/ + +#define SWIG_OK (0) +#define SWIG_ERROR (-1) +#define SWIG_IsOK(r) (r >= 0) +#define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError) + +/* The CastRankLimit says how many bits are used for the cast rank */ +#define SWIG_CASTRANKLIMIT (1 << 8) +/* The NewMask denotes the object was created (using new/malloc) */ +#define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1) +/* The TmpMask is for in/out typemaps that use temporal objects */ +#define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1) +/* Simple returning values */ +#define SWIG_BADOBJ (SWIG_ERROR) +#define SWIG_OLDOBJ (SWIG_OK) +#define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK) +#define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK) +/* Check, add and del mask methods */ +#define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r) +#define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r) +#define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK)) +#define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r) +#define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r) +#define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK)) + +/* Cast-Rank Mode */ +#if defined(SWIG_CASTRANK_MODE) +# ifndef SWIG_TypeRank +# define SWIG_TypeRank unsigned long +# endif +# ifndef SWIG_MAXCASTRANK /* Default cast allowed */ +# define SWIG_MAXCASTRANK (2) +# endif +# define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1) +# define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK) +SWIGINTERNINLINE int SWIG_AddCast(int r) { + return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r; +} +SWIGINTERNINLINE int SWIG_CheckState(int r) { + return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; +} +#else /* no cast-rank mode */ +# define SWIG_AddCast(r) (r) +# define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0) +#endif + + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +typedef void *(*swig_converter_func)(void *, int *); +typedef struct swig_type_info *(*swig_dycast_func)(void **); + +/* Structure to store information on one type */ +typedef struct swig_type_info { + const char *name; /* mangled name of this type */ + const char *str; /* human readable name of this type */ + swig_dycast_func dcast; /* dynamic cast function down a hierarchy */ + struct swig_cast_info *cast; /* linked list of types that can cast into this type */ + void *clientdata; /* language specific type data */ + int owndata; /* flag if the structure owns the clientdata */ +} swig_type_info; + +/* Structure to store a type and conversion function used for casting */ +typedef struct swig_cast_info { + swig_type_info *type; /* pointer to type that is equivalent to this type */ + swig_converter_func converter; /* function to cast the void pointers */ + struct swig_cast_info *next; /* pointer to next cast in linked list */ + struct swig_cast_info *prev; /* pointer to the previous cast */ +} swig_cast_info; + +/* Structure used to store module information + * Each module generates one structure like this, and the runtime collects + * all of these structures and stores them in a circularly linked list.*/ +typedef struct swig_module_info { + swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */ + size_t size; /* Number of types in this module */ + struct swig_module_info *next; /* Pointer to next element in circularly linked list */ + swig_type_info **type_initial; /* Array of initially generated type structures */ + swig_cast_info **cast_initial; /* Array of initially generated casting structures */ + void *clientdata; /* Language specific module data */ +} swig_module_info; + +/* + Compare two type names skipping the space characters, therefore + "char*" == "char *" and "Class" == "Class", etc. + + Return 0 when the two name types are equivalent, as in + strncmp, but skipping ' '. +*/ +SWIGRUNTIME int +SWIG_TypeNameComp(const char *f1, const char *l1, + const char *f2, const char *l2) { + for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) { + while ((*f1 == ' ') && (f1 != l1)) ++f1; + while ((*f2 == ' ') && (f2 != l2)) ++f2; + if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1; + } + return (int)((l1 - f1) - (l2 - f2)); +} + +/* + Check type equivalence in a name list like ||... + Return 0 if equal, -1 if nb < tb, 1 if nb > tb +*/ +SWIGRUNTIME int +SWIG_TypeCmp(const char *nb, const char *tb) { + int equiv = 1; + const char* te = tb + strlen(tb); + const char* ne = nb; + while (equiv != 0 && *ne) { + for (nb = ne; *ne; ++ne) { + if (*ne == '|') break; + } + equiv = SWIG_TypeNameComp(nb, ne, tb, te); + if (*ne) ++ne; + } + return equiv; +} + +/* + Check type equivalence in a name list like ||... + Return 0 if not equal, 1 if equal +*/ +SWIGRUNTIME int +SWIG_TypeEquiv(const char *nb, const char *tb) { + return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0; +} + +/* + Check the typename +*/ +SWIGRUNTIME swig_cast_info * +SWIG_TypeCheck(const char *c, swig_type_info *ty) { + if (ty) { + swig_cast_info *iter = ty->cast; + while (iter) { + if (strcmp(iter->type->name, c) == 0) { + if (iter == ty->cast) + return iter; + /* Move iter to the top of the linked list */ + iter->prev->next = iter->next; + if (iter->next) + iter->next->prev = iter->prev; + iter->next = ty->cast; + iter->prev = 0; + if (ty->cast) ty->cast->prev = iter; + ty->cast = iter; + return iter; + } + iter = iter->next; + } + } + return 0; +} + +/* + Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison +*/ +SWIGRUNTIME swig_cast_info * +SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) { + if (ty) { + swig_cast_info *iter = ty->cast; + while (iter) { + if (iter->type == from) { + if (iter == ty->cast) + return iter; + /* Move iter to the top of the linked list */ + iter->prev->next = iter->next; + if (iter->next) + iter->next->prev = iter->prev; + iter->next = ty->cast; + iter->prev = 0; + if (ty->cast) ty->cast->prev = iter; + ty->cast = iter; + return iter; + } + iter = iter->next; + } + } + return 0; +} + +/* + Cast a pointer up an inheritance hierarchy +*/ +SWIGRUNTIMEINLINE void * +SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) { + return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory); +} + +/* + Dynamic pointer casting. Down an inheritance hierarchy +*/ +SWIGRUNTIME swig_type_info * +SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) { + swig_type_info *lastty = ty; + if (!ty || !ty->dcast) return ty; + while (ty && (ty->dcast)) { + ty = (*ty->dcast)(ptr); + if (ty) lastty = ty; + } + return lastty; +} + +/* + Return the name associated with this type +*/ +SWIGRUNTIMEINLINE const char * +SWIG_TypeName(const swig_type_info *ty) { + return ty->name; +} + +/* + Return the pretty name associated with this type, + that is an unmangled type name in a form presentable to the user. +*/ +SWIGRUNTIME const char * +SWIG_TypePrettyName(const swig_type_info *type) { + /* The "str" field contains the equivalent pretty names of the + type, separated by vertical-bar characters. We choose + to print the last name, as it is often (?) the most + specific. */ + if (!type) return NULL; + if (type->str != NULL) { + const char *last_name = type->str; + const char *s; + for (s = type->str; *s; s++) + if (*s == '|') last_name = s+1; + return last_name; + } + else + return type->name; +} + +/* + Set the clientdata field for a type +*/ +SWIGRUNTIME void +SWIG_TypeClientData(swig_type_info *ti, void *clientdata) { + swig_cast_info *cast = ti->cast; + /* if (ti->clientdata == clientdata) return; */ + ti->clientdata = clientdata; + + while (cast) { + if (!cast->converter) { + swig_type_info *tc = cast->type; + if (!tc->clientdata) { + SWIG_TypeClientData(tc, clientdata); + } + } + cast = cast->next; + } +} +SWIGRUNTIME void +SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) { + SWIG_TypeClientData(ti, clientdata); + ti->owndata = 1; +} + +/* + Search for a swig_type_info structure only by mangled name + Search is a O(log #types) + + We start searching at module start, and finish searching when start == end. + Note: if start == end at the beginning of the function, we go all the way around + the circular list. +*/ +SWIGRUNTIME swig_type_info * +SWIG_MangledTypeQueryModule(swig_module_info *start, + swig_module_info *end, + const char *name) { + swig_module_info *iter = start; + do { + if (iter->size) { + size_t l = 0; + size_t r = iter->size - 1; + do { + /* since l+r >= 0, we can (>> 1) instead (/ 2) */ + size_t i = (l + r) >> 1; + const char *iname = iter->types[i]->name; + if (iname) { + int compare = strcmp(name, iname); + if (compare == 0) { + return iter->types[i]; + } else if (compare < 0) { + if (i) { + r = i - 1; + } else { + break; + } + } else if (compare > 0) { + l = i + 1; + } + } else { + break; /* should never happen */ + } + } while (l <= r); + } + iter = iter->next; + } while (iter != end); + return 0; +} + +/* + Search for a swig_type_info structure for either a mangled name or a human readable name. + It first searches the mangled names of the types, which is a O(log #types) + If a type is not found it then searches the human readable names, which is O(#types). + + We start searching at module start, and finish searching when start == end. + Note: if start == end at the beginning of the function, we go all the way around + the circular list. +*/ +SWIGRUNTIME swig_type_info * +SWIG_TypeQueryModule(swig_module_info *start, + swig_module_info *end, + const char *name) { + /* STEP 1: Search the name field using binary search */ + swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name); + if (ret) { + return ret; + } else { + /* STEP 2: If the type hasn't been found, do a complete search + of the str field (the human readable name) */ + swig_module_info *iter = start; + do { + size_t i = 0; + for (; i < iter->size; ++i) { + if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name))) + return iter->types[i]; + } + iter = iter->next; + } while (iter != end); + } + + /* neither found a match */ + return 0; +} + +/* + Pack binary data into a string +*/ +SWIGRUNTIME char * +SWIG_PackData(char *c, void *ptr, size_t sz) { + static const char hex[17] = "0123456789abcdef"; + const unsigned char *u = (unsigned char *) ptr; + const unsigned char *eu = u + sz; + for (; u != eu; ++u) { + unsigned char uu = *u; + *(c++) = hex[(uu & 0xf0) >> 4]; + *(c++) = hex[uu & 0xf]; + } + return c; +} + +/* + Unpack binary data from a string +*/ +SWIGRUNTIME const char * +SWIG_UnpackData(const char *c, void *ptr, size_t sz) { + unsigned char *u = (unsigned char *) ptr; + const unsigned char *eu = u + sz; + for (; u != eu; ++u) { + char d = *(c++); + unsigned char uu; + if ((d >= '0') && (d <= '9')) + uu = (unsigned char)((d - '0') << 4); + else if ((d >= 'a') && (d <= 'f')) + uu = (unsigned char)((d - ('a'-10)) << 4); + else + return (char *) 0; + d = *(c++); + if ((d >= '0') && (d <= '9')) + uu |= (unsigned char)(d - '0'); + else if ((d >= 'a') && (d <= 'f')) + uu |= (unsigned char)(d - ('a'-10)); + else + return (char *) 0; + *u = uu; + } + return c; +} + +/* + Pack 'void *' into a string buffer. +*/ +SWIGRUNTIME char * +SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) { + char *r = buff; + if ((2*sizeof(void *) + 2) > bsz) return 0; + *(r++) = '_'; + r = SWIG_PackData(r,&ptr,sizeof(void *)); + if (strlen(name) + 1 > (bsz - (r - buff))) return 0; + strcpy(r,name); + return buff; +} + +SWIGRUNTIME const char * +SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) { + if (*c != '_') { + if (strcmp(c,"NULL") == 0) { + *ptr = (void *) 0; + return name; + } else { + return 0; + } + } + return SWIG_UnpackData(++c,ptr,sizeof(void *)); +} + +SWIGRUNTIME char * +SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) { + char *r = buff; + size_t lname = (name ? strlen(name) : 0); + if ((2*sz + 2 + lname) > bsz) return 0; + *(r++) = '_'; + r = SWIG_PackData(r,ptr,sz); + if (lname) { + strncpy(r,name,lname+1); + } else { + *r = 0; + } + return buff; +} + +SWIGRUNTIME const char * +SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { + if (*c != '_') { + if (strcmp(c,"NULL") == 0) { + memset(ptr,0,sz); + return name; + } else { + return 0; + } + } + return SWIG_UnpackData(++c,ptr,sz); +} + +#ifdef __cplusplus +} +#endif + +/* Errors in SWIG */ +#define SWIG_UnknownError -1 +#define SWIG_IOError -2 +#define SWIG_RuntimeError -3 +#define SWIG_IndexError -4 +#define SWIG_TypeError -5 +#define SWIG_DivisionByZero -6 +#define SWIG_OverflowError -7 +#define SWIG_SyntaxError -8 +#define SWIG_ValueError -9 +#define SWIG_SystemError -10 +#define SWIG_AttributeError -11 +#define SWIG_MemoryError -12 +#define SWIG_NullReferenceError -13 + + + +/* Compatibility macros for Python 3 */ +#if PY_VERSION_HEX >= 0x03000000 + +#define PyClass_Check(obj) PyObject_IsInstance(obj, (PyObject *)&PyType_Type) +#define PyInt_Check(x) PyLong_Check(x) +#define PyInt_AsLong(x) PyLong_AsLong(x) +#define PyInt_FromLong(x) PyLong_FromLong(x) +#define PyInt_FromSize_t(x) PyLong_FromSize_t(x) +#define PyString_Check(name) PyBytes_Check(name) +#define PyString_FromString(x) PyUnicode_FromString(x) +#define PyString_Format(fmt, args) PyUnicode_Format(fmt, args) +#define PyString_AsString(str) PyBytes_AsString(str) +#define PyString_Size(str) PyBytes_Size(str) +#define PyString_InternFromString(key) PyUnicode_InternFromString(key) +#define Py_TPFLAGS_HAVE_CLASS Py_TPFLAGS_BASETYPE +#define PyString_AS_STRING(x) PyUnicode_AS_STRING(x) +#define _PyLong_FromSsize_t(x) PyLong_FromSsize_t(x) + +#endif + +#ifndef Py_TYPE +# define Py_TYPE(op) ((op)->ob_type) +#endif + +/* SWIG APIs for compatibility of both Python 2 & 3 */ + +#if PY_VERSION_HEX >= 0x03000000 +# define SWIG_Python_str_FromFormat PyUnicode_FromFormat +#else +# define SWIG_Python_str_FromFormat PyString_FromFormat +#endif + + +/* Warning: This function will allocate a new string in Python 3, + * so please call SWIG_Python_str_DelForPy3(x) to free the space. + */ +SWIGINTERN char* +SWIG_Python_str_AsChar(PyObject *str) +{ +#if PY_VERSION_HEX >= 0x03000000 + char *cstr; + char *newstr; + Py_ssize_t len; + str = PyUnicode_AsUTF8String(str); + PyBytes_AsStringAndSize(str, &cstr, &len); + newstr = (char *) malloc(len+1); + memcpy(newstr, cstr, len+1); + Py_XDECREF(str); + return newstr; +#else + return PyString_AsString(str); +#endif +} + +#if PY_VERSION_HEX >= 0x03000000 +# define SWIG_Python_str_DelForPy3(x) free( (void*) (x) ) +#else +# define SWIG_Python_str_DelForPy3(x) +#endif + + +SWIGINTERN PyObject* +SWIG_Python_str_FromChar(const char *c) +{ +#if PY_VERSION_HEX >= 0x03000000 + return PyUnicode_FromString(c); +#else + return PyString_FromString(c); +#endif +} + +/* Add PyOS_snprintf for old Pythons */ +#if PY_VERSION_HEX < 0x02020000 +# if defined(_MSC_VER) || defined(__BORLANDC__) || defined(_WATCOM) +# define PyOS_snprintf _snprintf +# else +# define PyOS_snprintf snprintf +# endif +#endif + +/* A crude PyString_FromFormat implementation for old Pythons */ +#if PY_VERSION_HEX < 0x02020000 + +#ifndef SWIG_PYBUFFER_SIZE +# define SWIG_PYBUFFER_SIZE 1024 +#endif + +static PyObject * +PyString_FromFormat(const char *fmt, ...) { + va_list ap; + char buf[SWIG_PYBUFFER_SIZE * 2]; + int res; + va_start(ap, fmt); + res = vsnprintf(buf, sizeof(buf), fmt, ap); + va_end(ap); + return (res < 0 || res >= (int)sizeof(buf)) ? 0 : PyString_FromString(buf); +} +#endif + +#ifndef PyObject_DEL +# define PyObject_DEL PyObject_Del +#endif + +/* A crude PyExc_StopIteration exception for old Pythons */ +#if PY_VERSION_HEX < 0x02020000 +# ifndef PyExc_StopIteration +# define PyExc_StopIteration PyExc_RuntimeError +# endif +# ifndef PyObject_GenericGetAttr +# define PyObject_GenericGetAttr 0 +# endif +#endif + +/* Py_NotImplemented is defined in 2.1 and up. */ +#if PY_VERSION_HEX < 0x02010000 +# ifndef Py_NotImplemented +# define Py_NotImplemented PyExc_RuntimeError +# endif +#endif + +/* A crude PyString_AsStringAndSize implementation for old Pythons */ +#if PY_VERSION_HEX < 0x02010000 +# ifndef PyString_AsStringAndSize +# define PyString_AsStringAndSize(obj, s, len) {*s = PyString_AsString(obj); *len = *s ? strlen(*s) : 0;} +# endif +#endif + +/* PySequence_Size for old Pythons */ +#if PY_VERSION_HEX < 0x02000000 +# ifndef PySequence_Size +# define PySequence_Size PySequence_Length +# endif +#endif + +/* PyBool_FromLong for old Pythons */ +#if PY_VERSION_HEX < 0x02030000 +static +PyObject *PyBool_FromLong(long ok) +{ + PyObject *result = ok ? Py_True : Py_False; + Py_INCREF(result); + return result; +} +#endif + +/* Py_ssize_t for old Pythons */ +/* This code is as recommended by: */ +/* http://www.python.org/dev/peps/pep-0353/#conversion-guidelines */ +#if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN) +typedef int Py_ssize_t; +# define PY_SSIZE_T_MAX INT_MAX +# define PY_SSIZE_T_MIN INT_MIN +typedef inquiry lenfunc; +typedef intargfunc ssizeargfunc; +typedef intintargfunc ssizessizeargfunc; +typedef intobjargproc ssizeobjargproc; +typedef intintobjargproc ssizessizeobjargproc; +typedef getreadbufferproc readbufferproc; +typedef getwritebufferproc writebufferproc; +typedef getsegcountproc segcountproc; +typedef getcharbufferproc charbufferproc; +static long PyNumber_AsSsize_t (PyObject *x, void *SWIGUNUSEDPARM(exc)) +{ + long result = 0; + PyObject *i = PyNumber_Int(x); + if (i) { + result = PyInt_AsLong(i); + Py_DECREF(i); + } + return result; +} +#endif + +#if PY_VERSION_HEX < 0x02050000 +#define PyInt_FromSize_t(x) PyInt_FromLong((long)x) +#endif + +#if PY_VERSION_HEX < 0x02040000 +#define Py_VISIT(op) \ + do { \ + if (op) { \ + int vret = visit((op), arg); \ + if (vret) \ + return vret; \ + } \ + } while (0) +#endif + +#if PY_VERSION_HEX < 0x02030000 +typedef struct { + PyTypeObject type; + PyNumberMethods as_number; + PyMappingMethods as_mapping; + PySequenceMethods as_sequence; + PyBufferProcs as_buffer; + PyObject *name, *slots; +} PyHeapTypeObject; +#endif + +#if PY_VERSION_HEX < 0x02030000 +typedef destructor freefunc; +#endif + +#if ((PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION > 6) || \ + (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION > 0) || \ + (PY_MAJOR_VERSION > 3)) +# define SWIGPY_USE_CAPSULE +# define SWIGPY_CAPSULE_NAME ((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer_capsule" SWIG_TYPE_TABLE_NAME) +#endif + +#if PY_VERSION_HEX < 0x03020000 +#define PyDescr_TYPE(x) (((PyDescrObject *)(x))->d_type) +#define PyDescr_NAME(x) (((PyDescrObject *)(x))->d_name) +#define Py_hash_t long +#endif + +/* ----------------------------------------------------------------------------- + * error manipulation + * ----------------------------------------------------------------------------- */ + +SWIGRUNTIME PyObject* +SWIG_Python_ErrorType(int code) { + PyObject* type = 0; + switch(code) { + case SWIG_MemoryError: + type = PyExc_MemoryError; + break; + case SWIG_IOError: + type = PyExc_IOError; + break; + case SWIG_RuntimeError: + type = PyExc_RuntimeError; + break; + case SWIG_IndexError: + type = PyExc_IndexError; + break; + case SWIG_TypeError: + type = PyExc_TypeError; + break; + case SWIG_DivisionByZero: + type = PyExc_ZeroDivisionError; + break; + case SWIG_OverflowError: + type = PyExc_OverflowError; + break; + case SWIG_SyntaxError: + type = PyExc_SyntaxError; + break; + case SWIG_ValueError: + type = PyExc_ValueError; + break; + case SWIG_SystemError: + type = PyExc_SystemError; + break; + case SWIG_AttributeError: + type = PyExc_AttributeError; + break; + default: + type = PyExc_RuntimeError; + } + return type; +} + + +SWIGRUNTIME void +SWIG_Python_AddErrorMsg(const char* mesg) +{ + PyObject *type = 0; + PyObject *value = 0; + PyObject *traceback = 0; + + if (PyErr_Occurred()) PyErr_Fetch(&type, &value, &traceback); + if (value) { + char *tmp; + PyObject *old_str = PyObject_Str(value); + PyErr_Clear(); + Py_XINCREF(type); + + PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg); + SWIG_Python_str_DelForPy3(tmp); + Py_DECREF(old_str); + Py_DECREF(value); + } else { + PyErr_SetString(PyExc_RuntimeError, mesg); + } +} + +#if defined(SWIG_PYTHON_NO_THREADS) +# if defined(SWIG_PYTHON_THREADS) +# undef SWIG_PYTHON_THREADS +# endif +#endif +#if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */ +# if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL) +# if (PY_VERSION_HEX >= 0x02030000) /* For 2.3 or later, use the PyGILState calls */ +# define SWIG_PYTHON_USE_GIL +# endif +# endif +# if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */ +# ifndef SWIG_PYTHON_INITIALIZE_THREADS +# define SWIG_PYTHON_INITIALIZE_THREADS PyEval_InitThreads() +# endif +# ifdef __cplusplus /* C++ code */ + class SWIG_Python_Thread_Block { + bool status; + PyGILState_STATE state; + public: + void end() { if (status) { PyGILState_Release(state); status = false;} } + SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {} + ~SWIG_Python_Thread_Block() { end(); } + }; + class SWIG_Python_Thread_Allow { + bool status; + PyThreadState *save; + public: + void end() { if (status) { PyEval_RestoreThread(save); status = false; }} + SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {} + ~SWIG_Python_Thread_Allow() { end(); } + }; +# define SWIG_PYTHON_THREAD_BEGIN_BLOCK SWIG_Python_Thread_Block _swig_thread_block +# define SWIG_PYTHON_THREAD_END_BLOCK _swig_thread_block.end() +# define SWIG_PYTHON_THREAD_BEGIN_ALLOW SWIG_Python_Thread_Allow _swig_thread_allow +# define SWIG_PYTHON_THREAD_END_ALLOW _swig_thread_allow.end() +# else /* C code */ +# define SWIG_PYTHON_THREAD_BEGIN_BLOCK PyGILState_STATE _swig_thread_block = PyGILState_Ensure() +# define SWIG_PYTHON_THREAD_END_BLOCK PyGILState_Release(_swig_thread_block) +# define SWIG_PYTHON_THREAD_BEGIN_ALLOW PyThreadState *_swig_thread_allow = PyEval_SaveThread() +# define SWIG_PYTHON_THREAD_END_ALLOW PyEval_RestoreThread(_swig_thread_allow) +# endif +# else /* Old thread way, not implemented, user must provide it */ +# if !defined(SWIG_PYTHON_INITIALIZE_THREADS) +# define SWIG_PYTHON_INITIALIZE_THREADS +# endif +# if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK) +# define SWIG_PYTHON_THREAD_BEGIN_BLOCK +# endif +# if !defined(SWIG_PYTHON_THREAD_END_BLOCK) +# define SWIG_PYTHON_THREAD_END_BLOCK +# endif +# if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW) +# define SWIG_PYTHON_THREAD_BEGIN_ALLOW +# endif +# if !defined(SWIG_PYTHON_THREAD_END_ALLOW) +# define SWIG_PYTHON_THREAD_END_ALLOW +# endif +# endif +#else /* No thread support */ +# define SWIG_PYTHON_INITIALIZE_THREADS +# define SWIG_PYTHON_THREAD_BEGIN_BLOCK +# define SWIG_PYTHON_THREAD_END_BLOCK +# define SWIG_PYTHON_THREAD_BEGIN_ALLOW +# define SWIG_PYTHON_THREAD_END_ALLOW +#endif + +/* ----------------------------------------------------------------------------- + * Python API portion that goes into the runtime + * ----------------------------------------------------------------------------- */ + +#ifdef __cplusplus +extern "C" { +#endif + +/* ----------------------------------------------------------------------------- + * Constant declarations + * ----------------------------------------------------------------------------- */ + +/* Constant Types */ +#define SWIG_PY_POINTER 4 +#define SWIG_PY_BINARY 5 + +/* Constant information structure */ +typedef struct swig_const_info { + int type; + char *name; + long lvalue; + double dvalue; + void *pvalue; + swig_type_info **ptype; +} swig_const_info; + + +/* ----------------------------------------------------------------------------- + * Wrapper of PyInstanceMethod_New() used in Python 3 + * It is exported to the generated module, used for -fastproxy + * ----------------------------------------------------------------------------- */ +#if PY_VERSION_HEX >= 0x03000000 +SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func) +{ + return PyInstanceMethod_New(func); +} +#else +SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *SWIGUNUSEDPARM(func)) +{ + return NULL; +} +#endif + +#ifdef __cplusplus +} +#endif + + +/* ----------------------------------------------------------------------------- + * pyrun.swg + * + * This file contains the runtime support for Python modules + * and includes code for managing global variables and pointer + * type checking. + * + * ----------------------------------------------------------------------------- */ + +/* Common SWIG API */ + +/* for raw pointers */ +#define SWIG_Python_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0) +#define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtr(obj, pptr, type, flags) +#define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own) + +#ifdef SWIGPYTHON_BUILTIN +#define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(self, ptr, type, flags) +#else +#define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags) +#endif + +#define SWIG_InternalNewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags) + +#define SWIG_CheckImplicit(ty) SWIG_Python_CheckImplicit(ty) +#define SWIG_AcquirePtr(ptr, src) SWIG_Python_AcquirePtr(ptr, src) +#define swig_owntype int + +/* for raw packed data */ +#define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty) +#define SWIG_NewPackedObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type) + +/* for class or struct pointers */ +#define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags) +#define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags) + +/* for C or C++ function pointers */ +#define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_Python_ConvertFunctionPtr(obj, pptr, type) +#define SWIG_NewFunctionPtrObj(ptr, type) SWIG_Python_NewPointerObj(NULL, ptr, type, 0) + +/* for C++ member pointers, ie, member methods */ +#define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty) +#define SWIG_NewMemberObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type) + + +/* Runtime API */ + +#define SWIG_GetModule(clientdata) SWIG_Python_GetModule(clientdata) +#define SWIG_SetModule(clientdata, pointer) SWIG_Python_SetModule(pointer) +#define SWIG_NewClientData(obj) SwigPyClientData_New(obj) + +#define SWIG_SetErrorObj SWIG_Python_SetErrorObj +#define SWIG_SetErrorMsg SWIG_Python_SetErrorMsg +#define SWIG_ErrorType(code) SWIG_Python_ErrorType(code) +#define SWIG_Error(code, msg) SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg) +#define SWIG_fail goto fail + + +/* Runtime API implementation */ + +/* Error manipulation */ + +SWIGINTERN void +SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) { + SWIG_PYTHON_THREAD_BEGIN_BLOCK; + PyErr_SetObject(errtype, obj); + Py_DECREF(obj); + SWIG_PYTHON_THREAD_END_BLOCK; +} + +SWIGINTERN void +SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) { + SWIG_PYTHON_THREAD_BEGIN_BLOCK; + PyErr_SetString(errtype, msg); + SWIG_PYTHON_THREAD_END_BLOCK; +} + +#define SWIG_Python_Raise(obj, type, desc) SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj) + +/* Set a constant value */ + +#if defined(SWIGPYTHON_BUILTIN) + +SWIGINTERN void +SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) { + PyObject *s = PyString_InternFromString(key); + PyList_Append(seq, s); + Py_DECREF(s); +} + +SWIGINTERN void +SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) { +#if PY_VERSION_HEX < 0x02030000 + PyDict_SetItemString(d, (char *)name, obj); +#else + PyDict_SetItemString(d, name, obj); +#endif + Py_DECREF(obj); + if (public_interface) + SwigPyBuiltin_AddPublicSymbol(public_interface, name); +} + +#else + +SWIGINTERN void +SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { +#if PY_VERSION_HEX < 0x02030000 + PyDict_SetItemString(d, (char *)name, obj); +#else + PyDict_SetItemString(d, name, obj); +#endif + Py_DECREF(obj); +} + +#endif + +/* Append a value to the result obj */ + +SWIGINTERN PyObject* +SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { +#if !defined(SWIG_PYTHON_OUTPUT_TUPLE) + if (!result) { + result = obj; + } else if (result == Py_None) { + Py_DECREF(result); + result = obj; + } else { + if (!PyList_Check(result)) { + PyObject *o2 = result; + result = PyList_New(1); + PyList_SetItem(result, 0, o2); + } + PyList_Append(result,obj); + Py_DECREF(obj); + } + return result; +#else + PyObject* o2; + PyObject* o3; + if (!result) { + result = obj; + } else if (result == Py_None) { + Py_DECREF(result); + result = obj; + } else { + if (!PyTuple_Check(result)) { + o2 = result; + result = PyTuple_New(1); + PyTuple_SET_ITEM(result, 0, o2); + } + o3 = PyTuple_New(1); + PyTuple_SET_ITEM(o3, 0, obj); + o2 = result; + result = PySequence_Concat(o2, o3); + Py_DECREF(o2); + Py_DECREF(o3); + } + return result; +#endif +} + +/* Unpack the argument tuple */ + +SWIGINTERN Py_ssize_t +SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs) +{ + if (!args) { + if (!min && !max) { + return 1; + } else { + PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none", + name, (min == max ? "" : "at least "), (int)min); + return 0; + } + } + if (!PyTuple_Check(args)) { + if (min <= 1 && max >= 1) { + Py_ssize_t i; + objs[0] = args; + for (i = 1; i < max; ++i) { + objs[i] = 0; + } + return 2; + } + PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple"); + return 0; + } else { + Py_ssize_t l = PyTuple_GET_SIZE(args); + if (l < min) { + PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", + name, (min == max ? "" : "at least "), (int)min, (int)l); + return 0; + } else if (l > max) { + PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", + name, (min == max ? "" : "at most "), (int)max, (int)l); + return 0; + } else { + Py_ssize_t i; + for (i = 0; i < l; ++i) { + objs[i] = PyTuple_GET_ITEM(args, i); + } + for (; l < max; ++l) { + objs[l] = 0; + } + return i + 1; + } + } +} + +/* A functor is a function object with one single object argument */ +#if PY_VERSION_HEX >= 0x02020000 +#define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunctionObjArgs(functor, obj, NULL); +#else +#define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunction(functor, "O", obj); +#endif + +/* + Helper for static pointer initialization for both C and C++ code, for example + static PyObject *SWIG_STATIC_POINTER(MyVar) = NewSomething(...); +*/ +#ifdef __cplusplus +#define SWIG_STATIC_POINTER(var) var +#else +#define SWIG_STATIC_POINTER(var) var = 0; if (!var) var +#endif + +/* ----------------------------------------------------------------------------- + * Pointer declarations + * ----------------------------------------------------------------------------- */ + +/* Flags for new pointer objects */ +#define SWIG_POINTER_NOSHADOW (SWIG_POINTER_OWN << 1) +#define SWIG_POINTER_NEW (SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN) + +#define SWIG_POINTER_IMPLICIT_CONV (SWIG_POINTER_DISOWN << 1) + +#define SWIG_BUILTIN_TP_INIT (SWIG_POINTER_OWN << 2) +#define SWIG_BUILTIN_INIT (SWIG_BUILTIN_TP_INIT | SWIG_POINTER_OWN) + +#ifdef __cplusplus +extern "C" { +#endif + +/* How to access Py_None */ +#if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) +# ifndef SWIG_PYTHON_NO_BUILD_NONE +# ifndef SWIG_PYTHON_BUILD_NONE +# define SWIG_PYTHON_BUILD_NONE +# endif +# endif +#endif + +#ifdef SWIG_PYTHON_BUILD_NONE +# ifdef Py_None +# undef Py_None +# define Py_None SWIG_Py_None() +# endif +SWIGRUNTIMEINLINE PyObject * +_SWIG_Py_None(void) +{ + PyObject *none = Py_BuildValue((char*)""); + Py_DECREF(none); + return none; +} +SWIGRUNTIME PyObject * +SWIG_Py_None(void) +{ + static PyObject *SWIG_STATIC_POINTER(none) = _SWIG_Py_None(); + return none; +} +#endif + +/* The python void return value */ + +SWIGRUNTIMEINLINE PyObject * +SWIG_Py_Void(void) +{ + PyObject *none = Py_None; + Py_INCREF(none); + return none; +} + +/* SwigPyClientData */ + +typedef struct { + PyObject *klass; + PyObject *newraw; + PyObject *newargs; + PyObject *destroy; + int delargs; + int implicitconv; + PyTypeObject *pytype; +} SwigPyClientData; + +SWIGRUNTIMEINLINE int +SWIG_Python_CheckImplicit(swig_type_info *ty) +{ + SwigPyClientData *data = (SwigPyClientData *)ty->clientdata; + return data ? data->implicitconv : 0; +} + +SWIGRUNTIMEINLINE PyObject * +SWIG_Python_ExceptionType(swig_type_info *desc) { + SwigPyClientData *data = desc ? (SwigPyClientData *) desc->clientdata : 0; + PyObject *klass = data ? data->klass : 0; + return (klass ? klass : PyExc_RuntimeError); +} + + +SWIGRUNTIME SwigPyClientData * +SwigPyClientData_New(PyObject* obj) +{ + if (!obj) { + return 0; + } else { + SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData)); + /* the klass element */ + data->klass = obj; + Py_INCREF(data->klass); + /* the newraw method and newargs arguments used to create a new raw instance */ + if (PyClass_Check(obj)) { + data->newraw = 0; + data->newargs = obj; + Py_INCREF(obj); + } else { +#if (PY_VERSION_HEX < 0x02020000) + data->newraw = 0; +#else + data->newraw = PyObject_GetAttrString(data->klass, (char *)"__new__"); +#endif + if (data->newraw) { + Py_INCREF(data->newraw); + data->newargs = PyTuple_New(1); + PyTuple_SetItem(data->newargs, 0, obj); + } else { + data->newargs = obj; + } + Py_INCREF(data->newargs); + } + /* the destroy method, aka as the C++ delete method */ + data->destroy = PyObject_GetAttrString(data->klass, (char *)"__swig_destroy__"); + if (PyErr_Occurred()) { + PyErr_Clear(); + data->destroy = 0; + } + if (data->destroy) { + int flags; + Py_INCREF(data->destroy); + flags = PyCFunction_GET_FLAGS(data->destroy); +#ifdef METH_O + data->delargs = !(flags & (METH_O)); +#else + data->delargs = 0; +#endif + } else { + data->delargs = 0; + } + data->implicitconv = 0; + data->pytype = 0; + return data; + } +} + +SWIGRUNTIME void +SwigPyClientData_Del(SwigPyClientData *data) { + Py_XDECREF(data->newraw); + Py_XDECREF(data->newargs); + Py_XDECREF(data->destroy); +} + +/* =============== SwigPyObject =====================*/ + +typedef struct { + PyObject_HEAD + void *ptr; + swig_type_info *ty; + int own; + PyObject *next; +#ifdef SWIGPYTHON_BUILTIN + PyObject *dict; +#endif +} SwigPyObject; + + +#ifdef SWIGPYTHON_BUILTIN + +SWIGRUNTIME PyObject * +SwigPyObject_get___dict__(PyObject *v, PyObject *SWIGUNUSEDPARM(args)) +{ + SwigPyObject *sobj = (SwigPyObject *)v; + + if (!sobj->dict) + sobj->dict = PyDict_New(); + + Py_INCREF(sobj->dict); + return sobj->dict; +} + +#endif + +SWIGRUNTIME PyObject * +SwigPyObject_long(SwigPyObject *v) +{ + return PyLong_FromVoidPtr(v->ptr); +} + +SWIGRUNTIME PyObject * +SwigPyObject_format(const char* fmt, SwigPyObject *v) +{ + PyObject *res = NULL; + PyObject *args = PyTuple_New(1); + if (args) { + if (PyTuple_SetItem(args, 0, SwigPyObject_long(v)) == 0) { + PyObject *ofmt = SWIG_Python_str_FromChar(fmt); + if (ofmt) { +#if PY_VERSION_HEX >= 0x03000000 + res = PyUnicode_Format(ofmt,args); +#else + res = PyString_Format(ofmt,args); +#endif + Py_DECREF(ofmt); + } + Py_DECREF(args); + } + } + return res; +} + +SWIGRUNTIME PyObject * +SwigPyObject_oct(SwigPyObject *v) +{ + return SwigPyObject_format("%o",v); +} + +SWIGRUNTIME PyObject * +SwigPyObject_hex(SwigPyObject *v) +{ + return SwigPyObject_format("%x",v); +} + +SWIGRUNTIME PyObject * +#ifdef METH_NOARGS +SwigPyObject_repr(SwigPyObject *v) +#else +SwigPyObject_repr(SwigPyObject *v, PyObject *args) +#endif +{ + const char *name = SWIG_TypePrettyName(v->ty); + PyObject *repr = SWIG_Python_str_FromFormat("", (name ? name : "unknown"), (void *)v); + if (v->next) { +# ifdef METH_NOARGS + PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next); +# else + PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next, args); +# endif +# if PY_VERSION_HEX >= 0x03000000 + PyObject *joined = PyUnicode_Concat(repr, nrep); + Py_DecRef(repr); + Py_DecRef(nrep); + repr = joined; +# else + PyString_ConcatAndDel(&repr,nrep); +# endif + } + return repr; +} + +SWIGRUNTIME int +SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w) +{ + void *i = v->ptr; + void *j = w->ptr; + return (i < j) ? -1 : ((i > j) ? 1 : 0); +} + +/* Added for Python 3.x, would it also be useful for Python 2.x? */ +SWIGRUNTIME PyObject* +SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op) +{ + PyObject* res; + if( op != Py_EQ && op != Py_NE ) { + Py_INCREF(Py_NotImplemented); + return Py_NotImplemented; + } + res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0); + return res; +} + + +SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void); + +#ifdef SWIGPYTHON_BUILTIN +static swig_type_info *SwigPyObject_stype = 0; +SWIGRUNTIME PyTypeObject* +SwigPyObject_type(void) { + SwigPyClientData *cd; + assert(SwigPyObject_stype); + cd = (SwigPyClientData*) SwigPyObject_stype->clientdata; + assert(cd); + assert(cd->pytype); + return cd->pytype; +} +#else +SWIGRUNTIME PyTypeObject* +SwigPyObject_type(void) { + static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyObject_TypeOnce(); + return type; +} +#endif + +SWIGRUNTIMEINLINE int +SwigPyObject_Check(PyObject *op) { +#ifdef SWIGPYTHON_BUILTIN + PyTypeObject *target_tp = SwigPyObject_type(); + if (PyType_IsSubtype(op->ob_type, target_tp)) + return 1; + return (strcmp(op->ob_type->tp_name, "SwigPyObject") == 0); +#else + return (Py_TYPE(op) == SwigPyObject_type()) + || (strcmp(Py_TYPE(op)->tp_name,"SwigPyObject") == 0); +#endif +} + +SWIGRUNTIME PyObject * +SwigPyObject_New(void *ptr, swig_type_info *ty, int own); + +SWIGRUNTIME void +SwigPyObject_dealloc(PyObject *v) +{ + SwigPyObject *sobj = (SwigPyObject *) v; + PyObject *next = sobj->next; + if (sobj->own == SWIG_POINTER_OWN) { + swig_type_info *ty = sobj->ty; + SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0; + PyObject *destroy = data ? data->destroy : 0; + if (destroy) { + /* destroy is always a VARARGS method */ + PyObject *res; + + /* PyObject_CallFunction() has the potential to silently drop + the active active exception. In cases of unnamed temporary + variable or where we just finished iterating over a generator + StopIteration will be active right now, and this needs to + remain true upon return from SwigPyObject_dealloc. So save + and restore. */ + + PyObject *val = NULL, *type = NULL, *tb = NULL; + PyErr_Fetch(&val, &type, &tb); + + if (data->delargs) { + /* we need to create a temporary object to carry the destroy operation */ + PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0); + res = SWIG_Python_CallFunctor(destroy, tmp); + Py_DECREF(tmp); + } else { + PyCFunction meth = PyCFunction_GET_FUNCTION(destroy); + PyObject *mself = PyCFunction_GET_SELF(destroy); + res = ((*meth)(mself, v)); + } + if (!res) + PyErr_WriteUnraisable(destroy); + + PyErr_Restore(val, type, tb); + + Py_XDECREF(res); + } +#if !defined(SWIG_PYTHON_SILENT_MEMLEAK) + else { + const char *name = SWIG_TypePrettyName(ty); + printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown")); + } +#endif + } + Py_XDECREF(next); + PyObject_DEL(v); +} + +SWIGRUNTIME PyObject* +SwigPyObject_append(PyObject* v, PyObject* next) +{ + SwigPyObject *sobj = (SwigPyObject *) v; +#ifndef METH_O + PyObject *tmp = 0; + if (!PyArg_ParseTuple(next,(char *)"O:append", &tmp)) return NULL; + next = tmp; +#endif + if (!SwigPyObject_Check(next)) { + PyErr_SetString(PyExc_TypeError, "Attempt to append a non SwigPyObject"); + return NULL; + } + sobj->next = next; + Py_INCREF(next); + return SWIG_Py_Void(); +} + +SWIGRUNTIME PyObject* +#ifdef METH_NOARGS +SwigPyObject_next(PyObject* v) +#else +SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) +#endif +{ + SwigPyObject *sobj = (SwigPyObject *) v; + if (sobj->next) { + Py_INCREF(sobj->next); + return sobj->next; + } else { + return SWIG_Py_Void(); + } +} + +SWIGINTERN PyObject* +#ifdef METH_NOARGS +SwigPyObject_disown(PyObject *v) +#else +SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) +#endif +{ + SwigPyObject *sobj = (SwigPyObject *)v; + sobj->own = 0; + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject* +#ifdef METH_NOARGS +SwigPyObject_acquire(PyObject *v) +#else +SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) +#endif +{ + SwigPyObject *sobj = (SwigPyObject *)v; + sobj->own = SWIG_POINTER_OWN; + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject* +SwigPyObject_own(PyObject *v, PyObject *args) +{ + PyObject *val = 0; +#if (PY_VERSION_HEX < 0x02020000) + if (!PyArg_ParseTuple(args,(char *)"|O:own",&val)) +#elif (PY_VERSION_HEX < 0x02050000) + if (!PyArg_UnpackTuple(args, (char *)"own", 0, 1, &val)) +#else + if (!PyArg_UnpackTuple(args, "own", 0, 1, &val)) +#endif + { + return NULL; + } + else + { + SwigPyObject *sobj = (SwigPyObject *)v; + PyObject *obj = PyBool_FromLong(sobj->own); + if (val) { +#ifdef METH_NOARGS + if (PyObject_IsTrue(val)) { + SwigPyObject_acquire(v); + } else { + SwigPyObject_disown(v); + } +#else + if (PyObject_IsTrue(val)) { + SwigPyObject_acquire(v,args); + } else { + SwigPyObject_disown(v,args); + } +#endif + } + return obj; + } +} + +#ifdef METH_O +static PyMethodDef +swigobject_methods[] = { + {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_NOARGS, (char *)"releases ownership of the pointer"}, + {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_NOARGS, (char *)"acquires ownership of the pointer"}, + {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"}, + {(char *)"append", (PyCFunction)SwigPyObject_append, METH_O, (char *)"appends another 'this' object"}, + {(char *)"next", (PyCFunction)SwigPyObject_next, METH_NOARGS, (char *)"returns the next 'this' object"}, + {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_NOARGS, (char *)"returns object representation"}, + {0, 0, 0, 0} +}; +#else +static PyMethodDef +swigobject_methods[] = { + {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_VARARGS, (char *)"releases ownership of the pointer"}, + {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_VARARGS, (char *)"acquires ownership of the pointer"}, + {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"}, + {(char *)"append", (PyCFunction)SwigPyObject_append, METH_VARARGS, (char *)"appends another 'this' object"}, + {(char *)"next", (PyCFunction)SwigPyObject_next, METH_VARARGS, (char *)"returns the next 'this' object"}, + {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_VARARGS, (char *)"returns object representation"}, + {0, 0, 0, 0} +}; +#endif + +#if PY_VERSION_HEX < 0x02020000 +SWIGINTERN PyObject * +SwigPyObject_getattr(SwigPyObject *sobj,char *name) +{ + return Py_FindMethod(swigobject_methods, (PyObject *)sobj, name); +} +#endif + +SWIGRUNTIME PyTypeObject* +SwigPyObject_TypeOnce(void) { + static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer"; + + static PyNumberMethods SwigPyObject_as_number = { + (binaryfunc)0, /*nb_add*/ + (binaryfunc)0, /*nb_subtract*/ + (binaryfunc)0, /*nb_multiply*/ + /* nb_divide removed in Python 3 */ +#if PY_VERSION_HEX < 0x03000000 + (binaryfunc)0, /*nb_divide*/ +#endif + (binaryfunc)0, /*nb_remainder*/ + (binaryfunc)0, /*nb_divmod*/ + (ternaryfunc)0,/*nb_power*/ + (unaryfunc)0, /*nb_negative*/ + (unaryfunc)0, /*nb_positive*/ + (unaryfunc)0, /*nb_absolute*/ + (inquiry)0, /*nb_nonzero*/ + 0, /*nb_invert*/ + 0, /*nb_lshift*/ + 0, /*nb_rshift*/ + 0, /*nb_and*/ + 0, /*nb_xor*/ + 0, /*nb_or*/ +#if PY_VERSION_HEX < 0x03000000 + 0, /*nb_coerce*/ +#endif + (unaryfunc)SwigPyObject_long, /*nb_int*/ +#if PY_VERSION_HEX < 0x03000000 + (unaryfunc)SwigPyObject_long, /*nb_long*/ +#else + 0, /*nb_reserved*/ +#endif + (unaryfunc)0, /*nb_float*/ +#if PY_VERSION_HEX < 0x03000000 + (unaryfunc)SwigPyObject_oct, /*nb_oct*/ + (unaryfunc)SwigPyObject_hex, /*nb_hex*/ +#endif +#if PY_VERSION_HEX >= 0x03050000 /* 3.5 */ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_matrix_multiply */ +#elif PY_VERSION_HEX >= 0x03000000 /* 3.0 */ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */ +#elif PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */ +#elif PY_VERSION_HEX >= 0x02020000 /* 2.2.0 */ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */ +#elif PY_VERSION_HEX >= 0x02000000 /* 2.0.0 */ + 0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_or */ +#endif + }; + + static PyTypeObject swigpyobject_type; + static int type_init = 0; + if (!type_init) { + const PyTypeObject tmp = { +#if PY_VERSION_HEX >= 0x03000000 + PyVarObject_HEAD_INIT(NULL, 0) +#else + PyObject_HEAD_INIT(NULL) + 0, /* ob_size */ +#endif + (char *)"SwigPyObject", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + (destructor)SwigPyObject_dealloc, /* tp_dealloc */ + 0, /* tp_print */ +#if PY_VERSION_HEX < 0x02020000 + (getattrfunc)SwigPyObject_getattr, /* tp_getattr */ +#else + (getattrfunc)0, /* tp_getattr */ +#endif + (setattrfunc)0, /* tp_setattr */ +#if PY_VERSION_HEX >= 0x03000000 + 0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */ +#else + (cmpfunc)SwigPyObject_compare, /* tp_compare */ +#endif + (reprfunc)SwigPyObject_repr, /* tp_repr */ + &SwigPyObject_as_number, /* tp_as_number */ + 0, /* tp_as_sequence */ + 0, /* tp_as_mapping */ + (hashfunc)0, /* tp_hash */ + (ternaryfunc)0, /* tp_call */ + 0, /* tp_str */ + PyObject_GenericGetAttr, /* tp_getattro */ + 0, /* tp_setattro */ + 0, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT, /* tp_flags */ + swigobject_doc, /* tp_doc */ + 0, /* tp_traverse */ + 0, /* tp_clear */ + (richcmpfunc)SwigPyObject_richcompare,/* tp_richcompare */ + 0, /* tp_weaklistoffset */ +#if PY_VERSION_HEX >= 0x02020000 + 0, /* tp_iter */ + 0, /* tp_iternext */ + swigobject_methods, /* tp_methods */ + 0, /* tp_members */ + 0, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + 0, /* tp_descr_get */ + 0, /* tp_descr_set */ + 0, /* tp_dictoffset */ + 0, /* tp_init */ + 0, /* tp_alloc */ + 0, /* tp_new */ + 0, /* tp_free */ + 0, /* tp_is_gc */ + 0, /* tp_bases */ + 0, /* tp_mro */ + 0, /* tp_cache */ + 0, /* tp_subclasses */ + 0, /* tp_weaklist */ +#endif +#if PY_VERSION_HEX >= 0x02030000 + 0, /* tp_del */ +#endif +#if PY_VERSION_HEX >= 0x02060000 + 0, /* tp_version_tag */ +#endif +#if PY_VERSION_HEX >= 0x03040000 + 0, /* tp_finalize */ +#endif +#ifdef COUNT_ALLOCS + 0, /* tp_allocs */ + 0, /* tp_frees */ + 0, /* tp_maxalloc */ +#if PY_VERSION_HEX >= 0x02050000 + 0, /* tp_prev */ +#endif + 0 /* tp_next */ +#endif + }; + swigpyobject_type = tmp; + type_init = 1; +#if PY_VERSION_HEX < 0x02020000 + swigpyobject_type.ob_type = &PyType_Type; +#else + if (PyType_Ready(&swigpyobject_type) < 0) + return NULL; +#endif + } + return &swigpyobject_type; +} + +SWIGRUNTIME PyObject * +SwigPyObject_New(void *ptr, swig_type_info *ty, int own) +{ + SwigPyObject *sobj = PyObject_NEW(SwigPyObject, SwigPyObject_type()); + if (sobj) { + sobj->ptr = ptr; + sobj->ty = ty; + sobj->own = own; + sobj->next = 0; + } + return (PyObject *)sobj; +} + +/* ----------------------------------------------------------------------------- + * Implements a simple Swig Packed type, and use it instead of string + * ----------------------------------------------------------------------------- */ + +typedef struct { + PyObject_HEAD + void *pack; + swig_type_info *ty; + size_t size; +} SwigPyPacked; + +SWIGRUNTIME int +SwigPyPacked_print(SwigPyPacked *v, FILE *fp, int SWIGUNUSEDPARM(flags)) +{ + char result[SWIG_BUFFER_SIZE]; + fputs("pack, v->size, 0, sizeof(result))) { + fputs("at ", fp); + fputs(result, fp); + } + fputs(v->ty->name,fp); + fputs(">", fp); + return 0; +} + +SWIGRUNTIME PyObject * +SwigPyPacked_repr(SwigPyPacked *v) +{ + char result[SWIG_BUFFER_SIZE]; + if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) { + return SWIG_Python_str_FromFormat("", result, v->ty->name); + } else { + return SWIG_Python_str_FromFormat("", v->ty->name); + } +} + +SWIGRUNTIME PyObject * +SwigPyPacked_str(SwigPyPacked *v) +{ + char result[SWIG_BUFFER_SIZE]; + if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){ + return SWIG_Python_str_FromFormat("%s%s", result, v->ty->name); + } else { + return SWIG_Python_str_FromChar(v->ty->name); + } +} + +SWIGRUNTIME int +SwigPyPacked_compare(SwigPyPacked *v, SwigPyPacked *w) +{ + size_t i = v->size; + size_t j = w->size; + int s = (i < j) ? -1 : ((i > j) ? 1 : 0); + return s ? s : strncmp((char *)v->pack, (char *)w->pack, 2*v->size); +} + +SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void); + +SWIGRUNTIME PyTypeObject* +SwigPyPacked_type(void) { + static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyPacked_TypeOnce(); + return type; +} + +SWIGRUNTIMEINLINE int +SwigPyPacked_Check(PyObject *op) { + return ((op)->ob_type == SwigPyPacked_TypeOnce()) + || (strcmp((op)->ob_type->tp_name,"SwigPyPacked") == 0); +} + +SWIGRUNTIME void +SwigPyPacked_dealloc(PyObject *v) +{ + if (SwigPyPacked_Check(v)) { + SwigPyPacked *sobj = (SwigPyPacked *) v; + free(sobj->pack); + } + PyObject_DEL(v); +} + +SWIGRUNTIME PyTypeObject* +SwigPyPacked_TypeOnce(void) { + static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer"; + static PyTypeObject swigpypacked_type; + static int type_init = 0; + if (!type_init) { + const PyTypeObject tmp = { +#if PY_VERSION_HEX>=0x03000000 + PyVarObject_HEAD_INIT(NULL, 0) +#else + PyObject_HEAD_INIT(NULL) + 0, /* ob_size */ +#endif + (char *)"SwigPyPacked", /* tp_name */ + sizeof(SwigPyPacked), /* tp_basicsize */ + 0, /* tp_itemsize */ + (destructor)SwigPyPacked_dealloc, /* tp_dealloc */ + (printfunc)SwigPyPacked_print, /* tp_print */ + (getattrfunc)0, /* tp_getattr */ + (setattrfunc)0, /* tp_setattr */ +#if PY_VERSION_HEX>=0x03000000 + 0, /* tp_reserved in 3.0.1 */ +#else + (cmpfunc)SwigPyPacked_compare, /* tp_compare */ +#endif + (reprfunc)SwigPyPacked_repr, /* tp_repr */ + 0, /* tp_as_number */ + 0, /* tp_as_sequence */ + 0, /* tp_as_mapping */ + (hashfunc)0, /* tp_hash */ + (ternaryfunc)0, /* tp_call */ + (reprfunc)SwigPyPacked_str, /* tp_str */ + PyObject_GenericGetAttr, /* tp_getattro */ + 0, /* tp_setattro */ + 0, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT, /* tp_flags */ + swigpacked_doc, /* tp_doc */ + 0, /* tp_traverse */ + 0, /* tp_clear */ + 0, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ +#if PY_VERSION_HEX >= 0x02020000 + 0, /* tp_iter */ + 0, /* tp_iternext */ + 0, /* tp_methods */ + 0, /* tp_members */ + 0, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + 0, /* tp_descr_get */ + 0, /* tp_descr_set */ + 0, /* tp_dictoffset */ + 0, /* tp_init */ + 0, /* tp_alloc */ + 0, /* tp_new */ + 0, /* tp_free */ + 0, /* tp_is_gc */ + 0, /* tp_bases */ + 0, /* tp_mro */ + 0, /* tp_cache */ + 0, /* tp_subclasses */ + 0, /* tp_weaklist */ +#endif +#if PY_VERSION_HEX >= 0x02030000 + 0, /* tp_del */ +#endif +#if PY_VERSION_HEX >= 0x02060000 + 0, /* tp_version_tag */ +#endif +#if PY_VERSION_HEX >= 0x03040000 + 0, /* tp_finalize */ +#endif +#ifdef COUNT_ALLOCS + 0, /* tp_allocs */ + 0, /* tp_frees */ + 0, /* tp_maxalloc */ +#if PY_VERSION_HEX >= 0x02050000 + 0, /* tp_prev */ +#endif + 0 /* tp_next */ +#endif + }; + swigpypacked_type = tmp; + type_init = 1; +#if PY_VERSION_HEX < 0x02020000 + swigpypacked_type.ob_type = &PyType_Type; +#else + if (PyType_Ready(&swigpypacked_type) < 0) + return NULL; +#endif + } + return &swigpypacked_type; +} + +SWIGRUNTIME PyObject * +SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty) +{ + SwigPyPacked *sobj = PyObject_NEW(SwigPyPacked, SwigPyPacked_type()); + if (sobj) { + void *pack = malloc(size); + if (pack) { + memcpy(pack, ptr, size); + sobj->pack = pack; + sobj->ty = ty; + sobj->size = size; + } else { + PyObject_DEL((PyObject *) sobj); + sobj = 0; + } + } + return (PyObject *) sobj; +} + +SWIGRUNTIME swig_type_info * +SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size) +{ + if (SwigPyPacked_Check(obj)) { + SwigPyPacked *sobj = (SwigPyPacked *)obj; + if (sobj->size != size) return 0; + memcpy(ptr, sobj->pack, size); + return sobj->ty; + } else { + return 0; + } +} + +/* ----------------------------------------------------------------------------- + * pointers/data manipulation + * ----------------------------------------------------------------------------- */ + +SWIGRUNTIMEINLINE PyObject * +_SWIG_This(void) +{ + return SWIG_Python_str_FromChar("this"); +} + +static PyObject *swig_this = NULL; + +SWIGRUNTIME PyObject * +SWIG_This(void) +{ + if (swig_this == NULL) + swig_this = _SWIG_This(); + return swig_this; +} + +/* #define SWIG_PYTHON_SLOW_GETSET_THIS */ + +/* TODO: I don't know how to implement the fast getset in Python 3 right now */ +#if PY_VERSION_HEX>=0x03000000 +#define SWIG_PYTHON_SLOW_GETSET_THIS +#endif + +SWIGRUNTIME SwigPyObject * +SWIG_Python_GetSwigThis(PyObject *pyobj) +{ + PyObject *obj; + + if (SwigPyObject_Check(pyobj)) + return (SwigPyObject *) pyobj; + +#ifdef SWIGPYTHON_BUILTIN + (void)obj; +# ifdef PyWeakref_CheckProxy + if (PyWeakref_CheckProxy(pyobj)) { + pyobj = PyWeakref_GET_OBJECT(pyobj); + if (pyobj && SwigPyObject_Check(pyobj)) + return (SwigPyObject*) pyobj; + } +# endif + return NULL; +#else + + obj = 0; + +#if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000)) + if (PyInstance_Check(pyobj)) { + obj = _PyInstance_Lookup(pyobj, SWIG_This()); + } else { + PyObject **dictptr = _PyObject_GetDictPtr(pyobj); + if (dictptr != NULL) { + PyObject *dict = *dictptr; + obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0; + } else { +#ifdef PyWeakref_CheckProxy + if (PyWeakref_CheckProxy(pyobj)) { + PyObject *wobj = PyWeakref_GET_OBJECT(pyobj); + return wobj ? SWIG_Python_GetSwigThis(wobj) : 0; + } +#endif + obj = PyObject_GetAttr(pyobj,SWIG_This()); + if (obj) { + Py_DECREF(obj); + } else { + if (PyErr_Occurred()) PyErr_Clear(); + return 0; + } + } + } +#else + obj = PyObject_GetAttr(pyobj,SWIG_This()); + if (obj) { + Py_DECREF(obj); + } else { + if (PyErr_Occurred()) PyErr_Clear(); + return 0; + } +#endif + if (obj && !SwigPyObject_Check(obj)) { + /* a PyObject is called 'this', try to get the 'real this' + SwigPyObject from it */ + return SWIG_Python_GetSwigThis(obj); + } + return (SwigPyObject *)obj; +#endif +} + +/* Acquire a pointer value */ + +SWIGRUNTIME int +SWIG_Python_AcquirePtr(PyObject *obj, int own) { + if (own == SWIG_POINTER_OWN) { + SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj); + if (sobj) { + int oldown = sobj->own; + sobj->own = own; + return oldown; + } + } + return 0; +} + +/* Convert a pointer value */ + +SWIGRUNTIME int +SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) { + int res; + SwigPyObject *sobj; + int implicit_conv = (flags & SWIG_POINTER_IMPLICIT_CONV) != 0; + + if (!obj) + return SWIG_ERROR; + if (obj == Py_None && !implicit_conv) { + if (ptr) + *ptr = 0; + return SWIG_OK; + } + + res = SWIG_ERROR; + + sobj = SWIG_Python_GetSwigThis(obj); + if (own) + *own = 0; + while (sobj) { + void *vptr = sobj->ptr; + if (ty) { + swig_type_info *to = sobj->ty; + if (to == ty) { + /* no type cast needed */ + if (ptr) *ptr = vptr; + break; + } else { + swig_cast_info *tc = SWIG_TypeCheck(to->name,ty); + if (!tc) { + sobj = (SwigPyObject *)sobj->next; + } else { + if (ptr) { + int newmemory = 0; + *ptr = SWIG_TypeCast(tc,vptr,&newmemory); + if (newmemory == SWIG_CAST_NEW_MEMORY) { + assert(own); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */ + if (own) + *own = *own | SWIG_CAST_NEW_MEMORY; + } + } + break; + } + } + } else { + if (ptr) *ptr = vptr; + break; + } + } + if (sobj) { + if (own) + *own = *own | sobj->own; + if (flags & SWIG_POINTER_DISOWN) { + sobj->own = 0; + } + res = SWIG_OK; + } else { + if (implicit_conv) { + SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0; + if (data && !data->implicitconv) { + PyObject *klass = data->klass; + if (klass) { + PyObject *impconv; + data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/ + impconv = SWIG_Python_CallFunctor(klass, obj); + data->implicitconv = 0; + if (PyErr_Occurred()) { + PyErr_Clear(); + impconv = 0; + } + if (impconv) { + SwigPyObject *iobj = SWIG_Python_GetSwigThis(impconv); + if (iobj) { + void *vptr; + res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0); + if (SWIG_IsOK(res)) { + if (ptr) { + *ptr = vptr; + /* transfer the ownership to 'ptr' */ + iobj->own = 0; + res = SWIG_AddCast(res); + res = SWIG_AddNewMask(res); + } else { + res = SWIG_AddCast(res); + } + } + } + Py_DECREF(impconv); + } + } + } + } + if (!SWIG_IsOK(res) && obj == Py_None) { + if (ptr) + *ptr = 0; + if (PyErr_Occurred()) + PyErr_Clear(); + res = SWIG_OK; + } + } + return res; +} + +/* Convert a function ptr value */ + +SWIGRUNTIME int +SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) { + if (!PyCFunction_Check(obj)) { + return SWIG_ConvertPtr(obj, ptr, ty, 0); + } else { + void *vptr = 0; + + /* here we get the method pointer for callbacks */ + const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc); + const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0; + if (desc) + desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0; + if (!desc) + return SWIG_ERROR; + if (ty) { + swig_cast_info *tc = SWIG_TypeCheck(desc,ty); + if (tc) { + int newmemory = 0; + *ptr = SWIG_TypeCast(tc,vptr,&newmemory); + assert(!newmemory); /* newmemory handling not yet implemented */ + } else { + return SWIG_ERROR; + } + } else { + *ptr = vptr; + } + return SWIG_OK; + } +} + +/* Convert a packed value value */ + +SWIGRUNTIME int +SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) { + swig_type_info *to = SwigPyPacked_UnpackData(obj, ptr, sz); + if (!to) return SWIG_ERROR; + if (ty) { + if (to != ty) { + /* check type cast? */ + swig_cast_info *tc = SWIG_TypeCheck(to->name,ty); + if (!tc) return SWIG_ERROR; + } + } + return SWIG_OK; +} + +/* ----------------------------------------------------------------------------- + * Create a new pointer object + * ----------------------------------------------------------------------------- */ + +/* + Create a new instance object, without calling __init__, and set the + 'this' attribute. +*/ + +SWIGRUNTIME PyObject* +SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) +{ +#if (PY_VERSION_HEX >= 0x02020000) + PyObject *inst = 0; + PyObject *newraw = data->newraw; + if (newraw) { + inst = PyObject_Call(newraw, data->newargs, NULL); + if (inst) { +#if !defined(SWIG_PYTHON_SLOW_GETSET_THIS) + PyObject **dictptr = _PyObject_GetDictPtr(inst); + if (dictptr != NULL) { + PyObject *dict = *dictptr; + if (dict == NULL) { + dict = PyDict_New(); + *dictptr = dict; + PyDict_SetItem(dict, SWIG_This(), swig_this); + } + } +#else + PyObject *key = SWIG_This(); + PyObject_SetAttr(inst, key, swig_this); +#endif + } + } else { +#if PY_VERSION_HEX >= 0x03000000 + inst = ((PyTypeObject*) data->newargs)->tp_new((PyTypeObject*) data->newargs, Py_None, Py_None); + if (inst) { + PyObject_SetAttr(inst, SWIG_This(), swig_this); + Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG; + } +#else + PyObject *dict = PyDict_New(); + if (dict) { + PyDict_SetItem(dict, SWIG_This(), swig_this); + inst = PyInstance_NewRaw(data->newargs, dict); + Py_DECREF(dict); + } +#endif + } + return inst; +#else +#if (PY_VERSION_HEX >= 0x02010000) + PyObject *inst = 0; + PyObject *dict = PyDict_New(); + if (dict) { + PyDict_SetItem(dict, SWIG_This(), swig_this); + inst = PyInstance_NewRaw(data->newargs, dict); + Py_DECREF(dict); + } + return (PyObject *) inst; +#else + PyInstanceObject *inst = PyObject_NEW(PyInstanceObject, &PyInstance_Type); + if (inst == NULL) { + return NULL; + } + inst->in_class = (PyClassObject *)data->newargs; + Py_INCREF(inst->in_class); + inst->in_dict = PyDict_New(); + if (inst->in_dict == NULL) { + Py_DECREF(inst); + return NULL; + } +#ifdef Py_TPFLAGS_HAVE_WEAKREFS + inst->in_weakreflist = NULL; +#endif +#ifdef Py_TPFLAGS_GC + PyObject_GC_Init(inst); +#endif + PyDict_SetItem(inst->in_dict, SWIG_This(), swig_this); + return (PyObject *) inst; +#endif +#endif +} + +SWIGRUNTIME void +SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this) +{ + PyObject *dict; +#if (PY_VERSION_HEX >= 0x02020000) && !defined(SWIG_PYTHON_SLOW_GETSET_THIS) + PyObject **dictptr = _PyObject_GetDictPtr(inst); + if (dictptr != NULL) { + dict = *dictptr; + if (dict == NULL) { + dict = PyDict_New(); + *dictptr = dict; + } + PyDict_SetItem(dict, SWIG_This(), swig_this); + return; + } +#endif + dict = PyObject_GetAttrString(inst, (char*)"__dict__"); + PyDict_SetItem(dict, SWIG_This(), swig_this); + Py_DECREF(dict); +} + + +SWIGINTERN PyObject * +SWIG_Python_InitShadowInstance(PyObject *args) { + PyObject *obj[2]; + if (!SWIG_Python_UnpackTuple(args, "swiginit", 2, 2, obj)) { + return NULL; + } else { + SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]); + if (sthis) { + SwigPyObject_append((PyObject*) sthis, obj[1]); + } else { + SWIG_Python_SetSwigThis(obj[0], obj[1]); + } + return SWIG_Py_Void(); + } +} + +/* Create a new pointer object */ + +SWIGRUNTIME PyObject * +SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int flags) { + SwigPyClientData *clientdata; + PyObject * robj; + int own; + + if (!ptr) + return SWIG_Py_Void(); + + clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0; + own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0; + if (clientdata && clientdata->pytype) { + SwigPyObject *newobj; + if (flags & SWIG_BUILTIN_TP_INIT) { + newobj = (SwigPyObject*) self; + if (newobj->ptr) { + PyObject *next_self = clientdata->pytype->tp_alloc(clientdata->pytype, 0); + while (newobj->next) + newobj = (SwigPyObject *) newobj->next; + newobj->next = next_self; + newobj = (SwigPyObject *)next_self; +#ifdef SWIGPYTHON_BUILTIN + newobj->dict = 0; +#endif + } + } else { + newobj = PyObject_New(SwigPyObject, clientdata->pytype); +#ifdef SWIGPYTHON_BUILTIN + newobj->dict = 0; +#endif + } + if (newobj) { + newobj->ptr = ptr; + newobj->ty = type; + newobj->own = own; + newobj->next = 0; + return (PyObject*) newobj; + } + return SWIG_Py_Void(); + } + + assert(!(flags & SWIG_BUILTIN_TP_INIT)); + + robj = SwigPyObject_New(ptr, type, own); + if (robj && clientdata && !(flags & SWIG_POINTER_NOSHADOW)) { + PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj); + Py_DECREF(robj); + robj = inst; + } + return robj; +} + +/* Create a new packed object */ + +SWIGRUNTIMEINLINE PyObject * +SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) { + return ptr ? SwigPyPacked_New((void *) ptr, sz, type) : SWIG_Py_Void(); +} + +/* -----------------------------------------------------------------------------* + * Get type list + * -----------------------------------------------------------------------------*/ + +#ifdef SWIG_LINK_RUNTIME +void *SWIG_ReturnGlobalTypeList(void *); +#endif + +SWIGRUNTIME swig_module_info * +SWIG_Python_GetModule(void *SWIGUNUSEDPARM(clientdata)) { + static void *type_pointer = (void *)0; + /* first check if module already created */ + if (!type_pointer) { +#ifdef SWIG_LINK_RUNTIME + type_pointer = SWIG_ReturnGlobalTypeList((void *)0); +#else +# ifdef SWIGPY_USE_CAPSULE + type_pointer = PyCapsule_Import(SWIGPY_CAPSULE_NAME, 0); +# else + type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, + (char*)"type_pointer" SWIG_TYPE_TABLE_NAME); +# endif + if (PyErr_Occurred()) { + PyErr_Clear(); + type_pointer = (void *)0; + } +#endif + } + return (swig_module_info *) type_pointer; +} + +#if PY_MAJOR_VERSION < 2 +/* PyModule_AddObject function was introduced in Python 2.0. The following function + is copied out of Python/modsupport.c in python version 2.3.4 */ +SWIGINTERN int +PyModule_AddObject(PyObject *m, char *name, PyObject *o) +{ + PyObject *dict; + if (!PyModule_Check(m)) { + PyErr_SetString(PyExc_TypeError, "PyModule_AddObject() needs module as first arg"); + return SWIG_ERROR; + } + if (!o) { + PyErr_SetString(PyExc_TypeError, "PyModule_AddObject() needs non-NULL value"); + return SWIG_ERROR; + } + + dict = PyModule_GetDict(m); + if (dict == NULL) { + /* Internal error -- modules must have a dict! */ + PyErr_Format(PyExc_SystemError, "module '%s' has no __dict__", + PyModule_GetName(m)); + return SWIG_ERROR; + } + if (PyDict_SetItemString(dict, name, o)) + return SWIG_ERROR; + Py_DECREF(o); + return SWIG_OK; +} +#endif + +SWIGRUNTIME void +#ifdef SWIGPY_USE_CAPSULE +SWIG_Python_DestroyModule(PyObject *obj) +#else +SWIG_Python_DestroyModule(void *vptr) +#endif +{ +#ifdef SWIGPY_USE_CAPSULE + swig_module_info *swig_module = (swig_module_info *) PyCapsule_GetPointer(obj, SWIGPY_CAPSULE_NAME); +#else + swig_module_info *swig_module = (swig_module_info *) vptr; +#endif + swig_type_info **types = swig_module->types; + size_t i; + for (i =0; i < swig_module->size; ++i) { + swig_type_info *ty = types[i]; + if (ty->owndata) { + SwigPyClientData *data = (SwigPyClientData *) ty->clientdata; + if (data) SwigPyClientData_Del(data); + } + } + Py_DECREF(SWIG_This()); + swig_this = NULL; +} + +SWIGRUNTIME void +SWIG_Python_SetModule(swig_module_info *swig_module) { +#if PY_VERSION_HEX >= 0x03000000 + /* Add a dummy module object into sys.modules */ + PyObject *module = PyImport_AddModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION); +#else + static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} }; /* Sentinel */ + PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table); +#endif +#ifdef SWIGPY_USE_CAPSULE + PyObject *pointer = PyCapsule_New((void *) swig_module, SWIGPY_CAPSULE_NAME, SWIG_Python_DestroyModule); + if (pointer && module) { + PyModule_AddObject(module, (char*)"type_pointer_capsule" SWIG_TYPE_TABLE_NAME, pointer); + } else { + Py_XDECREF(pointer); + } +#else + PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule); + if (pointer && module) { + PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer); + } else { + Py_XDECREF(pointer); + } +#endif +} + +/* The python cached type query */ +SWIGRUNTIME PyObject * +SWIG_Python_TypeCache(void) { + static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New(); + return cache; +} + +SWIGRUNTIME swig_type_info * +SWIG_Python_TypeQuery(const char *type) +{ + PyObject *cache = SWIG_Python_TypeCache(); + PyObject *key = SWIG_Python_str_FromChar(type); + PyObject *obj = PyDict_GetItem(cache, key); + swig_type_info *descriptor; + if (obj) { +#ifdef SWIGPY_USE_CAPSULE + descriptor = (swig_type_info *) PyCapsule_GetPointer(obj, NULL); +#else + descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj); +#endif + } else { + swig_module_info *swig_module = SWIG_GetModule(0); + descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type); + if (descriptor) { +#ifdef SWIGPY_USE_CAPSULE + obj = PyCapsule_New((void*) descriptor, NULL, NULL); +#else + obj = PyCObject_FromVoidPtr(descriptor, NULL); +#endif + PyDict_SetItem(cache, key, obj); + Py_DECREF(obj); + } + } + Py_DECREF(key); + return descriptor; +} + +/* + For backward compatibility only +*/ +#define SWIG_POINTER_EXCEPTION 0 +#define SWIG_arg_fail(arg) SWIG_Python_ArgFail(arg) +#define SWIG_MustGetPtr(p, type, argnum, flags) SWIG_Python_MustGetPtr(p, type, argnum, flags) + +SWIGRUNTIME int +SWIG_Python_AddErrMesg(const char* mesg, int infront) +{ + if (PyErr_Occurred()) { + PyObject *type = 0; + PyObject *value = 0; + PyObject *traceback = 0; + PyErr_Fetch(&type, &value, &traceback); + if (value) { + char *tmp; + PyObject *old_str = PyObject_Str(value); + Py_XINCREF(type); + PyErr_Clear(); + if (infront) { + PyErr_Format(type, "%s %s", mesg, tmp = SWIG_Python_str_AsChar(old_str)); + } else { + PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg); + } + SWIG_Python_str_DelForPy3(tmp); + Py_DECREF(old_str); + } + return 1; + } else { + return 0; + } +} + +SWIGRUNTIME int +SWIG_Python_ArgFail(int argnum) +{ + if (PyErr_Occurred()) { + /* add information about failing argument */ + char mesg[256]; + PyOS_snprintf(mesg, sizeof(mesg), "argument number %d:", argnum); + return SWIG_Python_AddErrMesg(mesg, 1); + } else { + return 0; + } +} + +SWIGRUNTIMEINLINE const char * +SwigPyObject_GetDesc(PyObject *self) +{ + SwigPyObject *v = (SwigPyObject *)self; + swig_type_info *ty = v ? v->ty : 0; + return ty ? ty->str : ""; +} + +SWIGRUNTIME void +SWIG_Python_TypeError(const char *type, PyObject *obj) +{ + if (type) { +#if defined(SWIG_COBJECT_TYPES) + if (obj && SwigPyObject_Check(obj)) { + const char *otype = (const char *) SwigPyObject_GetDesc(obj); + if (otype) { + PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'SwigPyObject(%s)' is received", + type, otype); + return; + } + } else +#endif + { + const char *otype = (obj ? obj->ob_type->tp_name : 0); + if (otype) { + PyObject *str = PyObject_Str(obj); + const char *cstr = str ? SWIG_Python_str_AsChar(str) : 0; + if (cstr) { + PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received", + type, otype, cstr); + SWIG_Python_str_DelForPy3(cstr); + } else { + PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received", + type, otype); + } + Py_XDECREF(str); + return; + } + } + PyErr_Format(PyExc_TypeError, "a '%s' is expected", type); + } else { + PyErr_Format(PyExc_TypeError, "unexpected type is received"); + } +} + + +/* Convert a pointer value, signal an exception on a type mismatch */ +SWIGRUNTIME void * +SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int SWIGUNUSEDPARM(argnum), int flags) { + void *result; + if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) { + PyErr_Clear(); +#if SWIG_POINTER_EXCEPTION + if (flags) { + SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj); + SWIG_Python_ArgFail(argnum); + } +#endif + } + return result; +} + +#ifdef SWIGPYTHON_BUILTIN +SWIGRUNTIME int +SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { + PyTypeObject *tp = obj->ob_type; + PyObject *descr; + PyObject *encoded_name; + descrsetfunc f; + int res = -1; + +# ifdef Py_USING_UNICODE + if (PyString_Check(name)) { + name = PyUnicode_Decode(PyString_AsString(name), PyString_Size(name), NULL, NULL); + if (!name) + return -1; + } else if (!PyUnicode_Check(name)) +# else + if (!PyString_Check(name)) +# endif + { + PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name); + return -1; + } else { + Py_INCREF(name); + } + + if (!tp->tp_dict) { + if (PyType_Ready(tp) < 0) + goto done; + } + + descr = _PyType_Lookup(tp, name); + f = NULL; + if (descr != NULL) + f = descr->ob_type->tp_descr_set; + if (!f) { + if (PyString_Check(name)) { + encoded_name = name; + Py_INCREF(name); + } else { + encoded_name = PyUnicode_AsUTF8String(name); + } + PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name)); + Py_DECREF(encoded_name); + } else { + res = f(descr, obj, value); + } + + done: + Py_DECREF(name); + return res; +} +#endif + + +#ifdef __cplusplus +} +#endif + + + +#define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0) + +#define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else + + + + #define SWIG_exception(code, msg) do { SWIG_Error(code, msg); SWIG_fail;; } while(0) + + +/* -------- TYPES TABLE (BEGIN) -------- */ + +#define SWIGTYPE_p_char swig_types[0] +#define SWIGTYPE_p_cmf__atmosphere__ConstantMeteorology swig_types[1] +#define SWIGTYPE_p_cmf__atmosphere__ConstantRainSource swig_types[2] +#define SWIGTYPE_p_cmf__atmosphere__IDWRainfall swig_types[3] +#define SWIGTYPE_p_cmf__atmosphere__IDW_Meteorology swig_types[4] +#define SWIGTYPE_p_cmf__atmosphere__MeteoStation swig_types[5] +#define SWIGTYPE_p_cmf__atmosphere__MeteoStationList swig_types[6] +#define SWIGTYPE_p_cmf__atmosphere__MeteoStationReference swig_types[7] +#define SWIGTYPE_p_cmf__atmosphere__Meteorology swig_types[8] +#define SWIGTYPE_p_cmf__atmosphere__RainSource swig_types[9] +#define SWIGTYPE_p_cmf__atmosphere__RainfallStation swig_types[10] +#define SWIGTYPE_p_cmf__atmosphere__RainfallStationList swig_types[11] +#define SWIGTYPE_p_cmf__atmosphere__RainfallStationReference swig_types[12] +#define SWIGTYPE_p_cmf__atmosphere__TimeseriesRainSource swig_types[13] +#define SWIGTYPE_p_cmf__atmosphere__Weather swig_types[14] +#define SWIGTYPE_p_cmf__atmosphere__aerodynamic_resistance swig_types[15] +#define SWIGTYPE_p_cmf__atmosphere__log_wind_profile swig_types[16] +#define SWIGTYPE_p_cmf__geometry__point swig_types[17] +#define SWIGTYPE_p_cmf__geometry__point_vector swig_types[18] +#define SWIGTYPE_p_cmf__math__BDF2 swig_types[19] +#define SWIGTYPE_p_cmf__math__CVodeIntegrator swig_types[20] +#define SWIGTYPE_p_cmf__math__Date swig_types[21] +#define SWIGTYPE_p_cmf__math__ExplicitEuler_fixed swig_types[22] +#define SWIGTYPE_p_cmf__math__HeunIntegrator swig_types[23] +#define SWIGTYPE_p_cmf__math__ImplicitEuler swig_types[24] +#define SWIGTYPE_p_cmf__math__Integrator swig_types[25] +#define SWIGTYPE_p_cmf__math__MultiIntegrator swig_types[26] +#define SWIGTYPE_p_cmf__math__RKFIntegrator swig_types[27] +#define SWIGTYPE_p_cmf__math__SoluteWaterIntegrator swig_types[28] +#define SWIGTYPE_p_cmf__math__StateVariable swig_types[29] +#define SWIGTYPE_p_cmf__math__StateVariableList swig_types[30] +#define SWIGTYPE_p_cmf__math__StateVariableOwner swig_types[31] +#define SWIGTYPE_p_cmf__math__Time swig_types[32] +#define SWIGTYPE_p_cmf__math__cubicspline swig_types[33] +#define SWIGTYPE_p_cmf__math__integratable swig_types[34] +#define SWIGTYPE_p_cmf__math__integratable_list swig_types[35] +#define SWIGTYPE_p_cmf__math__num_array swig_types[36] +#define SWIGTYPE_p_cmf__math__timeseries swig_types[37] +#define SWIGTYPE_p_cmf__project swig_types[38] +#define SWIGTYPE_p_cmf__river__Channel swig_types[39] +#define SWIGTYPE_p_cmf__river__IChannel swig_types[40] +#define SWIGTYPE_p_cmf__river__IVolumeHeightFunction swig_types[41] +#define SWIGTYPE_p_cmf__river__Manning swig_types[42] +#define SWIGTYPE_p_cmf__river__Manning_Diffusive swig_types[43] +#define SWIGTYPE_p_cmf__river__Manning_Kinematic swig_types[44] +#define SWIGTYPE_p_cmf__river__MeanChannel swig_types[45] +#define SWIGTYPE_p_cmf__river__OpenWaterStorage swig_types[46] +#define SWIGTYPE_p_cmf__river__PipeReach swig_types[47] +#define SWIGTYPE_p_cmf__river__Prism swig_types[48] +#define SWIGTYPE_p_cmf__river__Reach swig_types[49] +#define SWIGTYPE_p_cmf__river__ReachIterator swig_types[50] +#define SWIGTYPE_p_cmf__river__RectangularReach swig_types[51] +#define SWIGTYPE_p_cmf__river__SWATReachType swig_types[52] +#define SWIGTYPE_p_cmf__river__TriangularReach swig_types[53] +#define SWIGTYPE_p_cmf__river__volume_height_function swig_types[54] +#define SWIGTYPE_p_cmf__upslope__BrooksCoreyRetentionCurve swig_types[55] +#define SWIGTYPE_p_cmf__upslope__Cell swig_types[56] +#define SWIGTYPE_p_cmf__upslope__CellConnector swig_types[57] +#define SWIGTYPE_p_cmf__upslope__ET__CanopyStorageEvaporation swig_types[58] +#define SWIGTYPE_p_cmf__upslope__ET__ContentStress swig_types[59] +#define SWIGTYPE_p_cmf__upslope__ET__HargreaveET swig_types[60] +#define SWIGTYPE_p_cmf__upslope__ET__PenmanEvaporation swig_types[61] +#define SWIGTYPE_p_cmf__upslope__ET__PenmanMonteithET swig_types[62] +#define SWIGTYPE_p_cmf__upslope__ET__PriestleyTaylorET swig_types[63] +#define SWIGTYPE_p_cmf__upslope__ET__RootUptakeStessFunction swig_types[64] +#define SWIGTYPE_p_cmf__upslope__ET__ShuttleworthWallace swig_types[65] +#define SWIGTYPE_p_cmf__upslope__ET__SuctionStress swig_types[66] +#define SWIGTYPE_p_cmf__upslope__ET__TurcET swig_types[67] +#define SWIGTYPE_p_cmf__upslope__ET__VolumeStress swig_types[68] +#define SWIGTYPE_p_cmf__upslope__ET__canopy_evaporation swig_types[69] +#define SWIGTYPE_p_cmf__upslope__ET__canopy_evaporation_method swig_types[70] +#define SWIGTYPE_p_cmf__upslope__ET__constantETpot swig_types[71] +#define SWIGTYPE_p_cmf__upslope__ET__snow_evaporation swig_types[72] +#define SWIGTYPE_p_cmf__upslope__ET__snow_evaporation_method swig_types[73] +#define SWIGTYPE_p_cmf__upslope__ET__soil_evaporation swig_types[74] +#define SWIGTYPE_p_cmf__upslope__ET__soil_evaporation_method swig_types[75] +#define SWIGTYPE_p_cmf__upslope__ET__stressedET swig_types[76] +#define SWIGTYPE_p_cmf__upslope__ET__surface_water_evaporation swig_types[77] +#define SWIGTYPE_p_cmf__upslope__ET__surface_water_evaporation_method swig_types[78] +#define SWIGTYPE_p_cmf__upslope__ET__timeseriesETpot swig_types[79] +#define SWIGTYPE_p_cmf__upslope__ET__transpiration swig_types[80] +#define SWIGTYPE_p_cmf__upslope__ET__transpiration_method swig_types[81] +#define SWIGTYPE_p_cmf__upslope__LinearRetention swig_types[82] +#define SWIGTYPE_p_cmf__upslope__MacroPore swig_types[83] +#define SWIGTYPE_p_cmf__upslope__RetentionCurve swig_types[84] +#define SWIGTYPE_p_cmf__upslope__SoilLayer swig_types[85] +#define SWIGTYPE_p_cmf__upslope__SurfaceWater swig_types[86] +#define SWIGTYPE_p_cmf__upslope__Topology swig_types[87] +#define SWIGTYPE_p_cmf__upslope__VanGenuchtenMualem swig_types[88] +#define SWIGTYPE_p_cmf__upslope__aquifer swig_types[89] +#define SWIGTYPE_p_cmf__upslope__aquifer_Darcy swig_types[90] +#define SWIGTYPE_p_cmf__upslope__cell_vector swig_types[91] +#define SWIGTYPE_p_cmf__upslope__connections__BaseMacroFlow swig_types[92] +#define SWIGTYPE_p_cmf__upslope__connections__CanopyOverflow swig_types[93] +#define SWIGTYPE_p_cmf__upslope__connections__Darcy swig_types[94] +#define SWIGTYPE_p_cmf__upslope__connections__DarcyKinematic swig_types[95] +#define SWIGTYPE_p_cmf__upslope__connections__DiffusiveMacroMicroExchange swig_types[96] +#define SWIGTYPE_p_cmf__upslope__connections__DiffusiveSurfaceRunoff swig_types[97] +#define SWIGTYPE_p_cmf__upslope__connections__EnergyBudgetSnowMelt swig_types[98] +#define SWIGTYPE_p_cmf__upslope__connections__FreeDrainagePercolation swig_types[99] +#define SWIGTYPE_p_cmf__upslope__connections__GradientMacroFlow swig_types[100] +#define SWIGTYPE_p_cmf__upslope__connections__GradientMacroMicroExchange swig_types[101] +#define SWIGTYPE_p_cmf__upslope__connections__GreenAmptInfiltration swig_types[102] +#define SWIGTYPE_p_cmf__upslope__connections__JarvisMacroFlow swig_types[103] +#define SWIGTYPE_p_cmf__upslope__connections__KinematicMacroFlow swig_types[104] +#define SWIGTYPE_p_cmf__upslope__connections__KinematicSurfaceRunoff swig_types[105] +#define SWIGTYPE_p_cmf__upslope__connections__LayerBypass swig_types[106] +#define SWIGTYPE_p_cmf__upslope__connections__MACROlikeMacroMicroExchange swig_types[107] +#define SWIGTYPE_p_cmf__upslope__connections__MatrixInfiltration swig_types[108] +#define SWIGTYPE_p_cmf__upslope__connections__Rainfall swig_types[109] +#define SWIGTYPE_p_cmf__upslope__connections__Richards swig_types[110] +#define SWIGTYPE_p_cmf__upslope__connections__Richards_lateral swig_types[111] +#define SWIGTYPE_p_cmf__upslope__connections__RutterInterception swig_types[112] +#define SWIGTYPE_p_cmf__upslope__connections__SWATPercolation swig_types[113] +#define SWIGTYPE_p_cmf__upslope__connections__SimplRichards swig_types[114] +#define SWIGTYPE_p_cmf__upslope__connections__SimpleInfiltration swig_types[115] +#define SWIGTYPE_p_cmf__upslope__connections__SimpleTindexSnowMelt swig_types[116] +#define SWIGTYPE_p_cmf__upslope__connections__Snowfall swig_types[117] +#define SWIGTYPE_p_cmf__upslope__connections__TOPModelFlow swig_types[118] +#define SWIGTYPE_p_cmf__upslope__connections__TopographicGradientDarcy swig_types[119] +#define SWIGTYPE_p_cmf__upslope__connections__lateral_sub_surface_flux swig_types[120] +#define SWIGTYPE_p_cmf__upslope__layer_list swig_types[121] +#define SWIGTYPE_p_cmf__upslope__neighbor_iterator swig_types[122] +#define SWIGTYPE_p_cmf__upslope__subcatchment swig_types[123] +#define SWIGTYPE_p_cmf__upslope__vegetation__Vegetation swig_types[124] +#define SWIGTYPE_p_cmf__water__Adsorption swig_types[125] +#define SWIGTYPE_p_cmf__water__ConstraintLinearStorageConnection swig_types[126] +#define SWIGTYPE_p_cmf__water__DirichletBoundary swig_types[127] +#define SWIGTYPE_p_cmf__water__ExponentialDeclineConnection swig_types[128] +#define SWIGTYPE_p_cmf__water__FreundlichAdsorbtion swig_types[129] +#define SWIGTYPE_p_cmf__water__LangmuirAdsorption swig_types[130] +#define SWIGTYPE_p_cmf__water__LinearAdsorption swig_types[131] +#define SWIGTYPE_p_cmf__water__LinearStorageConnection swig_types[132] +#define SWIGTYPE_p_cmf__water__NeumannBoundary swig_types[133] +#define SWIGTYPE_p_cmf__water__NeumannBoundary_list swig_types[134] +#define SWIGTYPE_p_cmf__water__NeumannFlux swig_types[135] +#define SWIGTYPE_p_cmf__water__NullAdsorption swig_types[136] +#define SWIGTYPE_p_cmf__water__PowerLawConnection swig_types[137] +#define SWIGTYPE_p_cmf__water__SoluteStorage swig_types[138] +#define SWIGTYPE_p_cmf__water__SoluteTimeseries swig_types[139] +#define SWIGTYPE_p_cmf__water__SystemBridge swig_types[140] +#define SWIGTYPE_p_cmf__water__SystemBridgeConnection swig_types[141] +#define SWIGTYPE_p_cmf__water__TechnicalFlux swig_types[142] +#define SWIGTYPE_p_cmf__water__WaterStorage swig_types[143] +#define SWIGTYPE_p_cmf__water__bidirectional_kinematic_exchange swig_types[144] +#define SWIGTYPE_p_cmf__water__connection_list swig_types[145] +#define SWIGTYPE_p_cmf__water__constraint_kinematic_wave swig_types[146] +#define SWIGTYPE_p_cmf__water__external_control_connection swig_types[147] +#define SWIGTYPE_p_cmf__water__flux_connection swig_types[148] +#define SWIGTYPE_p_cmf__water__flux_integrator swig_types[149] +#define SWIGTYPE_p_cmf__water__flux_node swig_types[150] +#define SWIGTYPE_p_cmf__water__generic_gradient_connection swig_types[151] +#define SWIGTYPE_p_cmf__water__kinematic_wave swig_types[152] +#define SWIGTYPE_p_cmf__water__linear_scale swig_types[153] +#define SWIGTYPE_p_cmf__water__node_list swig_types[154] +#define SWIGTYPE_p_cmf__water__solute swig_types[155] +#define SWIGTYPE_p_cmf__water__solute_vector swig_types[156] +#define SWIGTYPE_p_cmf__water__statecontrol_connection swig_types[157] +#define SWIGTYPE_p_cmf__water__waterbalance_connection swig_types[158] +#define SWIGTYPE_p_cmf__water__waterbalance_integrator swig_types[159] +#define SWIGTYPE_p_const_iterator swig_types[160] +#define SWIGTYPE_p_double swig_types[161] +#define SWIGTYPE_p_f_r_cmf__upslope__Cell_r_cmf__upslope__Cell_ptrdiff_t__void swig_types[162] +#define SWIGTYPE_p_iterator swig_types[163] +#define SWIGTYPE_p_ptr swig_types[164] +#define SWIGTYPE_p_std__shared_ptrT_SoilLayer_t swig_types[165] +#define SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__ConstantRainSource_t swig_types[166] +#define SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__IDWRainfall_t swig_types[167] +#define SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t swig_types[168] +#define SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__RainSource_t swig_types[169] +#define SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__RainfallStationReference_t swig_types[170] +#define SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__RainfallStation_t swig_types[171] +#define SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__TimeseriesRainSource_t swig_types[172] +#define SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__aerodynamic_resistance_t swig_types[173] +#define SWIGTYPE_p_std__shared_ptrT_cmf__math__StateVariable_t swig_types[174] +#define SWIGTYPE_p_std__shared_ptrT_cmf__math__integratable_t swig_types[175] +#define SWIGTYPE_p_std__shared_ptrT_cmf__river__OpenWaterStorage_t swig_types[176] +#define SWIGTYPE_p_std__shared_ptrT_cmf__river__Reach_t swig_types[177] +#define SWIGTYPE_p_std__shared_ptrT_cmf__upslope__ET__canopy_evaporation_method_t swig_types[178] +#define SWIGTYPE_p_std__shared_ptrT_cmf__upslope__ET__snow_evaporation_method_t swig_types[179] +#define SWIGTYPE_p_std__shared_ptrT_cmf__upslope__ET__soil_evaporation_method_t swig_types[180] +#define SWIGTYPE_p_std__shared_ptrT_cmf__upslope__ET__surface_water_evaporation_method_t swig_types[181] +#define SWIGTYPE_p_std__shared_ptrT_cmf__upslope__ET__transpiration_method_t swig_types[182] +#define SWIGTYPE_p_std__shared_ptrT_cmf__upslope__MacroPore_t swig_types[183] +#define SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t swig_types[184] +#define SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SurfaceWater_t swig_types[185] +#define SWIGTYPE_p_std__shared_ptrT_cmf__upslope__aquifer_t swig_types[186] +#define SWIGTYPE_p_std__shared_ptrT_cmf__water__DirichletBoundary_t swig_types[187] +#define SWIGTYPE_p_std__shared_ptrT_cmf__water__NeumannBoundary_t swig_types[188] +#define SWIGTYPE_p_std__shared_ptrT_cmf__water__SoluteStorage_t swig_types[189] +#define SWIGTYPE_p_std__shared_ptrT_cmf__water__SystemBridge_t swig_types[190] +#define SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t swig_types[191] +#define SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_connection_t swig_types[192] +#define SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_integrator_t swig_types[193] +#define SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t swig_types[194] +#define SWIGTYPE_p_std__shared_ptrT_cmf__water__waterbalance_integrator_t swig_types[195] +#define SWIGTYPE_p_std__shared_ptrT_std__shared_ptrT_cmf__atmosphere__ConstantRainSource_t_t swig_types[196] +#define SWIGTYPE_p_std__shared_ptrT_std__shared_ptrT_cmf__atmosphere__RainfallStationReference_t_t swig_types[197] +#define SWIGTYPE_p_std__string swig_types[198] +#define SWIGTYPE_p_std__vectorT_std__shared_ptrT_cmf__water__WaterStorage_t_t swig_types[199] +#define SWIGTYPE_p_std__vectorT_std__shared_ptrT_cmf__water__flux_connection_t_t__const_iterator swig_types[200] +#define SWIGTYPE_p_std__vectorT_std__shared_ptrT_cmf__water__flux_connection_t_t__iterator swig_types[201] +static swig_type_info *swig_types[203]; +static swig_module_info swig_module = {swig_types, 202, 0, 0, 0, 0}; +#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) +#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) + +/* -------- TYPES TABLE (END) -------- */ + +#if (PY_VERSION_HEX <= 0x02000000) +# if !defined(SWIG_PYTHON_CLASSIC) +# error "This python version requires swig to be run with the '-classic' option" +# endif +#endif +#if (PY_VERSION_HEX <= 0x02020000) +# error "This python version requires swig to be run with the '-nomodern' option" +#endif +#if (PY_VERSION_HEX <= 0x02020000) +# error "This python version requires swig to be run with the '-nomodernargs' option" +#endif +#ifndef METH_O +# error "This python version requires swig to be run with the '-nofastunpack' option" +#endif +#ifdef SWIG_TypeQuery +# undef SWIG_TypeQuery +#endif +#define SWIG_TypeQuery SWIG_Python_TypeQuery + +/*----------------------------------------------- + @(target):= _cmf_core.so + ------------------------------------------------*/ +#if PY_VERSION_HEX >= 0x03000000 +# define SWIG_init PyInit__cmf_core + +#else +# define SWIG_init init_cmf_core + +#endif +#define SWIG_name "_cmf_core" + +#define SWIGVERSION 0x030012 +#define SWIG_VERSION SWIGVERSION + + +#define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a)) +#define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a)) + + +#include + + +namespace swig { + class SwigPtr_PyObject { + protected: + PyObject *_obj; + + public: + SwigPtr_PyObject() :_obj(0) + { + } + + SwigPtr_PyObject(const SwigPtr_PyObject& item) : _obj(item._obj) + { + SWIG_PYTHON_THREAD_BEGIN_BLOCK; + Py_XINCREF(_obj); + SWIG_PYTHON_THREAD_END_BLOCK; + } + + SwigPtr_PyObject(PyObject *obj, bool initial_ref = true) :_obj(obj) + { + if (initial_ref) { + SWIG_PYTHON_THREAD_BEGIN_BLOCK; + Py_XINCREF(_obj); + SWIG_PYTHON_THREAD_END_BLOCK; + } + } + + SwigPtr_PyObject & operator=(const SwigPtr_PyObject& item) + { + SWIG_PYTHON_THREAD_BEGIN_BLOCK; + Py_XINCREF(item._obj); + Py_XDECREF(_obj); + _obj = item._obj; + SWIG_PYTHON_THREAD_END_BLOCK; + return *this; + } + + ~SwigPtr_PyObject() + { + SWIG_PYTHON_THREAD_BEGIN_BLOCK; + Py_XDECREF(_obj); + SWIG_PYTHON_THREAD_END_BLOCK; + } + + operator PyObject *() const + { + return _obj; + } + + PyObject *operator->() const + { + return _obj; + } + }; +} + + +namespace swig { + struct SwigVar_PyObject : SwigPtr_PyObject { + SwigVar_PyObject(PyObject* obj = 0) : SwigPtr_PyObject(obj, false) { } + + SwigVar_PyObject & operator = (PyObject* obj) + { + Py_XDECREF(_obj); + _obj = obj; + return *this; + } + }; +} + + +#include + + +SWIGINTERNINLINE PyObject* + SWIG_From_int (int value) +{ + return PyInt_FromLong((long) value); +} + + + #include "cmfmemory.h" + + +// ********************************************************************************************** +// %iterable_to_list(LISTTYPE,ITEMTYPE) typemap system. Puts a function template into the header for general usage +// Function to convert an iterable to a list type (class with append function). For use in typemaps + template + int iterable_to_list(PyObject* iterable,swig_type_info* _item_descriptor, _Ty& temp_list) { + PyObject* iter = PyObject_GetIter(iterable); + if (iter == 0) { + // no iterator + return SWIG_ERROR; + } + while (PyObject* py_item = PyIter_Next(iter)) { + _item_type* item=0; + // if the item is a node, append to node_list + int is_ok = SWIG_ConvertPtr(py_item, (void**)&item, _item_descriptor, SWIG_POINTER_EXCEPTION); + if (is_ok == 0 && item != 0 ) { + temp_list.append(*item); + } + Py_DECREF(py_item); + } + Py_DECREF(iter); + return SWIG_OK; + } + + int is_listtype_or_iterable(PyObject* input, swig_type_info* listtype_descriptor) { + // Checks if a type has the given descriptor or is iterable + void * pt; + int res=SWIG_ConvertPtr(input,&pt,listtype_descriptor,0); + if (SWIG_IsOK(res)) { + return 1; + } else { + PyObject* iter = PyObject_GetIter(input); + if (iter != 0) { + Py_DECREF(iter); + return 2; + } + else return 0; + } + } + + +std::string pyrepr(PyObject* o) { + PyObject* s = PyObject_Repr(o); + #if PY_MAJOR_VERSION < 3 + std::string res = PyString_AsString(s); + #else + std::string res = PyUnicode_AsUTF8(s); + #endif + Py_XDECREF(s); + return res; +} + + + +// numpy/arrayobject.h requires this Macro-constant. Some Compilers (e.g. gcc) defines it internally, others (e.g. VS2008) not +#ifndef SIZEOF_LONG_DOUBLE +#define SIZEOF_LONG_DOUBLE sizeof(long double) +#endif +#ifndef NPY_NO_DEPRECATED_API +#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION +#endif + +// including numpy array definition +#include +// including my array header +#include "math/num_array.h" + + +#ifndef NPY_ARRAY_CARRAY +#define NPY_ARRAY_CARRAY NPY_CARRAY +#endif + +#ifndef NPY_ARRAY_OWNDATA +#define NPY_ARRAY_OWNDATA NPY_OWNDATA +#endif + +bool test_npy_array(PyObject* op) { + PyObject* ao = PyArray_ContiguousFromAny(op,NPY_DOUBLE,1,1); + if (!ao) // If given object was not convertable into an array + return false; + else { + Py_DECREF(ao); + return true; + } +} +// This function creates a numpy array from an num_array. +// The data of the num_array is afterwards owned by the numpy array. +PyObject* as_npy_array(cmf::math::num_array& a) +{ + // Size of the 1d array + npy_intp dims[1] = {a.size()}; + // pointer to the data of the 1d array + cmf::math::num_array::iterator start = a.release(); + // Creates the numpy array using size, place and type information + int flags = NPY_ARRAY_CARRAY | NPY_ARRAY_OWNDATA; + return PyArray_New( + &PyArray_Type,1,dims,NPY_DOUBLE,0, + (void *)start,0,flags,0); +} +// This function creates a new array from any object providing the array interface or from a sequence. +// First a numpy array is created to ensure right ordering, secondly an array is created by copying the given data. +ptrdiff_t from_npy_array(PyObject* op,double ** data) { + // Create a contiguous and behaved numpy array from the given object + // May include a copy of the data + // Returns NULL if: + // - given object was not a sequence of numbers or an object exposing the array interface or + // - array had more dimensions + PyArrayObject* ao = (PyArrayObject*)PyArray_ContiguousFromAny(op,NPY_DOUBLE,1,1); + if (!ao) {// If given object was not convertable into an array (no sequence of numbers or implementation of the array interface) + return 0; + } else { + // Get pointer to data + double * p_array=(double*)PyArray_DATA(ao); + // Get size + ptrdiff_t size = (ptrdiff_t)PyArray_DIM(ao,0); + double * res=new double[size]; + for (ptrdiff_t i=0;i +#if !defined(SWIG_NO_LLONG_MAX) +# if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__) +# define LLONG_MAX __LONG_LONG_MAX__ +# define LLONG_MIN (-LLONG_MAX - 1LL) +# define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL) +# endif +#endif + + +SWIGINTERN int +SWIG_AsVal_double (PyObject *obj, double *val) +{ + int res = SWIG_TypeError; + if (PyFloat_Check(obj)) { + if (val) *val = PyFloat_AsDouble(obj); + return SWIG_OK; +#if PY_VERSION_HEX < 0x03000000 + } else if (PyInt_Check(obj)) { + if (val) *val = (double) PyInt_AsLong(obj); + return SWIG_OK; +#endif + } else if (PyLong_Check(obj)) { + double v = PyLong_AsDouble(obj); + if (!PyErr_Occurred()) { + if (val) *val = v; + return SWIG_OK; + } else { + PyErr_Clear(); + } + } +#ifdef SWIG_PYTHON_CAST_MODE + { + int dispatch = 0; + double d = PyFloat_AsDouble(obj); + if (!PyErr_Occurred()) { + if (val) *val = d; + return SWIG_AddCast(SWIG_OK); + } else { + PyErr_Clear(); + } + if (!dispatch) { + long v = PyLong_AsLong(obj); + if (!PyErr_Occurred()) { + if (val) *val = v; + return SWIG_AddCast(SWIG_AddCast(SWIG_OK)); + } else { + PyErr_Clear(); + } + } + } +#endif + return res; +} + + +#include + + +#include + + +SWIGINTERNINLINE int +SWIG_CanCastAsInteger(double *d, double min, double max) { + double x = *d; + if ((min <= x && x <= max)) { + double fx = floor(x); + double cx = ceil(x); + double rd = ((x - fx) < 0.5) ? fx : cx; /* simple rint */ + if ((errno == EDOM) || (errno == ERANGE)) { + errno = 0; + } else { + double summ, reps, diff; + if (rd < x) { + diff = x - rd; + } else if (rd > x) { + diff = rd - x; + } else { + return 1; + } + summ = rd + x; + reps = diff/summ; + if (reps < 8*DBL_EPSILON) { + *d = rd; + return 1; + } + } + } + return 0; +} + + +SWIGINTERN int +SWIG_AsVal_long (PyObject *obj, long* val) +{ +#if PY_VERSION_HEX < 0x03000000 + if (PyInt_Check(obj)) { + if (val) *val = PyInt_AsLong(obj); + return SWIG_OK; + } else +#endif + if (PyLong_Check(obj)) { + long v = PyLong_AsLong(obj); + if (!PyErr_Occurred()) { + if (val) *val = v; + return SWIG_OK; + } else { + PyErr_Clear(); + return SWIG_OverflowError; + } + } +#ifdef SWIG_PYTHON_CAST_MODE + { + int dispatch = 0; + long v = PyInt_AsLong(obj); + if (!PyErr_Occurred()) { + if (val) *val = v; + return SWIG_AddCast(SWIG_OK); + } else { + PyErr_Clear(); + } + if (!dispatch) { + double d; + int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d)); + if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) { + if (val) *val = (long)(d); + return res; + } + } + } +#endif + return SWIG_TypeError; +} + + +SWIGINTERN int +SWIG_AsVal_int (PyObject * obj, int *val) +{ + long v; + int res = SWIG_AsVal_long (obj, &v); + if (SWIG_IsOK(res)) { + if ((v < INT_MIN || v > INT_MAX)) { + return SWIG_OverflowError; + } else { + if (val) *val = static_cast< int >(v); + } + } + return res; +} + + +#include "math/spline.h" + + + #define SWIG_From_long PyInt_FromLong + + +SWIGINTERNINLINE PyObject* +SWIG_From_unsigned_SS_long (unsigned long value) +{ + return (value > LONG_MAX) ? + PyLong_FromUnsignedLong(value) : PyInt_FromLong(static_cast< long >(value)); +} + + +#if defined(LLONG_MAX) && !defined(SWIG_LONG_LONG_AVAILABLE) +# define SWIG_LONG_LONG_AVAILABLE +#endif + + +#ifdef SWIG_LONG_LONG_AVAILABLE +SWIGINTERNINLINE PyObject* +SWIG_From_unsigned_SS_long_SS_long (unsigned long long value) +{ + return (value > LONG_MAX) ? + PyLong_FromUnsignedLongLong(value) : PyInt_FromLong(static_cast< long >(value)); +} +#endif + + +SWIGINTERNINLINE PyObject * +SWIG_From_size_t (size_t value) +{ +#ifdef SWIG_LONG_LONG_AVAILABLE + if (sizeof(size_t) <= sizeof(unsigned long)) { +#endif + return SWIG_From_unsigned_SS_long (static_cast< unsigned long >(value)); +#ifdef SWIG_LONG_LONG_AVAILABLE + } else { + /* assume sizeof(size_t) <= sizeof(unsigned long long) */ + return SWIG_From_unsigned_SS_long_SS_long (static_cast< unsigned long long >(value)); + } +#endif +} + + + #define SWIG_From_double PyFloat_FromDouble + + +// Include geometry +#include "geometry/geometry.h" +static bool check_seq_point(PyObject* input) { + if (PySequence_Check(input)) { + Py_ssize_t len = PySequence_Length(input); + if (len==2 || len==3) + return true; + } + return false; +} +static std::string convert_seq_to_point(PyObject* input,cmf::geometry::point& p) +{ + double temp[3]; + ptrdiff_t len=PyObject_Length(input); + if (len<2) { + std::string res = "Sequence <"; + res += pyrepr(input); + res+="> has to few items to convert to cmf.point. At least two items are needed"; + return res; + } else if (len>3) { + std::string res = "Sequence <"; + res+=pyrepr(input); + res+="> has to many items (more than 3) to convert to cmf.point."; + return res; + } + + for (int i=0;i(v); +#ifdef SWIG_LONG_LONG_AVAILABLE + } else if (sizeof(ptrdiff_t) <= sizeof(long long)) { + long long v; + res = SWIG_AsVal_long_SS_long (obj, val ? &v : 0); + if (SWIG_IsOK(res) && val) *val = static_cast< ptrdiff_t >(v); + } +#endif + return res; +} + + +#include "datetime.h" +#include "math/real.h" +#include "math/time.h" +#include "math/timeseries.h" + + +static cmf::math::Time convert_datetime_to_cmftime(PyObject* dt) { + cmf::math::Time* swigtime=0; + int res=SWIG_ConvertPtr(dt,(void**)(&swigtime),SWIGTYPE_p_cmf__math__Time,0); + if (SWIG_IsOK(res) && swigtime!=0) { + return *swigtime; + } else if (PyDateTime_Check(dt)) { + return cmf::math::Time(PyDateTime_GET_DAY(dt), + PyDateTime_GET_MONTH(dt), + PyDateTime_GET_YEAR(dt), + PyDateTime_DATE_GET_HOUR(dt), + PyDateTime_DATE_GET_MINUTE(dt), + PyDateTime_DATE_GET_SECOND(dt), + PyDateTime_DATE_GET_MICROSECOND(dt)/1000); + } else if (PyDate_Check(dt)) { + return cmf::math::Time(PyDateTime_GET_DAY(dt), + PyDateTime_GET_MONTH(dt), + PyDateTime_GET_YEAR(dt)); + } else if (PyDelta_Check(dt)) { + PyDateTime_Delta* delta=(PyDateTime_Delta*)(dt); + long long ms=24 * 3600; + ms*=delta->days; + ms+=delta->seconds; + ms*=1000; + ms+=delta->microseconds/1000; + return cmf::math::timespan(ms); + } else { + return cmf::math::never; + } + +} +static bool check_time(PyObject* dt) { + void * pT = 0; + int res=SWIG_ConvertPtr(dt,&pT,SWIGTYPE_p_cmf__math__Time,0); + if (SWIG_IsOK(res) && pT!=0) return true; + else if (PyDateTime_Check(dt)) return true; + else if (PyDelta_Check(dt)) return true; + else if (PyDate_Check(dt)) return true; + else return false; +} + + + + +SWIGINTERN swig_type_info* +SWIG_pchar_descriptor(void) +{ + static int init = 0; + static swig_type_info* info = 0; + if (!init) { + info = SWIG_TypeQuery("_p_char"); + init = 1; + } + return info; +} + + +SWIGINTERNINLINE PyObject * +SWIG_FromCharPtrAndSize(const char* carray, size_t size) +{ + if (carray) { + if (size > INT_MAX) { + swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); + return pchar_descriptor ? + SWIG_InternalNewPointerObj(const_cast< char * >(carray), pchar_descriptor, 0) : SWIG_Py_Void(); + } else { +#if PY_VERSION_HEX >= 0x03000000 +#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR) + return PyBytes_FromStringAndSize(carray, static_cast< Py_ssize_t >(size)); +#else +#if PY_VERSION_HEX >= 0x03010000 + return PyUnicode_DecodeUTF8(carray, static_cast< Py_ssize_t >(size), "surrogateescape"); +#else + return PyUnicode_FromStringAndSize(carray, static_cast< Py_ssize_t >(size)); +#endif +#endif +#else + return PyString_FromStringAndSize(carray, static_cast< Py_ssize_t >(size)); +#endif + } + } else { + return SWIG_Py_Void(); + } +} + + +SWIGINTERNINLINE PyObject * +SWIG_From_std_string (const std::string& s) +{ + return SWIG_FromCharPtrAndSize(s.data(), s.size()); +} + + +#ifdef SWIG_LONG_LONG_AVAILABLE +SWIGINTERNINLINE PyObject* +SWIG_From_long_SS_long (long long value) +{ + return ((value < LONG_MIN) || (value > LONG_MAX)) ? + PyLong_FromLongLong(value) : PyInt_FromLong(static_cast< long >(value)); +} +#endif + + +SWIGINTERN int +SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc) +{ +#if PY_VERSION_HEX>=0x03000000 +#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR) + if (PyBytes_Check(obj)) +#else + if (PyUnicode_Check(obj)) +#endif +#else + if (PyString_Check(obj)) +#endif + { + char *cstr; Py_ssize_t len; +#if PY_VERSION_HEX>=0x03000000 +#if !defined(SWIG_PYTHON_STRICT_BYTE_CHAR) + if (!alloc && cptr) { + /* We can't allow converting without allocation, since the internal + representation of string in Python 3 is UCS-2/UCS-4 but we require + a UTF-8 representation. + TODO(bhy) More detailed explanation */ + return SWIG_RuntimeError; + } + obj = PyUnicode_AsUTF8String(obj); + if(alloc) *alloc = SWIG_NEWOBJ; +#endif + PyBytes_AsStringAndSize(obj, &cstr, &len); +#else + PyString_AsStringAndSize(obj, &cstr, &len); +#endif + if (cptr) { + if (alloc) { + /* + In python the user should not be able to modify the inner + string representation. To warranty that, if you define + SWIG_PYTHON_SAFE_CSTRINGS, a new/copy of the python string + buffer is always returned. + + The default behavior is just to return the pointer value, + so, be careful. + */ +#if defined(SWIG_PYTHON_SAFE_CSTRINGS) + if (*alloc != SWIG_OLDOBJ) +#else + if (*alloc == SWIG_NEWOBJ) +#endif + { + *cptr = reinterpret_cast< char* >(memcpy(new char[len + 1], cstr, sizeof(char)*(len + 1))); + *alloc = SWIG_NEWOBJ; + } else { + *cptr = cstr; + *alloc = SWIG_OLDOBJ; + } + } else { +#if PY_VERSION_HEX>=0x03000000 +#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR) + *cptr = PyBytes_AsString(obj); +#else + assert(0); /* Should never reach here with Unicode strings in Python 3 */ +#endif +#else + *cptr = SWIG_Python_str_AsChar(obj); +#endif + } + } + if (psize) *psize = len + 1; +#if PY_VERSION_HEX>=0x03000000 && !defined(SWIG_PYTHON_STRICT_BYTE_CHAR) + Py_XDECREF(obj); +#endif + return SWIG_OK; + } else { +#if defined(SWIG_PYTHON_2_UNICODE) +#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR) +#error "Cannot use both SWIG_PYTHON_2_UNICODE and SWIG_PYTHON_STRICT_BYTE_CHAR at once" +#endif +#if PY_VERSION_HEX<0x03000000 + if (PyUnicode_Check(obj)) { + char *cstr; Py_ssize_t len; + if (!alloc && cptr) { + return SWIG_RuntimeError; + } + obj = PyUnicode_AsUTF8String(obj); + if (PyString_AsStringAndSize(obj, &cstr, &len) != -1) { + if (cptr) { + if (alloc) *alloc = SWIG_NEWOBJ; + *cptr = reinterpret_cast< char* >(memcpy(new char[len + 1], cstr, sizeof(char)*(len + 1))); + } + if (psize) *psize = len + 1; + + Py_XDECREF(obj); + return SWIG_OK; + } else { + Py_XDECREF(obj); + } + } +#endif +#endif + + swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); + if (pchar_descriptor) { + void* vptr = 0; + if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) { + if (cptr) *cptr = (char *) vptr; + if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0; + if (alloc) *alloc = SWIG_OLDOBJ; + return SWIG_OK; + } + } + } + return SWIG_TypeError; +} + + +SWIGINTERN int +SWIG_AsCharArray(PyObject * obj, char *val, size_t size) +{ + char* cptr = 0; size_t csize = 0; int alloc = SWIG_OLDOBJ; + int res = SWIG_AsCharPtrAndSize(obj, &cptr, &csize, &alloc); + if (SWIG_IsOK(res)) { + /* special case of single char conversion when we don't need space for NUL */ + if (size == 1 && csize == 2 && cptr && !cptr[1]) --csize; + if (csize <= size) { + if (val) { + if (csize) memcpy(val, cptr, csize*sizeof(char)); + if (csize < size) memset(val + csize, 0, (size - csize)*sizeof(char)); + } + if (alloc == SWIG_NEWOBJ) { + delete[] cptr; + res = SWIG_DelNewMask(res); + } + return res; + } + if (alloc == SWIG_NEWOBJ) delete[] cptr; + } + return SWIG_TypeError; +} + + +SWIGINTERN int +SWIG_AsVal_char (PyObject * obj, char *val) +{ + int res = SWIG_AsCharArray(obj, val, 1); + if (!SWIG_IsOK(res)) { + long v; + res = SWIG_AddCast(SWIG_AsVal_long (obj, &v)); + if (SWIG_IsOK(res)) { + if ((CHAR_MIN <= v) && (v <= CHAR_MAX)) { + if (val) *val = static_cast< char >(v); + } else { + res = SWIG_OverflowError; + } + } + } + return res; +} + + +#define cmf_math_timeseries_begin_get(self_) new cmf::math::Time(self_->begin()) + + +#define cmf_math_timeseries_step_get(self_) new cmf::math::Time(self_->step()) + + +#define cmf_math_timeseries_end_get(self_) new cmf::math::Time(self_->end()) + + +SWIGINTERN int +SWIG_AsVal_unsigned_SS_long (PyObject *obj, unsigned long *val) +{ +#if PY_VERSION_HEX < 0x03000000 + if (PyInt_Check(obj)) { + long v = PyInt_AsLong(obj); + if (v >= 0) { + if (val) *val = v; + return SWIG_OK; + } else { + return SWIG_OverflowError; + } + } else +#endif + if (PyLong_Check(obj)) { + unsigned long v = PyLong_AsUnsignedLong(obj); + if (!PyErr_Occurred()) { + if (val) *val = v; + return SWIG_OK; + } else { + PyErr_Clear(); + return SWIG_OverflowError; + } + } +#ifdef SWIG_PYTHON_CAST_MODE + { + int dispatch = 0; + unsigned long v = PyLong_AsUnsignedLong(obj); + if (!PyErr_Occurred()) { + if (val) *val = v; + return SWIG_AddCast(SWIG_OK); + } else { + PyErr_Clear(); + } + if (!dispatch) { + double d; + int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d)); + if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, ULONG_MAX)) { + if (val) *val = (unsigned long)(d); + return res; + } + } + } +#endif + return SWIG_TypeError; +} + + +#ifdef SWIG_LONG_LONG_AVAILABLE +SWIGINTERN int +SWIG_AsVal_unsigned_SS_long_SS_long (PyObject *obj, unsigned long long *val) +{ + int res = SWIG_TypeError; + if (PyLong_Check(obj)) { + unsigned long long v = PyLong_AsUnsignedLongLong(obj); + if (!PyErr_Occurred()) { + if (val) *val = v; + return SWIG_OK; + } else { + PyErr_Clear(); + res = SWIG_OverflowError; + } + } else { + unsigned long v; + res = SWIG_AsVal_unsigned_SS_long (obj,&v); + if (SWIG_IsOK(res)) { + if (val) *val = v; + return res; + } + } +#ifdef SWIG_PYTHON_CAST_MODE + { + const double mant_max = 1LL << DBL_MANT_DIG; + double d; + res = SWIG_AsVal_double (obj,&d); + if (SWIG_IsOK(res) && !SWIG_CanCastAsInteger(&d, 0, mant_max)) + return SWIG_OverflowError; + if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, mant_max)) { + if (val) *val = (unsigned long long)(d); + return SWIG_AddCast(res); + } + res = SWIG_TypeError; + } +#endif + return res; +} +#endif + + +SWIGINTERNINLINE int +SWIG_AsVal_size_t (PyObject * obj, size_t *val) +{ + int res = SWIG_TypeError; +#ifdef SWIG_LONG_LONG_AVAILABLE + if (sizeof(size_t) <= sizeof(unsigned long)) { +#endif + unsigned long v; + res = SWIG_AsVal_unsigned_SS_long (obj, val ? &v : 0); + if (SWIG_IsOK(res) && val) *val = static_cast< size_t >(v); +#ifdef SWIG_LONG_LONG_AVAILABLE + } else if (sizeof(size_t) <= sizeof(unsigned long long)) { + unsigned long long v; + res = SWIG_AsVal_unsigned_SS_long_SS_long (obj, val ? &v : 0); + if (SWIG_IsOK(res) && val) *val = static_cast< size_t >(v); + } +#endif + return res; +} + + +SWIGINTERN int +SWIG_AsPtr_std_string (PyObject * obj, std::string **val) +{ + char* buf = 0 ; size_t size = 0; int alloc = SWIG_OLDOBJ; + if (SWIG_IsOK((SWIG_AsCharPtrAndSize(obj, &buf, &size, &alloc)))) { + if (buf) { + if (val) *val = new std::string(buf, size - 1); + if (alloc == SWIG_NEWOBJ) delete[] buf; + return SWIG_NEWOBJ; + } else { + if (val) *val = 0; + return SWIG_OLDOBJ; + } + } else { + static int init = 0; + static swig_type_info* descriptor = 0; + if (!init) { + descriptor = SWIG_TypeQuery("std::string" " *"); + init = 1; + } + if (descriptor) { + std::string *vptr; + int res = SWIG_ConvertPtr(obj, (void**)&vptr, descriptor, 0); + if (SWIG_IsOK(res) && val) *val = vptr; + return res; + } + } + return SWIG_ERROR; +} + +SWIGINTERN ptrdiff_t cmf_math_timeseries___len__(cmf::math::timeseries *self){ + return self->size(); + } + +SWIGINTERNINLINE PyObject * +SWIG_From_ptrdiff_t (ptrdiff_t value) +{ +#ifdef SWIG_LONG_LONG_AVAILABLE + if (sizeof(ptrdiff_t) <= sizeof(long)) { +#endif + return SWIG_From_long (static_cast< long >(value)); +#ifdef SWIG_LONG_LONG_AVAILABLE + } else { + /* assume sizeof(ptrdiff_t) <= sizeof(long long) */ + return SWIG_From_long_SS_long (static_cast< long long >(value)); + } +#endif +} + + +#include "math/statevariable.h" +#include "math/integrators/integrator.h" +#include "math/integrators/bdf2.h" +#include "math/integrators/explicit_euler.h" +#include "math/integrators/implicit_euler.h" +#include "math/integrators/RKFintegrator.h" +#include "math/integrators/cvodeintegrator.h" +#include "math/integrators/multiintegrator.h" + + +#define cmf_math_StateVariable_state_get(self_) self_->get_state() +#define cmf_math_StateVariable_state_set(self_, val_) self_->set_state(val_) + +SWIGINTERN size_t cmf_math_integratable_list___len__(cmf::math::integratable_list const *self){ + return self->size(); + } +SWIGINTERN size_t cmf_math_StateVariableList___len__(cmf::math::StateVariableList const *self){ + return self->size(); + } + +#define cmf_math_CVodeIntegrator_order_get(self_) self_->get_order() + + +SWIGINTERN int +SWIG_AsVal_bool (PyObject *obj, bool *val) +{ + int r; + if (!PyBool_Check(obj)) + return SWIG_ERROR; + r = PyObject_IsTrue(obj); + if (r == -1) + return SWIG_ERROR; + if (val) *val = r ? true : false; + return SWIG_OK; +} + +SWIGINTERN cmf::math::StateVariable::ptr cmf_math_Integrator___getitem__(cmf::math::Integrator *self,int index){ + return (*self)[index]; + } + +SWIGINTERNINLINE PyObject * +SWIG_From_char (char c) +{ + return SWIG_FromCharPtrAndSize(&c,1); +} + + + // Include Water + #include "water/Solute.h" + #include "water/SoluteStorage.h" + #include "water/WaterStorage.h" + #include "water/flux_connection.h" + #include "water/boundary_condition.h" + #include "water/simple_connections.h" + #include "water/system_bridge.h" + +SWIGINTERN std::string cmf_water_solute___repr__(cmf::water::solute *self){ return "[" + self->Name + "]"; } +SWIGINTERN cmf::water::solute *cmf_water_solute_vector___getitem__(cmf::water::solute_vector *self,int i){ + return self->get_solute(i); + } +SWIGINTERN size_t cmf_water_solute_vector___len__(cmf::water::solute_vector *self){ return self->size();} +SWIGINTERN cmf::math::timeseries &cmf_water_SoluteTimeseries___getitem__(cmf::water::SoluteTimeseries *self,cmf::water::solute const &solute){ + return (*self)[solute]; + } +SWIGINTERN void cmf_water_SoluteTimeseries___setitem__(cmf::water::SoluteTimeseries *self,cmf::water::solute const &solute,cmf::math::timeseries concentration){ + (*self)[solute]=concentration; + } +SWIGINTERN size_t cmf_water_SoluteTimeseries___len__(cmf::water::SoluteTimeseries const *self){ + return self->size(); + } + +#define cmf_water_flux_node_project_get(self_) &self_->get_project() + + +#define cmf_water_flux_node_potential_get(self_) self_->get_potential() +#define cmf_water_flux_node_potential_set(self_, val_) self_->set_potential(val_) + + +#define cmf_water_flux_node_connections_get(self_) new cmf::water::connection_list(self_->get_connections()) + + +struct SWIG_null_deleter { + void operator() (void const *) const { + } +}; +#define SWIG_NO_NULL_DELETER_0 , SWIG_null_deleter() +#define SWIG_NO_NULL_DELETER_1 +#define SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW +#define SWIG_NO_NULL_DELETER_SWIG_POINTER_OWN + + +#define SWIG_NO_NULL_DELETER_SWIG_BUILTIN_INIT + +SWIGINTERN size_t cmf_water_connection_list___len__(cmf::water::connection_list const *self){ return self->size();} +SWIGINTERN bool cmf_water_connection_list___contains__(cmf::water::connection_list const *self,cmf::water::flux_connection::ptr const &con){ return self->contains(con);} + +#define cmf_water_WaterStorage_volume_get(self_) self_->get_volume() +#define cmf_water_WaterStorage_volume_set(self_, val_) self_->set_volume(val_) + + +#define cmf_water_WaterStorage_statevariable_get(self_) self_->get_state_variable_content() +#define cmf_water_WaterStorage_statevariable_set(self_, val_) self_->set_state_variable_content(val_) + + +#include "water/collections.h" + + +#define cmf_water_node_list_potentials_get(self_) self_->get_potentials() +#define cmf_water_node_list_potentials_set(self_, val_) self_->set_potentials(val_) + + +#define cmf_water_NeumannBoundary_list_fluxes_get(self_) self_->get_fluxes() +#define cmf_water_NeumannBoundary_list_fluxes_set(self_, val_) self_->set_fluxes(val_) + + + #include "atmosphere/Weather.h" + #include "atmosphere/meteorology.h" + #include "atmosphere/precipitation.h" + +SWIGINTERN double cmf_atmosphere_RainfallStation___call__(cmf::atmosphere::RainfallStation const *self,cmf::math::Time t){ return self->data[t]; } + + #include "upslope/vegetation/StructVegetation.h" + #include "upslope/surfacewater.h" + #include "upslope/cell.h" + #include "upslope/Topology.h" + #include "upslope/algorithm.h" + + +SWIGINTERN std::string cmf_upslope_vegetation_Vegetation___repr__(cmf::upslope::vegetation::Vegetation *self){ + std::stringstream sstr; + sstr << "cmf.vegetation(\n" + << " Height = " << self->Height << " [m]" << std::endl + << " LAI = " << self->LAI << " [m2/m2]" << std::endl + << " albedo = " << self->albedo << " [W/W]" << std::endl + << " CanopyClosure = " << self->CanopyClosure << " [m2/m2]" << std::endl + << " CanopyPARExtinction = " << self->CanopyPARExtinction << std::endl + << " CanopyCapacityPerLAI = " << self->CanopyCapacityPerLAI << " [mm]" << std::endl + << " StomatalResistance = " << self->StomatalResistance << " [s/m]" << std::endl + << " RootDepth = " << self->RootDepth << " [m]" << std::endl + << " fraction_at_rootdepth = " << self->fraction_at_rootdepth << " [-]" << std::endl + << " RootContent = " << self->RootContent << " [kg/m3]" << std::endl + << ")" << std::endl; + return sstr.str(); + } + +#define cmf_upslope_Cell_topology_get(self_) &self_->get_topology() + + +#define cmf_upslope_Cell_meteorology_get(self_) &self_->get_meteorology() +#define cmf_upslope_Cell_meteorology_set(self_, val_) self_->set_meteorology(*val_) + + +#define cmf_upslope_Cell_layers_get(self_) &self_->get_layers() + + +#define cmf_upslope_Cell_project_get(self_) &self_->get_project() + + +#define cmf_upslope_Cell_saturated_depth_get(self_) self_->get_saturated_depth() +#define cmf_upslope_Cell_saturated_depth_set(self_, val_) self_->set_saturated_depth(val_) + + +#define cmf_upslope_Cell_area_get(self_) self_->get_area() + + +#define cmf_upslope_Cell_soildepth_get(self_) self_->get_soildepth() + +SWIGINTERN bool cmf_upslope_neighbor_iterator___eq__(cmf::upslope::neighbor_iterator *self,cmf::upslope::neighbor_iterator const &cmp){return (*self)==cmp;} +SWIGINTERN bool cmf_upslope_neighbor_iterator___neq__(cmf::upslope::neighbor_iterator *self,cmf::upslope::neighbor_iterator const &cmp){return (*self)!=cmp;} + +#define cmf_upslope_cell_vector_lowest_get(self_) &self_->get_lowest() + + +#define cmf_upslope_cell_vector_highest_get(self_) &self_->get_highest() + + + // Include Upslope + #include "upslope/Soil/RetentionCurve.h" + #include "upslope/SoilLayer.h" + + +#define cmf_upslope_BrooksCoreyRetentionCurve_b_get(self_) self_->get_b() +#define cmf_upslope_BrooksCoreyRetentionCurve_b_set(self_, val_) self_->set_b(val_) + + +#define cmf_upslope_SoilLayer_gravitational_potential_get(self_) self_->get_gravitational_potential() + + +#define cmf_upslope_SoilLayer_matrix_potential_get(self_) self_->get_matrix_potential() + + +#define cmf_upslope_SoilLayer_wetness_get(self_) self_->get_wetness() +#define cmf_upslope_SoilLayer_wetness_set(self_, val_) self_->set_wetness(val_) + + +#define cmf_upslope_SoilLayer_theta_get(self_) self_->get_theta() +#define cmf_upslope_SoilLayer_theta_set(self_, val_) self_->set_theta(val_) + + +#define cmf_upslope_SoilLayer_K_get(self_) self_->get_K() + + +#define cmf_upslope_SoilLayer_Ksat_get(self_) self_->get_Ksat() + + +#define cmf_upslope_SoilLayer_thickness_get(self_) self_->get_thickness() + + +#define cmf_upslope_SoilLayer_lower_boundary_get(self_) self_->get_lower_boundary() + + +#define cmf_upslope_SoilLayer_upper_boundary_get(self_) self_->get_upper_boundary() + + +#define cmf_upslope_SoilLayer_porosity_get(self_) self_->get_porosity() + + +#define cmf_upslope_SoilLayer_ice_fraction_get(self_) self_->get_ice_fraction() +#define cmf_upslope_SoilLayer_ice_fraction_set(self_, val_) self_->set_ice_fraction(val_) + + +#define cmf_upslope_SoilLayer_rootfraction_get(self_) self_->get_rootfraction() +#define cmf_upslope_SoilLayer_rootfraction_set(self_, val_) self_->set_rootfraction(val_) + + +#define cmf_upslope_layer_list_gravitational_potential_get(self_) self_->get_gravitational_potential() + + +#define cmf_upslope_layer_list_matrix_potential_get(self_) self_->get_matrix_potential() + + +#define cmf_upslope_layer_list_wetness_get(self_) self_->get_wetness() + + +#define cmf_upslope_layer_list_volume_get(self_) self_->get_volume() + + +#define cmf_upslope_layer_list_potential_get(self_) self_->get_potential() + + +#define cmf_upslope_layer_list_K_get(self_) self_->get_K() + + +#define cmf_upslope_layer_list_Ksat_get(self_) self_->get_Ksat() + + +#define cmf_upslope_layer_list_thickness_get(self_) self_->get_thickness() + + +#define cmf_upslope_layer_list_lower_boundary_get(self_) self_->get_lower_boundary() + + +#define cmf_upslope_layer_list_upper_boundary_get(self_) self_->get_upper_boundary() + + +#define cmf_upslope_layer_list_porosity_get(self_) self_->get_porosity() + + +#define cmf_upslope_layer_list_ice_fraction_get(self_) self_->get_ice_fraction() + + +#define cmf_upslope_layer_list_theta_get(self_) self_->get_theta() + + +#define cmf_upslope_layer_list_root_get(self_) self_->get_rootfraction() + +SWIGINTERN cmf::upslope::SoilLayer::ptr cmf_upslope_layer_list___get(cmf::upslope::layer_list *self,int index){ return (*self)[index];} + +#include "upslope/macropore.h" + + +#define cmf_upslope_MacroPore_filled_fraction_get(self_) self_->get_filled_fraction() + + +#define cmf_upslope_MacroPore_K_get(self_) self_->get_K() + + +#define cmf_upslope_MacroPore_capacity_get(self_) self_->get_capacity() + + +#define cmf_upslope_MacroPore_cell_get(self_) self_->get_cell() + + + #include "reach/ReachType.h" + #include "reach/OpenWaterStorage.h" + #include "reach/Reach.h" + + +#define cmf_river_OpenWaterStorage_depth_get(self_) self_->get_depth() +#define cmf_river_OpenWaterStorage_depth_set(self_, val_) self_->set_depth(val_) + + +#define cmf_river_Reach_length_get(self_) self_->get_length() + + +#define cmf_river_Reach_width_get(self_) self_->get_width() + + +#define cmf_river_Reach_channel_get(self_) &self_->get_height_function() + + +#define cmf_river_Reach_upstream_count_get(self_) self_->upstream_count() + + +#define cmf_river_Reach_diffusive_get(self_) self_->get_diffusive() +#define cmf_river_Reach_diffusive_set(self_, val_) self_->set_diffusive(val_) + + +#define cmf_river_ReachIterator_position_get(self_) self_->position() + + +#define cmf_upslope_SurfaceWater_puddledepth_get(self_) self_->get_puddledepth() +#define cmf_upslope_SurfaceWater_puddledepth_set(self_, val_) self_->set_puddledepth(val_) + + +#define cmf_upslope_SurfaceWater_nManning_get(self_) self_->get_nManning() +#define cmf_upslope_SurfaceWater_nManning_set(self_, val_) self_->set_nManning(val_) + + + #include "upslope/groundwater.h" + #include "upslope/connections/subsurfacefluxes.h" + #include "upslope/connections/surfacefluxes.h" + #include "upslope/connections/AtmosphericFluxes.h" + #include "upslope/connections/infiltration.h" + #include "upslope/connections/Percolation.h" + #include "upslope/vegetation/ET.h" + #include "upslope/vegetation/ShuttleworthWallace.h" + // Include river model + #include "reach/ManningConnection.h" + // Include the combined solver + #include "math/integrators/WaterSoluteIntegrator.h" + + +#define cmf_upslope_aquifer_base_height_get(self_) self_->get_base_height() + + +#define cmf_upslope_aquifer_top_height_get(self_) self_->get_top_height() + + + #include "project.h" + + +#define cmf_project_cells_get(self_) &self_->get_cells() + +#ifdef __cplusplus +extern "C" { +#endif +SWIGINTERN PyObject *_wrap_get_parallel_threads(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + int result; + + if (!SWIG_Python_UnpackTuple(args,"get_parallel_threads",0,0,0)) SWIG_fail; + { + try { + result = (int)cmf::math::get_parallel_threads(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_set_parallel_threads(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + int arg1 ; + int val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + char * kwnames[] = { + (char *) "numthreads", NULL + }; + int result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:set_parallel_threads",kwnames,&obj0)) SWIG_fail; + ecode1 = SWIG_AsVal_int(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "set_parallel_threads" "', argument " "1"" of type '" "int""'"); + } + arg1 = static_cast< int >(val1); + { + try { + result = (int)cmf::math::set_parallel_threads(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_cubicspline(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::math::num_array *arg1 = 0 ; + cmf::math::num_array *arg2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "x",(char *) "y", NULL + }; + cmf::math::cubicspline *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:new_cubicspline",kwnames,&obj0,&obj1)) SWIG_fail; + { + // Convert a array_wrapper from numpy array + double * data=0; + ptrdiff_t size = from_npy_array(obj0,&data); + if (!data) { + SWIG_exception_fail(SWIG_TypeError,"Input data is not 'array-like' (in the sense of numpy arrays)"); + return NULL; + } + arg1 = new cmf::math::num_array(size,data); + } + { + // Convert a array_wrapper from numpy array + double * data=0; + ptrdiff_t size = from_npy_array(obj1,&data); + if (!data) { + SWIG_exception_fail(SWIG_TypeError,"Input data is not 'array-like' (in the sense of numpy arrays)"); + return NULL; + } + arg2 = new cmf::math::num_array(size,data); + } + { + try { + result = (cmf::math::cubicspline *)new cmf::math::cubicspline((cmf::math::num_array const &)*arg1,(cmf::math::num_array const &)*arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__cubicspline, SWIG_POINTER_NEW | 0 ); + { + delete arg1; + } + { + delete arg2; + } + return resultobj; +fail: + { + delete arg1; + } + { + delete arg2; + } + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cubicspline_generate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::cubicspline *arg1 = (cmf::math::cubicspline *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__cubicspline, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cubicspline_generate" "', argument " "1"" of type '" "cmf::math::cubicspline *""'"); + } + arg1 = reinterpret_cast< cmf::math::cubicspline * >(argp1); + { + try { + (arg1)->generate(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cubicspline_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::cubicspline *arg1 = (cmf::math::cubicspline *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + size_t result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__cubicspline, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cubicspline_size" "', argument " "1"" of type '" "cmf::math::cubicspline const *""'"); + } + arg1 = reinterpret_cast< cmf::math::cubicspline * >(argp1); + { + try { + result = ((cmf::math::cubicspline const *)arg1)->size(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cubicspline___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::math::cubicspline *arg1 = (cmf::math::cubicspline *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "x", NULL + }; + real result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:cubicspline___call__",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__math__cubicspline, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cubicspline___call__" "', argument " "1"" of type '" "cmf::math::cubicspline *""'"); + } + arg1 = reinterpret_cast< cmf::math::cubicspline * >(argp1); + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cubicspline___call__" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + { + try { + result = (real)(arg1)->operator ()(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_cubicspline(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::cubicspline *arg1 = (cmf::math::cubicspline *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__cubicspline, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_cubicspline" "', argument " "1"" of type '" "cmf::math::cubicspline *""'"); + } + arg1 = reinterpret_cast< cmf::math::cubicspline * >(argp1); + { + try { + delete arg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *cubicspline_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__math__cubicspline, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *cubicspline_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN int Swig_var_PI_set(PyObject *) { + SWIG_Error(SWIG_AttributeError,"Variable PI is read-only."); + return 1; +} + + +SWIGINTERN PyObject *Swig_var_PI_get(void) { + PyObject *pyobj = 0; + + pyobj = SWIG_From_double(static_cast< double >(cmf::geometry::PI)); + return pyobj; +} + + +SWIGINTERN PyObject *_wrap_point_x_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::geometry::point *arg1 = (cmf::geometry::point *) 0 ; + double arg2 ; + cmf::geometry::point p1 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"point_x_set",2,2,swig_obj)) SWIG_fail; + { + if (SWIG_ConvertPtr(swig_obj[0], (void **) &arg1, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { + if (check_xy(swig_obj[0])) { + std::string res = convert_xyz_to_point(swig_obj[0],p1); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + return NULL; + } + } + else if (PySequence_Check(swig_obj[0])) { + std::string res = convert_seq_to_point(swig_obj[0],p1); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError, res.c_str()); + } + } else { + std::string res="<"; + res+=pyrepr(swig_obj[0]); + res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + } + arg1 = &p1; + } + } + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "point_x_set" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + if (arg1) (arg1)->x = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_point_x_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::geometry::point *arg1 = (cmf::geometry::point *) 0 ; + cmf::geometry::point p1 ; + PyObject *swig_obj[1] ; + double result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + if (SWIG_ConvertPtr(swig_obj[0], (void **) &arg1, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { + if (check_xy(swig_obj[0])) { + std::string res = convert_xyz_to_point(swig_obj[0],p1); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + return NULL; + } + } + else if (PySequence_Check(swig_obj[0])) { + std::string res = convert_seq_to_point(swig_obj[0],p1); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError, res.c_str()); + } + } else { + std::string res="<"; + res+=pyrepr(swig_obj[0]); + res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + } + arg1 = &p1; + } + } + result = (double) ((arg1)->x); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_point_y_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::geometry::point *arg1 = (cmf::geometry::point *) 0 ; + double arg2 ; + cmf::geometry::point p1 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"point_y_set",2,2,swig_obj)) SWIG_fail; + { + if (SWIG_ConvertPtr(swig_obj[0], (void **) &arg1, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { + if (check_xy(swig_obj[0])) { + std::string res = convert_xyz_to_point(swig_obj[0],p1); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + return NULL; + } + } + else if (PySequence_Check(swig_obj[0])) { + std::string res = convert_seq_to_point(swig_obj[0],p1); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError, res.c_str()); + } + } else { + std::string res="<"; + res+=pyrepr(swig_obj[0]); + res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + } + arg1 = &p1; + } + } + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "point_y_set" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + if (arg1) (arg1)->y = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_point_y_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::geometry::point *arg1 = (cmf::geometry::point *) 0 ; + cmf::geometry::point p1 ; + PyObject *swig_obj[1] ; + double result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + if (SWIG_ConvertPtr(swig_obj[0], (void **) &arg1, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { + if (check_xy(swig_obj[0])) { + std::string res = convert_xyz_to_point(swig_obj[0],p1); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + return NULL; + } + } + else if (PySequence_Check(swig_obj[0])) { + std::string res = convert_seq_to_point(swig_obj[0],p1); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError, res.c_str()); + } + } else { + std::string res="<"; + res+=pyrepr(swig_obj[0]); + res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + } + arg1 = &p1; + } + } + result = (double) ((arg1)->y); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_point_z_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::geometry::point *arg1 = (cmf::geometry::point *) 0 ; + double arg2 ; + cmf::geometry::point p1 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"point_z_set",2,2,swig_obj)) SWIG_fail; + { + if (SWIG_ConvertPtr(swig_obj[0], (void **) &arg1, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { + if (check_xy(swig_obj[0])) { + std::string res = convert_xyz_to_point(swig_obj[0],p1); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + return NULL; + } + } + else if (PySequence_Check(swig_obj[0])) { + std::string res = convert_seq_to_point(swig_obj[0],p1); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError, res.c_str()); + } + } else { + std::string res="<"; + res+=pyrepr(swig_obj[0]); + res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + } + arg1 = &p1; + } + } + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "point_z_set" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + if (arg1) (arg1)->z = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_point_z_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::geometry::point *arg1 = (cmf::geometry::point *) 0 ; + cmf::geometry::point p1 ; + PyObject *swig_obj[1] ; + double result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + if (SWIG_ConvertPtr(swig_obj[0], (void **) &arg1, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { + if (check_xy(swig_obj[0])) { + std::string res = convert_xyz_to_point(swig_obj[0],p1); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + return NULL; + } + } + else if (PySequence_Check(swig_obj[0])) { + std::string res = convert_seq_to_point(swig_obj[0],p1); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError, res.c_str()); + } + } else { + std::string res="<"; + res+=pyrepr(swig_obj[0]); + res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + } + arg1 = &p1; + } + } + result = (double) ((arg1)->z); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_point__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) { + PyObject *resultobj = 0; + cmf::geometry::point *result = 0 ; + + if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; + { + try { + result = (cmf::geometry::point *)new cmf::geometry::point(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_point__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::geometry::point *arg1 = 0 ; + cmf::geometry::point p1 ; + cmf::geometry::point *result = 0 ; + + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + { + if (SWIG_ConvertPtr(swig_obj[0], (void **) &arg1, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { + if (check_xy(swig_obj[0])) { + std::string res = convert_xyz_to_point(swig_obj[0],p1); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + return NULL; + } + } + else if (PySequence_Check(swig_obj[0])) { + std::string res = convert_seq_to_point(swig_obj[0],p1); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError, res.c_str()); + } + } else { + std::string res="<"; + res+=pyrepr(swig_obj[0]); + res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + } + arg1 = &p1; + } + } + { + try { + result = (cmf::geometry::point *)new cmf::geometry::point((cmf::geometry::point const &)*arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_point__SWIG_2(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + double arg1 ; + double arg2 ; + double arg3 = (double) 0.0 ; + double val1 ; + int ecode1 = 0 ; + double val2 ; + int ecode2 = 0 ; + double val3 ; + int ecode3 = 0 ; + cmf::geometry::point *result = 0 ; + + if ((nobjs < 2) || (nobjs > 3)) SWIG_fail; + ecode1 = SWIG_AsVal_double(swig_obj[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_point" "', argument " "1"" of type '" "double""'"); + } + arg1 = static_cast< double >(val1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_point" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + if (swig_obj[2]) { + ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_point" "', argument " "3"" of type '" "double""'"); + } + arg3 = static_cast< double >(val3); + } + { + try { + result = (cmf::geometry::point *)new cmf::geometry::point(arg1,arg2,arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_point(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[4] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"new_point",0,3,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 0) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + if (argc == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + { + cmf::geometry::point p; + _v=check_xy(argv[0]) || check_seq_point(argv[0]); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + if ((argc >= 2) && (argc <= 3)) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + { + int res = SWIG_AsVal_double(argv[0], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_double(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (argc > 2) { + { + { + int res = SWIG_AsVal_double(argv[2], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + } + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 3; + if (_rank == _rankm) goto dispatch; + } + } + check_3: + + dispatch: + switch(_index) { + case 1: + return _wrap_new_point__SWIG_0(self, argc, argv); + case 2: + return _wrap_new_point__SWIG_1(self, argc, argv); + case 3: + return _wrap_new_point__SWIG_2(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_point'.\n" + " Possible C/C++ prototypes are:\n" + " cmf::geometry::point::point()\n" + " cmf::geometry::point::point(cmf::geometry::point const &)\n" + " cmf::geometry::point::point(double,double,double)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_point_distanceTo(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::geometry::point *arg1 = (cmf::geometry::point *) 0 ; + cmf::geometry::point arg2 ; + cmf::geometry::point p1 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "p", NULL + }; + double result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:point_distanceTo",kwnames,&obj0,&obj1)) SWIG_fail; + { + if (SWIG_ConvertPtr(obj0, (void **) &arg1, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { + if (check_xy(obj0)) { + std::string res = convert_xyz_to_point(obj0,p1); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + return NULL; + } + } + else if (PySequence_Check(obj0)) { + std::string res = convert_seq_to_point(obj0,p1); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError, res.c_str()); + } + } else { + std::string res="<"; + res+=pyrepr(obj0); + res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + } + arg1 = &p1; + } + } + { + if (check_xy(obj1)) { + std::string res = convert_xyz_to_point(obj1,arg2); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + return NULL; + } + } + else if (PySequence_Check(obj1)) { + std::string res = convert_seq_to_point(obj1,arg2); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError, res.c_str()); + } + } else { + std::string res="<"; + res+=pyrepr(obj1); + res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + } + } + { + try { + result = (double)((cmf::geometry::point const *)arg1)->distanceTo(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_point_z_weight_distance(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::geometry::point *arg1 = (cmf::geometry::point *) 0 ; + cmf::geometry::point arg2 ; + double arg3 ; + cmf::geometry::point p1 ; + double val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "p",(char *) "z_weight", NULL + }; + double result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:point_z_weight_distance",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + { + if (SWIG_ConvertPtr(obj0, (void **) &arg1, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { + if (check_xy(obj0)) { + std::string res = convert_xyz_to_point(obj0,p1); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + return NULL; + } + } + else if (PySequence_Check(obj0)) { + std::string res = convert_seq_to_point(obj0,p1); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError, res.c_str()); + } + } else { + std::string res="<"; + res+=pyrepr(obj0); + res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + } + arg1 = &p1; + } + } + { + if (check_xy(obj1)) { + std::string res = convert_xyz_to_point(obj1,arg2); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + return NULL; + } + } + else if (PySequence_Check(obj1)) { + std::string res = convert_seq_to_point(obj1,arg2); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError, res.c_str()); + } + } else { + std::string res="<"; + res+=pyrepr(obj1); + res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + } + } + ecode3 = SWIG_AsVal_double(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "point_z_weight_distance" "', argument " "3"" of type '" "double""'"); + } + arg3 = static_cast< double >(val3); + { + try { + result = (double)((cmf::geometry::point const *)arg1)->z_weight_distance(arg2,arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_point_distance3DTo(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::geometry::point *arg1 = (cmf::geometry::point *) 0 ; + cmf::geometry::point arg2 ; + cmf::geometry::point p1 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "p", NULL + }; + double result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:point_distance3DTo",kwnames,&obj0,&obj1)) SWIG_fail; + { + if (SWIG_ConvertPtr(obj0, (void **) &arg1, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { + if (check_xy(obj0)) { + std::string res = convert_xyz_to_point(obj0,p1); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + return NULL; + } + } + else if (PySequence_Check(obj0)) { + std::string res = convert_seq_to_point(obj0,p1); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError, res.c_str()); + } + } else { + std::string res="<"; + res+=pyrepr(obj0); + res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + } + arg1 = &p1; + } + } + { + if (check_xy(obj1)) { + std::string res = convert_xyz_to_point(obj1,arg2); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + return NULL; + } + } + else if (PySequence_Check(obj1)) { + std::string res = convert_seq_to_point(obj1,arg2); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError, res.c_str()); + } + } else { + std::string res="<"; + res+=pyrepr(obj1); + res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + } + } + { + try { + result = (double)((cmf::geometry::point const *)arg1)->distance3DTo(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_point_distance(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::geometry::point arg1 ; + cmf::geometry::point arg2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "p1",(char *) "p2", NULL + }; + double result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:point_distance",kwnames,&obj0,&obj1)) SWIG_fail; + { + if (check_xy(obj0)) { + std::string res = convert_xyz_to_point(obj0,arg1); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + return NULL; + } + } + else if (PySequence_Check(obj0)) { + std::string res = convert_seq_to_point(obj0,arg1); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError, res.c_str()); + } + } else { + std::string res="<"; + res+=pyrepr(obj0); + res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + } + } + { + if (check_xy(obj1)) { + std::string res = convert_xyz_to_point(obj1,arg2); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + return NULL; + } + } + else if (PySequence_Check(obj1)) { + std::string res = convert_seq_to_point(obj1,arg2); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError, res.c_str()); + } + } else { + std::string res="<"; + res+=pyrepr(obj1); + res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + } + } + { + try { + result = (double)cmf::geometry::point::distance(arg1,arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_point_distance_max(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::geometry::point *arg1 = (cmf::geometry::point *) 0 ; + cmf::geometry::point arg2 ; + cmf::geometry::point p1 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "p", NULL + }; + double result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:point_distance_max",kwnames,&obj0,&obj1)) SWIG_fail; + { + if (SWIG_ConvertPtr(obj0, (void **) &arg1, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { + if (check_xy(obj0)) { + std::string res = convert_xyz_to_point(obj0,p1); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + return NULL; + } + } + else if (PySequence_Check(obj0)) { + std::string res = convert_seq_to_point(obj0,p1); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError, res.c_str()); + } + } else { + std::string res="<"; + res+=pyrepr(obj0); + res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + } + arg1 = &p1; + } + } + { + if (check_xy(obj1)) { + std::string res = convert_xyz_to_point(obj1,arg2); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + return NULL; + } + } + else if (PySequence_Check(obj1)) { + std::string res = convert_seq_to_point(obj1,arg2); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError, res.c_str()); + } + } else { + std::string res="<"; + res+=pyrepr(obj1); + res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + } + } + { + try { + result = (double)((cmf::geometry::point const *)arg1)->distance_max(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_point_azimuth(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::geometry::point *arg1 = (cmf::geometry::point *) 0 ; + cmf::geometry::point arg2 ; + cmf::geometry::point p1 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "p", NULL + }; + double result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:point_azimuth",kwnames,&obj0,&obj1)) SWIG_fail; + { + if (SWIG_ConvertPtr(obj0, (void **) &arg1, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { + if (check_xy(obj0)) { + std::string res = convert_xyz_to_point(obj0,p1); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + return NULL; + } + } + else if (PySequence_Check(obj0)) { + std::string res = convert_seq_to_point(obj0,p1); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError, res.c_str()); + } + } else { + std::string res="<"; + res+=pyrepr(obj0); + res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + } + arg1 = &p1; + } + } + { + if (check_xy(obj1)) { + std::string res = convert_xyz_to_point(obj1,arg2); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + return NULL; + } + } + else if (PySequence_Check(obj1)) { + std::string res = convert_seq_to_point(obj1,arg2); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError, res.c_str()); + } + } else { + std::string res="<"; + res+=pyrepr(obj1); + res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + } + } + { + try { + result = (double)((cmf::geometry::point const *)arg1)->azimuth(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_point_angleToXAxis(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::geometry::point *arg1 = (cmf::geometry::point *) 0 ; + cmf::geometry::point arg2 ; + cmf::geometry::point p1 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "p", NULL + }; + double result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:point_angleToXAxis",kwnames,&obj0,&obj1)) SWIG_fail; + { + if (SWIG_ConvertPtr(obj0, (void **) &arg1, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { + if (check_xy(obj0)) { + std::string res = convert_xyz_to_point(obj0,p1); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + return NULL; + } + } + else if (PySequence_Check(obj0)) { + std::string res = convert_seq_to_point(obj0,p1); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError, res.c_str()); + } + } else { + std::string res="<"; + res+=pyrepr(obj0); + res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + } + arg1 = &p1; + } + } + { + if (check_xy(obj1)) { + std::string res = convert_xyz_to_point(obj1,arg2); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + return NULL; + } + } + else if (PySequence_Check(obj1)) { + std::string res = convert_seq_to_point(obj1,arg2); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError, res.c_str()); + } + } else { + std::string res="<"; + res+=pyrepr(obj1); + res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + } + } + { + try { + result = (double)((cmf::geometry::point const *)arg1)->angleToXAxis(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_point_sum(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::geometry::point *arg1 = (cmf::geometry::point *) 0 ; + cmf::geometry::point p1 ; + PyObject *swig_obj[1] ; + double result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + if (SWIG_ConvertPtr(swig_obj[0], (void **) &arg1, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { + if (check_xy(swig_obj[0])) { + std::string res = convert_xyz_to_point(swig_obj[0],p1); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + return NULL; + } + } + else if (PySequence_Check(swig_obj[0])) { + std::string res = convert_seq_to_point(swig_obj[0],p1); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError, res.c_str()); + } + } else { + std::string res="<"; + res+=pyrepr(swig_obj[0]); + res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + } + arg1 = &p1; + } + } + { + try { + result = (double)((cmf::geometry::point const *)arg1)->sum(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_point_length(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::geometry::point *arg1 = (cmf::geometry::point *) 0 ; + cmf::geometry::point p1 ; + PyObject *swig_obj[1] ; + double result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + if (SWIG_ConvertPtr(swig_obj[0], (void **) &arg1, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { + if (check_xy(swig_obj[0])) { + std::string res = convert_xyz_to_point(swig_obj[0],p1); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + return NULL; + } + } + else if (PySequence_Check(swig_obj[0])) { + std::string res = convert_seq_to_point(swig_obj[0],p1); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError, res.c_str()); + } + } else { + std::string res="<"; + res+=pyrepr(swig_obj[0]); + res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + } + arg1 = &p1; + } + } + { + try { + result = (double)((cmf::geometry::point const *)arg1)->length(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_point___add__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::geometry::point *arg1 = (cmf::geometry::point *) 0 ; + cmf::geometry::point *arg2 = 0 ; + cmf::geometry::point p1 ; + cmf::geometry::point p2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "p", NULL + }; + cmf::geometry::point result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:point___add__",kwnames,&obj0,&obj1)) SWIG_fail; + { + if (SWIG_ConvertPtr(obj0, (void **) &arg1, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { + if (check_xy(obj0)) { + std::string res = convert_xyz_to_point(obj0,p1); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + return NULL; + } + } + else if (PySequence_Check(obj0)) { + std::string res = convert_seq_to_point(obj0,p1); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError, res.c_str()); + } + } else { + std::string res="<"; + res+=pyrepr(obj0); + res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + } + arg1 = &p1; + } + } + { + if (SWIG_ConvertPtr(obj1, (void **) &arg2, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { + if (check_xy(obj1)) { + std::string res = convert_xyz_to_point(obj1,p2); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + return NULL; + } + } + else if (PySequence_Check(obj1)) { + std::string res = convert_seq_to_point(obj1,p2); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError, res.c_str()); + } + } else { + std::string res="<"; + res+=pyrepr(obj1); + res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + } + arg2 = &p2; + } + } + { + try { + result = ((cmf::geometry::point const *)arg1)->operator +((cmf::geometry::point const &)*arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj((new cmf::geometry::point(static_cast< const cmf::geometry::point& >(result))), SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_point___iadd__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::geometry::point *arg1 = (cmf::geometry::point *) 0 ; + cmf::geometry::point *arg2 = 0 ; + cmf::geometry::point p1 ; + cmf::geometry::point p2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "left", NULL + }; + cmf::geometry::point *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:point___iadd__",kwnames,&obj0,&obj1)) SWIG_fail; + { + if (SWIG_ConvertPtr(obj0, (void **) &arg1, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { + if (check_xy(obj0)) { + std::string res = convert_xyz_to_point(obj0,p1); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + return NULL; + } + } + else if (PySequence_Check(obj0)) { + std::string res = convert_seq_to_point(obj0,p1); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError, res.c_str()); + } + } else { + std::string res="<"; + res+=pyrepr(obj0); + res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + } + arg1 = &p1; + } + } + { + if (SWIG_ConvertPtr(obj1, (void **) &arg2, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { + if (check_xy(obj1)) { + std::string res = convert_xyz_to_point(obj1,p2); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + return NULL; + } + } + else if (PySequence_Check(obj1)) { + std::string res = convert_seq_to_point(obj1,p2); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError, res.c_str()); + } + } else { + std::string res="<"; + res+=pyrepr(obj1); + res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + } + arg2 = &p2; + } + } + { + try { + result = (cmf::geometry::point *) &(arg1)->operator +=((cmf::geometry::point const &)*arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_point___sub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::geometry::point *arg1 = (cmf::geometry::point *) 0 ; + cmf::geometry::point *arg2 = 0 ; + cmf::geometry::point p1 ; + cmf::geometry::point p2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "p", NULL + }; + cmf::geometry::point result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:point___sub__",kwnames,&obj0,&obj1)) SWIG_fail; + { + if (SWIG_ConvertPtr(obj0, (void **) &arg1, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { + if (check_xy(obj0)) { + std::string res = convert_xyz_to_point(obj0,p1); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + return NULL; + } + } + else if (PySequence_Check(obj0)) { + std::string res = convert_seq_to_point(obj0,p1); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError, res.c_str()); + } + } else { + std::string res="<"; + res+=pyrepr(obj0); + res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + } + arg1 = &p1; + } + } + { + if (SWIG_ConvertPtr(obj1, (void **) &arg2, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { + if (check_xy(obj1)) { + std::string res = convert_xyz_to_point(obj1,p2); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + return NULL; + } + } + else if (PySequence_Check(obj1)) { + std::string res = convert_seq_to_point(obj1,p2); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError, res.c_str()); + } + } else { + std::string res="<"; + res+=pyrepr(obj1); + res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + } + arg2 = &p2; + } + } + { + try { + result = ((cmf::geometry::point const *)arg1)->operator -((cmf::geometry::point const &)*arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj((new cmf::geometry::point(static_cast< const cmf::geometry::point& >(result))), SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_point___isub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::geometry::point *arg1 = (cmf::geometry::point *) 0 ; + cmf::geometry::point *arg2 = 0 ; + cmf::geometry::point p1 ; + cmf::geometry::point p2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "left", NULL + }; + cmf::geometry::point *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:point___isub__",kwnames,&obj0,&obj1)) SWIG_fail; + { + if (SWIG_ConvertPtr(obj0, (void **) &arg1, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { + if (check_xy(obj0)) { + std::string res = convert_xyz_to_point(obj0,p1); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + return NULL; + } + } + else if (PySequence_Check(obj0)) { + std::string res = convert_seq_to_point(obj0,p1); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError, res.c_str()); + } + } else { + std::string res="<"; + res+=pyrepr(obj0); + res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + } + arg1 = &p1; + } + } + { + if (SWIG_ConvertPtr(obj1, (void **) &arg2, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { + if (check_xy(obj1)) { + std::string res = convert_xyz_to_point(obj1,p2); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + return NULL; + } + } + else if (PySequence_Check(obj1)) { + std::string res = convert_seq_to_point(obj1,p2); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError, res.c_str()); + } + } else { + std::string res="<"; + res+=pyrepr(obj1); + res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + } + arg2 = &p2; + } + } + { + try { + result = (cmf::geometry::point *) &(arg1)->operator -=((cmf::geometry::point const &)*arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_point___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::geometry::point *arg1 = (cmf::geometry::point *) 0 ; + double arg2 ; + cmf::geometry::point p1 ; + double val2 ; + int ecode2 = 0 ; + cmf::geometry::point result; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + { + if (SWIG_ConvertPtr(swig_obj[0], (void **) &arg1, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { + if (check_xy(swig_obj[0])) { + std::string res = convert_xyz_to_point(swig_obj[0],p1); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + return NULL; + } + } + else if (PySequence_Check(swig_obj[0])) { + std::string res = convert_seq_to_point(swig_obj[0],p1); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError, res.c_str()); + } + } else { + std::string res="<"; + res+=pyrepr(swig_obj[0]); + res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + } + arg1 = &p1; + } + } + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "point___mul__" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + { + try { + result = ((cmf::geometry::point const *)arg1)->operator *(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj((new cmf::geometry::point(static_cast< const cmf::geometry::point& >(result))), SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_point___imul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::geometry::point *arg1 = (cmf::geometry::point *) 0 ; + double arg2 ; + cmf::geometry::point p1 ; + double val2 ; + int ecode2 = 0 ; + cmf::geometry::point *result = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + { + if (SWIG_ConvertPtr(swig_obj[0], (void **) &arg1, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { + if (check_xy(swig_obj[0])) { + std::string res = convert_xyz_to_point(swig_obj[0],p1); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + return NULL; + } + } + else if (PySequence_Check(swig_obj[0])) { + std::string res = convert_seq_to_point(swig_obj[0],p1); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError, res.c_str()); + } + } else { + std::string res="<"; + res+=pyrepr(swig_obj[0]); + res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + } + arg1 = &p1; + } + } + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "point___imul__" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + { + try { + result = (cmf::geometry::point *) &(arg1)->operator *=(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_point___truediv____SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::geometry::point *arg1 = (cmf::geometry::point *) 0 ; + double arg2 ; + cmf::geometry::point p1 ; + double val2 ; + int ecode2 = 0 ; + cmf::geometry::point result; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + { + if (SWIG_ConvertPtr(swig_obj[0], (void **) &arg1, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { + if (check_xy(swig_obj[0])) { + std::string res = convert_xyz_to_point(swig_obj[0],p1); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + return NULL; + } + } + else if (PySequence_Check(swig_obj[0])) { + std::string res = convert_seq_to_point(swig_obj[0],p1); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError, res.c_str()); + } + } else { + std::string res="<"; + res+=pyrepr(swig_obj[0]); + res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + } + arg1 = &p1; + } + } + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "point___truediv__" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + { + try { + result = ((cmf::geometry::point const *)arg1)->operator /(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj((new cmf::geometry::point(static_cast< const cmf::geometry::point& >(result))), SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_point___itruediv____SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::geometry::point *arg1 = (cmf::geometry::point *) 0 ; + double arg2 ; + cmf::geometry::point p1 ; + double val2 ; + int ecode2 = 0 ; + cmf::geometry::point *result = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + { + if (SWIG_ConvertPtr(swig_obj[0], (void **) &arg1, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { + if (check_xy(swig_obj[0])) { + std::string res = convert_xyz_to_point(swig_obj[0],p1); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + return NULL; + } + } + else if (PySequence_Check(swig_obj[0])) { + std::string res = convert_seq_to_point(swig_obj[0],p1); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError, res.c_str()); + } + } else { + std::string res="<"; + res+=pyrepr(swig_obj[0]); + res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + } + arg1 = &p1; + } + } + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "point___itruediv__" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + { + try { + result = (cmf::geometry::point *) &(arg1)->operator /=(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_point___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::geometry::point *arg1 = (cmf::geometry::point *) 0 ; + cmf::geometry::point *arg2 = 0 ; + cmf::geometry::point p1 ; + cmf::geometry::point p2 ; + cmf::geometry::point result; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + { + if (SWIG_ConvertPtr(swig_obj[0], (void **) &arg1, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { + if (check_xy(swig_obj[0])) { + std::string res = convert_xyz_to_point(swig_obj[0],p1); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + return NULL; + } + } + else if (PySequence_Check(swig_obj[0])) { + std::string res = convert_seq_to_point(swig_obj[0],p1); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError, res.c_str()); + } + } else { + std::string res="<"; + res+=pyrepr(swig_obj[0]); + res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + } + arg1 = &p1; + } + } + { + if (SWIG_ConvertPtr(swig_obj[1], (void **) &arg2, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { + if (check_xy(swig_obj[1])) { + std::string res = convert_xyz_to_point(swig_obj[1],p2); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + return NULL; + } + } + else if (PySequence_Check(swig_obj[1])) { + std::string res = convert_seq_to_point(swig_obj[1],p2); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError, res.c_str()); + } + } else { + std::string res="<"; + res+=pyrepr(swig_obj[1]); + res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + } + arg2 = &p2; + } + } + { + try { + result = ((cmf::geometry::point const *)arg1)->operator *((cmf::geometry::point const &)*arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj((new cmf::geometry::point(static_cast< const cmf::geometry::point& >(result))), SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_point___mul__(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"point___mul__",0,2,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + { + cmf::geometry::point p; + _v=check_xy(argv[0]) || check_seq_point(argv[0]); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_double(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + { + cmf::geometry::point p; + _v=check_xy(argv[0]) || check_seq_point(argv[0]); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + cmf::geometry::point p; + _v=check_xy(argv[1]) || check_seq_point(argv[1]); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_point___mul____SWIG_0(self, argc, argv); + case 2: + return _wrap_point___mul____SWIG_1(self, argc, argv); + } + } + +fail: + Py_INCREF(Py_NotImplemented); + return Py_NotImplemented; +} + + +SWIGINTERN PyObject *_wrap_point___imul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::geometry::point *arg1 = (cmf::geometry::point *) 0 ; + cmf::geometry::point *arg2 = 0 ; + cmf::geometry::point p1 ; + cmf::geometry::point p2 ; + cmf::geometry::point *result = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + { + if (SWIG_ConvertPtr(swig_obj[0], (void **) &arg1, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { + if (check_xy(swig_obj[0])) { + std::string res = convert_xyz_to_point(swig_obj[0],p1); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + return NULL; + } + } + else if (PySequence_Check(swig_obj[0])) { + std::string res = convert_seq_to_point(swig_obj[0],p1); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError, res.c_str()); + } + } else { + std::string res="<"; + res+=pyrepr(swig_obj[0]); + res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + } + arg1 = &p1; + } + } + { + if (SWIG_ConvertPtr(swig_obj[1], (void **) &arg2, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { + if (check_xy(swig_obj[1])) { + std::string res = convert_xyz_to_point(swig_obj[1],p2); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + return NULL; + } + } + else if (PySequence_Check(swig_obj[1])) { + std::string res = convert_seq_to_point(swig_obj[1],p2); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError, res.c_str()); + } + } else { + std::string res="<"; + res+=pyrepr(swig_obj[1]); + res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + } + arg2 = &p2; + } + } + { + try { + result = (cmf::geometry::point *) &(arg1)->operator *=((cmf::geometry::point const &)*arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_point___imul__(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"point___imul__",0,2,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + { + cmf::geometry::point p; + _v=check_xy(argv[0]) || check_seq_point(argv[0]); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_double(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + { + cmf::geometry::point p; + _v=check_xy(argv[0]) || check_seq_point(argv[0]); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + cmf::geometry::point p; + _v=check_xy(argv[1]) || check_seq_point(argv[1]); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_point___imul____SWIG_0(self, argc, argv); + case 2: + return _wrap_point___imul____SWIG_1(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'point___imul__'.\n" + " Possible C/C++ prototypes are:\n" + " cmf::geometry::point::operator *=(double)\n" + " cmf::geometry::point::operator *=(cmf::geometry::point const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_point___truediv____SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::geometry::point *arg1 = (cmf::geometry::point *) 0 ; + cmf::geometry::point *arg2 = 0 ; + cmf::geometry::point p1 ; + cmf::geometry::point p2 ; + cmf::geometry::point result; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + { + if (SWIG_ConvertPtr(swig_obj[0], (void **) &arg1, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { + if (check_xy(swig_obj[0])) { + std::string res = convert_xyz_to_point(swig_obj[0],p1); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + return NULL; + } + } + else if (PySequence_Check(swig_obj[0])) { + std::string res = convert_seq_to_point(swig_obj[0],p1); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError, res.c_str()); + } + } else { + std::string res="<"; + res+=pyrepr(swig_obj[0]); + res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + } + arg1 = &p1; + } + } + { + if (SWIG_ConvertPtr(swig_obj[1], (void **) &arg2, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { + if (check_xy(swig_obj[1])) { + std::string res = convert_xyz_to_point(swig_obj[1],p2); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + return NULL; + } + } + else if (PySequence_Check(swig_obj[1])) { + std::string res = convert_seq_to_point(swig_obj[1],p2); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError, res.c_str()); + } + } else { + std::string res="<"; + res+=pyrepr(swig_obj[1]); + res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + } + arg2 = &p2; + } + } + { + try { + result = ((cmf::geometry::point const *)arg1)->operator /((cmf::geometry::point const &)*arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj((new cmf::geometry::point(static_cast< const cmf::geometry::point& >(result))), SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_point___truediv__(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"point___truediv__",0,2,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + { + cmf::geometry::point p; + _v=check_xy(argv[0]) || check_seq_point(argv[0]); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_double(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + { + cmf::geometry::point p; + _v=check_xy(argv[0]) || check_seq_point(argv[0]); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + cmf::geometry::point p; + _v=check_xy(argv[1]) || check_seq_point(argv[1]); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_point___truediv____SWIG_0(self, argc, argv); + case 2: + return _wrap_point___truediv____SWIG_1(self, argc, argv); + } + } + +fail: + Py_INCREF(Py_NotImplemented); + return Py_NotImplemented; +} + + +SWIGINTERN PyObject *_wrap_point___itruediv____SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::geometry::point *arg1 = (cmf::geometry::point *) 0 ; + cmf::geometry::point *arg2 = 0 ; + cmf::geometry::point p1 ; + cmf::geometry::point p2 ; + cmf::geometry::point *result = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + { + if (SWIG_ConvertPtr(swig_obj[0], (void **) &arg1, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { + if (check_xy(swig_obj[0])) { + std::string res = convert_xyz_to_point(swig_obj[0],p1); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + return NULL; + } + } + else if (PySequence_Check(swig_obj[0])) { + std::string res = convert_seq_to_point(swig_obj[0],p1); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError, res.c_str()); + } + } else { + std::string res="<"; + res+=pyrepr(swig_obj[0]); + res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + } + arg1 = &p1; + } + } + { + if (SWIG_ConvertPtr(swig_obj[1], (void **) &arg2, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { + if (check_xy(swig_obj[1])) { + std::string res = convert_xyz_to_point(swig_obj[1],p2); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + return NULL; + } + } + else if (PySequence_Check(swig_obj[1])) { + std::string res = convert_seq_to_point(swig_obj[1],p2); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError, res.c_str()); + } + } else { + std::string res="<"; + res+=pyrepr(swig_obj[1]); + res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + } + arg2 = &p2; + } + } + { + try { + result = (cmf::geometry::point *) &(arg1)->operator /=((cmf::geometry::point const &)*arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_point___itruediv__(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"point___itruediv__",0,2,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + { + cmf::geometry::point p; + _v=check_xy(argv[0]) || check_seq_point(argv[0]); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_double(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + { + cmf::geometry::point p; + _v=check_xy(argv[0]) || check_seq_point(argv[0]); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + cmf::geometry::point p; + _v=check_xy(argv[1]) || check_seq_point(argv[1]); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_point___itruediv____SWIG_0(self, argc, argv); + case 2: + return _wrap_point___itruediv____SWIG_1(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'point___itruediv__'.\n" + " Possible C/C++ prototypes are:\n" + " cmf::geometry::point::operator /=(double)\n" + " cmf::geometry::point::operator /=(cmf::geometry::point const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_point___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::geometry::point *arg1 = (cmf::geometry::point *) 0 ; + cmf::geometry::point *arg2 = 0 ; + cmf::geometry::point p1 ; + cmf::geometry::point p2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "p", NULL + }; + bool result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:point___eq__",kwnames,&obj0,&obj1)) SWIG_fail; + { + if (SWIG_ConvertPtr(obj0, (void **) &arg1, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { + if (check_xy(obj0)) { + std::string res = convert_xyz_to_point(obj0,p1); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + return NULL; + } + } + else if (PySequence_Check(obj0)) { + std::string res = convert_seq_to_point(obj0,p1); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError, res.c_str()); + } + } else { + std::string res="<"; + res+=pyrepr(obj0); + res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + } + arg1 = &p1; + } + } + { + if (SWIG_ConvertPtr(obj1, (void **) &arg2, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { + if (check_xy(obj1)) { + std::string res = convert_xyz_to_point(obj1,p2); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + return NULL; + } + } + else if (PySequence_Check(obj1)) { + std::string res = convert_seq_to_point(obj1,p2); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError, res.c_str()); + } + } else { + std::string res="<"; + res+=pyrepr(obj1); + res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + } + arg2 = &p2; + } + } + { + try { + result = (bool)((cmf::geometry::point const *)arg1)->operator ==((cmf::geometry::point const &)*arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_point___ne__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::geometry::point *arg1 = (cmf::geometry::point *) 0 ; + cmf::geometry::point *arg2 = 0 ; + cmf::geometry::point p1 ; + cmf::geometry::point p2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "p", NULL + }; + bool result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:point___ne__",kwnames,&obj0,&obj1)) SWIG_fail; + { + if (SWIG_ConvertPtr(obj0, (void **) &arg1, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { + if (check_xy(obj0)) { + std::string res = convert_xyz_to_point(obj0,p1); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + return NULL; + } + } + else if (PySequence_Check(obj0)) { + std::string res = convert_seq_to_point(obj0,p1); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError, res.c_str()); + } + } else { + std::string res="<"; + res+=pyrepr(obj0); + res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + } + arg1 = &p1; + } + } + { + if (SWIG_ConvertPtr(obj1, (void **) &arg2, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { + if (check_xy(obj1)) { + std::string res = convert_xyz_to_point(obj1,p2); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + return NULL; + } + } + else if (PySequence_Check(obj1)) { + std::string res = convert_seq_to_point(obj1,p2); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError, res.c_str()); + } + } else { + std::string res="<"; + res+=pyrepr(obj1); + res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + } + arg2 = &p2; + } + } + { + try { + result = (bool)((cmf::geometry::point const *)arg1)->operator !=((cmf::geometry::point const &)*arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_point___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::geometry::point *arg1 = (cmf::geometry::point *) 0 ; + cmf::geometry::point p1 ; + PyObject *swig_obj[1] ; + int result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + if (SWIG_ConvertPtr(swig_obj[0], (void **) &arg1, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { + if (check_xy(swig_obj[0])) { + std::string res = convert_xyz_to_point(swig_obj[0],p1); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + return NULL; + } + } + else if (PySequence_Check(swig_obj[0])) { + std::string res = convert_seq_to_point(swig_obj[0],p1); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError, res.c_str()); + } + } else { + std::string res="<"; + res+=pyrepr(swig_obj[0]); + res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + } + arg1 = &p1; + } + } + { + try { + result = (int)cmf_geometry_point___len__((cmf::geometry::point const *)arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_point___rmul__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::geometry::point *arg1 = (cmf::geometry::point *) 0 ; + double arg2 ; + cmf::geometry::point p1 ; + double val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "val", NULL + }; + cmf::geometry::point result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:point___rmul__",kwnames,&obj0,&obj1)) SWIG_fail; + { + if (SWIG_ConvertPtr(obj0, (void **) &arg1, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { + if (check_xy(obj0)) { + std::string res = convert_xyz_to_point(obj0,p1); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + return NULL; + } + } + else if (PySequence_Check(obj0)) { + std::string res = convert_seq_to_point(obj0,p1); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError, res.c_str()); + } + } else { + std::string res="<"; + res+=pyrepr(obj0); + res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + } + arg1 = &p1; + } + } + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "point___rmul__" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + { + try { + result = cmf_geometry_point___rmul__(arg1,arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj((new cmf::geometry::point(static_cast< const cmf::geometry::point& >(result))), SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_point___rdiv__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::geometry::point *arg1 = (cmf::geometry::point *) 0 ; + double arg2 ; + cmf::geometry::point p1 ; + double val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "val", NULL + }; + cmf::geometry::point result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:point___rdiv__",kwnames,&obj0,&obj1)) SWIG_fail; + { + if (SWIG_ConvertPtr(obj0, (void **) &arg1, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { + if (check_xy(obj0)) { + std::string res = convert_xyz_to_point(obj0,p1); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + return NULL; + } + } + else if (PySequence_Check(obj0)) { + std::string res = convert_seq_to_point(obj0,p1); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError, res.c_str()); + } + } else { + std::string res="<"; + res+=pyrepr(obj0); + res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + } + arg1 = &p1; + } + } + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "point___rdiv__" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + { + try { + result = cmf_geometry_point___rdiv__(arg1,arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj((new cmf::geometry::point(static_cast< const cmf::geometry::point& >(result))), SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_point(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::geometry::point *arg1 = (cmf::geometry::point *) 0 ; + cmf::geometry::point p1 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + if (SWIG_ConvertPtr(swig_obj[0], (void **) &arg1, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { + if (check_xy(swig_obj[0])) { + std::string res = convert_xyz_to_point(swig_obj[0],p1); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + return NULL; + } + } + else if (PySequence_Check(swig_obj[0])) { + std::string res = convert_seq_to_point(swig_obj[0],p1); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError, res.c_str()); + } + } else { + std::string res="<"; + res+=pyrepr(swig_obj[0]); + res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + } + arg1 = &p1; + } + } + { + try { + delete arg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *point_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__geometry__point, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *point_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_dot(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::geometry::point *arg1 = 0 ; + cmf::geometry::point *arg2 = 0 ; + cmf::geometry::point p1 ; + cmf::geometry::point p2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "p1",(char *) "p2", NULL + }; + double result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:dot",kwnames,&obj0,&obj1)) SWIG_fail; + { + if (SWIG_ConvertPtr(obj0, (void **) &arg1, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { + if (check_xy(obj0)) { + std::string res = convert_xyz_to_point(obj0,p1); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + return NULL; + } + } + else if (PySequence_Check(obj0)) { + std::string res = convert_seq_to_point(obj0,p1); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError, res.c_str()); + } + } else { + std::string res="<"; + res+=pyrepr(obj0); + res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + } + arg1 = &p1; + } + } + { + if (SWIG_ConvertPtr(obj1, (void **) &arg2, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { + if (check_xy(obj1)) { + std::string res = convert_xyz_to_point(obj1,p2); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + return NULL; + } + } + else if (PySequence_Check(obj1)) { + std::string res = convert_seq_to_point(obj1,p2); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError, res.c_str()); + } + } else { + std::string res="<"; + res+=pyrepr(obj1); + res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + } + arg2 = &p2; + } + } + { + try { + result = (double)cmf::geometry::dot((cmf::geometry::point const &)*arg1,(cmf::geometry::point const &)*arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_distance(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::geometry::point *arg1 = 0 ; + cmf::geometry::point *arg2 = 0 ; + cmf::geometry::point p1 ; + cmf::geometry::point p2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "p1",(char *) "p2", NULL + }; + double result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:distance",kwnames,&obj0,&obj1)) SWIG_fail; + { + if (SWIG_ConvertPtr(obj0, (void **) &arg1, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { + if (check_xy(obj0)) { + std::string res = convert_xyz_to_point(obj0,p1); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + return NULL; + } + } + else if (PySequence_Check(obj0)) { + std::string res = convert_seq_to_point(obj0,p1); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError, res.c_str()); + } + } else { + std::string res="<"; + res+=pyrepr(obj0); + res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + } + arg1 = &p1; + } + } + { + if (SWIG_ConvertPtr(obj1, (void **) &arg2, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { + if (check_xy(obj1)) { + std::string res = convert_xyz_to_point(obj1,p2); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + return NULL; + } + } + else if (PySequence_Check(obj1)) { + std::string res = convert_seq_to_point(obj1,p2); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError, res.c_str()); + } + } else { + std::string res="<"; + res+=pyrepr(obj1); + res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + } + arg2 = &p2; + } + } + { + try { + result = (double)cmf::geometry::distance((cmf::geometry::point const &)*arg1,(cmf::geometry::point const &)*arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_point_vector_X_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::geometry::point_vector *arg1 = (cmf::geometry::point_vector *) 0 ; + cmf::math::num_array arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"point_vector_X_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__geometry__point_vector, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "point_vector_X_set" "', argument " "1"" of type '" "cmf::geometry::point_vector *""'"); + } + arg1 = reinterpret_cast< cmf::geometry::point_vector * >(argp1); + { + // Convert a array_wrapper from numpy array + double * data=0; + ptrdiff_t size = from_npy_array(swig_obj[1],&data); + if (!data) { + SWIG_exception_fail(SWIG_TypeError,"Input data is not 'array-like' (in the sense of numpy arrays)"); + return NULL; + } + arg2 = cmf::math::num_array(size,data); + } + if (arg1) (arg1)->X = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_point_vector_X_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::geometry::point_vector *arg1 = (cmf::geometry::point_vector *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::math::num_array result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__geometry__point_vector, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "point_vector_X_get" "', argument " "1"" of type '" "cmf::geometry::point_vector *""'"); + } + arg1 = reinterpret_cast< cmf::geometry::point_vector * >(argp1); + result = ((arg1)->X); + { + resultobj = as_npy_array(result); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_point_vector_Y_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::geometry::point_vector *arg1 = (cmf::geometry::point_vector *) 0 ; + cmf::math::num_array arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"point_vector_Y_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__geometry__point_vector, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "point_vector_Y_set" "', argument " "1"" of type '" "cmf::geometry::point_vector *""'"); + } + arg1 = reinterpret_cast< cmf::geometry::point_vector * >(argp1); + { + // Convert a array_wrapper from numpy array + double * data=0; + ptrdiff_t size = from_npy_array(swig_obj[1],&data); + if (!data) { + SWIG_exception_fail(SWIG_TypeError,"Input data is not 'array-like' (in the sense of numpy arrays)"); + return NULL; + } + arg2 = cmf::math::num_array(size,data); + } + if (arg1) (arg1)->Y = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_point_vector_Y_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::geometry::point_vector *arg1 = (cmf::geometry::point_vector *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::math::num_array result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__geometry__point_vector, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "point_vector_Y_get" "', argument " "1"" of type '" "cmf::geometry::point_vector *""'"); + } + arg1 = reinterpret_cast< cmf::geometry::point_vector * >(argp1); + result = ((arg1)->Y); + { + resultobj = as_npy_array(result); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_point_vector_Z_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::geometry::point_vector *arg1 = (cmf::geometry::point_vector *) 0 ; + cmf::math::num_array arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"point_vector_Z_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__geometry__point_vector, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "point_vector_Z_set" "', argument " "1"" of type '" "cmf::geometry::point_vector *""'"); + } + arg1 = reinterpret_cast< cmf::geometry::point_vector * >(argp1); + { + // Convert a array_wrapper from numpy array + double * data=0; + ptrdiff_t size = from_npy_array(swig_obj[1],&data); + if (!data) { + SWIG_exception_fail(SWIG_TypeError,"Input data is not 'array-like' (in the sense of numpy arrays)"); + return NULL; + } + arg2 = cmf::math::num_array(size,data); + } + if (arg1) (arg1)->Z = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_point_vector_Z_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::geometry::point_vector *arg1 = (cmf::geometry::point_vector *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::math::num_array result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__geometry__point_vector, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "point_vector_Z_get" "', argument " "1"" of type '" "cmf::geometry::point_vector *""'"); + } + arg1 = reinterpret_cast< cmf::geometry::point_vector * >(argp1); + result = ((arg1)->Z); + { + resultobj = as_npy_array(result); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_point_vector(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + ptrdiff_t arg1 ; + ptrdiff_t val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + char * kwnames[] = { + (char *) "size", NULL + }; + cmf::geometry::point_vector *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:new_point_vector",kwnames,&obj0)) SWIG_fail; + ecode1 = SWIG_AsVal_ptrdiff_t(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_point_vector" "', argument " "1"" of type '" "ptrdiff_t""'"); + } + arg1 = static_cast< ptrdiff_t >(val1); + { + try { + result = (cmf::geometry::point_vector *)new cmf::geometry::point_vector(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__geometry__point_vector, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_point_vector_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::geometry::point_vector *arg1 = (cmf::geometry::point_vector *) 0 ; + ptrdiff_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "index", NULL + }; + cmf::geometry::point result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:point_vector_get",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__geometry__point_vector, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "point_vector_get" "', argument " "1"" of type '" "cmf::geometry::point_vector const *""'"); + } + arg1 = reinterpret_cast< cmf::geometry::point_vector * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "point_vector_get" "', argument " "2"" of type '" "ptrdiff_t""'"); + } + arg2 = static_cast< ptrdiff_t >(val2); + { + try { + result = ((cmf::geometry::point_vector const *)arg1)->get(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj((new cmf::geometry::point(static_cast< const cmf::geometry::point& >(result))), SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_point_vector_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::geometry::point_vector *arg1 = (cmf::geometry::point_vector *) 0 ; + ptrdiff_t arg2 ; + cmf::geometry::point arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "index",(char *) "p", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:point_vector_set",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__geometry__point_vector, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "point_vector_set" "', argument " "1"" of type '" "cmf::geometry::point_vector *""'"); + } + arg1 = reinterpret_cast< cmf::geometry::point_vector * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "point_vector_set" "', argument " "2"" of type '" "ptrdiff_t""'"); + } + arg2 = static_cast< ptrdiff_t >(val2); + { + if (check_xy(obj2)) { + std::string res = convert_xyz_to_point(obj2,arg3); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + return NULL; + } + } + else if (PySequence_Check(obj2)) { + std::string res = convert_seq_to_point(obj2,arg3); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError, res.c_str()); + } + } else { + std::string res="<"; + res+=pyrepr(obj2); + res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + } + } + { + try { + (arg1)->set(arg2,arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_point_vector_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::geometry::point_vector *arg1 = (cmf::geometry::point_vector *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + size_t result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__geometry__point_vector, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "point_vector_size" "', argument " "1"" of type '" "cmf::geometry::point_vector const *""'"); + } + arg1 = reinterpret_cast< cmf::geometry::point_vector * >(argp1); + { + try { + result = ((cmf::geometry::point_vector const *)arg1)->size(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_point_vector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::geometry::point_vector *arg1 = (cmf::geometry::point_vector *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__geometry__point_vector, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_point_vector" "', argument " "1"" of type '" "cmf::geometry::point_vector *""'"); + } + arg1 = reinterpret_cast< cmf::geometry::point_vector * >(argp1); + { + try { + delete arg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *point_vector_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__geometry__point_vector, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *point_vector_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN int Swig_var_Debug_set(PyObject *) { + SWIG_Error(SWIG_AttributeError,"Variable Debug is read-only."); + return 1; +} + + +SWIGINTERN PyObject *Swig_var_Debug_get(void) { + PyObject *pyobj = 0; + + pyobj = SWIG_From_bool(static_cast< bool >(Debug)); + return pyobj; +} + + +SWIGINTERN int Swig_var___compiledate___set(PyObject *) { + SWIG_Error(SWIG_AttributeError,"Variable __compiledate__ is read-only."); + return 1; +} + + +SWIGINTERN PyObject *Swig_var___compiledate___get(void) { + PyObject *pyobj = 0; + + pyobj = SWIG_From_std_string(static_cast< std::string >(__compiledate__)); + return pyobj; +} + + +SWIGINTERN PyObject *_wrap_minimum(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + real arg1 ; + real arg2 ; + double val1 ; + int ecode1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "a",(char *) "b", NULL + }; + real result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:minimum",kwnames,&obj0,&obj1)) SWIG_fail; + ecode1 = SWIG_AsVal_double(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "minimum" "', argument " "1"" of type '" "real""'"); + } + arg1 = static_cast< real >(val1); + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "minimum" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + { + try { + result = (real)minimum(arg1,arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_maximum(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + real arg1 ; + real arg2 ; + double val1 ; + int ecode1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "a",(char *) "b", NULL + }; + real result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:maximum",kwnames,&obj0,&obj1)) SWIG_fail; + ecode1 = SWIG_AsVal_double(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "maximum" "', argument " "1"" of type '" "real""'"); + } + arg1 = static_cast< real >(val1); + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "maximum" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + { + try { + result = (real)maximum(arg1,arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_minmax(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + real arg1 ; + real arg2 ; + real arg3 ; + double val1 ; + int ecode1 = 0 ; + double val2 ; + int ecode2 = 0 ; + double val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "x",(char *) "min",(char *) "max", NULL + }; + real result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:minmax",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + ecode1 = SWIG_AsVal_double(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "minmax" "', argument " "1"" of type '" "real""'"); + } + arg1 = static_cast< real >(val1); + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "minmax" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + ecode3 = SWIG_AsVal_double(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "minmax" "', argument " "3"" of type '" "real""'"); + } + arg3 = static_cast< real >(val3); + { + try { + result = (real)minmax(arg1,arg2,arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_mean(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + real arg1 ; + real arg2 ; + double val1 ; + int ecode1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "a",(char *) "b", NULL + }; + real result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:mean",kwnames,&obj0,&obj1)) SWIG_fail; + ecode1 = SWIG_AsVal_double(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "mean" "', argument " "1"" of type '" "real""'"); + } + arg1 = static_cast< real >(val1); + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "mean" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + { + try { + result = (real)mean(arg1,arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_geo_mean(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + real arg1 ; + real arg2 ; + double val1 ; + int ecode1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "a",(char *) "b", NULL + }; + real result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:geo_mean",kwnames,&obj0,&obj1)) SWIG_fail; + ecode1 = SWIG_AsVal_double(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "geo_mean" "', argument " "1"" of type '" "real""'"); + } + arg1 = static_cast< real >(val1); + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "geo_mean" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + { + try { + result = (real)geo_mean(arg1,arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_harmonic_mean(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + real arg1 ; + real arg2 ; + double val1 ; + int ecode1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "a",(char *) "b", NULL + }; + real result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:harmonic_mean",kwnames,&obj0,&obj1)) SWIG_fail; + ecode1 = SWIG_AsVal_double(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "harmonic_mean" "', argument " "1"" of type '" "real""'"); + } + arg1 = static_cast< real >(val1); + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "harmonic_mean" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + { + try { + result = (real)harmonic_mean(arg1,arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_piecewise_linear(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + real arg1 ; + real arg2 ; + real arg3 ; + real arg4 = (real) 0 ; + real arg5 = (real) 1 ; + double val1 ; + int ecode1 = 0 ; + double val2 ; + int ecode2 = 0 ; + double val3 ; + int ecode3 = 0 ; + double val4 ; + int ecode4 = 0 ; + double val5 ; + int ecode5 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + char * kwnames[] = { + (char *) "x",(char *) "xmin",(char *) "xmax",(char *) "ymin",(char *) "ymax", NULL + }; + real result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OO:piecewise_linear",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; + ecode1 = SWIG_AsVal_double(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "piecewise_linear" "', argument " "1"" of type '" "real""'"); + } + arg1 = static_cast< real >(val1); + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "piecewise_linear" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + ecode3 = SWIG_AsVal_double(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "piecewise_linear" "', argument " "3"" of type '" "real""'"); + } + arg3 = static_cast< real >(val3); + if (obj3) { + ecode4 = SWIG_AsVal_double(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "piecewise_linear" "', argument " "4"" of type '" "real""'"); + } + arg4 = static_cast< real >(val4); + } + if (obj4) { + ecode5 = SWIG_AsVal_double(obj4, &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "piecewise_linear" "', argument " "5"" of type '" "real""'"); + } + arg5 = static_cast< real >(val5); + } + { + try { + result = (real)piecewise_linear(arg1,arg2,arg3,arg4,arg5); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_boltzmann(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + real arg1 ; + real arg2 ; + real arg3 ; + double val1 ; + int ecode1 = 0 ; + double val2 ; + int ecode2 = 0 ; + double val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "x",(char *) "x_half",(char *) "tau", NULL + }; + real result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:boltzmann",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + ecode1 = SWIG_AsVal_double(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "boltzmann" "', argument " "1"" of type '" "real""'"); + } + arg1 = static_cast< real >(val1); + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "boltzmann" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + ecode3 = SWIG_AsVal_double(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "boltzmann" "', argument " "3"" of type '" "real""'"); + } + arg3 = static_cast< real >(val3); + { + try { + result = (real)boltzmann(arg1,arg2,arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_sign(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + real arg1 ; + double val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + char * kwnames[] = { + (char *) "x", NULL + }; + real result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:sign",kwnames,&obj0)) SWIG_fail; + ecode1 = SWIG_AsVal_double(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "sign" "', argument " "1"" of type '" "real""'"); + } + arg1 = static_cast< real >(val1); + { + try { + result = (real)sign(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_square(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + real arg1 ; + double val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + char * kwnames[] = { + (char *) "x", NULL + }; + real result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:square",kwnames,&obj0)) SWIG_fail; + ecode1 = SWIG_AsVal_double(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "square" "', argument " "1"" of type '" "real""'"); + } + arg1 = static_cast< real >(val1); + { + try { + result = (real)square(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN int Swig_var_Pi_set(PyObject *) { + SWIG_Error(SWIG_AttributeError,"Variable Pi is read-only."); + return 1; +} + + +SWIGINTERN PyObject *Swig_var_Pi_get(void) { + PyObject *pyobj = 0; + + pyobj = SWIG_From_double(static_cast< double >(Pi)); + return pyobj; +} + + +SWIGINTERN PyObject *_wrap_new_Time__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + int arg1 ; + int arg2 ; + int arg3 ; + int arg4 = (int) 0 ; + int arg5 = (int) 0 ; + int arg6 = (int) 0 ; + int arg7 = (int) 0 ; + int val1 ; + int ecode1 = 0 ; + int val2 ; + int ecode2 = 0 ; + int val3 ; + int ecode3 = 0 ; + int val4 ; + int ecode4 = 0 ; + int val5 ; + int ecode5 = 0 ; + int val6 ; + int ecode6 = 0 ; + int val7 ; + int ecode7 = 0 ; + cmf::math::Time *result = 0 ; + + if ((nobjs < 3) || (nobjs > 7)) SWIG_fail; + ecode1 = SWIG_AsVal_int(swig_obj[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Time" "', argument " "1"" of type '" "int""'"); + } + arg1 = static_cast< int >(val1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Time" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Time" "', argument " "3"" of type '" "int""'"); + } + arg3 = static_cast< int >(val3); + if (swig_obj[3]) { + ecode4 = SWIG_AsVal_int(swig_obj[3], &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_Time" "', argument " "4"" of type '" "int""'"); + } + arg4 = static_cast< int >(val4); + } + if (swig_obj[4]) { + ecode5 = SWIG_AsVal_int(swig_obj[4], &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_Time" "', argument " "5"" of type '" "int""'"); + } + arg5 = static_cast< int >(val5); + } + if (swig_obj[5]) { + ecode6 = SWIG_AsVal_int(swig_obj[5], &val6); + if (!SWIG_IsOK(ecode6)) { + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_Time" "', argument " "6"" of type '" "int""'"); + } + arg6 = static_cast< int >(val6); + } + if (swig_obj[6]) { + ecode7 = SWIG_AsVal_int(swig_obj[6], &val7); + if (!SWIG_IsOK(ecode7)) { + SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_Time" "', argument " "7"" of type '" "int""'"); + } + arg7 = static_cast< int >(val7); + } + { + try { + result = (cmf::math::Time *)new cmf::math::Time(arg1,arg2,arg3,arg4,arg5,arg6,arg7); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__Time, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_Time__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + SwigValueWrapper< cmf::math::Date > arg1 ; + void *argp1 ; + int res1 = 0 ; + cmf::math::Time *result = 0 ; + + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + { + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_cmf__math__Date, 0 | SWIG_POINTER_IMPLICIT_CONV); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Time" "', argument " "1"" of type '" "cmf::math::Date""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Time" "', argument " "1"" of type '" "cmf::math::Date""'"); + } else { + cmf::math::Date * temp = reinterpret_cast< cmf::math::Date * >(argp1); + arg1 = *temp; + if (SWIG_IsNewObj(res1)) delete temp; + } + } + { + try { + result = (cmf::math::Time *)new cmf::math::Time(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__Time, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_Time__SWIG_2(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::math::Time *arg1 = 0 ; + cmf::math::Time T1 ; + cmf::math::Time *result = 0 ; + + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + { + // typemape const Time& + T1 = convert_datetime_to_cmftime(swig_obj[0]); + if (T1 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } else { + arg1 = &T1; + } + } + { + try { + result = (cmf::math::Time *)new cmf::math::Time((cmf::math::Time const &)*arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__Time, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_Time__SWIG_3(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) { + PyObject *resultobj = 0; + cmf::math::Time *result = 0 ; + + if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; + { + try { + result = (cmf::math::Time *)new cmf::math::Time(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__Time, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_Time(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[8] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"new_Time",0,7,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 0) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + if (argc == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_cmf__math__Date, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + if (argc == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + { + _v = check_time(argv[0]); // typecheck const cmf::math::Time & + } + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 3; + if (_rank == _rankm) goto dispatch; + } + } + check_3: + + if (argc == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_cmf__math__Date, SWIG_POINTER_IMPLICIT_CONV); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_4; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 4; + if (_rank == _rankm) goto dispatch; + } + } + check_4: + + if ((argc >= 3) && (argc <= 7)) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + { + int res = SWIG_AsVal_int(argv[0], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_5; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_int(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_5; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_int(argv[2], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_5; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (argc > 3) { + { + { + int res = SWIG_AsVal_int(argv[3], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_5; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (argc > 4) { + { + { + int res = SWIG_AsVal_int(argv[4], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_5; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (argc > 5) { + { + { + int res = SWIG_AsVal_int(argv[5], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_5; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (argc > 6) { + { + { + int res = SWIG_AsVal_int(argv[6], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_5; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + } + } + } + } + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 5; + if (_rank == _rankm) goto dispatch; + } + } + check_5: + + dispatch: + switch(_index) { + case 1: + return _wrap_new_Time__SWIG_3(self, argc, argv); + case 2: + return _wrap_new_Time__SWIG_1(self, argc, argv); + case 3: + return _wrap_new_Time__SWIG_2(self, argc, argv); + case 4: + return _wrap_new_Time__SWIG_1(self, argc, argv); + case 5: + return _wrap_new_Time__SWIG_0(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_Time'.\n" + " Possible C/C++ prototypes are:\n" + " cmf::math::Time::Time(int,int,int,int,int,int,int)\n" + " cmf::math::Time::Time(cmf::math::Date)\n" + " cmf::math::Time::Time(cmf::math::Time const &)\n" + " cmf::math::Time::Time()\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_Time_AsDays(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::Time *arg1 = (cmf::math::Time *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Time, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Time_AsDays" "', argument " "1"" of type '" "cmf::math::Time const *""'"); + } + arg1 = reinterpret_cast< cmf::math::Time * >(argp1); + { + try { + result = (double)((cmf::math::Time const *)arg1)->AsDays(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Time_AsHours(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::Time *arg1 = (cmf::math::Time *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Time, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Time_AsHours" "', argument " "1"" of type '" "cmf::math::Time const *""'"); + } + arg1 = reinterpret_cast< cmf::math::Time * >(argp1); + { + try { + result = (double)((cmf::math::Time const *)arg1)->AsHours(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Time_AsMinutes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::Time *arg1 = (cmf::math::Time *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Time, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Time_AsMinutes" "', argument " "1"" of type '" "cmf::math::Time const *""'"); + } + arg1 = reinterpret_cast< cmf::math::Time * >(argp1); + { + try { + result = (double)((cmf::math::Time const *)arg1)->AsMinutes(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Time_AsSeconds(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::Time *arg1 = (cmf::math::Time *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Time, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Time_AsSeconds" "', argument " "1"" of type '" "cmf::math::Time const *""'"); + } + arg1 = reinterpret_cast< cmf::math::Time * >(argp1); + { + try { + result = (double)((cmf::math::Time const *)arg1)->AsSeconds(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Time_AsMilliseconds(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::Time *arg1 = (cmf::math::Time *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + long long result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Time, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Time_AsMilliseconds" "', argument " "1"" of type '" "cmf::math::Time const *""'"); + } + arg1 = reinterpret_cast< cmf::math::Time * >(argp1); + { + try { + result = (long long)((cmf::math::Time const *)arg1)->AsMilliseconds(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_long_SS_long(static_cast< long long >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Time_AsDate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::Time *arg1 = (cmf::math::Time *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + SwigValueWrapper< cmf::math::Date > result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Time, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Time_AsDate" "', argument " "1"" of type '" "cmf::math::Time const *""'"); + } + arg1 = reinterpret_cast< cmf::math::Time * >(argp1); + { + try { + result = ((cmf::math::Time const *)arg1)->AsDate(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj((new cmf::math::Date(static_cast< const cmf::math::Date& >(result))), SWIGTYPE_p_cmf__math__Date, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Time_to_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::math::Time *arg1 = (cmf::math::Time *) 0 ; + char arg2 = (char) ':' ; + void *argp1 = 0 ; + int res1 = 0 ; + char val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "seperator", NULL + }; + std::string result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Time_to_string",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__math__Time, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Time_to_string" "', argument " "1"" of type '" "cmf::math::Time *""'"); + } + arg1 = reinterpret_cast< cmf::math::Time * >(argp1); + if (obj1) { + ecode2 = SWIG_AsVal_char(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Time_to_string" "', argument " "2"" of type '" "char""'"); + } + arg2 = static_cast< char >(val2); + } + { + try { + result = (arg1)->to_string(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Time_is_not_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::Time *arg1 = (cmf::math::Time *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + bool result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Time, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Time_is_not_0" "', argument " "1"" of type '" "cmf::math::Time const *""'"); + } + arg1 = reinterpret_cast< cmf::math::Time * >(argp1); + { + try { + result = (bool)((cmf::math::Time const *)arg1)->is_not_0(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Time_DOY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::Time *arg1 = (cmf::math::Time *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Time, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Time_DOY" "', argument " "1"" of type '" "cmf::math::Time const *""'"); + } + arg1 = reinterpret_cast< cmf::math::Time * >(argp1); + { + try { + result = (double)((cmf::math::Time const *)arg1)->DOY(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Time___add__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::math::Time *arg1 = (cmf::math::Time *) 0 ; + cmf::math::Time *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + cmf::math::Time T2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "t1", NULL + }; + cmf::math::Time result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Time___add__",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__math__Time, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Time___add__" "', argument " "1"" of type '" "cmf::math::Time const *""'"); + } + arg1 = reinterpret_cast< cmf::math::Time * >(argp1); + { + // typemape const Time& + T2 = convert_datetime_to_cmftime(obj1); + if (T2 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } else { + arg2 = &T2; + } + } + { + try { + result = ((cmf::math::Time const *)arg1)->operator +((cmf::math::Time const &)*arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj((new cmf::math::Time(static_cast< const cmf::math::Time& >(result))), SWIGTYPE_p_cmf__math__Time, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Time___sub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::math::Time *arg1 = (cmf::math::Time *) 0 ; + cmf::math::Time *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + cmf::math::Time T2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "t1", NULL + }; + cmf::math::Time result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Time___sub__",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__math__Time, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Time___sub__" "', argument " "1"" of type '" "cmf::math::Time const *""'"); + } + arg1 = reinterpret_cast< cmf::math::Time * >(argp1); + { + // typemape const Time& + T2 = convert_datetime_to_cmftime(obj1); + if (T2 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } else { + arg2 = &T2; + } + } + { + try { + result = ((cmf::math::Time const *)arg1)->operator -((cmf::math::Time const &)*arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj((new cmf::math::Time(static_cast< const cmf::math::Time& >(result))), SWIGTYPE_p_cmf__math__Time, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Time___iadd__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::math::Time *arg1 = (cmf::math::Time *) 0 ; + cmf::math::Time *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + cmf::math::Time T2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "t1", NULL + }; + cmf::math::Time result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Time___iadd__",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__math__Time, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Time___iadd__" "', argument " "1"" of type '" "cmf::math::Time *""'"); + } + arg1 = reinterpret_cast< cmf::math::Time * >(argp1); + { + // typemape const Time& + T2 = convert_datetime_to_cmftime(obj1); + if (T2 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } else { + arg2 = &T2; + } + } + { + try { + result = (arg1)->operator +=((cmf::math::Time const &)*arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj((new cmf::math::Time(static_cast< const cmf::math::Time& >(result))), SWIGTYPE_p_cmf__math__Time, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Time___isub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::math::Time *arg1 = (cmf::math::Time *) 0 ; + cmf::math::Time *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + cmf::math::Time T2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "t1", NULL + }; + cmf::math::Time result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Time___isub__",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__math__Time, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Time___isub__" "', argument " "1"" of type '" "cmf::math::Time *""'"); + } + arg1 = reinterpret_cast< cmf::math::Time * >(argp1); + { + // typemape const Time& + T2 = convert_datetime_to_cmftime(obj1); + if (T2 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } else { + arg2 = &T2; + } + } + { + try { + result = (arg1)->operator -=((cmf::math::Time const &)*arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj((new cmf::math::Time(static_cast< const cmf::math::Time& >(result))), SWIGTYPE_p_cmf__math__Time, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Time___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::math::Time *arg1 = (cmf::math::Time *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + cmf::math::Time result; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Time, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Time___mul__" "', argument " "1"" of type '" "cmf::math::Time const *""'"); + } + arg1 = reinterpret_cast< cmf::math::Time * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Time___mul__" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + { + try { + result = ((cmf::math::Time const *)arg1)->operator *(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj((new cmf::math::Time(static_cast< const cmf::math::Time& >(result))), SWIGTYPE_p_cmf__math__Time, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Time___truediv____SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::math::Time *arg1 = (cmf::math::Time *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + cmf::math::Time result; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Time, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Time___truediv__" "', argument " "1"" of type '" "cmf::math::Time const *""'"); + } + arg1 = reinterpret_cast< cmf::math::Time * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Time___truediv__" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + { + try { + result = ((cmf::math::Time const *)arg1)->operator /(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj((new cmf::math::Time(static_cast< const cmf::math::Time& >(result))), SWIGTYPE_p_cmf__math__Time, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Time___mod__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::math::Time *arg1 = (cmf::math::Time *) 0 ; + cmf::math::Time *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + cmf::math::Time T2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "t1", NULL + }; + cmf::math::Time result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Time___mod__",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__math__Time, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Time___mod__" "', argument " "1"" of type '" "cmf::math::Time const *""'"); + } + arg1 = reinterpret_cast< cmf::math::Time * >(argp1); + { + // typemape const Time& + T2 = convert_datetime_to_cmftime(obj1); + if (T2 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } else { + arg2 = &T2; + } + } + { + try { + result = ((cmf::math::Time const *)arg1)->operator %((cmf::math::Time const &)*arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj((new cmf::math::Time(static_cast< const cmf::math::Time& >(result))), SWIGTYPE_p_cmf__math__Time, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Time___imul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::math::Time *arg1 = (cmf::math::Time *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + cmf::math::Time *result = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Time, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Time___imul__" "', argument " "1"" of type '" "cmf::math::Time *""'"); + } + arg1 = reinterpret_cast< cmf::math::Time * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Time___imul__" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + { + try { + result = (cmf::math::Time *) &(arg1)->operator *=(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__Time, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Time___itruediv____SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::math::Time *arg1 = (cmf::math::Time *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + cmf::math::Time *result = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Time, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Time___itruediv__" "', argument " "1"" of type '" "cmf::math::Time *""'"); + } + arg1 = reinterpret_cast< cmf::math::Time * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Time___itruediv__" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + { + try { + result = (cmf::math::Time *) &(arg1)->operator /=(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__Time, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Time___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::math::Time *arg1 = (cmf::math::Time *) 0 ; + long long arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + long long val2 ; + int ecode2 = 0 ; + cmf::math::Time result; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Time, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Time___mul__" "', argument " "1"" of type '" "cmf::math::Time const *""'"); + } + arg1 = reinterpret_cast< cmf::math::Time * >(argp1); + ecode2 = SWIG_AsVal_long_SS_long(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Time___mul__" "', argument " "2"" of type '" "long long""'"); + } + arg2 = static_cast< long long >(val2); + { + try { + result = ((cmf::math::Time const *)arg1)->operator *(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj((new cmf::math::Time(static_cast< const cmf::math::Time& >(result))), SWIGTYPE_p_cmf__math__Time, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Time___truediv____SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::math::Time *arg1 = (cmf::math::Time *) 0 ; + long long arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + long long val2 ; + int ecode2 = 0 ; + cmf::math::Time result; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Time, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Time___truediv__" "', argument " "1"" of type '" "cmf::math::Time const *""'"); + } + arg1 = reinterpret_cast< cmf::math::Time * >(argp1); + ecode2 = SWIG_AsVal_long_SS_long(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Time___truediv__" "', argument " "2"" of type '" "long long""'"); + } + arg2 = static_cast< long long >(val2); + { + try { + result = ((cmf::math::Time const *)arg1)->operator /(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj((new cmf::math::Time(static_cast< const cmf::math::Time& >(result))), SWIGTYPE_p_cmf__math__Time, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Time___imul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::math::Time *arg1 = (cmf::math::Time *) 0 ; + long long arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + long long val2 ; + int ecode2 = 0 ; + cmf::math::Time *result = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Time, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Time___imul__" "', argument " "1"" of type '" "cmf::math::Time *""'"); + } + arg1 = reinterpret_cast< cmf::math::Time * >(argp1); + ecode2 = SWIG_AsVal_long_SS_long(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Time___imul__" "', argument " "2"" of type '" "long long""'"); + } + arg2 = static_cast< long long >(val2); + { + try { + result = (cmf::math::Time *) &(arg1)->operator *=(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__Time, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Time___itruediv____SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::math::Time *arg1 = (cmf::math::Time *) 0 ; + long long arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + long long val2 ; + int ecode2 = 0 ; + cmf::math::Time *result = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Time, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Time___itruediv__" "', argument " "1"" of type '" "cmf::math::Time *""'"); + } + arg1 = reinterpret_cast< cmf::math::Time * >(argp1); + ecode2 = SWIG_AsVal_long_SS_long(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Time___itruediv__" "', argument " "2"" of type '" "long long""'"); + } + arg2 = static_cast< long long >(val2); + { + try { + result = (cmf::math::Time *) &(arg1)->operator /=(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__Time, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Time___mul____SWIG_2(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::math::Time *arg1 = (cmf::math::Time *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + cmf::math::Time result; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Time, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Time___mul__" "', argument " "1"" of type '" "cmf::math::Time const *""'"); + } + arg1 = reinterpret_cast< cmf::math::Time * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Time___mul__" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + { + try { + result = ((cmf::math::Time const *)arg1)->operator *(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj((new cmf::math::Time(static_cast< const cmf::math::Time& >(result))), SWIGTYPE_p_cmf__math__Time, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Time___mul__(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"Time___mul__",0,2,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__math__Time, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_int(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__math__Time, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_long_SS_long(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__math__Time, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_double(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 3; + if (_rank == _rankm) goto dispatch; + } + } + check_3: + + dispatch: + switch(_index) { + case 1: + return _wrap_Time___mul____SWIG_2(self, argc, argv); + case 2: + return _wrap_Time___mul____SWIG_1(self, argc, argv); + case 3: + return _wrap_Time___mul____SWIG_0(self, argc, argv); + } + } + +fail: + Py_INCREF(Py_NotImplemented); + return Py_NotImplemented; +} + + +SWIGINTERN PyObject *_wrap_Time___truediv____SWIG_2(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::math::Time *arg1 = (cmf::math::Time *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + cmf::math::Time result; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Time, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Time___truediv__" "', argument " "1"" of type '" "cmf::math::Time const *""'"); + } + arg1 = reinterpret_cast< cmf::math::Time * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Time___truediv__" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + { + try { + result = ((cmf::math::Time const *)arg1)->operator /(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj((new cmf::math::Time(static_cast< const cmf::math::Time& >(result))), SWIGTYPE_p_cmf__math__Time, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Time___imul____SWIG_2(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::math::Time *arg1 = (cmf::math::Time *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + cmf::math::Time *result = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Time, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Time___imul__" "', argument " "1"" of type '" "cmf::math::Time *""'"); + } + arg1 = reinterpret_cast< cmf::math::Time * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Time___imul__" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + { + try { + result = (cmf::math::Time *) &(arg1)->operator *=(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__Time, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Time___imul__(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"Time___imul__",0,2,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__math__Time, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_int(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__math__Time, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_long_SS_long(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__math__Time, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_double(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 3; + if (_rank == _rankm) goto dispatch; + } + } + check_3: + + dispatch: + switch(_index) { + case 1: + return _wrap_Time___imul____SWIG_2(self, argc, argv); + case 2: + return _wrap_Time___imul____SWIG_1(self, argc, argv); + case 3: + return _wrap_Time___imul____SWIG_0(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'Time___imul__'.\n" + " Possible C/C++ prototypes are:\n" + " cmf::math::Time::operator *=(double)\n" + " cmf::math::Time::operator *=(long long)\n" + " cmf::math::Time::operator *=(int)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_Time___itruediv____SWIG_2(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::math::Time *arg1 = (cmf::math::Time *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + cmf::math::Time *result = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Time, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Time___itruediv__" "', argument " "1"" of type '" "cmf::math::Time *""'"); + } + arg1 = reinterpret_cast< cmf::math::Time * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Time___itruediv__" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + { + try { + result = (cmf::math::Time *) &(arg1)->operator /=(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__Time, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Time___itruediv__(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"Time___itruediv__",0,2,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__math__Time, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_int(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__math__Time, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_long_SS_long(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__math__Time, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_double(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 3; + if (_rank == _rankm) goto dispatch; + } + } + check_3: + + dispatch: + switch(_index) { + case 1: + return _wrap_Time___itruediv____SWIG_2(self, argc, argv); + case 2: + return _wrap_Time___itruediv____SWIG_1(self, argc, argv); + case 3: + return _wrap_Time___itruediv____SWIG_0(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'Time___itruediv__'.\n" + " Possible C/C++ prototypes are:\n" + " cmf::math::Time::operator /=(double)\n" + " cmf::math::Time::operator /=(long long)\n" + " cmf::math::Time::operator /=(int)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_Time___imod__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::math::Time *arg1 = (cmf::math::Time *) 0 ; + cmf::math::Time *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + cmf::math::Time T2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "t1", NULL + }; + cmf::math::Time *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Time___imod__",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__math__Time, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Time___imod__" "', argument " "1"" of type '" "cmf::math::Time *""'"); + } + arg1 = reinterpret_cast< cmf::math::Time * >(argp1); + { + // typemape const Time& + T2 = convert_datetime_to_cmftime(obj1); + if (T2 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } else { + arg2 = &T2; + } + } + { + try { + result = (cmf::math::Time *) &(arg1)->operator %=((cmf::math::Time const &)*arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__Time, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Time___truediv____SWIG_3(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::math::Time *arg1 = (cmf::math::Time *) 0 ; + cmf::math::Time *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + cmf::math::Time T2 ; + double result; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Time, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Time___truediv__" "', argument " "1"" of type '" "cmf::math::Time const *""'"); + } + arg1 = reinterpret_cast< cmf::math::Time * >(argp1); + { + // typemape const Time& + T2 = convert_datetime_to_cmftime(swig_obj[1]); + if (T2 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } else { + arg2 = &T2; + } + } + { + try { + result = (double)((cmf::math::Time const *)arg1)->operator /((cmf::math::Time const &)*arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Time___truediv__(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"Time___truediv__",0,2,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__math__Time, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_int(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__math__Time, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_long_SS_long(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__math__Time, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_double(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 3; + if (_rank == _rankm) goto dispatch; + } + } + check_3: + + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__math__Time, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_4; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + _v = check_time(argv[1]); // typecheck const cmf::math::Time & + } + } + if (!_v) goto check_4; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 4; + if (_rank == _rankm) goto dispatch; + } + } + check_4: + + dispatch: + switch(_index) { + case 1: + return _wrap_Time___truediv____SWIG_2(self, argc, argv); + case 2: + return _wrap_Time___truediv____SWIG_1(self, argc, argv); + case 3: + return _wrap_Time___truediv____SWIG_0(self, argc, argv); + case 4: + return _wrap_Time___truediv____SWIG_3(self, argc, argv); + } + } + +fail: + Py_INCREF(Py_NotImplemented); + return Py_NotImplemented; +} + + +SWIGINTERN PyObject *_wrap_Time_times_in(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::math::Time *arg1 = (cmf::math::Time *) 0 ; + cmf::math::Time *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + cmf::math::Time T2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "t1", NULL + }; + long long result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Time_times_in",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__math__Time, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Time_times_in" "', argument " "1"" of type '" "cmf::math::Time const *""'"); + } + arg1 = reinterpret_cast< cmf::math::Time * >(argp1); + { + // typemape const Time& + T2 = convert_datetime_to_cmftime(obj1); + if (T2 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } else { + arg2 = &T2; + } + } + { + try { + result = (long long)((cmf::math::Time const *)arg1)->times_in((cmf::math::Time const &)*arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_long_SS_long(static_cast< long long >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Time___lt__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::math::Time *arg1 = (cmf::math::Time *) 0 ; + cmf::math::Time *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + cmf::math::Time T2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "t1", NULL + }; + bool result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Time___lt__",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__math__Time, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Time___lt__" "', argument " "1"" of type '" "cmf::math::Time const *""'"); + } + arg1 = reinterpret_cast< cmf::math::Time * >(argp1); + { + // typemape const Time& + T2 = convert_datetime_to_cmftime(obj1); + if (T2 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } else { + arg2 = &T2; + } + } + { + try { + result = (bool)((cmf::math::Time const *)arg1)->operator <((cmf::math::Time const &)*arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Time___gt__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::math::Time *arg1 = (cmf::math::Time *) 0 ; + cmf::math::Time *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + cmf::math::Time T2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "t1", NULL + }; + bool result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Time___gt__",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__math__Time, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Time___gt__" "', argument " "1"" of type '" "cmf::math::Time const *""'"); + } + arg1 = reinterpret_cast< cmf::math::Time * >(argp1); + { + // typemape const Time& + T2 = convert_datetime_to_cmftime(obj1); + if (T2 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } else { + arg2 = &T2; + } + } + { + try { + result = (bool)((cmf::math::Time const *)arg1)->operator >((cmf::math::Time const &)*arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Time___le__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::math::Time *arg1 = (cmf::math::Time *) 0 ; + cmf::math::Time *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + cmf::math::Time T2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "t1", NULL + }; + bool result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Time___le__",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__math__Time, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Time___le__" "', argument " "1"" of type '" "cmf::math::Time const *""'"); + } + arg1 = reinterpret_cast< cmf::math::Time * >(argp1); + { + // typemape const Time& + T2 = convert_datetime_to_cmftime(obj1); + if (T2 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } else { + arg2 = &T2; + } + } + { + try { + result = (bool)((cmf::math::Time const *)arg1)->operator <=((cmf::math::Time const &)*arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Time___ge__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::math::Time *arg1 = (cmf::math::Time *) 0 ; + cmf::math::Time *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + cmf::math::Time T2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "t1", NULL + }; + bool result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Time___ge__",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__math__Time, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Time___ge__" "', argument " "1"" of type '" "cmf::math::Time const *""'"); + } + arg1 = reinterpret_cast< cmf::math::Time * >(argp1); + { + // typemape const Time& + T2 = convert_datetime_to_cmftime(obj1); + if (T2 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } else { + arg2 = &T2; + } + } + { + try { + result = (bool)((cmf::math::Time const *)arg1)->operator >=((cmf::math::Time const &)*arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Time___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::math::Time *arg1 = (cmf::math::Time *) 0 ; + cmf::math::Time *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + cmf::math::Time T2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "t1", NULL + }; + bool result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Time___eq__",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__math__Time, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Time___eq__" "', argument " "1"" of type '" "cmf::math::Time const *""'"); + } + arg1 = reinterpret_cast< cmf::math::Time * >(argp1); + { + // typemape const Time& + T2 = convert_datetime_to_cmftime(obj1); + if (T2 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } else { + arg2 = &T2; + } + } + { + try { + result = (bool)((cmf::math::Time const *)arg1)->operator ==((cmf::math::Time const &)*arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Time___ne__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::math::Time *arg1 = (cmf::math::Time *) 0 ; + cmf::math::Time *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + cmf::math::Time T2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "t1", NULL + }; + bool result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Time___ne__",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__math__Time, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Time___ne__" "', argument " "1"" of type '" "cmf::math::Time const *""'"); + } + arg1 = reinterpret_cast< cmf::math::Time * >(argp1); + { + // typemape const Time& + T2 = convert_datetime_to_cmftime(obj1); + if (T2 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } else { + arg2 = &T2; + } + } + { + try { + result = (bool)((cmf::math::Time const *)arg1)->operator !=((cmf::math::Time const &)*arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_Time(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::Time *arg1 = (cmf::math::Time *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Time, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Time" "', argument " "1"" of type '" "cmf::math::Time *""'"); + } + arg1 = reinterpret_cast< cmf::math::Time * >(argp1); + { + try { + delete arg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *Time_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__math__Time, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *Time_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_Date_year_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::Date *arg1 = (cmf::math::Date *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"Date_year_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Date, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Date_year_set" "', argument " "1"" of type '" "cmf::math::Date *""'"); + } + arg1 = reinterpret_cast< cmf::math::Date * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Date_year_set" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->year = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Date_year_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::Date *arg1 = (cmf::math::Date *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Date, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Date_year_get" "', argument " "1"" of type '" "cmf::math::Date *""'"); + } + arg1 = reinterpret_cast< cmf::math::Date * >(argp1); + result = (int) ((arg1)->year); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Date_month_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::Date *arg1 = (cmf::math::Date *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"Date_month_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Date, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Date_month_set" "', argument " "1"" of type '" "cmf::math::Date *""'"); + } + arg1 = reinterpret_cast< cmf::math::Date * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Date_month_set" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->month = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Date_month_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::Date *arg1 = (cmf::math::Date *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Date, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Date_month_get" "', argument " "1"" of type '" "cmf::math::Date *""'"); + } + arg1 = reinterpret_cast< cmf::math::Date * >(argp1); + result = (int) ((arg1)->month); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Date_day_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::Date *arg1 = (cmf::math::Date *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"Date_day_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Date, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Date_day_set" "', argument " "1"" of type '" "cmf::math::Date *""'"); + } + arg1 = reinterpret_cast< cmf::math::Date * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Date_day_set" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->day = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Date_day_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::Date *arg1 = (cmf::math::Date *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Date, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Date_day_get" "', argument " "1"" of type '" "cmf::math::Date *""'"); + } + arg1 = reinterpret_cast< cmf::math::Date * >(argp1); + result = (int) ((arg1)->day); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Date_hour_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::Date *arg1 = (cmf::math::Date *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"Date_hour_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Date, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Date_hour_set" "', argument " "1"" of type '" "cmf::math::Date *""'"); + } + arg1 = reinterpret_cast< cmf::math::Date * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Date_hour_set" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->hour = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Date_hour_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::Date *arg1 = (cmf::math::Date *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Date, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Date_hour_get" "', argument " "1"" of type '" "cmf::math::Date *""'"); + } + arg1 = reinterpret_cast< cmf::math::Date * >(argp1); + result = (int) ((arg1)->hour); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Date_minute_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::Date *arg1 = (cmf::math::Date *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"Date_minute_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Date, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Date_minute_set" "', argument " "1"" of type '" "cmf::math::Date *""'"); + } + arg1 = reinterpret_cast< cmf::math::Date * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Date_minute_set" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->minute = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Date_minute_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::Date *arg1 = (cmf::math::Date *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Date, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Date_minute_get" "', argument " "1"" of type '" "cmf::math::Date *""'"); + } + arg1 = reinterpret_cast< cmf::math::Date * >(argp1); + result = (int) ((arg1)->minute); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Date_second_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::Date *arg1 = (cmf::math::Date *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"Date_second_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Date, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Date_second_set" "', argument " "1"" of type '" "cmf::math::Date *""'"); + } + arg1 = reinterpret_cast< cmf::math::Date * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Date_second_set" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->second = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Date_second_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::Date *arg1 = (cmf::math::Date *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Date, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Date_second_get" "', argument " "1"" of type '" "cmf::math::Date *""'"); + } + arg1 = reinterpret_cast< cmf::math::Date * >(argp1); + result = (int) ((arg1)->second); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Date_ms_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::Date *arg1 = (cmf::math::Date *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"Date_ms_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Date, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Date_ms_set" "', argument " "1"" of type '" "cmf::math::Date *""'"); + } + arg1 = reinterpret_cast< cmf::math::Date * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Date_ms_set" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->ms = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Date_ms_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::Date *arg1 = (cmf::math::Date *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Date, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Date_ms_get" "', argument " "1"" of type '" "cmf::math::Date *""'"); + } + arg1 = reinterpret_cast< cmf::math::Date * >(argp1); + result = (int) ((arg1)->ms); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_Date__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + int arg1 ; + int arg2 ; + int arg3 ; + int arg4 = (int) 0 ; + int arg5 = (int) 0 ; + int arg6 = (int) 0 ; + int arg7 = (int) 0 ; + int val1 ; + int ecode1 = 0 ; + int val2 ; + int ecode2 = 0 ; + int val3 ; + int ecode3 = 0 ; + int val4 ; + int ecode4 = 0 ; + int val5 ; + int ecode5 = 0 ; + int val6 ; + int ecode6 = 0 ; + int val7 ; + int ecode7 = 0 ; + cmf::math::Date *result = 0 ; + + if ((nobjs < 3) || (nobjs > 7)) SWIG_fail; + ecode1 = SWIG_AsVal_int(swig_obj[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Date" "', argument " "1"" of type '" "int""'"); + } + arg1 = static_cast< int >(val1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Date" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Date" "', argument " "3"" of type '" "int""'"); + } + arg3 = static_cast< int >(val3); + if (swig_obj[3]) { + ecode4 = SWIG_AsVal_int(swig_obj[3], &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_Date" "', argument " "4"" of type '" "int""'"); + } + arg4 = static_cast< int >(val4); + } + if (swig_obj[4]) { + ecode5 = SWIG_AsVal_int(swig_obj[4], &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_Date" "', argument " "5"" of type '" "int""'"); + } + arg5 = static_cast< int >(val5); + } + if (swig_obj[5]) { + ecode6 = SWIG_AsVal_int(swig_obj[5], &val6); + if (!SWIG_IsOK(ecode6)) { + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_Date" "', argument " "6"" of type '" "int""'"); + } + arg6 = static_cast< int >(val6); + } + if (swig_obj[6]) { + ecode7 = SWIG_AsVal_int(swig_obj[6], &val7); + if (!SWIG_IsOK(ecode7)) { + SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_Date" "', argument " "7"" of type '" "int""'"); + } + arg7 = static_cast< int >(val7); + } + { + try { + result = (cmf::math::Date *)new cmf::math::Date(arg1,arg2,arg3,arg4,arg5,arg6,arg7); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__Date, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_Date__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::math::Time *arg1 = 0 ; + cmf::math::Time T1 ; + cmf::math::Date *result = 0 ; + + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + { + // typemape const Time& + T1 = convert_datetime_to_cmftime(swig_obj[0]); + if (T1 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } else { + arg1 = &T1; + } + } + { + try { + result = (cmf::math::Date *)new cmf::math::Date((cmf::math::Time const &)*arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__Date, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_Date(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[8] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"new_Date",0,7,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + { + _v = check_time(argv[0]); // typecheck const cmf::math::Time & + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if ((argc >= 3) && (argc <= 7)) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + { + int res = SWIG_AsVal_int(argv[0], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_int(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_int(argv[2], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (argc > 3) { + { + { + int res = SWIG_AsVal_int(argv[3], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (argc > 4) { + { + { + int res = SWIG_AsVal_int(argv[4], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (argc > 5) { + { + { + int res = SWIG_AsVal_int(argv[5], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (argc > 6) { + { + { + int res = SWIG_AsVal_int(argv[6], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + } + } + } + } + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_new_Date__SWIG_1(self, argc, argv); + case 2: + return _wrap_new_Date__SWIG_0(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_Date'.\n" + " Possible C/C++ prototypes are:\n" + " cmf::math::Date::Date(int,int,int,int,int,int,int)\n" + " cmf::math::Date::Date(cmf::math::Time const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_Date_ToTime(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::Date *arg1 = (cmf::math::Date *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::math::Time result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Date, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Date_ToTime" "', argument " "1"" of type '" "cmf::math::Date *""'"); + } + arg1 = reinterpret_cast< cmf::math::Date * >(argp1); + { + try { + result = (arg1)->ToTime(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj((new cmf::math::Time(static_cast< const cmf::math::Time& >(result))), SWIGTYPE_p_cmf__math__Time, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Date_DOY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::Date *arg1 = (cmf::math::Date *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Date, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Date_DOY" "', argument " "1"" of type '" "cmf::math::Date *""'"); + } + arg1 = reinterpret_cast< cmf::math::Date * >(argp1); + { + try { + result = (double)(arg1)->DOY(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Date_to_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::Date *arg1 = (cmf::math::Date *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::string result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Date, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Date_to_string" "', argument " "1"" of type '" "cmf::math::Date *""'"); + } + arg1 = reinterpret_cast< cmf::math::Date * >(argp1); + { + try { + result = (arg1)->to_string(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_Date(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::Date *arg1 = (cmf::math::Date *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Date, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Date" "', argument " "1"" of type '" "cmf::math::Date *""'"); + } + arg1 = reinterpret_cast< cmf::math::Date * >(argp1); + { + try { + delete arg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *Date_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__math__Date, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *Date_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN int Swig_var_ms_set(PyObject *) { + SWIG_Error(SWIG_AttributeError,"Variable ms is read-only."); + return 1; +} + + +SWIGINTERN PyObject *Swig_var_ms_get(void) { + PyObject *pyobj = 0; + + pyobj = SWIG_NewPointerObj(SWIG_as_voidptr(&cmf::math::ms), SWIGTYPE_p_cmf__math__Time, 0 ); + return pyobj; +} + + +SWIGINTERN int Swig_var_sec_set(PyObject *) { + SWIG_Error(SWIG_AttributeError,"Variable sec is read-only."); + return 1; +} + + +SWIGINTERN PyObject *Swig_var_sec_get(void) { + PyObject *pyobj = 0; + + pyobj = SWIG_NewPointerObj(SWIG_as_voidptr(&cmf::math::sec), SWIGTYPE_p_cmf__math__Time, 0 ); + return pyobj; +} + + +SWIGINTERN int Swig_var_min_set(PyObject *) { + SWIG_Error(SWIG_AttributeError,"Variable min is read-only."); + return 1; +} + + +SWIGINTERN PyObject *Swig_var_min_get(void) { + PyObject *pyobj = 0; + + pyobj = SWIG_NewPointerObj(SWIG_as_voidptr(&cmf::math::min), SWIGTYPE_p_cmf__math__Time, 0 ); + return pyobj; +} + + +SWIGINTERN int Swig_var_h_set(PyObject *) { + SWIG_Error(SWIG_AttributeError,"Variable h is read-only."); + return 1; +} + + +SWIGINTERN PyObject *Swig_var_h_get(void) { + PyObject *pyobj = 0; + + pyobj = SWIG_NewPointerObj(SWIG_as_voidptr(&cmf::math::h), SWIGTYPE_p_cmf__math__Time, 0 ); + return pyobj; +} + + +SWIGINTERN int Swig_var_day_set(PyObject *) { + SWIG_Error(SWIG_AttributeError,"Variable day is read-only."); + return 1; +} + + +SWIGINTERN PyObject *Swig_var_day_get(void) { + PyObject *pyobj = 0; + + pyobj = SWIG_NewPointerObj(SWIG_as_voidptr(&cmf::math::day), SWIGTYPE_p_cmf__math__Time, 0 ); + return pyobj; +} + + +SWIGINTERN int Swig_var_week_set(PyObject *) { + SWIG_Error(SWIG_AttributeError,"Variable week is read-only."); + return 1; +} + + +SWIGINTERN PyObject *Swig_var_week_get(void) { + PyObject *pyobj = 0; + + pyobj = SWIG_NewPointerObj(SWIG_as_voidptr(&cmf::math::week), SWIGTYPE_p_cmf__math__Time, 0 ); + return pyobj; +} + + +SWIGINTERN int Swig_var_year_set(PyObject *) { + SWIG_Error(SWIG_AttributeError,"Variable year is read-only."); + return 1; +} + + +SWIGINTERN PyObject *Swig_var_year_get(void) { + PyObject *pyobj = 0; + + pyobj = SWIG_NewPointerObj(SWIG_as_voidptr(&cmf::math::year), SWIGTYPE_p_cmf__math__Time, 0 ); + return pyobj; +} + + +SWIGINTERN int Swig_var_month_set(PyObject *) { + SWIG_Error(SWIG_AttributeError,"Variable month is read-only."); + return 1; +} + + +SWIGINTERN PyObject *Swig_var_month_get(void) { + PyObject *pyobj = 0; + + pyobj = SWIG_NewPointerObj(SWIG_as_voidptr(&cmf::math::month), SWIGTYPE_p_cmf__math__Time, 0 ); + return pyobj; +} + + +SWIGINTERN int Swig_var_never_set(PyObject *) { + SWIG_Error(SWIG_AttributeError,"Variable never is read-only."); + return 1; +} + + +SWIGINTERN PyObject *Swig_var_never_get(void) { + PyObject *pyobj = 0; + + pyobj = SWIG_NewPointerObj(SWIG_as_voidptr(&cmf::math::never), SWIGTYPE_p_cmf__math__Time, 0 ); + return pyobj; +} + + +SWIGINTERN PyObject *_wrap_timeseries_interpolationpower(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries_interpolationpower" "', argument " "1"" of type '" "cmf::math::timeseries const *""'"); + } + arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); + { + try { + result = (int)((cmf::math::timeseries const *)arg1)->interpolationpower(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_timeseries_add(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "Value", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:timeseries_add",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries_add" "', argument " "1"" of type '" "cmf::math::timeseries *""'"); + } + arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "timeseries_add" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + { + try { + (arg1)->add(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_timeseries_is_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + bool result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries_is_empty" "', argument " "1"" of type '" "cmf::math::timeseries const *""'"); + } + arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); + { + try { + result = (bool)((cmf::math::timeseries const *)arg1)->is_empty(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_timeseries_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries_clear" "', argument " "1"" of type '" "cmf::math::timeseries *""'"); + } + arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); + { + try { + (arg1)->clear(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_timeseries_adress(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + size_t result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries_adress" "', argument " "1"" of type '" "cmf::math::timeseries const *""'"); + } + arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); + { + try { + result = ((cmf::math::timeseries const *)arg1)->adress(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_timeseries_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::math::timeseries result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries_copy" "', argument " "1"" of type '" "cmf::math::timeseries const *""'"); + } + arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); + { + try { + result = ((cmf::math::timeseries const *)arg1)->copy(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj((new cmf::math::timeseries(static_cast< const cmf::math::timeseries& >(result))), SWIGTYPE_p_cmf__math__timeseries, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_timeseries_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + size_t result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries_size" "', argument " "1"" of type '" "cmf::math::timeseries const *""'"); + } + arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); + { + try { + result = ((cmf::math::timeseries const *)arg1)->size(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_timeseries_count_values(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + size_t result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries_count_values" "', argument " "1"" of type '" "cmf::math::timeseries const *""'"); + } + arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); + { + try { + result = ((cmf::math::timeseries const *)arg1)->count_values(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_timeseries(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::math::Time arg1 = (cmf::math::Time) cmf::math::Time() ; + cmf::math::Time arg2 = (cmf::math::Time) cmf::math::day ; + int arg3 = (int) 1 ; + size_t arg4 = (size_t) 0 ; + int val3 ; + int ecode3 = 0 ; + size_t val4 ; + int ecode4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + char * kwnames[] = { + (char *) "begin",(char *) "step",(char *) "interpolationmethod",(char *) "count", NULL + }; + cmf::math::timeseries *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|OOOO:new_timeseries",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + if (obj0) { + { + arg1 = convert_datetime_to_cmftime(obj0); + if (arg1 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } + } + } + if (obj1) { + { + arg2 = convert_datetime_to_cmftime(obj1); + if (arg2 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } + } + } + if (obj2) { + ecode3 = SWIG_AsVal_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_timeseries" "', argument " "3"" of type '" "int""'"); + } + arg3 = static_cast< int >(val3); + } + if (obj3) { + ecode4 = SWIG_AsVal_size_t(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_timeseries" "', argument " "4"" of type '" "size_t""'"); + } + arg4 = static_cast< size_t >(val4); + } + { + try { + result = (cmf::math::timeseries *)new cmf::math::timeseries(arg1,arg2,arg3,arg4); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__timeseries, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_timeseries_from_array(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::math::Time arg1 ; + cmf::math::Time arg2 ; + cmf::math::num_array *arg3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "begin",(char *) "step",(char *) "data", NULL + }; + cmf::math::timeseries result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:timeseries_from_array",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + { + arg1 = convert_datetime_to_cmftime(obj0); + if (arg1 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } + } + { + arg2 = convert_datetime_to_cmftime(obj1); + if (arg2 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } + } + { + // Convert a array_wrapper from numpy array + double * data=0; + ptrdiff_t size = from_npy_array(obj2,&data); + if (!data) { + SWIG_exception_fail(SWIG_TypeError,"Input data is not 'array-like' (in the sense of numpy arrays)"); + return NULL; + } + arg3 = new cmf::math::num_array(size,data); + } + { + try { + result = cmf::math::timeseries::from_array(arg1,arg2,(cmf::math::num_array const &)*arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj((new cmf::math::timeseries(static_cast< const cmf::math::timeseries& >(result))), SWIGTYPE_p_cmf__math__timeseries, SWIG_POINTER_OWN | 0 ); + { + delete arg3; + } + return resultobj; +fail: + { + delete arg3; + } + return NULL; +} + + +SWIGINTERN PyObject *_wrap_timeseries_from_scalar(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + double arg1 ; + double val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + char * kwnames[] = { + (char *) "scalar", NULL + }; + cmf::math::timeseries result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:timeseries_from_scalar",kwnames,&obj0)) SWIG_fail; + ecode1 = SWIG_AsVal_double(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "timeseries_from_scalar" "', argument " "1"" of type '" "double""'"); + } + arg1 = static_cast< double >(val1); + { + try { + result = cmf::math::timeseries::from_scalar(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj((new cmf::math::timeseries(static_cast< const cmf::math::timeseries& >(result))), SWIGTYPE_p_cmf__math__timeseries, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_timeseries_from_file(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + std::string arg1 ; + PyObject * obj0 = 0 ; + char * kwnames[] = { + (char *) "filename", NULL + }; + cmf::math::timeseries result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:timeseries_from_file",kwnames,&obj0)) SWIG_fail; + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string(obj0, &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "timeseries_from_file" "', argument " "1"" of type '" "std::string""'"); + } + arg1 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + { + try { + result = cmf::math::timeseries::from_file(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj((new cmf::math::timeseries(static_cast< const cmf::math::timeseries& >(result))), SWIGTYPE_p_cmf__math__timeseries, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_timeseries_get_t(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; + cmf::math::Time arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "t", NULL + }; + double result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:timeseries_get_t",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries_get_t" "', argument " "1"" of type '" "cmf::math::timeseries const *""'"); + } + arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); + { + arg2 = convert_datetime_to_cmftime(obj1); + if (arg2 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } + } + { + try { + result = (double)((cmf::math::timeseries const *)arg1)->get_t(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_timeseries_get_i(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; + ptrdiff_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "i", NULL + }; + double result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:timeseries_get_i",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries_get_i" "', argument " "1"" of type '" "cmf::math::timeseries const *""'"); + } + arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "timeseries_get_i" "', argument " "2"" of type '" "ptrdiff_t""'"); + } + arg2 = static_cast< ptrdiff_t >(val2); + { + try { + result = (double)((cmf::math::timeseries const *)arg1)->get_i(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_timeseries_set_t(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; + cmf::math::Time arg2 ; + double arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "t",(char *) "value", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:timeseries_set_t",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries_set_t" "', argument " "1"" of type '" "cmf::math::timeseries *""'"); + } + arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); + { + arg2 = convert_datetime_to_cmftime(obj1); + if (arg2 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } + } + ecode3 = SWIG_AsVal_double(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "timeseries_set_t" "', argument " "3"" of type '" "double""'"); + } + arg3 = static_cast< double >(val3); + { + try { + (arg1)->set_t(arg2,arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_timeseries_set_i(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; + ptrdiff_t arg2 ; + double arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + double val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "i",(char *) "value", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:timeseries_set_i",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries_set_i" "', argument " "1"" of type '" "cmf::math::timeseries *""'"); + } + arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "timeseries_set_i" "', argument " "2"" of type '" "ptrdiff_t""'"); + } + arg2 = static_cast< ptrdiff_t >(val2); + ecode3 = SWIG_AsVal_double(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "timeseries_set_i" "', argument " "3"" of type '" "double""'"); + } + arg3 = static_cast< double >(val3); + { + try { + (arg1)->set_i(arg2,arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_timeseries_get_slice__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; + cmf::math::Time arg2 ; + cmf::math::Time arg3 ; + cmf::math::Time arg4 = (cmf::math::Time) cmf::math::Time() ; + void *argp1 = 0 ; + int res1 = 0 ; + cmf::math::timeseries result; + + if ((nobjs < 3) || (nobjs > 4)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries_get_slice" "', argument " "1"" of type '" "cmf::math::timeseries *""'"); + } + arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); + { + arg2 = convert_datetime_to_cmftime(swig_obj[1]); + if (arg2 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } + } + { + arg3 = convert_datetime_to_cmftime(swig_obj[2]); + if (arg3 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } + } + if (swig_obj[3]) { + { + arg4 = convert_datetime_to_cmftime(swig_obj[3]); + if (arg4 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } + } + } + { + try { + result = (arg1)->get_slice(arg2,arg3,arg4); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj((new cmf::math::timeseries(static_cast< const cmf::math::timeseries& >(result))), SWIGTYPE_p_cmf__math__timeseries, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_timeseries_set_slice__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; + cmf::math::Time arg2 ; + cmf::math::Time arg3 ; + cmf::math::timeseries arg4 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if ((nobjs < 4) || (nobjs > 4)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries_set_slice" "', argument " "1"" of type '" "cmf::math::timeseries *""'"); + } + arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); + { + arg2 = convert_datetime_to_cmftime(swig_obj[1]); + if (arg2 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } + } + { + arg3 = convert_datetime_to_cmftime(swig_obj[2]); + if (arg3 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } + } + { + cmf::math::timeseries *p_ts = &arg4; + int res=SWIG_ConvertPtr(swig_obj[3],(void**)(&p_ts),SWIGTYPE_p_cmf__math__timeseries,0); + if (!(SWIG_IsOK(res)) || p_ts==0) { + if (PyNumber_Check(swig_obj[3])) { + double scalar = PyFloat_AsDouble(swig_obj[3]); + arg4 = cmf::math::timeseries::from_scalar(scalar); + } else { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.timeseries object"); + } + } else { + arg4 = *p_ts; + } + } + { + try { + (arg1)->set_slice(arg2,arg3,arg4); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_timeseries_get_slice__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; + ptrdiff_t arg2 ; + ptrdiff_t arg3 ; + ptrdiff_t arg4 = (ptrdiff_t) 1 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + ptrdiff_t val3 ; + int ecode3 = 0 ; + ptrdiff_t val4 ; + int ecode4 = 0 ; + cmf::math::timeseries result; + + if ((nobjs < 3) || (nobjs > 4)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries_get_slice" "', argument " "1"" of type '" "cmf::math::timeseries *""'"); + } + arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "timeseries_get_slice" "', argument " "2"" of type '" "ptrdiff_t""'"); + } + arg2 = static_cast< ptrdiff_t >(val2); + ecode3 = SWIG_AsVal_ptrdiff_t(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "timeseries_get_slice" "', argument " "3"" of type '" "ptrdiff_t""'"); + } + arg3 = static_cast< ptrdiff_t >(val3); + if (swig_obj[3]) { + ecode4 = SWIG_AsVal_ptrdiff_t(swig_obj[3], &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "timeseries_get_slice" "', argument " "4"" of type '" "ptrdiff_t""'"); + } + arg4 = static_cast< ptrdiff_t >(val4); + } + { + try { + result = (arg1)->get_slice(arg2,arg3,arg4); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj((new cmf::math::timeseries(static_cast< const cmf::math::timeseries& >(result))), SWIGTYPE_p_cmf__math__timeseries, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_timeseries_get_slice(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[5] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"timeseries_get_slice",0,4,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if ((argc >= 3) && (argc <= 4)) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__math__timeseries, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + _v = check_time(argv[1]); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + _v = check_time(argv[2]); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (argc > 3) { + { + { + _v = check_time(argv[3]); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + } + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if ((argc >= 3) && (argc <= 4)) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__math__timeseries, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_ptrdiff_t(argv[2], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (argc > 3) { + { + { + int res = SWIG_AsVal_ptrdiff_t(argv[3], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + } + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_timeseries_get_slice__SWIG_0(self, argc, argv); + case 2: + return _wrap_timeseries_get_slice__SWIG_1(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'timeseries_get_slice'.\n" + " Possible C/C++ prototypes are:\n" + " cmf::math::timeseries::get_slice(cmf::math::Time,cmf::math::Time,cmf::math::Time)\n" + " cmf::math::timeseries::get_slice(ptrdiff_t,ptrdiff_t,ptrdiff_t)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_timeseries_set_slice__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; + ptrdiff_t arg2 ; + ptrdiff_t arg3 ; + cmf::math::timeseries arg4 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + ptrdiff_t val3 ; + int ecode3 = 0 ; + + if ((nobjs < 4) || (nobjs > 4)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries_set_slice" "', argument " "1"" of type '" "cmf::math::timeseries *""'"); + } + arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "timeseries_set_slice" "', argument " "2"" of type '" "ptrdiff_t""'"); + } + arg2 = static_cast< ptrdiff_t >(val2); + ecode3 = SWIG_AsVal_ptrdiff_t(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "timeseries_set_slice" "', argument " "3"" of type '" "ptrdiff_t""'"); + } + arg3 = static_cast< ptrdiff_t >(val3); + { + cmf::math::timeseries *p_ts = &arg4; + int res=SWIG_ConvertPtr(swig_obj[3],(void**)(&p_ts),SWIGTYPE_p_cmf__math__timeseries,0); + if (!(SWIG_IsOK(res)) || p_ts==0) { + if (PyNumber_Check(swig_obj[3])) { + double scalar = PyFloat_AsDouble(swig_obj[3]); + arg4 = cmf::math::timeseries::from_scalar(scalar); + } else { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.timeseries object"); + } + } else { + arg4 = *p_ts; + } + } + { + try { + (arg1)->set_slice(arg2,arg3,arg4); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_timeseries_set_slice(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[5] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"timeseries_set_slice",0,4,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__math__timeseries, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + _v = check_time(argv[1]); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + _v = check_time(argv[2]); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + void * pt; + int res=SWIG_ConvertPtr(argv[3],&pt,SWIGTYPE_p_cmf__math__timeseries,0); + _v=SWIG_IsOK(res) || PyNumber_Check(argv[3]); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__math__timeseries, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_ptrdiff_t(argv[2], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + void * pt; + int res=SWIG_ConvertPtr(argv[3],&pt,SWIGTYPE_p_cmf__math__timeseries,0); + _v=SWIG_IsOK(res) || PyNumber_Check(argv[3]); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_timeseries_set_slice__SWIG_0(self, argc, argv); + case 2: + return _wrap_timeseries_set_slice__SWIG_1(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'timeseries_set_slice'.\n" + " Possible C/C++ prototypes are:\n" + " cmf::math::timeseries::set_slice(cmf::math::Time,cmf::math::Time,cmf::math::timeseries)\n" + " cmf::math::timeseries::set_slice(ptrdiff_t,ptrdiff_t,cmf::math::timeseries)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_timeseries_remove_nodata(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "nodata_value", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:timeseries_remove_nodata",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries_remove_nodata" "', argument " "1"" of type '" "cmf::math::timeseries *""'"); + } + arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "timeseries_remove_nodata" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + { + try { + (arg1)->remove_nodata(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_timeseries___iadd____SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; + cmf::math::timeseries arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + cmf::math::timeseries *result = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__timeseries, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries___iadd__" "', argument " "1"" of type '" "cmf::math::timeseries *""'"); + } + arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); + { + cmf::math::timeseries *p_ts = &arg2; + int res=SWIG_ConvertPtr(swig_obj[1],(void**)(&p_ts),SWIGTYPE_p_cmf__math__timeseries,0); + if (!(SWIG_IsOK(res)) || p_ts==0) { + if (PyNumber_Check(swig_obj[1])) { + double scalar = PyFloat_AsDouble(swig_obj[1]); + arg2 = cmf::math::timeseries::from_scalar(scalar); + } else { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.timeseries object"); + } + } else { + arg2 = *p_ts; + } + } + { + try { + result = (cmf::math::timeseries *) &(arg1)->operator +=(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__timeseries, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_timeseries___iadd____SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + cmf::math::timeseries *result = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__timeseries, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries___iadd__" "', argument " "1"" of type '" "cmf::math::timeseries *""'"); + } + arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "timeseries___iadd__" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + { + try { + result = (cmf::math::timeseries *) &(arg1)->operator +=(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__timeseries, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_timeseries___iadd__(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"timeseries___iadd__",0,2,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__math__timeseries, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_double(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__math__timeseries, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + void * pt; + int res=SWIG_ConvertPtr(argv[1],&pt,SWIGTYPE_p_cmf__math__timeseries,0); + _v=SWIG_IsOK(res) || PyNumber_Check(argv[1]); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_timeseries___iadd____SWIG_1(self, argc, argv); + case 2: + return _wrap_timeseries___iadd____SWIG_0(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'timeseries___iadd__'.\n" + " Possible C/C++ prototypes are:\n" + " cmf::math::timeseries::operator +=(cmf::math::timeseries)\n" + " cmf::math::timeseries::operator +=(double)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_timeseries___isub____SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; + cmf::math::timeseries arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + cmf::math::timeseries *result = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__timeseries, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries___isub__" "', argument " "1"" of type '" "cmf::math::timeseries *""'"); + } + arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); + { + cmf::math::timeseries *p_ts = &arg2; + int res=SWIG_ConvertPtr(swig_obj[1],(void**)(&p_ts),SWIGTYPE_p_cmf__math__timeseries,0); + if (!(SWIG_IsOK(res)) || p_ts==0) { + if (PyNumber_Check(swig_obj[1])) { + double scalar = PyFloat_AsDouble(swig_obj[1]); + arg2 = cmf::math::timeseries::from_scalar(scalar); + } else { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.timeseries object"); + } + } else { + arg2 = *p_ts; + } + } + { + try { + result = (cmf::math::timeseries *) &(arg1)->operator -=(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__timeseries, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_timeseries___isub____SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + cmf::math::timeseries *result = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__timeseries, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries___isub__" "', argument " "1"" of type '" "cmf::math::timeseries *""'"); + } + arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "timeseries___isub__" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + { + try { + result = (cmf::math::timeseries *) &(arg1)->operator -=(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__timeseries, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_timeseries___isub__(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"timeseries___isub__",0,2,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__math__timeseries, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_double(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__math__timeseries, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + void * pt; + int res=SWIG_ConvertPtr(argv[1],&pt,SWIGTYPE_p_cmf__math__timeseries,0); + _v=SWIG_IsOK(res) || PyNumber_Check(argv[1]); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_timeseries___isub____SWIG_1(self, argc, argv); + case 2: + return _wrap_timeseries___isub____SWIG_0(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'timeseries___isub__'.\n" + " Possible C/C++ prototypes are:\n" + " cmf::math::timeseries::operator -=(cmf::math::timeseries)\n" + " cmf::math::timeseries::operator -=(double)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_timeseries___imul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; + cmf::math::timeseries arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + cmf::math::timeseries *result = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__timeseries, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries___imul__" "', argument " "1"" of type '" "cmf::math::timeseries *""'"); + } + arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); + { + cmf::math::timeseries *p_ts = &arg2; + int res=SWIG_ConvertPtr(swig_obj[1],(void**)(&p_ts),SWIGTYPE_p_cmf__math__timeseries,0); + if (!(SWIG_IsOK(res)) || p_ts==0) { + if (PyNumber_Check(swig_obj[1])) { + double scalar = PyFloat_AsDouble(swig_obj[1]); + arg2 = cmf::math::timeseries::from_scalar(scalar); + } else { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.timeseries object"); + } + } else { + arg2 = *p_ts; + } + } + { + try { + result = (cmf::math::timeseries *) &(arg1)->operator *=(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__timeseries, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_timeseries___imul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + cmf::math::timeseries *result = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__timeseries, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries___imul__" "', argument " "1"" of type '" "cmf::math::timeseries *""'"); + } + arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "timeseries___imul__" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + { + try { + result = (cmf::math::timeseries *) &(arg1)->operator *=(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__timeseries, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_timeseries___imul__(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"timeseries___imul__",0,2,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__math__timeseries, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_double(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__math__timeseries, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + void * pt; + int res=SWIG_ConvertPtr(argv[1],&pt,SWIGTYPE_p_cmf__math__timeseries,0); + _v=SWIG_IsOK(res) || PyNumber_Check(argv[1]); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_timeseries___imul____SWIG_1(self, argc, argv); + case 2: + return _wrap_timeseries___imul____SWIG_0(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'timeseries___imul__'.\n" + " Possible C/C++ prototypes are:\n" + " cmf::math::timeseries::operator *=(cmf::math::timeseries)\n" + " cmf::math::timeseries::operator *=(double)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_timeseries___itruediv____SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; + cmf::math::timeseries arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + cmf::math::timeseries *result = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__timeseries, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries___itruediv__" "', argument " "1"" of type '" "cmf::math::timeseries *""'"); + } + arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); + { + cmf::math::timeseries *p_ts = &arg2; + int res=SWIG_ConvertPtr(swig_obj[1],(void**)(&p_ts),SWIGTYPE_p_cmf__math__timeseries,0); + if (!(SWIG_IsOK(res)) || p_ts==0) { + if (PyNumber_Check(swig_obj[1])) { + double scalar = PyFloat_AsDouble(swig_obj[1]); + arg2 = cmf::math::timeseries::from_scalar(scalar); + } else { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.timeseries object"); + } + } else { + arg2 = *p_ts; + } + } + { + try { + result = (cmf::math::timeseries *) &(arg1)->operator /=(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__timeseries, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_timeseries___itruediv____SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + cmf::math::timeseries *result = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__timeseries, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries___itruediv__" "', argument " "1"" of type '" "cmf::math::timeseries *""'"); + } + arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "timeseries___itruediv__" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + { + try { + result = (cmf::math::timeseries *) &(arg1)->operator /=(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__timeseries, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_timeseries___itruediv__(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"timeseries___itruediv__",0,2,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__math__timeseries, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_double(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__math__timeseries, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + void * pt; + int res=SWIG_ConvertPtr(argv[1],&pt,SWIGTYPE_p_cmf__math__timeseries,0); + _v=SWIG_IsOK(res) || PyNumber_Check(argv[1]); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_timeseries___itruediv____SWIG_1(self, argc, argv); + case 2: + return _wrap_timeseries___itruediv____SWIG_0(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'timeseries___itruediv__'.\n" + " Possible C/C++ prototypes are:\n" + " cmf::math::timeseries::operator /=(cmf::math::timeseries)\n" + " cmf::math::timeseries::operator /=(double)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_timeseries___add____SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; + cmf::math::timeseries arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + cmf::math::timeseries result; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries___add__" "', argument " "1"" of type '" "cmf::math::timeseries const *""'"); + } + arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); + { + cmf::math::timeseries *p_ts = &arg2; + int res=SWIG_ConvertPtr(swig_obj[1],(void**)(&p_ts),SWIGTYPE_p_cmf__math__timeseries,0); + if (!(SWIG_IsOK(res)) || p_ts==0) { + if (PyNumber_Check(swig_obj[1])) { + double scalar = PyFloat_AsDouble(swig_obj[1]); + arg2 = cmf::math::timeseries::from_scalar(scalar); + } else { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.timeseries object"); + } + } else { + arg2 = *p_ts; + } + } + { + try { + result = ((cmf::math::timeseries const *)arg1)->operator +(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj((new cmf::math::timeseries(static_cast< const cmf::math::timeseries& >(result))), SWIGTYPE_p_cmf__math__timeseries, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_timeseries___sub____SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; + cmf::math::timeseries arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + cmf::math::timeseries result; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries___sub__" "', argument " "1"" of type '" "cmf::math::timeseries const *""'"); + } + arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); + { + cmf::math::timeseries *p_ts = &arg2; + int res=SWIG_ConvertPtr(swig_obj[1],(void**)(&p_ts),SWIGTYPE_p_cmf__math__timeseries,0); + if (!(SWIG_IsOK(res)) || p_ts==0) { + if (PyNumber_Check(swig_obj[1])) { + double scalar = PyFloat_AsDouble(swig_obj[1]); + arg2 = cmf::math::timeseries::from_scalar(scalar); + } else { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.timeseries object"); + } + } else { + arg2 = *p_ts; + } + } + { + try { + result = ((cmf::math::timeseries const *)arg1)->operator -(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj((new cmf::math::timeseries(static_cast< const cmf::math::timeseries& >(result))), SWIGTYPE_p_cmf__math__timeseries, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_timeseries___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; + cmf::math::timeseries arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + cmf::math::timeseries result; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries___mul__" "', argument " "1"" of type '" "cmf::math::timeseries const *""'"); + } + arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); + { + cmf::math::timeseries *p_ts = &arg2; + int res=SWIG_ConvertPtr(swig_obj[1],(void**)(&p_ts),SWIGTYPE_p_cmf__math__timeseries,0); + if (!(SWIG_IsOK(res)) || p_ts==0) { + if (PyNumber_Check(swig_obj[1])) { + double scalar = PyFloat_AsDouble(swig_obj[1]); + arg2 = cmf::math::timeseries::from_scalar(scalar); + } else { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.timeseries object"); + } + } else { + arg2 = *p_ts; + } + } + { + try { + result = ((cmf::math::timeseries const *)arg1)->operator *(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj((new cmf::math::timeseries(static_cast< const cmf::math::timeseries& >(result))), SWIGTYPE_p_cmf__math__timeseries, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_timeseries___truediv____SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; + cmf::math::timeseries arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + cmf::math::timeseries result; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries___truediv__" "', argument " "1"" of type '" "cmf::math::timeseries const *""'"); + } + arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); + { + cmf::math::timeseries *p_ts = &arg2; + int res=SWIG_ConvertPtr(swig_obj[1],(void**)(&p_ts),SWIGTYPE_p_cmf__math__timeseries,0); + if (!(SWIG_IsOK(res)) || p_ts==0) { + if (PyNumber_Check(swig_obj[1])) { + double scalar = PyFloat_AsDouble(swig_obj[1]); + arg2 = cmf::math::timeseries::from_scalar(scalar); + } else { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.timeseries object"); + } + } else { + arg2 = *p_ts; + } + } + { + try { + result = ((cmf::math::timeseries const *)arg1)->operator /(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj((new cmf::math::timeseries(static_cast< const cmf::math::timeseries& >(result))), SWIGTYPE_p_cmf__math__timeseries, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_timeseries___add____SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + cmf::math::timeseries result; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries___add__" "', argument " "1"" of type '" "cmf::math::timeseries const *""'"); + } + arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "timeseries___add__" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + { + try { + result = ((cmf::math::timeseries const *)arg1)->operator +(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj((new cmf::math::timeseries(static_cast< const cmf::math::timeseries& >(result))), SWIGTYPE_p_cmf__math__timeseries, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_timeseries___add__(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"timeseries___add__",0,2,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__math__timeseries, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_double(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__math__timeseries, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + void * pt; + int res=SWIG_ConvertPtr(argv[1],&pt,SWIGTYPE_p_cmf__math__timeseries,0); + _v=SWIG_IsOK(res) || PyNumber_Check(argv[1]); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_timeseries___add____SWIG_1(self, argc, argv); + case 2: + return _wrap_timeseries___add____SWIG_0(self, argc, argv); + } + } + +fail: + Py_INCREF(Py_NotImplemented); + return Py_NotImplemented; +} + + +SWIGINTERN PyObject *_wrap_timeseries___sub____SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + cmf::math::timeseries result; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries___sub__" "', argument " "1"" of type '" "cmf::math::timeseries const *""'"); + } + arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "timeseries___sub__" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + { + try { + result = ((cmf::math::timeseries const *)arg1)->operator -(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj((new cmf::math::timeseries(static_cast< const cmf::math::timeseries& >(result))), SWIGTYPE_p_cmf__math__timeseries, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_timeseries___sub__(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"timeseries___sub__",0,2,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__math__timeseries, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_double(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__math__timeseries, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + void * pt; + int res=SWIG_ConvertPtr(argv[1],&pt,SWIGTYPE_p_cmf__math__timeseries,0); + _v=SWIG_IsOK(res) || PyNumber_Check(argv[1]); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_timeseries___sub____SWIG_1(self, argc, argv); + case 2: + return _wrap_timeseries___sub____SWIG_0(self, argc, argv); + } + } + +fail: + Py_INCREF(Py_NotImplemented); + return Py_NotImplemented; +} + + +SWIGINTERN PyObject *_wrap_timeseries___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + cmf::math::timeseries result; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries___mul__" "', argument " "1"" of type '" "cmf::math::timeseries const *""'"); + } + arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "timeseries___mul__" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + { + try { + result = ((cmf::math::timeseries const *)arg1)->operator *(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj((new cmf::math::timeseries(static_cast< const cmf::math::timeseries& >(result))), SWIGTYPE_p_cmf__math__timeseries, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_timeseries___mul__(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"timeseries___mul__",0,2,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__math__timeseries, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_double(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__math__timeseries, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + void * pt; + int res=SWIG_ConvertPtr(argv[1],&pt,SWIGTYPE_p_cmf__math__timeseries,0); + _v=SWIG_IsOK(res) || PyNumber_Check(argv[1]); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_timeseries___mul____SWIG_1(self, argc, argv); + case 2: + return _wrap_timeseries___mul____SWIG_0(self, argc, argv); + } + } + +fail: + Py_INCREF(Py_NotImplemented); + return Py_NotImplemented; +} + + +SWIGINTERN PyObject *_wrap_timeseries___truediv____SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + cmf::math::timeseries result; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries___truediv__" "', argument " "1"" of type '" "cmf::math::timeseries const *""'"); + } + arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "timeseries___truediv__" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + { + try { + result = ((cmf::math::timeseries const *)arg1)->operator /(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj((new cmf::math::timeseries(static_cast< const cmf::math::timeseries& >(result))), SWIGTYPE_p_cmf__math__timeseries, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_timeseries___truediv__(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"timeseries___truediv__",0,2,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__math__timeseries, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_double(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__math__timeseries, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + void * pt; + int res=SWIG_ConvertPtr(argv[1],&pt,SWIGTYPE_p_cmf__math__timeseries,0); + _v=SWIG_IsOK(res) || PyNumber_Check(argv[1]); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_timeseries___truediv____SWIG_1(self, argc, argv); + case 2: + return _wrap_timeseries___truediv____SWIG_0(self, argc, argv); + } + } + +fail: + Py_INCREF(Py_NotImplemented); + return Py_NotImplemented; +} + + +SWIGINTERN PyObject *_wrap_timeseries___neg__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::math::timeseries result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries___neg__" "', argument " "1"" of type '" "cmf::math::timeseries const *""'"); + } + arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); + { + try { + result = ((cmf::math::timeseries const *)arg1)->operator -(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj((new cmf::math::timeseries(static_cast< const cmf::math::timeseries& >(result))), SWIGTYPE_p_cmf__math__timeseries, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_timeseries_inv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::math::timeseries result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries_inv" "', argument " "1"" of type '" "cmf::math::timeseries const *""'"); + } + arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); + { + try { + result = ((cmf::math::timeseries const *)arg1)->inv(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj((new cmf::math::timeseries(static_cast< const cmf::math::timeseries& >(result))), SWIGTYPE_p_cmf__math__timeseries, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_timeseries_reduce_min(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; + cmf::math::Time arg2 ; + cmf::math::Time arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "begin",(char *) "step", NULL + }; + cmf::math::timeseries result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:timeseries_reduce_min",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries_reduce_min" "', argument " "1"" of type '" "cmf::math::timeseries const *""'"); + } + arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); + { + arg2 = convert_datetime_to_cmftime(obj1); + if (arg2 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } + } + { + arg3 = convert_datetime_to_cmftime(obj2); + if (arg3 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } + } + { + try { + result = ((cmf::math::timeseries const *)arg1)->reduce_min(arg2,arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj((new cmf::math::timeseries(static_cast< const cmf::math::timeseries& >(result))), SWIGTYPE_p_cmf__math__timeseries, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_timeseries_reduce_max(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; + cmf::math::Time arg2 ; + cmf::math::Time arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "begin",(char *) "step", NULL + }; + cmf::math::timeseries result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:timeseries_reduce_max",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries_reduce_max" "', argument " "1"" of type '" "cmf::math::timeseries const *""'"); + } + arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); + { + arg2 = convert_datetime_to_cmftime(obj1); + if (arg2 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } + } + { + arg3 = convert_datetime_to_cmftime(obj2); + if (arg3 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } + } + { + try { + result = ((cmf::math::timeseries const *)arg1)->reduce_max(arg2,arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj((new cmf::math::timeseries(static_cast< const cmf::math::timeseries& >(result))), SWIGTYPE_p_cmf__math__timeseries, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_timeseries_reduce_sum(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; + cmf::math::Time arg2 ; + cmf::math::Time arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "begin",(char *) "step", NULL + }; + cmf::math::timeseries result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:timeseries_reduce_sum",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries_reduce_sum" "', argument " "1"" of type '" "cmf::math::timeseries const *""'"); + } + arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); + { + arg2 = convert_datetime_to_cmftime(obj1); + if (arg2 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } + } + { + arg3 = convert_datetime_to_cmftime(obj2); + if (arg3 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } + } + { + try { + result = ((cmf::math::timeseries const *)arg1)->reduce_sum(arg2,arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj((new cmf::math::timeseries(static_cast< const cmf::math::timeseries& >(result))), SWIGTYPE_p_cmf__math__timeseries, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_timeseries_reduce_avg(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; + cmf::math::Time arg2 ; + cmf::math::Time arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "begin",(char *) "step", NULL + }; + cmf::math::timeseries result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:timeseries_reduce_avg",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries_reduce_avg" "', argument " "1"" of type '" "cmf::math::timeseries const *""'"); + } + arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); + { + arg2 = convert_datetime_to_cmftime(obj1); + if (arg2 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } + } + { + arg3 = convert_datetime_to_cmftime(obj2); + if (arg3 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } + } + { + try { + result = ((cmf::math::timeseries const *)arg1)->reduce_avg(arg2,arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj((new cmf::math::timeseries(static_cast< const cmf::math::timeseries& >(result))), SWIGTYPE_p_cmf__math__timeseries, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_timeseries_floating_avg__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; + cmf::math::Time arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + cmf::math::timeseries result; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries_floating_avg" "', argument " "1"" of type '" "cmf::math::timeseries const *""'"); + } + arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); + { + arg2 = convert_datetime_to_cmftime(swig_obj[1]); + if (arg2 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } + } + { + try { + result = ((cmf::math::timeseries const *)arg1)->floating_avg(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj((new cmf::math::timeseries(static_cast< const cmf::math::timeseries& >(result))), SWIGTYPE_p_cmf__math__timeseries, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_timeseries_floating_avg__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; + size_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + cmf::math::timeseries result; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries_floating_avg" "', argument " "1"" of type '" "cmf::math::timeseries const *""'"); + } + arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); + ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "timeseries_floating_avg" "', argument " "2"" of type '" "size_t""'"); + } + arg2 = static_cast< size_t >(val2); + { + try { + result = ((cmf::math::timeseries const *)arg1)->floating_avg(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj((new cmf::math::timeseries(static_cast< const cmf::math::timeseries& >(result))), SWIGTYPE_p_cmf__math__timeseries, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_timeseries_floating_avg(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"timeseries_floating_avg",0,2,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__math__timeseries, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + _v = check_time(argv[1]); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__math__timeseries, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_size_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_timeseries_floating_avg__SWIG_0(self, argc, argv); + case 2: + return _wrap_timeseries_floating_avg__SWIG_1(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'timeseries_floating_avg'.\n" + " Possible C/C++ prototypes are:\n" + " cmf::math::timeseries::floating_avg(cmf::math::Time) const\n" + " cmf::math::timeseries::floating_avg(size_t) const\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_timeseries_floating_max(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; + cmf::math::Time arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "window_width", NULL + }; + cmf::math::timeseries result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:timeseries_floating_max",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries_floating_max" "', argument " "1"" of type '" "cmf::math::timeseries const *""'"); + } + arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); + { + arg2 = convert_datetime_to_cmftime(obj1); + if (arg2 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } + } + { + try { + result = ((cmf::math::timeseries const *)arg1)->floating_max(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj((new cmf::math::timeseries(static_cast< const cmf::math::timeseries& >(result))), SWIGTYPE_p_cmf__math__timeseries, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_timeseries_floating_min(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; + cmf::math::Time arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "window_width", NULL + }; + cmf::math::timeseries result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:timeseries_floating_min",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries_floating_min" "', argument " "1"" of type '" "cmf::math::timeseries const *""'"); + } + arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); + { + arg2 = convert_datetime_to_cmftime(obj1); + if (arg2 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } + } + { + try { + result = ((cmf::math::timeseries const *)arg1)->floating_min(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj((new cmf::math::timeseries(static_cast< const cmf::math::timeseries& >(result))), SWIGTYPE_p_cmf__math__timeseries, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_timeseries_mean(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries_mean" "', argument " "1"" of type '" "cmf::math::timeseries const *""'"); + } + arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); + { + try { + result = (double)((cmf::math::timeseries const *)arg1)->mean(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_timeseries_min(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries_min" "', argument " "1"" of type '" "cmf::math::timeseries const *""'"); + } + arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); + { + try { + result = (double)((cmf::math::timeseries const *)arg1)->min(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_timeseries_max(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries_max" "', argument " "1"" of type '" "cmf::math::timeseries const *""'"); + } + arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); + { + try { + result = (double)((cmf::math::timeseries const *)arg1)->max(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_timeseries_log(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::math::timeseries result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries_log" "', argument " "1"" of type '" "cmf::math::timeseries const *""'"); + } + arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); + { + try { + result = ((cmf::math::timeseries const *)arg1)->log(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj((new cmf::math::timeseries(static_cast< const cmf::math::timeseries& >(result))), SWIGTYPE_p_cmf__math__timeseries, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_timeseries_log10(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::math::timeseries result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries_log10" "', argument " "1"" of type '" "cmf::math::timeseries const *""'"); + } + arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); + { + try { + result = ((cmf::math::timeseries const *)arg1)->log10(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj((new cmf::math::timeseries(static_cast< const cmf::math::timeseries& >(result))), SWIGTYPE_p_cmf__math__timeseries, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_timeseries_power(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "exponent", NULL + }; + cmf::math::timeseries result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:timeseries_power",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries_power" "', argument " "1"" of type '" "cmf::math::timeseries const *""'"); + } + arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "timeseries_power" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + { + try { + result = ((cmf::math::timeseries const *)arg1)->power(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj((new cmf::math::timeseries(static_cast< const cmf::math::timeseries& >(result))), SWIGTYPE_p_cmf__math__timeseries, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_timeseries_exp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::math::timeseries result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries_exp" "', argument " "1"" of type '" "cmf::math::timeseries const *""'"); + } + arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); + { + try { + result = ((cmf::math::timeseries const *)arg1)->exp(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj((new cmf::math::timeseries(static_cast< const cmf::math::timeseries& >(result))), SWIGTYPE_p_cmf__math__timeseries, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_timeseries_begin_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::math::Time *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries_begin_get" "', argument " "1"" of type '" "cmf::math::timeseries *""'"); + } + arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); + { + try { + result = (cmf::math::Time *)cmf_math_timeseries_begin_get(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__Time, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_timeseries_step_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::math::Time *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries_step_get" "', argument " "1"" of type '" "cmf::math::timeseries *""'"); + } + arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); + { + try { + result = (cmf::math::Time *)cmf_math_timeseries_step_get(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__Time, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_timeseries_end_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::math::Time *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries_end_get" "', argument " "1"" of type '" "cmf::math::timeseries *""'"); + } + arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); + { + try { + result = (cmf::math::Time *)cmf_math_timeseries_end_get(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__Time, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_timeseries___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + ptrdiff_t result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseries___len__" "', argument " "1"" of type '" "cmf::math::timeseries *""'"); + } + arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); + { + try { + result = cmf_math_timeseries___len__(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_ptrdiff_t(static_cast< ptrdiff_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_timeseries(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::timeseries *arg1 = (cmf::math::timeseries *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__timeseries, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_timeseries" "', argument " "1"" of type '" "cmf::math::timeseries *""'"); + } + arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); + { + try { + delete arg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *timeseries_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__math__timeseries, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *timeseries_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_nash_sutcliffe(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::math::timeseries *arg1 = 0 ; + cmf::math::timeseries *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "model",(char *) "observation", NULL + }; + double result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:nash_sutcliffe",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_cmf__math__timeseries, 0 | SWIG_POINTER_IMPLICIT_CONV); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "nash_sutcliffe" "', argument " "1"" of type '" "cmf::math::timeseries const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "nash_sutcliffe" "', argument " "1"" of type '" "cmf::math::timeseries const &""'"); + } + arg1 = reinterpret_cast< cmf::math::timeseries * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_cmf__math__timeseries, 0 | SWIG_POINTER_IMPLICIT_CONV); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "nash_sutcliffe" "', argument " "2"" of type '" "cmf::math::timeseries const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "nash_sutcliffe" "', argument " "2"" of type '" "cmf::math::timeseries const &""'"); + } + arg2 = reinterpret_cast< cmf::math::timeseries * >(argp2); + { + try { + result = (double)cmf::math::nash_sutcliffe((cmf::math::timeseries const &)*arg1,(cmf::math::timeseries const &)*arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + if (SWIG_IsNewObj(res1)) delete arg1; + if (SWIG_IsNewObj(res2)) delete arg2; + return resultobj; +fail: + if (SWIG_IsNewObj(res1)) delete arg1; + if (SWIG_IsNewObj(res2)) delete arg2; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_integratable_integrate(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::math::integratable *arg1 = (cmf::math::integratable *) 0 ; + cmf::math::Time arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::math::integratable > tempshared1 ; + std::shared_ptr< cmf::math::integratable > *smartarg1 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "t", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:integratable_integrate",kwnames,&obj0,&obj1)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__math__integratable_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "integratable_integrate" "', argument " "1"" of type '" "cmf::math::integratable *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::math::integratable > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::math::integratable > * >(argp1); + arg1 = const_cast< cmf::math::integratable * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::math::integratable > * >(argp1); + arg1 = const_cast< cmf::math::integratable * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + arg2 = convert_datetime_to_cmftime(obj1); + if (arg2 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } + } + { + try { + (arg1)->integrate(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_integratable_reset(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::math::integratable *arg1 = (cmf::math::integratable *) 0 ; + cmf::math::Time arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::math::integratable > tempshared1 ; + std::shared_ptr< cmf::math::integratable > *smartarg1 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "t", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:integratable_reset",kwnames,&obj0,&obj1)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__math__integratable_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "integratable_reset" "', argument " "1"" of type '" "cmf::math::integratable *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::math::integratable > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::math::integratable > * >(argp1); + arg1 = const_cast< cmf::math::integratable * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::math::integratable > * >(argp1); + arg1 = const_cast< cmf::math::integratable * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + arg2 = convert_datetime_to_cmftime(obj1); + if (arg2 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } + } + { + try { + (arg1)->reset(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_integratable_sum(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::integratable *arg1 = (cmf::math::integratable *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::math::integratable const > tempshared1 ; + std::shared_ptr< cmf::math::integratable const > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__math__integratable_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "integratable_sum" "', argument " "1"" of type '" "cmf::math::integratable const *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::math::integratable > * >(argp1); + delete reinterpret_cast< std::shared_ptr< const cmf::math::integratable > * >(argp1); + arg1 = const_cast< cmf::math::integratable * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::math::integratable > * >(argp1); + arg1 = const_cast< cmf::math::integratable * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + try { + result = (double)((cmf::math::integratable const *)arg1)->sum(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_integratable_avg(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::integratable *arg1 = (cmf::math::integratable *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::math::integratable const > tempshared1 ; + std::shared_ptr< cmf::math::integratable const > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__math__integratable_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "integratable_avg" "', argument " "1"" of type '" "cmf::math::integratable const *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::math::integratable > * >(argp1); + delete reinterpret_cast< std::shared_ptr< const cmf::math::integratable > * >(argp1); + arg1 = const_cast< cmf::math::integratable * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::math::integratable > * >(argp1); + arg1 = const_cast< cmf::math::integratable * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + try { + result = (double)((cmf::math::integratable const *)arg1)->avg(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_integratable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::integratable *arg1 = (cmf::math::integratable *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::math::integratable > tempshared1 ; + std::shared_ptr< cmf::math::integratable > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__math__integratable_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_integratable" "', argument " "1"" of type '" "cmf::math::integratable *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::math::integratable > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::math::integratable > * >(argp1); + arg1 = const_cast< cmf::math::integratable * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::math::integratable > * >(argp1); + arg1 = const_cast< cmf::math::integratable * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + try { + (void)arg1; delete smartarg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *integratable_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_cmf__math__integratable_t, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_integratable_list_append(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::math::integratable_list *arg1 = (cmf::math::integratable_list *) 0 ; + cmf::math::integratable::ptr arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "add", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:integratable_list_append",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__math__integratable_list, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "integratable_list_append" "', argument " "1"" of type '" "cmf::math::integratable_list *""'"); + } + arg1 = reinterpret_cast< cmf::math::integratable_list * >(argp1); + { + int newmem = 0; + res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__math__integratable_t, 0 , &newmem); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "integratable_list_append" "', argument " "2"" of type '" "cmf::math::integratable::ptr""'"); + } + if (argp2) arg2 = *(reinterpret_cast< cmf::math::integratable::ptr * >(argp2)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::math::integratable::ptr * >(argp2); + } + { + try { + (arg1)->append(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_integratable_list_remove(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::math::integratable_list *arg1 = (cmf::math::integratable_list *) 0 ; + cmf::math::integratable::ptr arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "rm", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:integratable_list_remove",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__math__integratable_list, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "integratable_list_remove" "', argument " "1"" of type '" "cmf::math::integratable_list *""'"); + } + arg1 = reinterpret_cast< cmf::math::integratable_list * >(argp1); + { + int newmem = 0; + res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__math__integratable_t, 0 , &newmem); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "integratable_list_remove" "', argument " "2"" of type '" "cmf::math::integratable::ptr""'"); + } + if (argp2) arg2 = *(reinterpret_cast< cmf::math::integratable::ptr * >(argp2)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::math::integratable::ptr * >(argp2); + } + { + try { + (arg1)->remove(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_integratable_list___getitem(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::math::integratable_list *arg1 = (cmf::math::integratable_list *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "index", NULL + }; + cmf::math::integratable::ptr result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:integratable_list___getitem",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__math__integratable_list, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "integratable_list___getitem" "', argument " "1"" of type '" "cmf::math::integratable_list const *""'"); + } + arg1 = reinterpret_cast< cmf::math::integratable_list * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "integratable_list___getitem" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + { + try { + result = ((cmf::math::integratable_list const *)arg1)->operator [](arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + std::shared_ptr< cmf::math::integratable > *smartresult = result ? new std::shared_ptr< cmf::math::integratable >(result) : 0; + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__math__integratable_t, SWIG_POINTER_OWN); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_integratable_list_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::integratable_list *arg1 = (cmf::math::integratable_list *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + size_t result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__integratable_list, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "integratable_list_size" "', argument " "1"" of type '" "cmf::math::integratable_list const *""'"); + } + arg1 = reinterpret_cast< cmf::math::integratable_list * >(argp1); + { + try { + result = ((cmf::math::integratable_list const *)arg1)->size(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_integratable_list_avg(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::integratable_list *arg1 = (cmf::math::integratable_list *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::math::num_array result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__integratable_list, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "integratable_list_avg" "', argument " "1"" of type '" "cmf::math::integratable_list const *""'"); + } + arg1 = reinterpret_cast< cmf::math::integratable_list * >(argp1); + { + try { + result = ((cmf::math::integratable_list const *)arg1)->avg(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + resultobj = as_npy_array(result); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_integratable_list_sum(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::integratable_list *arg1 = (cmf::math::integratable_list *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::math::num_array result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__integratable_list, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "integratable_list_sum" "', argument " "1"" of type '" "cmf::math::integratable_list const *""'"); + } + arg1 = reinterpret_cast< cmf::math::integratable_list * >(argp1); + { + try { + result = ((cmf::math::integratable_list const *)arg1)->sum(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + resultobj = as_npy_array(result); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_integratable_list_reset(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::math::integratable_list *arg1 = (cmf::math::integratable_list *) 0 ; + cmf::math::Time arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "t", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:integratable_list_reset",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__math__integratable_list, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "integratable_list_reset" "', argument " "1"" of type '" "cmf::math::integratable_list *""'"); + } + arg1 = reinterpret_cast< cmf::math::integratable_list * >(argp1); + { + arg2 = convert_datetime_to_cmftime(obj1); + if (arg2 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } + } + { + try { + (arg1)->reset(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_integratable_list_integrate(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::math::integratable_list *arg1 = (cmf::math::integratable_list *) 0 ; + cmf::math::Time arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "t", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:integratable_list_integrate",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__math__integratable_list, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "integratable_list_integrate" "', argument " "1"" of type '" "cmf::math::integratable_list *""'"); + } + arg1 = reinterpret_cast< cmf::math::integratable_list * >(argp1); + { + arg2 = convert_datetime_to_cmftime(obj1); + if (arg2 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } + } + { + try { + (arg1)->integrate(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_integratable_list__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) { + PyObject *resultobj = 0; + cmf::math::integratable_list *result = 0 ; + + if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; + { + try { + result = (cmf::math::integratable_list *)new cmf::math::integratable_list(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__integratable_list, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_integratable_list__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::math::integratable_list *arg1 = 0 ; + cmf::math::integratable_list temp_list1 ; + cmf::math::integratable_list *result = 0 ; + + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + { + if (SWIG_ConvertPtr(swig_obj[0], (void **) &arg1, SWIGTYPE_p_cmf__math__integratable_list, SWIG_POINTER_EXCEPTION) == -1) { + int res = iterable_to_list(swig_obj[0],SWIGTYPE_p_std__shared_ptrT_cmf__math__integratable_t, temp_list1); + if (SWIG_IsOK(res)) { + arg1 = &temp_list1; + } else { + SWIG_exception_fail(SWIG_TypeError,"Only iterables can be converted to cmf::math::integratable_list"); + } + } + } + { + try { + result = (cmf::math::integratable_list *)new cmf::math::integratable_list((cmf::math::integratable_list const &)*arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__integratable_list, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_integratable_list(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[2] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"new_integratable_list",0,1,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 0) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + if (argc == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + { + _v = is_listtype_or_iterable(argv[0],SWIGTYPE_p_cmf__math__integratable_list); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_new_integratable_list__SWIG_0(self, argc, argv); + case 2: + return _wrap_new_integratable_list__SWIG_1(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_integratable_list'.\n" + " Possible C/C++ prototypes are:\n" + " cmf::math::integratable_list::integratable_list()\n" + " cmf::math::integratable_list::integratable_list(cmf::math::integratable_list const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_integratable_list___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::integratable_list *arg1 = (cmf::math::integratable_list *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + size_t result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__integratable_list, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "integratable_list___len__" "', argument " "1"" of type '" "cmf::math::integratable_list const *""'"); + } + arg1 = reinterpret_cast< cmf::math::integratable_list * >(argp1); + { + try { + result = cmf_math_integratable_list___len__((cmf::math::integratable_list const *)arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_integratable_list(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::integratable_list *arg1 = (cmf::math::integratable_list *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__integratable_list, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_integratable_list" "', argument " "1"" of type '" "cmf::math::integratable_list *""'"); + } + arg1 = reinterpret_cast< cmf::math::integratable_list * >(argp1); + { + try { + delete arg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *integratable_list_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__math__integratable_list, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *integratable_list_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_StateVariable_dxdt(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::math::StateVariable *arg1 = (cmf::math::StateVariable *) 0 ; + cmf::math::Time *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::math::StateVariable > tempshared1 ; + std::shared_ptr< cmf::math::StateVariable > *smartarg1 = 0 ; + cmf::math::Time T2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "time", NULL + }; + real result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:StateVariable_dxdt",kwnames,&obj0,&obj1)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__math__StateVariable_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StateVariable_dxdt" "', argument " "1"" of type '" "cmf::math::StateVariable *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::math::StateVariable > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::math::StateVariable > * >(argp1); + arg1 = const_cast< cmf::math::StateVariable * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::math::StateVariable > * >(argp1); + arg1 = const_cast< cmf::math::StateVariable * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + // typemape const Time& + T2 = convert_datetime_to_cmftime(obj1); + if (T2 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } else { + arg2 = &T2; + } + } + { + try { + result = (real)(arg1)->dxdt((cmf::math::Time const &)*arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StateVariable_get_abs_errtol(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::math::StateVariable *arg1 = (cmf::math::StateVariable *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::math::StateVariable const > tempshared1 ; + std::shared_ptr< cmf::math::StateVariable const > *smartarg1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "rel_errtol", NULL + }; + real result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:StateVariable_get_abs_errtol",kwnames,&obj0,&obj1)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__math__StateVariable_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StateVariable_get_abs_errtol" "', argument " "1"" of type '" "cmf::math::StateVariable const *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::math::StateVariable > * >(argp1); + delete reinterpret_cast< std::shared_ptr< const cmf::math::StateVariable > * >(argp1); + arg1 = const_cast< cmf::math::StateVariable * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::math::StateVariable > * >(argp1); + arg1 = const_cast< cmf::math::StateVariable * >((smartarg1 ? smartarg1->get() : 0)); + } + } + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StateVariable_get_abs_errtol" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + { + try { + result = (real)((cmf::math::StateVariable const *)arg1)->get_abs_errtol(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StateVariable_to_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::StateVariable *arg1 = (cmf::math::StateVariable *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::math::StateVariable const > tempshared1 ; + std::shared_ptr< cmf::math::StateVariable const > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + std::string result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__math__StateVariable_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StateVariable_to_string" "', argument " "1"" of type '" "cmf::math::StateVariable const *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::math::StateVariable > * >(argp1); + delete reinterpret_cast< std::shared_ptr< const cmf::math::StateVariable > * >(argp1); + arg1 = const_cast< cmf::math::StateVariable * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::math::StateVariable > * >(argp1); + arg1 = const_cast< cmf::math::StateVariable * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + try { + result = ((cmf::math::StateVariable const *)arg1)->to_string(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_StateVariable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::StateVariable *arg1 = (cmf::math::StateVariable *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::math::StateVariable > tempshared1 ; + std::shared_ptr< cmf::math::StateVariable > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__math__StateVariable_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_StateVariable" "', argument " "1"" of type '" "cmf::math::StateVariable *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::math::StateVariable > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::math::StateVariable > * >(argp1); + arg1 = const_cast< cmf::math::StateVariable * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::math::StateVariable > * >(argp1); + arg1 = const_cast< cmf::math::StateVariable * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + try { + (void)arg1; delete smartarg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StateVariable_state_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::StateVariable *arg1 = (cmf::math::StateVariable *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::math::StateVariable > tempshared1 ; + std::shared_ptr< cmf::math::StateVariable > *smartarg1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"StateVariable_state_set",2,2,swig_obj)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__math__StateVariable_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StateVariable_state_set" "', argument " "1"" of type '" "cmf::math::StateVariable *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::math::StateVariable > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::math::StateVariable > * >(argp1); + arg1 = const_cast< cmf::math::StateVariable * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::math::StateVariable > * >(argp1); + arg1 = const_cast< cmf::math::StateVariable * >((smartarg1 ? smartarg1->get() : 0)); + } + } + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StateVariable_state_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + { + try { + cmf_math_StateVariable_state_set(arg1,arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StateVariable_state_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::StateVariable *arg1 = (cmf::math::StateVariable *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::math::StateVariable > tempshared1 ; + std::shared_ptr< cmf::math::StateVariable > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__math__StateVariable_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StateVariable_state_get" "', argument " "1"" of type '" "cmf::math::StateVariable *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::math::StateVariable > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::math::StateVariable > * >(argp1); + arg1 = const_cast< cmf::math::StateVariable * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::math::StateVariable > * >(argp1); + arg1 = const_cast< cmf::math::StateVariable * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + try { + result = (real)cmf_math_StateVariable_state_get(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *StateVariable_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_cmf__math__StateVariable_t, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_StateVariableOwner_get_states(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::StateVariableOwner *arg1 = (cmf::math::StateVariableOwner *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::math::StateVariableList result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__StateVariableOwner, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StateVariableOwner_get_states" "', argument " "1"" of type '" "cmf::math::StateVariableOwner *""'"); + } + arg1 = reinterpret_cast< cmf::math::StateVariableOwner * >(argp1); + { + try { + result = (arg1)->get_states(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj((new cmf::math::StateVariableList(static_cast< const cmf::math::StateVariableList& >(result))), SWIGTYPE_p_cmf__math__StateVariableList, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_StateVariableOwner(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::StateVariableOwner *arg1 = (cmf::math::StateVariableOwner *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__StateVariableOwner, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_StateVariableOwner" "', argument " "1"" of type '" "cmf::math::StateVariableOwner *""'"); + } + arg1 = reinterpret_cast< cmf::math::StateVariableOwner * >(argp1); + { + try { + delete arg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *StateVariableOwner_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__math__StateVariableOwner, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_StateVariableList_append(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::math::StateVariableList *arg1 = (cmf::math::StateVariableList *) 0 ; + cmf::math::StateVariable::ptr arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "sv", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:StateVariableList_append",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__math__StateVariableList, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StateVariableList_append" "', argument " "1"" of type '" "cmf::math::StateVariableList *""'"); + } + arg1 = reinterpret_cast< cmf::math::StateVariableList * >(argp1); + { + int newmem = 0; + res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__math__StateVariable_t, 0 , &newmem); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StateVariableList_append" "', argument " "2"" of type '" "cmf::math::StateVariable::ptr""'"); + } + if (argp2) arg2 = *(reinterpret_cast< cmf::math::StateVariable::ptr * >(argp2)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::math::StateVariable::ptr * >(argp2); + } + { + try { + (arg1)->append(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StateVariableList_extend(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::math::StateVariableList *arg1 = (cmf::math::StateVariableList *) 0 ; + cmf::math::StateVariableOwner *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "svo", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:StateVariableList_extend",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__math__StateVariableList, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StateVariableList_extend" "', argument " "1"" of type '" "cmf::math::StateVariableList *""'"); + } + arg1 = reinterpret_cast< cmf::math::StateVariableList * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_cmf__math__StateVariableOwner, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StateVariableList_extend" "', argument " "2"" of type '" "cmf::math::StateVariableOwner &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StateVariableList_extend" "', argument " "2"" of type '" "cmf::math::StateVariableOwner &""'"); + } + arg2 = reinterpret_cast< cmf::math::StateVariableOwner * >(argp2); + { + try { + (arg1)->extend(*arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StateVariableList___iadd____SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::math::StateVariableList *arg1 = (cmf::math::StateVariableList *) 0 ; + cmf::math::StateVariableList *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + cmf::math::StateVariableList temp_list2 ; + cmf::math::StateVariableList *result = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__StateVariableList, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StateVariableList___iadd__" "', argument " "1"" of type '" "cmf::math::StateVariableList *""'"); + } + arg1 = reinterpret_cast< cmf::math::StateVariableList * >(argp1); + { + if (SWIG_ConvertPtr(swig_obj[1], (void **) &arg2, SWIGTYPE_p_cmf__math__StateVariableList, SWIG_POINTER_EXCEPTION) == -1) { + int res = iterable_to_list(swig_obj[1],SWIGTYPE_p_std__shared_ptrT_cmf__math__StateVariable_t, temp_list2); + if (SWIG_IsOK(res)) { + arg2 = &temp_list2; + } else { + SWIG_exception_fail(SWIG_TypeError,"Only iterables can be converted to cmf::math::StateVariableList"); + } + } + } + { + try { + result = (cmf::math::StateVariableList *) &(arg1)->operator +=((cmf::math::StateVariableList const &)*arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__StateVariableList, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StateVariableList___iadd____SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::math::StateVariableList *arg1 = (cmf::math::StateVariableList *) 0 ; + cmf::math::StateVariableOwner *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + cmf::math::StateVariableList *result = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__StateVariableList, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StateVariableList___iadd__" "', argument " "1"" of type '" "cmf::math::StateVariableList *""'"); + } + arg1 = reinterpret_cast< cmf::math::StateVariableList * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_cmf__math__StateVariableOwner, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StateVariableList___iadd__" "', argument " "2"" of type '" "cmf::math::StateVariableOwner &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StateVariableList___iadd__" "', argument " "2"" of type '" "cmf::math::StateVariableOwner &""'"); + } + arg2 = reinterpret_cast< cmf::math::StateVariableOwner * >(argp2); + { + try { + result = (cmf::math::StateVariableList *) &(arg1)->operator +=(*arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__StateVariableList, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StateVariableList___iadd__(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"StateVariableList___iadd__",0,2,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__math__StateVariableList, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + _v = is_listtype_or_iterable(argv[1],SWIGTYPE_p_cmf__math__StateVariableList); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__math__StateVariableList, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_cmf__math__StateVariableOwner, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_StateVariableList___iadd____SWIG_0(self, argc, argv); + case 2: + return _wrap_StateVariableList___iadd____SWIG_1(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'StateVariableList___iadd__'.\n" + " Possible C/C++ prototypes are:\n" + " cmf::math::StateVariableList::operator +=(cmf::math::StateVariableList const &)\n" + " cmf::math::StateVariableList::operator +=(cmf::math::StateVariableOwner &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_StateVariableList_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::StateVariableList *arg1 = (cmf::math::StateVariableList *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + size_t result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__StateVariableList, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StateVariableList_size" "', argument " "1"" of type '" "cmf::math::StateVariableList const *""'"); + } + arg1 = reinterpret_cast< cmf::math::StateVariableList * >(argp1); + { + try { + result = ((cmf::math::StateVariableList const *)arg1)->size(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_StateVariableList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::StateVariableList *arg1 = (cmf::math::StateVariableList *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__StateVariableList, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_StateVariableList" "', argument " "1"" of type '" "cmf::math::StateVariableList *""'"); + } + arg1 = reinterpret_cast< cmf::math::StateVariableList * >(argp1); + { + try { + delete arg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StateVariableList___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::StateVariableList *arg1 = (cmf::math::StateVariableList *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + size_t result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__StateVariableList, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StateVariableList___len__" "', argument " "1"" of type '" "cmf::math::StateVariableList const *""'"); + } + arg1 = reinterpret_cast< cmf::math::StateVariableList * >(argp1); + { + try { + result = cmf_math_StateVariableList___len__((cmf::math::StateVariableList const *)arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_StateVariableList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::StateVariableList *result = 0 ; + + if (!SWIG_Python_UnpackTuple(args,"new_StateVariableList",0,0,0)) SWIG_fail; + { + try { + result = (cmf::math::StateVariableList *)new cmf::math::StateVariableList(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__StateVariableList, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *StateVariableList_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__math__StateVariableList, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *StateVariableList_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_Integrator_get_dxdt(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::math::Integrator *arg1 = (cmf::math::Integrator *) 0 ; + cmf::math::Time arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "time", NULL + }; + cmf::math::num_array result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Integrator_get_dxdt",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__math__Integrator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Integrator_get_dxdt" "', argument " "1"" of type '" "cmf::math::Integrator const *""'"); + } + arg1 = reinterpret_cast< cmf::math::Integrator * >(argp1); + { + arg2 = convert_datetime_to_cmftime(obj1); + if (arg2 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } + } + { + try { + result = ((cmf::math::Integrator const *)arg1)->get_dxdt(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + resultobj = as_npy_array(result); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Integrator_get_states__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::math::Integrator *arg1 = (cmf::math::Integrator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + cmf::math::num_array result; + + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Integrator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Integrator_get_states" "', argument " "1"" of type '" "cmf::math::Integrator const *""'"); + } + arg1 = reinterpret_cast< cmf::math::Integrator * >(argp1); + { + try { + result = ((cmf::math::Integrator const *)arg1)->get_states(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + resultobj = as_npy_array(result); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Integrator_add_states(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::math::Integrator *arg1 = (cmf::math::Integrator *) 0 ; + cmf::math::StateVariableOwner *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "stateOwner", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Integrator_add_states",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__math__Integrator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Integrator_add_states" "', argument " "1"" of type '" "cmf::math::Integrator *""'"); + } + arg1 = reinterpret_cast< cmf::math::Integrator * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_cmf__math__StateVariableOwner, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Integrator_add_states" "', argument " "2"" of type '" "cmf::math::StateVariableOwner &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Integrator_add_states" "', argument " "2"" of type '" "cmf::math::StateVariableOwner &""'"); + } + arg2 = reinterpret_cast< cmf::math::StateVariableOwner * >(argp2); + { + try { + (arg1)->add_states(*arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Integrator_add_single_state(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::math::Integrator *arg1 = (cmf::math::Integrator *) 0 ; + cmf::math::StateVariable::ptr arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "state", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Integrator_add_single_state",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__math__Integrator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Integrator_add_single_state" "', argument " "1"" of type '" "cmf::math::Integrator *""'"); + } + arg1 = reinterpret_cast< cmf::math::Integrator * >(argp1); + { + int newmem = 0; + res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__math__StateVariable_t, 0 , &newmem); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Integrator_add_single_state" "', argument " "2"" of type '" "cmf::math::StateVariable::ptr""'"); + } + if (argp2) arg2 = *(reinterpret_cast< cmf::math::StateVariable::ptr * >(argp2)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::math::StateVariable::ptr * >(argp2); + } + { + try { + (arg1)->add_single_state(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Integrator_integratables_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::Integrator *arg1 = (cmf::math::Integrator *) 0 ; + cmf::math::integratable_list *arg2 = (cmf::math::integratable_list *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"Integrator_integratables_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Integrator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Integrator_integratables_set" "', argument " "1"" of type '" "cmf::math::Integrator *""'"); + } + arg1 = reinterpret_cast< cmf::math::Integrator * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_cmf__math__integratable_list, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Integrator_integratables_set" "', argument " "2"" of type '" "cmf::math::integratable_list *""'"); + } + arg2 = reinterpret_cast< cmf::math::integratable_list * >(argp2); + if (arg1) (arg1)->integratables = *arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Integrator_integratables_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::Integrator *arg1 = (cmf::math::Integrator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::math::integratable_list *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Integrator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Integrator_integratables_get" "', argument " "1"" of type '" "cmf::math::Integrator *""'"); + } + arg1 = reinterpret_cast< cmf::math::Integrator * >(argp1); + result = (cmf::math::integratable_list *)& ((arg1)->integratables); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__integratable_list, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Integrator_reset_integratables_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::Integrator *arg1 = (cmf::math::Integrator *) 0 ; + bool arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"Integrator_reset_integratables_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Integrator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Integrator_reset_integratables_set" "', argument " "1"" of type '" "cmf::math::Integrator *""'"); + } + arg1 = reinterpret_cast< cmf::math::Integrator * >(argp1); + ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Integrator_reset_integratables_set" "', argument " "2"" of type '" "bool""'"); + } + arg2 = static_cast< bool >(val2); + if (arg1) (arg1)->reset_integratables = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Integrator_reset_integratables_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::Integrator *arg1 = (cmf::math::Integrator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + bool result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Integrator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Integrator_reset_integratables_get" "', argument " "1"" of type '" "cmf::math::Integrator *""'"); + } + arg1 = reinterpret_cast< cmf::math::Integrator * >(argp1); + result = (bool) ((arg1)->reset_integratables); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Integrator_use_OpenMP_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::Integrator *arg1 = (cmf::math::Integrator *) 0 ; + bool arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"Integrator_use_OpenMP_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Integrator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Integrator_use_OpenMP_set" "', argument " "1"" of type '" "cmf::math::Integrator *""'"); + } + arg1 = reinterpret_cast< cmf::math::Integrator * >(argp1); + ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Integrator_use_OpenMP_set" "', argument " "2"" of type '" "bool""'"); + } + arg2 = static_cast< bool >(val2); + if (arg1) (arg1)->use_OpenMP = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Integrator_use_OpenMP_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::Integrator *arg1 = (cmf::math::Integrator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + bool result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Integrator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Integrator_use_OpenMP_get" "', argument " "1"" of type '" "cmf::math::Integrator *""'"); + } + arg1 = reinterpret_cast< cmf::math::Integrator * >(argp1); + result = (bool) ((arg1)->use_OpenMP); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Integrator_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::Integrator *arg1 = (cmf::math::Integrator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + size_t result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Integrator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Integrator_size" "', argument " "1"" of type '" "cmf::math::Integrator const *""'"); + } + arg1 = reinterpret_cast< cmf::math::Integrator * >(argp1); + { + try { + result = ((cmf::math::Integrator const *)arg1)->size(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Integrator_get_state(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::math::Integrator *arg1 = (cmf::math::Integrator *) 0 ; + ptrdiff_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "position", NULL + }; + real result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Integrator_get_state",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__math__Integrator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Integrator_get_state" "', argument " "1"" of type '" "cmf::math::Integrator const *""'"); + } + arg1 = reinterpret_cast< cmf::math::Integrator * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Integrator_get_state" "', argument " "2"" of type '" "ptrdiff_t""'"); + } + arg2 = static_cast< ptrdiff_t >(val2); + { + try { + result = (real)((cmf::math::Integrator const *)arg1)->get_state(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Integrator_set_state(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::math::Integrator *arg1 = (cmf::math::Integrator *) 0 ; + ptrdiff_t arg2 ; + real arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + double val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "position",(char *) "newState", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:Integrator_set_state",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__math__Integrator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Integrator_set_state" "', argument " "1"" of type '" "cmf::math::Integrator *""'"); + } + arg1 = reinterpret_cast< cmf::math::Integrator * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Integrator_set_state" "', argument " "2"" of type '" "ptrdiff_t""'"); + } + arg2 = static_cast< ptrdiff_t >(val2); + ecode3 = SWIG_AsVal_double(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Integrator_set_state" "', argument " "3"" of type '" "real""'"); + } + arg3 = static_cast< real >(val3); + { + try { + (arg1)->set_state(arg2,arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Integrator_get_states__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::math::Integrator *arg1 = (cmf::math::Integrator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + cmf::math::StateVariableList result; + + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Integrator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Integrator_get_states" "', argument " "1"" of type '" "cmf::math::Integrator *""'"); + } + arg1 = reinterpret_cast< cmf::math::Integrator * >(argp1); + { + try { + result = (arg1)->get_states(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj((new cmf::math::StateVariableList(static_cast< const cmf::math::StateVariableList& >(result))), SWIGTYPE_p_cmf__math__StateVariableList, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Integrator_get_states(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[2] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"Integrator_get_states",0,1,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__math__Integrator, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__math__Integrator, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_Integrator_get_states__SWIG_1(self, argc, argv); + case 2: + return _wrap_Integrator_get_states__SWIG_0(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'Integrator_get_states'.\n" + " Possible C/C++ prototypes are:\n" + " cmf::math::Integrator::get_states() const\n" + " cmf::math::Integrator::get_states()\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_delete_Integrator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::Integrator *arg1 = (cmf::math::Integrator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Integrator, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Integrator" "', argument " "1"" of type '" "cmf::math::Integrator *""'"); + } + arg1 = reinterpret_cast< cmf::math::Integrator * >(argp1); + { + try { + delete arg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Integrator_get_t(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::Integrator *arg1 = (cmf::math::Integrator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::math::Time result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Integrator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Integrator_get_t" "', argument " "1"" of type '" "cmf::math::Integrator const *""'"); + } + arg1 = reinterpret_cast< cmf::math::Integrator * >(argp1); + { + try { + result = ((cmf::math::Integrator const *)arg1)->get_t(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj((new cmf::math::Time(static_cast< const cmf::math::Time& >(result))), SWIGTYPE_p_cmf__math__Time, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Integrator_set_t(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::math::Integrator *arg1 = (cmf::math::Integrator *) 0 ; + cmf::math::Time arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "val", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Integrator_set_t",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__math__Integrator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Integrator_set_t" "', argument " "1"" of type '" "cmf::math::Integrator *""'"); + } + arg1 = reinterpret_cast< cmf::math::Integrator * >(argp1); + { + arg2 = convert_datetime_to_cmftime(obj1); + if (arg2 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } + } + { + try { + (arg1)->set_t(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Integrator_get_dt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::Integrator *arg1 = (cmf::math::Integrator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::math::Time result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Integrator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Integrator_get_dt" "', argument " "1"" of type '" "cmf::math::Integrator const *""'"); + } + arg1 = reinterpret_cast< cmf::math::Integrator * >(argp1); + { + try { + result = ((cmf::math::Integrator const *)arg1)->get_dt(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj((new cmf::math::Time(static_cast< const cmf::math::Time& >(result))), SWIGTYPE_p_cmf__math__Time, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Integrator_reset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::Integrator *arg1 = (cmf::math::Integrator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Integrator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Integrator_reset" "', argument " "1"" of type '" "cmf::math::Integrator *""'"); + } + arg1 = reinterpret_cast< cmf::math::Integrator * >(argp1); + { + try { + (arg1)->reset(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Integrator_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::Integrator *arg1 = (cmf::math::Integrator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::math::Integrator *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__Integrator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Integrator_copy" "', argument " "1"" of type '" "cmf::math::Integrator const *""'"); + } + arg1 = reinterpret_cast< cmf::math::Integrator * >(argp1); + { + try { + result = (cmf::math::Integrator *)((cmf::math::Integrator const *)arg1)->copy(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__Integrator, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Integrator_integrate(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::math::Integrator *arg1 = (cmf::math::Integrator *) 0 ; + cmf::math::Time arg2 ; + cmf::math::Time arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "t_max",(char *) "dt", NULL + }; + int result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:Integrator_integrate",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__math__Integrator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Integrator_integrate" "', argument " "1"" of type '" "cmf::math::Integrator *""'"); + } + arg1 = reinterpret_cast< cmf::math::Integrator * >(argp1); + { + arg2 = convert_datetime_to_cmftime(obj1); + if (arg2 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } + } + { + arg3 = convert_datetime_to_cmftime(obj2); + if (arg3 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } + } + { + try { + result = (int)(arg1)->integrate(arg2,arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Integrator_integrate_until(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::math::Integrator *arg1 = (cmf::math::Integrator *) 0 ; + cmf::math::Time arg2 ; + cmf::math::Time arg3 = (cmf::math::Time) cmf::math::Time() ; + bool arg4 = (bool) false ; + void *argp1 = 0 ; + int res1 = 0 ; + bool val4 ; + int ecode4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "t_max",(char *) "dt",(char *) "reset", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OO:Integrator_integrate_until",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__math__Integrator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Integrator_integrate_until" "', argument " "1"" of type '" "cmf::math::Integrator *""'"); + } + arg1 = reinterpret_cast< cmf::math::Integrator * >(argp1); + { + arg2 = convert_datetime_to_cmftime(obj1); + if (arg2 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } + } + if (obj2) { + { + arg3 = convert_datetime_to_cmftime(obj2); + if (arg3 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } + } + } + if (obj3) { + ecode4 = SWIG_AsVal_bool(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Integrator_integrate_until" "', argument " "4"" of type '" "bool""'"); + } + arg4 = static_cast< bool >(val4); + } + { + try { + (arg1)->integrate_until(arg2,arg3,arg4); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Integrator___getitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::math::Integrator *arg1 = (cmf::math::Integrator *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "index", NULL + }; + cmf::math::StateVariable::ptr result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Integrator___getitem__",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__math__Integrator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Integrator___getitem__" "', argument " "1"" of type '" "cmf::math::Integrator *""'"); + } + arg1 = reinterpret_cast< cmf::math::Integrator * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Integrator___getitem__" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + { + try { + result = cmf_math_Integrator___getitem__(arg1,arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + std::shared_ptr< cmf::math::StateVariable > *smartresult = result ? new std::shared_ptr< cmf::math::StateVariable >(result) : 0; + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__math__StateVariable_t, SWIG_POINTER_OWN); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *Integrator_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__math__Integrator, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_BDF2_get_error_position(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::BDF2 *arg1 = (cmf::math::BDF2 *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__BDF2, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BDF2_get_error_position" "', argument " "1"" of type '" "cmf::math::BDF2 const *""'"); + } + arg1 = reinterpret_cast< cmf::math::BDF2 * >(argp1); + { + try { + result = (int)((cmf::math::BDF2 const *)arg1)->get_error_position(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_BDF2_max_order_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::BDF2 *arg1 = (cmf::math::BDF2 *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"BDF2_max_order_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__BDF2, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BDF2_max_order_set" "', argument " "1"" of type '" "cmf::math::BDF2 *""'"); + } + arg1 = reinterpret_cast< cmf::math::BDF2 * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BDF2_max_order_set" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->max_order = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_BDF2_max_order_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::BDF2 *arg1 = (cmf::math::BDF2 *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__BDF2, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BDF2_max_order_get" "', argument " "1"" of type '" "cmf::math::BDF2 *""'"); + } + arg1 = reinterpret_cast< cmf::math::BDF2 * >(argp1); + result = (int) ((arg1)->max_order); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_BDF2__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + real arg1 = (real) 1e-9 ; + cmf::math::Time arg2 = (cmf::math::Time) cmf::math::timespan(10) ; + double val1 ; + int ecode1 = 0 ; + cmf::math::BDF2 *result = 0 ; + + if ((nobjs < 0) || (nobjs > 2)) SWIG_fail; + if (swig_obj[0]) { + ecode1 = SWIG_AsVal_double(swig_obj[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_BDF2" "', argument " "1"" of type '" "real""'"); + } + arg1 = static_cast< real >(val1); + } + if (swig_obj[1]) { + { + arg2 = convert_datetime_to_cmftime(swig_obj[1]); + if (arg2 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } + } + } + { + try { + result = (cmf::math::BDF2 *)new cmf::math::BDF2(arg1,arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__BDF2, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_BDF2__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::math::StateVariableOwner *arg1 = 0 ; + real arg2 = (real) 1e-9 ; + cmf::math::Time arg3 = (cmf::math::Time) cmf::math::timespan(10) ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + cmf::math::BDF2 *result = 0 ; + + if ((nobjs < 1) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_cmf__math__StateVariableOwner, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_BDF2" "', argument " "1"" of type '" "cmf::math::StateVariableOwner &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BDF2" "', argument " "1"" of type '" "cmf::math::StateVariableOwner &""'"); + } + arg1 = reinterpret_cast< cmf::math::StateVariableOwner * >(argp1); + if (swig_obj[1]) { + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_BDF2" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + } + if (swig_obj[2]) { + { + arg3 = convert_datetime_to_cmftime(swig_obj[2]); + if (arg3 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } + } + } + { + try { + result = (cmf::math::BDF2 *)new cmf::math::BDF2(*arg1,arg2,arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__BDF2, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_BDF2__SWIG_2(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::math::Integrator *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + cmf::math::BDF2 *result = 0 ; + + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_cmf__math__Integrator, 0 | 0); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_BDF2" "', argument " "1"" of type '" "cmf::math::Integrator const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BDF2" "', argument " "1"" of type '" "cmf::math::Integrator const &""'"); + } + arg1 = reinterpret_cast< cmf::math::Integrator * >(argp1); + { + try { + result = (cmf::math::BDF2 *)new cmf::math::BDF2((cmf::math::Integrator const &)*arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__BDF2, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_BDF2(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[4] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"new_BDF2",0,3,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if ((argc >= 0) && (argc <= 2)) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + if (argc > 0) { + { + { + int res = SWIG_AsVal_double(argv[0], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (argc > 1) { + { + { + _v = check_time(argv[1]); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + } + } + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_cmf__math__Integrator, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + if ((argc >= 1) && (argc <= 3)) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__math__StateVariableOwner, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (argc > 1) { + { + { + int res = SWIG_AsVal_double(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (argc > 2) { + { + { + _v = check_time(argv[2]); + } + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + } + } + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 3; + if (_rank == _rankm) goto dispatch; + } + } + check_3: + + dispatch: + switch(_index) { + case 1: + return _wrap_new_BDF2__SWIG_0(self, argc, argv); + case 2: + return _wrap_new_BDF2__SWIG_2(self, argc, argv); + case 3: + return _wrap_new_BDF2__SWIG_1(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_BDF2'.\n" + " Possible C/C++ prototypes are:\n" + " cmf::math::BDF2::BDF2(real,cmf::math::Time)\n" + " cmf::math::BDF2::BDF2(cmf::math::StateVariableOwner &,real,cmf::math::Time)\n" + " cmf::math::BDF2::BDF2(cmf::math::Integrator const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_delete_BDF2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::BDF2 *arg1 = (cmf::math::BDF2 *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__BDF2, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_BDF2" "', argument " "1"" of type '" "cmf::math::BDF2 *""'"); + } + arg1 = reinterpret_cast< cmf::math::BDF2 * >(argp1); + { + try { + delete arg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *BDF2_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__math__BDF2, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *BDF2_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_new_ExplicitEuler_fixed__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::math::StateVariableOwner *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + cmf::math::ExplicitEuler_fixed *result = 0 ; + + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_cmf__math__StateVariableOwner, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ExplicitEuler_fixed" "', argument " "1"" of type '" "cmf::math::StateVariableOwner &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ExplicitEuler_fixed" "', argument " "1"" of type '" "cmf::math::StateVariableOwner &""'"); + } + arg1 = reinterpret_cast< cmf::math::StateVariableOwner * >(argp1); + { + try { + result = (cmf::math::ExplicitEuler_fixed *)new cmf::math::ExplicitEuler_fixed(*arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__ExplicitEuler_fixed, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ExplicitEuler_fixed__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) { + PyObject *resultobj = 0; + cmf::math::ExplicitEuler_fixed *result = 0 ; + + if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; + { + try { + result = (cmf::math::ExplicitEuler_fixed *)new cmf::math::ExplicitEuler_fixed(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__ExplicitEuler_fixed, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ExplicitEuler_fixed__SWIG_2(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::math::Integrator *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + cmf::math::ExplicitEuler_fixed *result = 0 ; + + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_cmf__math__Integrator, 0 | 0); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ExplicitEuler_fixed" "', argument " "1"" of type '" "cmf::math::Integrator const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ExplicitEuler_fixed" "', argument " "1"" of type '" "cmf::math::Integrator const &""'"); + } + arg1 = reinterpret_cast< cmf::math::Integrator * >(argp1); + { + try { + result = (cmf::math::ExplicitEuler_fixed *)new cmf::math::ExplicitEuler_fixed((cmf::math::Integrator const &)*arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__ExplicitEuler_fixed, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ExplicitEuler_fixed(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[2] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"new_ExplicitEuler_fixed",0,1,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 0) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + if (argc == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_cmf__math__Integrator, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + if (argc == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__math__StateVariableOwner, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 3; + if (_rank == _rankm) goto dispatch; + } + } + check_3: + + dispatch: + switch(_index) { + case 1: + return _wrap_new_ExplicitEuler_fixed__SWIG_1(self, argc, argv); + case 2: + return _wrap_new_ExplicitEuler_fixed__SWIG_2(self, argc, argv); + case 3: + return _wrap_new_ExplicitEuler_fixed__SWIG_0(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_ExplicitEuler_fixed'.\n" + " Possible C/C++ prototypes are:\n" + " cmf::math::ExplicitEuler_fixed::ExplicitEuler_fixed(cmf::math::StateVariableOwner &)\n" + " cmf::math::ExplicitEuler_fixed::ExplicitEuler_fixed()\n" + " cmf::math::ExplicitEuler_fixed::ExplicitEuler_fixed(cmf::math::Integrator const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_delete_ExplicitEuler_fixed(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::ExplicitEuler_fixed *arg1 = (cmf::math::ExplicitEuler_fixed *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__ExplicitEuler_fixed, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ExplicitEuler_fixed" "', argument " "1"" of type '" "cmf::math::ExplicitEuler_fixed *""'"); + } + arg1 = reinterpret_cast< cmf::math::ExplicitEuler_fixed * >(argp1); + { + try { + delete arg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *ExplicitEuler_fixed_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__math__ExplicitEuler_fixed, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *ExplicitEuler_fixed_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_HeunIntegrator_alpha_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::HeunIntegrator *arg1 = (cmf::math::HeunIntegrator *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"HeunIntegrator_alpha_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__HeunIntegrator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HeunIntegrator_alpha_set" "', argument " "1"" of type '" "cmf::math::HeunIntegrator *""'"); + } + arg1 = reinterpret_cast< cmf::math::HeunIntegrator * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HeunIntegrator_alpha_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->alpha = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_HeunIntegrator_alpha_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::HeunIntegrator *arg1 = (cmf::math::HeunIntegrator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__HeunIntegrator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HeunIntegrator_alpha_get" "', argument " "1"" of type '" "cmf::math::HeunIntegrator *""'"); + } + arg1 = reinterpret_cast< cmf::math::HeunIntegrator * >(argp1); + result = (real) ((arg1)->alpha); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_HeunIntegrator__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::math::StateVariableOwner *arg1 = 0 ; + real arg2 = (real) 0.5 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + cmf::math::HeunIntegrator *result = 0 ; + + if ((nobjs < 1) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_cmf__math__StateVariableOwner, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_HeunIntegrator" "', argument " "1"" of type '" "cmf::math::StateVariableOwner &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_HeunIntegrator" "', argument " "1"" of type '" "cmf::math::StateVariableOwner &""'"); + } + arg1 = reinterpret_cast< cmf::math::StateVariableOwner * >(argp1); + if (swig_obj[1]) { + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_HeunIntegrator" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + } + { + try { + result = (cmf::math::HeunIntegrator *)new cmf::math::HeunIntegrator(*arg1,arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__HeunIntegrator, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_HeunIntegrator__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + real arg1 = (real) 0.5 ; + double val1 ; + int ecode1 = 0 ; + cmf::math::HeunIntegrator *result = 0 ; + + if ((nobjs < 0) || (nobjs > 1)) SWIG_fail; + if (swig_obj[0]) { + ecode1 = SWIG_AsVal_double(swig_obj[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_HeunIntegrator" "', argument " "1"" of type '" "real""'"); + } + arg1 = static_cast< real >(val1); + } + { + try { + result = (cmf::math::HeunIntegrator *)new cmf::math::HeunIntegrator(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__HeunIntegrator, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_HeunIntegrator__SWIG_2(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::math::Integrator *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + cmf::math::HeunIntegrator *result = 0 ; + + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_cmf__math__Integrator, 0 | 0); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_HeunIntegrator" "', argument " "1"" of type '" "cmf::math::Integrator const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_HeunIntegrator" "', argument " "1"" of type '" "cmf::math::Integrator const &""'"); + } + arg1 = reinterpret_cast< cmf::math::Integrator * >(argp1); + { + try { + result = (cmf::math::HeunIntegrator *)new cmf::math::HeunIntegrator((cmf::math::Integrator const &)*arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__HeunIntegrator, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_HeunIntegrator(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"new_HeunIntegrator",0,2,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if ((argc >= 0) && (argc <= 1)) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + if (argc > 0) { + { + { + int res = SWIG_AsVal_double(argv[0], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + } + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_cmf__math__Integrator, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + if ((argc >= 1) && (argc <= 2)) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__math__StateVariableOwner, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (argc > 1) { + { + { + int res = SWIG_AsVal_double(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + } + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 3; + if (_rank == _rankm) goto dispatch; + } + } + check_3: + + dispatch: + switch(_index) { + case 1: + return _wrap_new_HeunIntegrator__SWIG_1(self, argc, argv); + case 2: + return _wrap_new_HeunIntegrator__SWIG_2(self, argc, argv); + case 3: + return _wrap_new_HeunIntegrator__SWIG_0(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_HeunIntegrator'.\n" + " Possible C/C++ prototypes are:\n" + " cmf::math::HeunIntegrator::HeunIntegrator(cmf::math::StateVariableOwner &,real)\n" + " cmf::math::HeunIntegrator::HeunIntegrator(real)\n" + " cmf::math::HeunIntegrator::HeunIntegrator(cmf::math::Integrator const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_delete_HeunIntegrator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::HeunIntegrator *arg1 = (cmf::math::HeunIntegrator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__HeunIntegrator, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_HeunIntegrator" "', argument " "1"" of type '" "cmf::math::HeunIntegrator *""'"); + } + arg1 = reinterpret_cast< cmf::math::HeunIntegrator * >(argp1); + { + try { + delete arg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *HeunIntegrator_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__math__HeunIntegrator, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *HeunIntegrator_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_ImplicitEuler_dt_min_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::ImplicitEuler *arg1 = (cmf::math::ImplicitEuler *) 0 ; + cmf::math::Time *arg2 = (cmf::math::Time *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"ImplicitEuler_dt_min_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__ImplicitEuler, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImplicitEuler_dt_min_set" "', argument " "1"" of type '" "cmf::math::ImplicitEuler *""'"); + } + arg1 = reinterpret_cast< cmf::math::ImplicitEuler * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_cmf__math__Time, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ImplicitEuler_dt_min_set" "', argument " "2"" of type '" "cmf::math::Time *""'"); + } + arg2 = reinterpret_cast< cmf::math::Time * >(argp2); + if (arg1) (arg1)->dt_min = *arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ImplicitEuler_dt_min_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::ImplicitEuler *arg1 = (cmf::math::ImplicitEuler *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::math::Time *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__ImplicitEuler, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImplicitEuler_dt_min_get" "', argument " "1"" of type '" "cmf::math::ImplicitEuler *""'"); + } + arg1 = reinterpret_cast< cmf::math::ImplicitEuler * >(argp1); + result = (cmf::math::Time *)& ((arg1)->dt_min); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__Time, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ImplicitEuler__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::math::StateVariableOwner *arg1 = 0 ; + real arg2 = (real) 1e-9 ; + cmf::math::Time arg3 = (cmf::math::Time) cmf::math::timespan(10) ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + cmf::math::ImplicitEuler *result = 0 ; + + if ((nobjs < 1) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_cmf__math__StateVariableOwner, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ImplicitEuler" "', argument " "1"" of type '" "cmf::math::StateVariableOwner &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ImplicitEuler" "', argument " "1"" of type '" "cmf::math::StateVariableOwner &""'"); + } + arg1 = reinterpret_cast< cmf::math::StateVariableOwner * >(argp1); + if (swig_obj[1]) { + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_ImplicitEuler" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + } + if (swig_obj[2]) { + { + arg3 = convert_datetime_to_cmftime(swig_obj[2]); + if (arg3 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } + } + } + { + try { + result = (cmf::math::ImplicitEuler *)new cmf::math::ImplicitEuler(*arg1,arg2,arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__ImplicitEuler, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ImplicitEuler__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + real arg1 = (real) 1e-9 ; + cmf::math::Time arg2 = (cmf::math::Time) cmf::math::timespan(10) ; + double val1 ; + int ecode1 = 0 ; + cmf::math::ImplicitEuler *result = 0 ; + + if ((nobjs < 0) || (nobjs > 2)) SWIG_fail; + if (swig_obj[0]) { + ecode1 = SWIG_AsVal_double(swig_obj[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ImplicitEuler" "', argument " "1"" of type '" "real""'"); + } + arg1 = static_cast< real >(val1); + } + if (swig_obj[1]) { + { + arg2 = convert_datetime_to_cmftime(swig_obj[1]); + if (arg2 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } + } + } + { + try { + result = (cmf::math::ImplicitEuler *)new cmf::math::ImplicitEuler(arg1,arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__ImplicitEuler, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ImplicitEuler__SWIG_2(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::math::Integrator *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + cmf::math::ImplicitEuler *result = 0 ; + + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_cmf__math__Integrator, 0 | 0); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ImplicitEuler" "', argument " "1"" of type '" "cmf::math::Integrator const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ImplicitEuler" "', argument " "1"" of type '" "cmf::math::Integrator const &""'"); + } + arg1 = reinterpret_cast< cmf::math::Integrator * >(argp1); + { + try { + result = (cmf::math::ImplicitEuler *)new cmf::math::ImplicitEuler((cmf::math::Integrator const &)*arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__ImplicitEuler, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ImplicitEuler(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[4] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"new_ImplicitEuler",0,3,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if ((argc >= 0) && (argc <= 2)) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + if (argc > 0) { + { + { + int res = SWIG_AsVal_double(argv[0], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (argc > 1) { + { + { + _v = check_time(argv[1]); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + } + } + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_cmf__math__Integrator, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + if ((argc >= 1) && (argc <= 3)) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__math__StateVariableOwner, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (argc > 1) { + { + { + int res = SWIG_AsVal_double(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (argc > 2) { + { + { + _v = check_time(argv[2]); + } + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + } + } + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 3; + if (_rank == _rankm) goto dispatch; + } + } + check_3: + + dispatch: + switch(_index) { + case 1: + return _wrap_new_ImplicitEuler__SWIG_1(self, argc, argv); + case 2: + return _wrap_new_ImplicitEuler__SWIG_2(self, argc, argv); + case 3: + return _wrap_new_ImplicitEuler__SWIG_0(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_ImplicitEuler'.\n" + " Possible C/C++ prototypes are:\n" + " cmf::math::ImplicitEuler::ImplicitEuler(cmf::math::StateVariableOwner &,real,cmf::math::Time)\n" + " cmf::math::ImplicitEuler::ImplicitEuler(real,cmf::math::Time)\n" + " cmf::math::ImplicitEuler::ImplicitEuler(cmf::math::Integrator const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_delete_ImplicitEuler(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::ImplicitEuler *arg1 = (cmf::math::ImplicitEuler *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__ImplicitEuler, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ImplicitEuler" "', argument " "1"" of type '" "cmf::math::ImplicitEuler *""'"); + } + arg1 = reinterpret_cast< cmf::math::ImplicitEuler * >(argp1); + { + try { + delete arg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *ImplicitEuler_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__math__ImplicitEuler, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *ImplicitEuler_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_new_RKFIntegrator__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::math::StateVariableOwner *arg1 = 0 ; + real arg2 = (real) 1e-9 ; + cmf::math::Time arg3 = (cmf::math::Time) cmf::math::timespan(1000) ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + cmf::math::RKFIntegrator *result = 0 ; + + if ((nobjs < 1) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_cmf__math__StateVariableOwner, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_RKFIntegrator" "', argument " "1"" of type '" "cmf::math::StateVariableOwner &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_RKFIntegrator" "', argument " "1"" of type '" "cmf::math::StateVariableOwner &""'"); + } + arg1 = reinterpret_cast< cmf::math::StateVariableOwner * >(argp1); + if (swig_obj[1]) { + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_RKFIntegrator" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + } + if (swig_obj[2]) { + { + arg3 = convert_datetime_to_cmftime(swig_obj[2]); + if (arg3 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } + } + } + { + try { + result = (cmf::math::RKFIntegrator *)new cmf::math::RKFIntegrator(*arg1,arg2,arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__RKFIntegrator, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_RKFIntegrator__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + real arg1 = (real) 1e-9 ; + cmf::math::Time arg2 = (cmf::math::Time) cmf::math::timespan(1000) ; + double val1 ; + int ecode1 = 0 ; + cmf::math::RKFIntegrator *result = 0 ; + + if ((nobjs < 0) || (nobjs > 2)) SWIG_fail; + if (swig_obj[0]) { + ecode1 = SWIG_AsVal_double(swig_obj[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_RKFIntegrator" "', argument " "1"" of type '" "real""'"); + } + arg1 = static_cast< real >(val1); + } + if (swig_obj[1]) { + { + arg2 = convert_datetime_to_cmftime(swig_obj[1]); + if (arg2 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } + } + } + { + try { + result = (cmf::math::RKFIntegrator *)new cmf::math::RKFIntegrator(arg1,arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__RKFIntegrator, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_RKFIntegrator(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[4] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"new_RKFIntegrator",0,3,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if ((argc >= 0) && (argc <= 2)) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + if (argc > 0) { + { + { + int res = SWIG_AsVal_double(argv[0], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (argc > 1) { + { + { + _v = check_time(argv[1]); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + } + } + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if ((argc >= 1) && (argc <= 3)) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__math__StateVariableOwner, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (argc > 1) { + { + { + int res = SWIG_AsVal_double(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (argc > 2) { + { + { + _v = check_time(argv[2]); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + } + } + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_new_RKFIntegrator__SWIG_1(self, argc, argv); + case 2: + return _wrap_new_RKFIntegrator__SWIG_0(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_RKFIntegrator'.\n" + " Possible C/C++ prototypes are:\n" + " cmf::math::RKFIntegrator::RKFIntegrator(cmf::math::StateVariableOwner &,real,cmf::math::Time)\n" + " cmf::math::RKFIntegrator::RKFIntegrator(real,cmf::math::Time)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_delete_RKFIntegrator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::RKFIntegrator *arg1 = (cmf::math::RKFIntegrator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__RKFIntegrator, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_RKFIntegrator" "', argument " "1"" of type '" "cmf::math::RKFIntegrator *""'"); + } + arg1 = reinterpret_cast< cmf::math::RKFIntegrator * >(argp1); + { + try { + delete arg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *RKFIntegrator_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__math__RKFIntegrator, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *RKFIntegrator_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_CVodeIntegrator_preconditioner_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::CVodeIntegrator *arg1 = (cmf::math::CVodeIntegrator *) 0 ; + char arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + char val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"CVodeIntegrator_preconditioner_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__CVodeIntegrator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CVodeIntegrator_preconditioner_set" "', argument " "1"" of type '" "cmf::math::CVodeIntegrator *""'"); + } + arg1 = reinterpret_cast< cmf::math::CVodeIntegrator * >(argp1); + ecode2 = SWIG_AsVal_char(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CVodeIntegrator_preconditioner_set" "', argument " "2"" of type '" "char""'"); + } + arg2 = static_cast< char >(val2); + if (arg1) (arg1)->preconditioner = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CVodeIntegrator_preconditioner_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::CVodeIntegrator *arg1 = (cmf::math::CVodeIntegrator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + char result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__CVodeIntegrator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CVodeIntegrator_preconditioner_get" "', argument " "1"" of type '" "cmf::math::CVodeIntegrator *""'"); + } + arg1 = reinterpret_cast< cmf::math::CVodeIntegrator * >(argp1); + result = (char) ((arg1)->preconditioner); + resultobj = SWIG_From_char(static_cast< char >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CVodeIntegrator_MaxNonLinearIterations_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::CVodeIntegrator *arg1 = (cmf::math::CVodeIntegrator *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"CVodeIntegrator_MaxNonLinearIterations_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__CVodeIntegrator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CVodeIntegrator_MaxNonLinearIterations_set" "', argument " "1"" of type '" "cmf::math::CVodeIntegrator *""'"); + } + arg1 = reinterpret_cast< cmf::math::CVodeIntegrator * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CVodeIntegrator_MaxNonLinearIterations_set" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->MaxNonLinearIterations = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CVodeIntegrator_MaxNonLinearIterations_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::CVodeIntegrator *arg1 = (cmf::math::CVodeIntegrator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__CVodeIntegrator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CVodeIntegrator_MaxNonLinearIterations_get" "', argument " "1"" of type '" "cmf::math::CVodeIntegrator *""'"); + } + arg1 = reinterpret_cast< cmf::math::CVodeIntegrator * >(argp1); + result = (int) ((arg1)->MaxNonLinearIterations); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CVodeIntegrator_MaxConvergenceFailures_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::CVodeIntegrator *arg1 = (cmf::math::CVodeIntegrator *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"CVodeIntegrator_MaxConvergenceFailures_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__CVodeIntegrator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CVodeIntegrator_MaxConvergenceFailures_set" "', argument " "1"" of type '" "cmf::math::CVodeIntegrator *""'"); + } + arg1 = reinterpret_cast< cmf::math::CVodeIntegrator * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CVodeIntegrator_MaxConvergenceFailures_set" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->MaxConvergenceFailures = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CVodeIntegrator_MaxConvergenceFailures_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::CVodeIntegrator *arg1 = (cmf::math::CVodeIntegrator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__CVodeIntegrator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CVodeIntegrator_MaxConvergenceFailures_get" "', argument " "1"" of type '" "cmf::math::CVodeIntegrator *""'"); + } + arg1 = reinterpret_cast< cmf::math::CVodeIntegrator * >(argp1); + result = (int) ((arg1)->MaxConvergenceFailures); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CVodeIntegrator_MaxErrorTestFailures_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::CVodeIntegrator *arg1 = (cmf::math::CVodeIntegrator *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"CVodeIntegrator_MaxErrorTestFailures_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__CVodeIntegrator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CVodeIntegrator_MaxErrorTestFailures_set" "', argument " "1"" of type '" "cmf::math::CVodeIntegrator *""'"); + } + arg1 = reinterpret_cast< cmf::math::CVodeIntegrator * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CVodeIntegrator_MaxErrorTestFailures_set" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->MaxErrorTestFailures = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CVodeIntegrator_MaxErrorTestFailures_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::CVodeIntegrator *arg1 = (cmf::math::CVodeIntegrator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__CVodeIntegrator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CVodeIntegrator_MaxErrorTestFailures_get" "', argument " "1"" of type '" "cmf::math::CVodeIntegrator *""'"); + } + arg1 = reinterpret_cast< cmf::math::CVodeIntegrator * >(argp1); + result = (int) ((arg1)->MaxErrorTestFailures); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CVodeIntegrator_maxl_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::CVodeIntegrator *arg1 = (cmf::math::CVodeIntegrator *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"CVodeIntegrator_maxl_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__CVodeIntegrator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CVodeIntegrator_maxl_set" "', argument " "1"" of type '" "cmf::math::CVodeIntegrator *""'"); + } + arg1 = reinterpret_cast< cmf::math::CVodeIntegrator * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CVodeIntegrator_maxl_set" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->maxl = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CVodeIntegrator_maxl_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::CVodeIntegrator *arg1 = (cmf::math::CVodeIntegrator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__CVodeIntegrator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CVodeIntegrator_maxl_get" "', argument " "1"" of type '" "cmf::math::CVodeIntegrator *""'"); + } + arg1 = reinterpret_cast< cmf::math::CVodeIntegrator * >(argp1); + result = (int) ((arg1)->maxl); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CVodeIntegrator_LinearSolver_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::CVodeIntegrator *arg1 = (cmf::math::CVodeIntegrator *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"CVodeIntegrator_LinearSolver_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__CVodeIntegrator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CVodeIntegrator_LinearSolver_set" "', argument " "1"" of type '" "cmf::math::CVodeIntegrator *""'"); + } + arg1 = reinterpret_cast< cmf::math::CVodeIntegrator * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CVodeIntegrator_LinearSolver_set" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->LinearSolver = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CVodeIntegrator_LinearSolver_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::CVodeIntegrator *arg1 = (cmf::math::CVodeIntegrator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__CVodeIntegrator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CVodeIntegrator_LinearSolver_get" "', argument " "1"" of type '" "cmf::math::CVodeIntegrator *""'"); + } + arg1 = reinterpret_cast< cmf::math::CVodeIntegrator * >(argp1); + result = (int) ((arg1)->LinearSolver); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CVodeIntegrator_MaxOrder_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::CVodeIntegrator *arg1 = (cmf::math::CVodeIntegrator *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"CVodeIntegrator_MaxOrder_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__CVodeIntegrator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CVodeIntegrator_MaxOrder_set" "', argument " "1"" of type '" "cmf::math::CVodeIntegrator *""'"); + } + arg1 = reinterpret_cast< cmf::math::CVodeIntegrator * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CVodeIntegrator_MaxOrder_set" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->MaxOrder = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CVodeIntegrator_MaxOrder_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::CVodeIntegrator *arg1 = (cmf::math::CVodeIntegrator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__CVodeIntegrator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CVodeIntegrator_MaxOrder_get" "', argument " "1"" of type '" "cmf::math::CVodeIntegrator *""'"); + } + arg1 = reinterpret_cast< cmf::math::CVodeIntegrator * >(argp1); + result = (int) ((arg1)->MaxOrder); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CVodeIntegrator_max_step_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::CVodeIntegrator *arg1 = (cmf::math::CVodeIntegrator *) 0 ; + cmf::math::Time *arg2 = (cmf::math::Time *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"CVodeIntegrator_max_step_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__CVodeIntegrator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CVodeIntegrator_max_step_set" "', argument " "1"" of type '" "cmf::math::CVodeIntegrator *""'"); + } + arg1 = reinterpret_cast< cmf::math::CVodeIntegrator * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_cmf__math__Time, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CVodeIntegrator_max_step_set" "', argument " "2"" of type '" "cmf::math::Time *""'"); + } + arg2 = reinterpret_cast< cmf::math::Time * >(argp2); + if (arg1) (arg1)->max_step = *arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CVodeIntegrator_max_step_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::CVodeIntegrator *arg1 = (cmf::math::CVodeIntegrator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::math::Time *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__CVodeIntegrator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CVodeIntegrator_max_step_get" "', argument " "1"" of type '" "cmf::math::CVodeIntegrator *""'"); + } + arg1 = reinterpret_cast< cmf::math::CVodeIntegrator * >(argp1); + result = (cmf::math::Time *)& ((arg1)->max_step); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__Time, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CVodeIntegrator_initialize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::CVodeIntegrator *arg1 = (cmf::math::CVodeIntegrator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__CVodeIntegrator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CVodeIntegrator_initialize" "', argument " "1"" of type '" "cmf::math::CVodeIntegrator *""'"); + } + arg1 = reinterpret_cast< cmf::math::CVodeIntegrator * >(argp1); + { + try { + (arg1)->initialize(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CVodeIntegrator_release(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::CVodeIntegrator *arg1 = (cmf::math::CVodeIntegrator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__CVodeIntegrator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CVodeIntegrator_release" "', argument " "1"" of type '" "cmf::math::CVodeIntegrator *""'"); + } + arg1 = reinterpret_cast< cmf::math::CVodeIntegrator * >(argp1); + { + try { + (arg1)->release(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_CVodeIntegrator__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + real arg1 = (real) 1e-9 ; + char arg2 = (char) 'R' ; + double val1 ; + int ecode1 = 0 ; + char val2 ; + int ecode2 = 0 ; + cmf::math::CVodeIntegrator *result = 0 ; + + if ((nobjs < 0) || (nobjs > 2)) SWIG_fail; + if (swig_obj[0]) { + ecode1 = SWIG_AsVal_double(swig_obj[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_CVodeIntegrator" "', argument " "1"" of type '" "real""'"); + } + arg1 = static_cast< real >(val1); + } + if (swig_obj[1]) { + ecode2 = SWIG_AsVal_char(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_CVodeIntegrator" "', argument " "2"" of type '" "char""'"); + } + arg2 = static_cast< char >(val2); + } + { + try { + result = (cmf::math::CVodeIntegrator *)new cmf::math::CVodeIntegrator(arg1,arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__CVodeIntegrator, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_CVodeIntegrator__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::math::StateVariableOwner *arg1 = 0 ; + real arg2 = (real) 1e-9 ; + char arg3 = (char) 'R' ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + char val3 ; + int ecode3 = 0 ; + cmf::math::CVodeIntegrator *result = 0 ; + + if ((nobjs < 1) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_cmf__math__StateVariableOwner, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CVodeIntegrator" "', argument " "1"" of type '" "cmf::math::StateVariableOwner &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CVodeIntegrator" "', argument " "1"" of type '" "cmf::math::StateVariableOwner &""'"); + } + arg1 = reinterpret_cast< cmf::math::StateVariableOwner * >(argp1); + if (swig_obj[1]) { + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_CVodeIntegrator" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + } + if (swig_obj[2]) { + ecode3 = SWIG_AsVal_char(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_CVodeIntegrator" "', argument " "3"" of type '" "char""'"); + } + arg3 = static_cast< char >(val3); + } + { + try { + result = (cmf::math::CVodeIntegrator *)new cmf::math::CVodeIntegrator(*arg1,arg2,arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__CVodeIntegrator, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_CVodeIntegrator__SWIG_2(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::math::CVodeIntegrator *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + cmf::math::CVodeIntegrator *result = 0 ; + + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_cmf__math__CVodeIntegrator, 0 | 0); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CVodeIntegrator" "', argument " "1"" of type '" "cmf::math::CVodeIntegrator const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CVodeIntegrator" "', argument " "1"" of type '" "cmf::math::CVodeIntegrator const &""'"); + } + arg1 = reinterpret_cast< cmf::math::CVodeIntegrator * >(argp1); + { + try { + result = (cmf::math::CVodeIntegrator *)new cmf::math::CVodeIntegrator((cmf::math::CVodeIntegrator const &)*arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__CVodeIntegrator, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_CVodeIntegrator(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[4] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"new_CVodeIntegrator",0,3,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if ((argc >= 0) && (argc <= 2)) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + if (argc > 0) { + { + { + int res = SWIG_AsVal_double(argv[0], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (argc > 1) { + { + { + int res = SWIG_AsVal_char(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + } + } + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_cmf__math__CVodeIntegrator, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + if ((argc >= 1) && (argc <= 3)) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__math__StateVariableOwner, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (argc > 1) { + { + { + int res = SWIG_AsVal_double(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (argc > 2) { + { + { + int res = SWIG_AsVal_char(argv[2], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + } + } + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 3; + if (_rank == _rankm) goto dispatch; + } + } + check_3: + + dispatch: + switch(_index) { + case 1: + return _wrap_new_CVodeIntegrator__SWIG_0(self, argc, argv); + case 2: + return _wrap_new_CVodeIntegrator__SWIG_2(self, argc, argv); + case 3: + return _wrap_new_CVodeIntegrator__SWIG_1(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_CVodeIntegrator'.\n" + " Possible C/C++ prototypes are:\n" + " cmf::math::CVodeIntegrator::CVodeIntegrator(real,char)\n" + " cmf::math::CVodeIntegrator::CVodeIntegrator(cmf::math::StateVariableOwner &,real,char)\n" + " cmf::math::CVodeIntegrator::CVodeIntegrator(cmf::math::CVodeIntegrator const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_CVodeIntegrator_get_error(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::CVodeIntegrator *arg1 = (cmf::math::CVodeIntegrator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::math::num_array result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__CVodeIntegrator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CVodeIntegrator_get_error" "', argument " "1"" of type '" "cmf::math::CVodeIntegrator const *""'"); + } + arg1 = reinterpret_cast< cmf::math::CVodeIntegrator * >(argp1); + { + try { + result = ((cmf::math::CVodeIntegrator const *)arg1)->get_error(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + resultobj = as_npy_array(result); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CVodeIntegrator_get_nonlinear_iterations(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::CVodeIntegrator *arg1 = (cmf::math::CVodeIntegrator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__CVodeIntegrator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CVodeIntegrator_get_nonlinear_iterations" "', argument " "1"" of type '" "cmf::math::CVodeIntegrator const *""'"); + } + arg1 = reinterpret_cast< cmf::math::CVodeIntegrator * >(argp1); + { + try { + result = (int)((cmf::math::CVodeIntegrator const *)arg1)->get_nonlinear_iterations(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CVodeIntegrator_get_rhsevals(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::CVodeIntegrator *arg1 = (cmf::math::CVodeIntegrator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__CVodeIntegrator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CVodeIntegrator_get_rhsevals" "', argument " "1"" of type '" "cmf::math::CVodeIntegrator const *""'"); + } + arg1 = reinterpret_cast< cmf::math::CVodeIntegrator * >(argp1); + { + try { + result = (int)((cmf::math::CVodeIntegrator const *)arg1)->get_rhsevals(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CVodeIntegrator_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::CVodeIntegrator *arg1 = (cmf::math::CVodeIntegrator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::math::CVodeIntegrator *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__CVodeIntegrator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CVodeIntegrator_copy" "', argument " "1"" of type '" "cmf::math::CVodeIntegrator const *""'"); + } + arg1 = reinterpret_cast< cmf::math::CVodeIntegrator * >(argp1); + { + try { + result = (cmf::math::CVodeIntegrator *)((cmf::math::CVodeIntegrator const *)arg1)->copy(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__CVodeIntegrator, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_CVodeIntegrator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::CVodeIntegrator *arg1 = (cmf::math::CVodeIntegrator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__CVodeIntegrator, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CVodeIntegrator" "', argument " "1"" of type '" "cmf::math::CVodeIntegrator *""'"); + } + arg1 = reinterpret_cast< cmf::math::CVodeIntegrator * >(argp1); + { + try { + delete arg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CVodeIntegrator_order_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::CVodeIntegrator *arg1 = (cmf::math::CVodeIntegrator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__CVodeIntegrator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CVodeIntegrator_order_get" "', argument " "1"" of type '" "cmf::math::CVodeIntegrator *""'"); + } + arg1 = reinterpret_cast< cmf::math::CVodeIntegrator * >(argp1); + { + try { + result = (int)cmf_math_CVodeIntegrator_order_get(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *CVodeIntegrator_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__math__CVodeIntegrator, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *CVodeIntegrator_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_MultiIntegrator_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::MultiIntegrator *arg1 = (cmf::math::MultiIntegrator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::math::MultiIntegrator *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__MultiIntegrator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiIntegrator_copy" "', argument " "1"" of type '" "cmf::math::MultiIntegrator const *""'"); + } + arg1 = reinterpret_cast< cmf::math::MultiIntegrator * >(argp1); + { + try { + result = (cmf::math::MultiIntegrator *)((cmf::math::MultiIntegrator const *)arg1)->copy(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__MultiIntegrator, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_MultiIntegrator_add_states_to_integrator(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::math::MultiIntegrator *arg1 = (cmf::math::MultiIntegrator *) 0 ; + cmf::math::StateVariableOwner *arg2 = 0 ; + int arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "stateOwner",(char *) "integrator_position", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:MultiIntegrator_add_states_to_integrator",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__math__MultiIntegrator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiIntegrator_add_states_to_integrator" "', argument " "1"" of type '" "cmf::math::MultiIntegrator *""'"); + } + arg1 = reinterpret_cast< cmf::math::MultiIntegrator * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_cmf__math__StateVariableOwner, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MultiIntegrator_add_states_to_integrator" "', argument " "2"" of type '" "cmf::math::StateVariableOwner &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MultiIntegrator_add_states_to_integrator" "', argument " "2"" of type '" "cmf::math::StateVariableOwner &""'"); + } + arg2 = reinterpret_cast< cmf::math::StateVariableOwner * >(argp2); + ecode3 = SWIG_AsVal_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MultiIntegrator_add_states_to_integrator" "', argument " "3"" of type '" "int""'"); + } + arg3 = static_cast< int >(val3); + { + try { + (arg1)->add_states_to_integrator(*arg2,arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_MultiIntegrator(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::math::Integrator *arg1 = 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "template_integrator",(char *) "count", NULL + }; + cmf::math::MultiIntegrator *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:new_MultiIntegrator",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_cmf__math__Integrator, 0 | 0); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MultiIntegrator" "', argument " "1"" of type '" "cmf::math::Integrator const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MultiIntegrator" "', argument " "1"" of type '" "cmf::math::Integrator const &""'"); + } + arg1 = reinterpret_cast< cmf::math::Integrator * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_MultiIntegrator" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + { + try { + result = (cmf::math::MultiIntegrator *)new cmf::math::MultiIntegrator((cmf::math::Integrator const &)*arg1,arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__MultiIntegrator, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_MultiIntegrator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::MultiIntegrator *arg1 = (cmf::math::MultiIntegrator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__MultiIntegrator, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MultiIntegrator" "', argument " "1"" of type '" "cmf::math::MultiIntegrator *""'"); + } + arg1 = reinterpret_cast< cmf::math::MultiIntegrator * >(argp1); + { + try { + delete arg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *MultiIntegrator_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__math__MultiIntegrator, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *MultiIntegrator_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_Adsorption_freesolute(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::Adsorption *arg1 = (cmf::water::Adsorption *) 0 ; + real arg2 ; + real arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + double val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "xt",(char *) "V", NULL + }; + real result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:Adsorption_freesolute",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__Adsorption, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Adsorption_freesolute" "', argument " "1"" of type '" "cmf::water::Adsorption const *""'"); + } + arg1 = reinterpret_cast< cmf::water::Adsorption * >(argp1); + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Adsorption_freesolute" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + ecode3 = SWIG_AsVal_double(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Adsorption_freesolute" "', argument " "3"" of type '" "real""'"); + } + arg3 = static_cast< real >(val3); + { + try { + result = (real)((cmf::water::Adsorption const *)arg1)->freesolute(arg2,arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Adsorption_totalsolute(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::Adsorption *arg1 = (cmf::water::Adsorption *) 0 ; + real arg2 ; + real arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + double val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "xf",(char *) "V", NULL + }; + real result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:Adsorption_totalsolute",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__Adsorption, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Adsorption_totalsolute" "', argument " "1"" of type '" "cmf::water::Adsorption const *""'"); + } + arg1 = reinterpret_cast< cmf::water::Adsorption * >(argp1); + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Adsorption_totalsolute" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + ecode3 = SWIG_AsVal_double(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Adsorption_totalsolute" "', argument " "3"" of type '" "real""'"); + } + arg3 = static_cast< real >(val3); + { + try { + result = (real)((cmf::water::Adsorption const *)arg1)->totalsolute(arg2,arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Adsorption_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::Adsorption *arg1 = (cmf::water::Adsorption *) 0 ; + real arg2 = (real) -1 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "m", NULL + }; + cmf::water::Adsorption *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Adsorption_copy",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__Adsorption, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Adsorption_copy" "', argument " "1"" of type '" "cmf::water::Adsorption const *""'"); + } + arg1 = reinterpret_cast< cmf::water::Adsorption * >(argp1); + if (obj1) { + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Adsorption_copy" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + } + { + try { + result = (cmf::water::Adsorption *)((cmf::water::Adsorption const *)arg1)->copy(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__water__Adsorption, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_Adsorption(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::Adsorption *arg1 = (cmf::water::Adsorption *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__Adsorption, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Adsorption" "', argument " "1"" of type '" "cmf::water::Adsorption *""'"); + } + arg1 = reinterpret_cast< cmf::water::Adsorption * >(argp1); + { + try { + delete arg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *Adsorption_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__water__Adsorption, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_NullAdsorption_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::NullAdsorption *arg1 = (cmf::water::NullAdsorption *) 0 ; + real arg2 = (real) -1 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "m", NULL + }; + cmf::water::NullAdsorption *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:NullAdsorption_copy",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__NullAdsorption, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NullAdsorption_copy" "', argument " "1"" of type '" "cmf::water::NullAdsorption const *""'"); + } + arg1 = reinterpret_cast< cmf::water::NullAdsorption * >(argp1); + if (obj1) { + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "NullAdsorption_copy" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + } + { + try { + result = (cmf::water::NullAdsorption *)((cmf::water::NullAdsorption const *)arg1)->copy(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__water__NullAdsorption, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_NullAdsorption(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::NullAdsorption *arg1 = (cmf::water::NullAdsorption *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__NullAdsorption, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_NullAdsorption" "', argument " "1"" of type '" "cmf::water::NullAdsorption *""'"); + } + arg1 = reinterpret_cast< cmf::water::NullAdsorption * >(argp1); + { + try { + delete arg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_NullAdsorption(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::NullAdsorption *result = 0 ; + + if (!SWIG_Python_UnpackTuple(args,"new_NullAdsorption",0,0,0)) SWIG_fail; + { + try { + result = (cmf::water::NullAdsorption *)new cmf::water::NullAdsorption(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__water__NullAdsorption, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *NullAdsorption_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__water__NullAdsorption, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *NullAdsorption_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_LinearAdsorption_K_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::LinearAdsorption *arg1 = (cmf::water::LinearAdsorption *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"LinearAdsorption_K_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__LinearAdsorption, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LinearAdsorption_K_set" "', argument " "1"" of type '" "cmf::water::LinearAdsorption *""'"); + } + arg1 = reinterpret_cast< cmf::water::LinearAdsorption * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LinearAdsorption_K_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->K = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_LinearAdsorption_K_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::LinearAdsorption *arg1 = (cmf::water::LinearAdsorption *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__LinearAdsorption, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LinearAdsorption_K_get" "', argument " "1"" of type '" "cmf::water::LinearAdsorption *""'"); + } + arg1 = reinterpret_cast< cmf::water::LinearAdsorption * >(argp1); + result = (real) ((arg1)->K); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_LinearAdsorption_m_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::LinearAdsorption *arg1 = (cmf::water::LinearAdsorption *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"LinearAdsorption_m_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__LinearAdsorption, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LinearAdsorption_m_set" "', argument " "1"" of type '" "cmf::water::LinearAdsorption *""'"); + } + arg1 = reinterpret_cast< cmf::water::LinearAdsorption * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LinearAdsorption_m_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->m = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_LinearAdsorption_m_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::LinearAdsorption *arg1 = (cmf::water::LinearAdsorption *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__LinearAdsorption, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LinearAdsorption_m_get" "', argument " "1"" of type '" "cmf::water::LinearAdsorption *""'"); + } + arg1 = reinterpret_cast< cmf::water::LinearAdsorption * >(argp1); + result = (real) ((arg1)->m); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_LinearAdsorption__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + real arg1 ; + real arg2 ; + double val1 ; + int ecode1 = 0 ; + double val2 ; + int ecode2 = 0 ; + cmf::water::LinearAdsorption *result = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + ecode1 = SWIG_AsVal_double(swig_obj[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_LinearAdsorption" "', argument " "1"" of type '" "real""'"); + } + arg1 = static_cast< real >(val1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_LinearAdsorption" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + { + try { + result = (cmf::water::LinearAdsorption *)new cmf::water::LinearAdsorption(arg1,arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__water__LinearAdsorption, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_LinearAdsorption__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::water::LinearAdsorption *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + cmf::water::LinearAdsorption *result = 0 ; + + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_cmf__water__LinearAdsorption, 0 | 0); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_LinearAdsorption" "', argument " "1"" of type '" "cmf::water::LinearAdsorption const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LinearAdsorption" "', argument " "1"" of type '" "cmf::water::LinearAdsorption const &""'"); + } + arg1 = reinterpret_cast< cmf::water::LinearAdsorption * >(argp1); + { + try { + result = (cmf::water::LinearAdsorption *)new cmf::water::LinearAdsorption((cmf::water::LinearAdsorption const &)*arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__water__LinearAdsorption, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_LinearAdsorption(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"new_LinearAdsorption",0,2,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_cmf__water__LinearAdsorption, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + { + int res = SWIG_AsVal_double(argv[0], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_double(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_new_LinearAdsorption__SWIG_1(self, argc, argv); + case 2: + return _wrap_new_LinearAdsorption__SWIG_0(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_LinearAdsorption'.\n" + " Possible C/C++ prototypes are:\n" + " cmf::water::LinearAdsorption::LinearAdsorption(real,real)\n" + " cmf::water::LinearAdsorption::LinearAdsorption(cmf::water::LinearAdsorption const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_LinearAdsorption_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::LinearAdsorption *arg1 = (cmf::water::LinearAdsorption *) 0 ; + real arg2 = (real) -1 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "m", NULL + }; + cmf::water::LinearAdsorption *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:LinearAdsorption_copy",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__LinearAdsorption, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LinearAdsorption_copy" "', argument " "1"" of type '" "cmf::water::LinearAdsorption const *""'"); + } + arg1 = reinterpret_cast< cmf::water::LinearAdsorption * >(argp1); + if (obj1) { + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LinearAdsorption_copy" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + } + { + try { + result = (cmf::water::LinearAdsorption *)((cmf::water::LinearAdsorption const *)arg1)->copy(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__water__LinearAdsorption, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_LinearAdsorption(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::LinearAdsorption *arg1 = (cmf::water::LinearAdsorption *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__LinearAdsorption, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_LinearAdsorption" "', argument " "1"" of type '" "cmf::water::LinearAdsorption *""'"); + } + arg1 = reinterpret_cast< cmf::water::LinearAdsorption * >(argp1); + { + try { + delete arg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *LinearAdsorption_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__water__LinearAdsorption, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *LinearAdsorption_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_FreundlichAdsorbtion_K_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::FreundlichAdsorbtion *arg1 = (cmf::water::FreundlichAdsorbtion *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"FreundlichAdsorbtion_K_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__FreundlichAdsorbtion, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FreundlichAdsorbtion_K_set" "', argument " "1"" of type '" "cmf::water::FreundlichAdsorbtion *""'"); + } + arg1 = reinterpret_cast< cmf::water::FreundlichAdsorbtion * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FreundlichAdsorbtion_K_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->K = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FreundlichAdsorbtion_K_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::FreundlichAdsorbtion *arg1 = (cmf::water::FreundlichAdsorbtion *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__FreundlichAdsorbtion, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FreundlichAdsorbtion_K_get" "', argument " "1"" of type '" "cmf::water::FreundlichAdsorbtion *""'"); + } + arg1 = reinterpret_cast< cmf::water::FreundlichAdsorbtion * >(argp1); + result = (real) ((arg1)->K); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FreundlichAdsorbtion_n_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::FreundlichAdsorbtion *arg1 = (cmf::water::FreundlichAdsorbtion *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"FreundlichAdsorbtion_n_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__FreundlichAdsorbtion, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FreundlichAdsorbtion_n_set" "', argument " "1"" of type '" "cmf::water::FreundlichAdsorbtion *""'"); + } + arg1 = reinterpret_cast< cmf::water::FreundlichAdsorbtion * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FreundlichAdsorbtion_n_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->n = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FreundlichAdsorbtion_n_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::FreundlichAdsorbtion *arg1 = (cmf::water::FreundlichAdsorbtion *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__FreundlichAdsorbtion, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FreundlichAdsorbtion_n_get" "', argument " "1"" of type '" "cmf::water::FreundlichAdsorbtion *""'"); + } + arg1 = reinterpret_cast< cmf::water::FreundlichAdsorbtion * >(argp1); + result = (real) ((arg1)->n); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FreundlichAdsorbtion_m_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::FreundlichAdsorbtion *arg1 = (cmf::water::FreundlichAdsorbtion *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"FreundlichAdsorbtion_m_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__FreundlichAdsorbtion, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FreundlichAdsorbtion_m_set" "', argument " "1"" of type '" "cmf::water::FreundlichAdsorbtion *""'"); + } + arg1 = reinterpret_cast< cmf::water::FreundlichAdsorbtion * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FreundlichAdsorbtion_m_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->m = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FreundlichAdsorbtion_m_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::FreundlichAdsorbtion *arg1 = (cmf::water::FreundlichAdsorbtion *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__FreundlichAdsorbtion, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FreundlichAdsorbtion_m_get" "', argument " "1"" of type '" "cmf::water::FreundlichAdsorbtion *""'"); + } + arg1 = reinterpret_cast< cmf::water::FreundlichAdsorbtion * >(argp1); + result = (real) ((arg1)->m); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FreundlichAdsorbtion_epsilon_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::FreundlichAdsorbtion *arg1 = (cmf::water::FreundlichAdsorbtion *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"FreundlichAdsorbtion_epsilon_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__FreundlichAdsorbtion, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FreundlichAdsorbtion_epsilon_set" "', argument " "1"" of type '" "cmf::water::FreundlichAdsorbtion *""'"); + } + arg1 = reinterpret_cast< cmf::water::FreundlichAdsorbtion * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FreundlichAdsorbtion_epsilon_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->epsilon = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FreundlichAdsorbtion_epsilon_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::FreundlichAdsorbtion *arg1 = (cmf::water::FreundlichAdsorbtion *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__FreundlichAdsorbtion, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FreundlichAdsorbtion_epsilon_get" "', argument " "1"" of type '" "cmf::water::FreundlichAdsorbtion *""'"); + } + arg1 = reinterpret_cast< cmf::water::FreundlichAdsorbtion * >(argp1); + result = (real) ((arg1)->epsilon); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FreundlichAdsorbtion_maxiter_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::FreundlichAdsorbtion *arg1 = (cmf::water::FreundlichAdsorbtion *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"FreundlichAdsorbtion_maxiter_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__FreundlichAdsorbtion, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FreundlichAdsorbtion_maxiter_set" "', argument " "1"" of type '" "cmf::water::FreundlichAdsorbtion *""'"); + } + arg1 = reinterpret_cast< cmf::water::FreundlichAdsorbtion * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FreundlichAdsorbtion_maxiter_set" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->maxiter = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FreundlichAdsorbtion_maxiter_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::FreundlichAdsorbtion *arg1 = (cmf::water::FreundlichAdsorbtion *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__FreundlichAdsorbtion, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FreundlichAdsorbtion_maxiter_get" "', argument " "1"" of type '" "cmf::water::FreundlichAdsorbtion *""'"); + } + arg1 = reinterpret_cast< cmf::water::FreundlichAdsorbtion * >(argp1); + result = (int) ((arg1)->maxiter); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_FreundlichAdsorbtion__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + real arg1 ; + real arg2 ; + real arg3 ; + real arg4 = (real) 1e-12 ; + int arg5 = (int) 100 ; + double val1 ; + int ecode1 = 0 ; + double val2 ; + int ecode2 = 0 ; + double val3 ; + int ecode3 = 0 ; + double val4 ; + int ecode4 = 0 ; + int val5 ; + int ecode5 = 0 ; + cmf::water::FreundlichAdsorbtion *result = 0 ; + + if ((nobjs < 3) || (nobjs > 5)) SWIG_fail; + ecode1 = SWIG_AsVal_double(swig_obj[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FreundlichAdsorbtion" "', argument " "1"" of type '" "real""'"); + } + arg1 = static_cast< real >(val1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FreundlichAdsorbtion" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_FreundlichAdsorbtion" "', argument " "3"" of type '" "real""'"); + } + arg3 = static_cast< real >(val3); + if (swig_obj[3]) { + ecode4 = SWIG_AsVal_double(swig_obj[3], &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_FreundlichAdsorbtion" "', argument " "4"" of type '" "real""'"); + } + arg4 = static_cast< real >(val4); + } + if (swig_obj[4]) { + ecode5 = SWIG_AsVal_int(swig_obj[4], &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_FreundlichAdsorbtion" "', argument " "5"" of type '" "int""'"); + } + arg5 = static_cast< int >(val5); + } + { + try { + result = (cmf::water::FreundlichAdsorbtion *)new cmf::water::FreundlichAdsorbtion(arg1,arg2,arg3,arg4,arg5); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__water__FreundlichAdsorbtion, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_FreundlichAdsorbtion__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::water::FreundlichAdsorbtion *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + cmf::water::FreundlichAdsorbtion *result = 0 ; + + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_cmf__water__FreundlichAdsorbtion, 0 | 0); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FreundlichAdsorbtion" "', argument " "1"" of type '" "cmf::water::FreundlichAdsorbtion const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FreundlichAdsorbtion" "', argument " "1"" of type '" "cmf::water::FreundlichAdsorbtion const &""'"); + } + arg1 = reinterpret_cast< cmf::water::FreundlichAdsorbtion * >(argp1); + { + try { + result = (cmf::water::FreundlichAdsorbtion *)new cmf::water::FreundlichAdsorbtion((cmf::water::FreundlichAdsorbtion const &)*arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__water__FreundlichAdsorbtion, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_FreundlichAdsorbtion(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[6] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"new_FreundlichAdsorbtion",0,5,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_cmf__water__FreundlichAdsorbtion, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if ((argc >= 3) && (argc <= 5)) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + { + int res = SWIG_AsVal_double(argv[0], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_double(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_double(argv[2], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (argc > 3) { + { + { + int res = SWIG_AsVal_double(argv[3], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (argc > 4) { + { + { + int res = SWIG_AsVal_int(argv[4], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + } + } + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_new_FreundlichAdsorbtion__SWIG_1(self, argc, argv); + case 2: + return _wrap_new_FreundlichAdsorbtion__SWIG_0(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_FreundlichAdsorbtion'.\n" + " Possible C/C++ prototypes are:\n" + " cmf::water::FreundlichAdsorbtion::FreundlichAdsorbtion(real,real,real,real,int)\n" + " cmf::water::FreundlichAdsorbtion::FreundlichAdsorbtion(cmf::water::FreundlichAdsorbtion const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_FreundlichAdsorbtion_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::FreundlichAdsorbtion *arg1 = (cmf::water::FreundlichAdsorbtion *) 0 ; + real arg2 = (real) -1 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "m", NULL + }; + cmf::water::FreundlichAdsorbtion *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:FreundlichAdsorbtion_copy",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__FreundlichAdsorbtion, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FreundlichAdsorbtion_copy" "', argument " "1"" of type '" "cmf::water::FreundlichAdsorbtion const *""'"); + } + arg1 = reinterpret_cast< cmf::water::FreundlichAdsorbtion * >(argp1); + if (obj1) { + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FreundlichAdsorbtion_copy" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + } + { + try { + result = (cmf::water::FreundlichAdsorbtion *)((cmf::water::FreundlichAdsorbtion const *)arg1)->copy(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__water__FreundlichAdsorbtion, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_FreundlichAdsorbtion(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::FreundlichAdsorbtion *arg1 = (cmf::water::FreundlichAdsorbtion *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__FreundlichAdsorbtion, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FreundlichAdsorbtion" "', argument " "1"" of type '" "cmf::water::FreundlichAdsorbtion *""'"); + } + arg1 = reinterpret_cast< cmf::water::FreundlichAdsorbtion * >(argp1); + { + try { + delete arg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *FreundlichAdsorbtion_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__water__FreundlichAdsorbtion, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *FreundlichAdsorbtion_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_LangmuirAdsorption_K_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::LangmuirAdsorption *arg1 = (cmf::water::LangmuirAdsorption *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"LangmuirAdsorption_K_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__LangmuirAdsorption, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LangmuirAdsorption_K_set" "', argument " "1"" of type '" "cmf::water::LangmuirAdsorption *""'"); + } + arg1 = reinterpret_cast< cmf::water::LangmuirAdsorption * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LangmuirAdsorption_K_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->K = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_LangmuirAdsorption_K_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::LangmuirAdsorption *arg1 = (cmf::water::LangmuirAdsorption *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__LangmuirAdsorption, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LangmuirAdsorption_K_get" "', argument " "1"" of type '" "cmf::water::LangmuirAdsorption *""'"); + } + arg1 = reinterpret_cast< cmf::water::LangmuirAdsorption * >(argp1); + result = (real) ((arg1)->K); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_LangmuirAdsorption_m_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::LangmuirAdsorption *arg1 = (cmf::water::LangmuirAdsorption *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"LangmuirAdsorption_m_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__LangmuirAdsorption, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LangmuirAdsorption_m_set" "', argument " "1"" of type '" "cmf::water::LangmuirAdsorption *""'"); + } + arg1 = reinterpret_cast< cmf::water::LangmuirAdsorption * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LangmuirAdsorption_m_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->m = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_LangmuirAdsorption_m_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::LangmuirAdsorption *arg1 = (cmf::water::LangmuirAdsorption *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__LangmuirAdsorption, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LangmuirAdsorption_m_get" "', argument " "1"" of type '" "cmf::water::LangmuirAdsorption *""'"); + } + arg1 = reinterpret_cast< cmf::water::LangmuirAdsorption * >(argp1); + result = (real) ((arg1)->m); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_LangmuirAdsorption__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + real arg1 ; + real arg2 ; + double val1 ; + int ecode1 = 0 ; + double val2 ; + int ecode2 = 0 ; + cmf::water::LangmuirAdsorption *result = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + ecode1 = SWIG_AsVal_double(swig_obj[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_LangmuirAdsorption" "', argument " "1"" of type '" "real""'"); + } + arg1 = static_cast< real >(val1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_LangmuirAdsorption" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + { + try { + result = (cmf::water::LangmuirAdsorption *)new cmf::water::LangmuirAdsorption(arg1,arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__water__LangmuirAdsorption, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_LangmuirAdsorption__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::water::LangmuirAdsorption *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + cmf::water::LangmuirAdsorption *result = 0 ; + + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_cmf__water__LangmuirAdsorption, 0 | 0); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_LangmuirAdsorption" "', argument " "1"" of type '" "cmf::water::LangmuirAdsorption const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LangmuirAdsorption" "', argument " "1"" of type '" "cmf::water::LangmuirAdsorption const &""'"); + } + arg1 = reinterpret_cast< cmf::water::LangmuirAdsorption * >(argp1); + { + try { + result = (cmf::water::LangmuirAdsorption *)new cmf::water::LangmuirAdsorption((cmf::water::LangmuirAdsorption const &)*arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__water__LangmuirAdsorption, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_LangmuirAdsorption(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"new_LangmuirAdsorption",0,2,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_cmf__water__LangmuirAdsorption, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + { + int res = SWIG_AsVal_double(argv[0], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_double(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_new_LangmuirAdsorption__SWIG_1(self, argc, argv); + case 2: + return _wrap_new_LangmuirAdsorption__SWIG_0(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_LangmuirAdsorption'.\n" + " Possible C/C++ prototypes are:\n" + " cmf::water::LangmuirAdsorption::LangmuirAdsorption(real,real)\n" + " cmf::water::LangmuirAdsorption::LangmuirAdsorption(cmf::water::LangmuirAdsorption const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_LangmuirAdsorption_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::LangmuirAdsorption *arg1 = (cmf::water::LangmuirAdsorption *) 0 ; + real arg2 = (real) -1 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "m", NULL + }; + cmf::water::LangmuirAdsorption *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:LangmuirAdsorption_copy",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__LangmuirAdsorption, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LangmuirAdsorption_copy" "', argument " "1"" of type '" "cmf::water::LangmuirAdsorption const *""'"); + } + arg1 = reinterpret_cast< cmf::water::LangmuirAdsorption * >(argp1); + if (obj1) { + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LangmuirAdsorption_copy" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + } + { + try { + result = (cmf::water::LangmuirAdsorption *)((cmf::water::LangmuirAdsorption const *)arg1)->copy(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__water__LangmuirAdsorption, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_LangmuirAdsorption(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::LangmuirAdsorption *arg1 = (cmf::water::LangmuirAdsorption *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__LangmuirAdsorption, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_LangmuirAdsorption" "', argument " "1"" of type '" "cmf::water::LangmuirAdsorption *""'"); + } + arg1 = reinterpret_cast< cmf::water::LangmuirAdsorption * >(argp1); + { + try { + delete arg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *LangmuirAdsorption_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__water__LangmuirAdsorption, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *LangmuirAdsorption_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_new_solute(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::solute *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + char * kwnames[] = { + (char *) "copy", NULL + }; + cmf::water::solute *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:new_solute",kwnames,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_cmf__water__solute, 0 | 0); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_solute" "', argument " "1"" of type '" "cmf::water::solute const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_solute" "', argument " "1"" of type '" "cmf::water::solute const &""'"); + } + arg1 = reinterpret_cast< cmf::water::solute * >(argp1); + { + try { + result = (cmf::water::solute *)new cmf::water::solute((cmf::water::solute const &)*arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__water__solute, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_solute___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::solute *arg1 = (cmf::water::solute *) 0 ; + cmf::water::solute *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "cmp", NULL + }; + bool result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:solute___eq__",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__solute, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "solute___eq__" "', argument " "1"" of type '" "cmf::water::solute const *""'"); + } + arg1 = reinterpret_cast< cmf::water::solute * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_cmf__water__solute, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "solute___eq__" "', argument " "2"" of type '" "cmf::water::solute const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "solute___eq__" "', argument " "2"" of type '" "cmf::water::solute const &""'"); + } + arg2 = reinterpret_cast< cmf::water::solute * >(argp2); + { + try { + result = (bool)((cmf::water::solute const *)arg1)->operator ==((cmf::water::solute const &)*arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_solute___lt__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::solute *arg1 = (cmf::water::solute *) 0 ; + cmf::water::solute *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "cmp", NULL + }; + bool result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:solute___lt__",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__solute, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "solute___lt__" "', argument " "1"" of type '" "cmf::water::solute const *""'"); + } + arg1 = reinterpret_cast< cmf::water::solute * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_cmf__water__solute, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "solute___lt__" "', argument " "2"" of type '" "cmf::water::solute const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "solute___lt__" "', argument " "2"" of type '" "cmf::water::solute const &""'"); + } + arg2 = reinterpret_cast< cmf::water::solute * >(argp2); + { + try { + result = (bool)((cmf::water::solute const *)arg1)->operator <((cmf::water::solute const &)*arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_solute___gt__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::solute *arg1 = (cmf::water::solute *) 0 ; + cmf::water::solute *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "cmp", NULL + }; + bool result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:solute___gt__",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__solute, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "solute___gt__" "', argument " "1"" of type '" "cmf::water::solute const *""'"); + } + arg1 = reinterpret_cast< cmf::water::solute * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_cmf__water__solute, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "solute___gt__" "', argument " "2"" of type '" "cmf::water::solute const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "solute___gt__" "', argument " "2"" of type '" "cmf::water::solute const &""'"); + } + arg2 = reinterpret_cast< cmf::water::solute * >(argp2); + { + try { + result = (bool)((cmf::water::solute const *)arg1)->operator >((cmf::water::solute const &)*arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_solute___le__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::solute *arg1 = (cmf::water::solute *) 0 ; + cmf::water::solute *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "cmp", NULL + }; + bool result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:solute___le__",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__solute, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "solute___le__" "', argument " "1"" of type '" "cmf::water::solute const *""'"); + } + arg1 = reinterpret_cast< cmf::water::solute * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_cmf__water__solute, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "solute___le__" "', argument " "2"" of type '" "cmf::water::solute const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "solute___le__" "', argument " "2"" of type '" "cmf::water::solute const &""'"); + } + arg2 = reinterpret_cast< cmf::water::solute * >(argp2); + { + try { + result = (bool)((cmf::water::solute const *)arg1)->operator <=((cmf::water::solute const &)*arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_solute___ge__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::solute *arg1 = (cmf::water::solute *) 0 ; + cmf::water::solute *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "cmp", NULL + }; + bool result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:solute___ge__",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__solute, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "solute___ge__" "', argument " "1"" of type '" "cmf::water::solute const *""'"); + } + arg1 = reinterpret_cast< cmf::water::solute * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_cmf__water__solute, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "solute___ge__" "', argument " "2"" of type '" "cmf::water::solute const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "solute___ge__" "', argument " "2"" of type '" "cmf::water::solute const &""'"); + } + arg2 = reinterpret_cast< cmf::water::solute * >(argp2); + { + try { + result = (bool)((cmf::water::solute const *)arg1)->operator >=((cmf::water::solute const &)*arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_solute___ne__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::solute *arg1 = (cmf::water::solute *) 0 ; + cmf::water::solute *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "cmp", NULL + }; + bool result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:solute___ne__",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__solute, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "solute___ne__" "', argument " "1"" of type '" "cmf::water::solute const *""'"); + } + arg1 = reinterpret_cast< cmf::water::solute * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_cmf__water__solute, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "solute___ne__" "', argument " "2"" of type '" "cmf::water::solute const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "solute___ne__" "', argument " "2"" of type '" "cmf::water::solute const &""'"); + } + arg2 = reinterpret_cast< cmf::water::solute * >(argp2); + { + try { + result = (bool)((cmf::water::solute const *)arg1)->operator !=((cmf::water::solute const &)*arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_solute_Name_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::solute *arg1 = (cmf::water::solute *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"solute_Name_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__solute, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "solute_Name_set" "', argument " "1"" of type '" "cmf::water::solute *""'"); + } + arg1 = reinterpret_cast< cmf::water::solute * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "solute_Name_set" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "solute_Name_set" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + if (arg1) (arg1)->Name = *arg2; + resultobj = SWIG_Py_Void(); + if (SWIG_IsNewObj(res2)) delete arg2; + return resultobj; +fail: + if (SWIG_IsNewObj(res2)) delete arg2; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_solute_Name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::solute *arg1 = (cmf::water::solute *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::string *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__solute, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "solute_Name_get" "', argument " "1"" of type '" "cmf::water::solute *""'"); + } + arg1 = reinterpret_cast< cmf::water::solute * >(argp1); + result = (std::string *) & ((arg1)->Name); + resultobj = SWIG_From_std_string(static_cast< std::string >(*result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_solute_Unit_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::solute *arg1 = (cmf::water::solute *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"solute_Unit_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__solute, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "solute_Unit_set" "', argument " "1"" of type '" "cmf::water::solute *""'"); + } + arg1 = reinterpret_cast< cmf::water::solute * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "solute_Unit_set" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "solute_Unit_set" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + if (arg1) (arg1)->Unit = *arg2; + resultobj = SWIG_Py_Void(); + if (SWIG_IsNewObj(res2)) delete arg2; + return resultobj; +fail: + if (SWIG_IsNewObj(res2)) delete arg2; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_solute_Unit_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::solute *arg1 = (cmf::water::solute *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::string *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__solute, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "solute_Unit_get" "', argument " "1"" of type '" "cmf::water::solute *""'"); + } + arg1 = reinterpret_cast< cmf::water::solute * >(argp1); + result = (std::string *) & ((arg1)->Unit); + resultobj = SWIG_From_std_string(static_cast< std::string >(*result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_solute_Uptake_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::solute *arg1 = (cmf::water::solute *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"solute_Uptake_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__solute, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "solute_Uptake_set" "', argument " "1"" of type '" "cmf::water::solute *""'"); + } + arg1 = reinterpret_cast< cmf::water::solute * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "solute_Uptake_set" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + if (arg1) (arg1)->Uptake = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_solute_Uptake_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::solute *arg1 = (cmf::water::solute *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__solute, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "solute_Uptake_get" "', argument " "1"" of type '" "cmf::water::solute *""'"); + } + arg1 = reinterpret_cast< cmf::water::solute * >(argp1); + result = (double) ((arg1)->Uptake); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_solute_Id_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::solute *arg1 = (cmf::water::solute *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + size_t result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__solute, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "solute_Id_get" "', argument " "1"" of type '" "cmf::water::solute *""'"); + } + arg1 = reinterpret_cast< cmf::water::solute * >(argp1); + result = (size_t) ((arg1)->Id); + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_solute___repr__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::solute *arg1 = (cmf::water::solute *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::string result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__solute, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "solute___repr__" "', argument " "1"" of type '" "cmf::water::solute *""'"); + } + arg1 = reinterpret_cast< cmf::water::solute * >(argp1); + { + try { + result = cmf_water_solute___repr__(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_solute(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::solute *arg1 = (cmf::water::solute *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__solute, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_solute" "', argument " "1"" of type '" "cmf::water::solute *""'"); + } + arg1 = reinterpret_cast< cmf::water::solute * >(argp1); + { + try { + delete arg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *solute_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__water__solute, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *solute_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_solute_vector_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::solute_vector *arg1 = (cmf::water::solute_vector *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + size_t result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__solute_vector, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "solute_vector_size" "', argument " "1"" of type '" "cmf::water::solute_vector const *""'"); + } + arg1 = reinterpret_cast< cmf::water::solute_vector * >(argp1); + { + try { + result = ((cmf::water::solute_vector const *)arg1)->size(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_solute_vector(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + std::string arg1 ; + PyObject * obj0 = 0 ; + char * kwnames[] = { + (char *) "str", NULL + }; + cmf::water::solute_vector *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:new_solute_vector",kwnames,&obj0)) SWIG_fail; + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string(obj0, &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "new_solute_vector" "', argument " "1"" of type '" "std::string""'"); + } + arg1 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + { + try { + result = (cmf::water::solute_vector *)new cmf::water::solute_vector(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__water__solute_vector, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_solute_vector_get_solute(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::solute_vector *arg1 = (cmf::water::solute_vector *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "position", NULL + }; + cmf::water::solute *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:solute_vector_get_solute",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__solute_vector, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "solute_vector_get_solute" "', argument " "1"" of type '" "cmf::water::solute_vector *""'"); + } + arg1 = reinterpret_cast< cmf::water::solute_vector * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "solute_vector_get_solute" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + { + try { + result = (cmf::water::solute *)(arg1)->get_solute(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__water__solute, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_solute_vector___getitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::solute_vector *arg1 = (cmf::water::solute_vector *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "i", NULL + }; + cmf::water::solute *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:solute_vector___getitem__",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__solute_vector, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "solute_vector___getitem__" "', argument " "1"" of type '" "cmf::water::solute_vector *""'"); + } + arg1 = reinterpret_cast< cmf::water::solute_vector * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "solute_vector___getitem__" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + { + try { + result = (cmf::water::solute *)cmf_water_solute_vector___getitem__(arg1,arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__water__solute, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_solute_vector___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::solute_vector *arg1 = (cmf::water::solute_vector *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + size_t result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__solute_vector, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "solute_vector___len__" "', argument " "1"" of type '" "cmf::water::solute_vector *""'"); + } + arg1 = reinterpret_cast< cmf::water::solute_vector * >(argp1); + { + try { + result = cmf_water_solute_vector___len__(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_solute_vector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::solute_vector *arg1 = (cmf::water::solute_vector *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__solute_vector, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_solute_vector" "', argument " "1"" of type '" "cmf::water::solute_vector *""'"); + } + arg1 = reinterpret_cast< cmf::water::solute_vector * >(argp1); + { + try { + delete arg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *solute_vector_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__water__solute_vector, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *solute_vector_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_SoluteTimeseries_conc(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::SoluteTimeseries *arg1 = (cmf::water::SoluteTimeseries *) 0 ; + cmf::math::Time arg2 ; + cmf::water::solute *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "t",(char *) "_Solute", NULL + }; + real result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:SoluteTimeseries_conc",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__SoluteTimeseries, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SoluteTimeseries_conc" "', argument " "1"" of type '" "cmf::water::SoluteTimeseries const *""'"); + } + arg1 = reinterpret_cast< cmf::water::SoluteTimeseries * >(argp1); + { + arg2 = convert_datetime_to_cmftime(obj1); + if (arg2 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } + } + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_cmf__water__solute, 0 | 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SoluteTimeseries_conc" "', argument " "3"" of type '" "cmf::water::solute const &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SoluteTimeseries_conc" "', argument " "3"" of type '" "cmf::water::solute const &""'"); + } + arg3 = reinterpret_cast< cmf::water::solute * >(argp3); + { + try { + result = (real)((cmf::water::SoluteTimeseries const *)arg1)->conc(arg2,(cmf::water::solute const &)*arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SoluteTimeseries_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::SoluteTimeseries *arg1 = (cmf::water::SoluteTimeseries *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + size_t result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__SoluteTimeseries, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SoluteTimeseries_size" "', argument " "1"" of type '" "cmf::water::SoluteTimeseries const *""'"); + } + arg1 = reinterpret_cast< cmf::water::SoluteTimeseries * >(argp1); + { + try { + result = ((cmf::water::SoluteTimeseries const *)arg1)->size(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_SoluteTimeseries__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) { + PyObject *resultobj = 0; + cmf::water::SoluteTimeseries *result = 0 ; + + if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; + { + try { + result = (cmf::water::SoluteTimeseries *)new cmf::water::SoluteTimeseries(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__water__SoluteTimeseries, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_SoluteTimeseries__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::water::solute_vector *arg1 = 0 ; + cmf::math::Time arg2 ; + cmf::math::Time arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + cmf::water::SoluteTimeseries *result = 0 ; + + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_cmf__water__solute_vector, 0 | 0); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SoluteTimeseries" "', argument " "1"" of type '" "cmf::water::solute_vector const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SoluteTimeseries" "', argument " "1"" of type '" "cmf::water::solute_vector const &""'"); + } + arg1 = reinterpret_cast< cmf::water::solute_vector * >(argp1); + { + arg2 = convert_datetime_to_cmftime(swig_obj[1]); + if (arg2 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } + } + { + arg3 = convert_datetime_to_cmftime(swig_obj[2]); + if (arg3 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } + } + { + try { + result = (cmf::water::SoluteTimeseries *)new cmf::water::SoluteTimeseries((cmf::water::solute_vector const &)*arg1,arg2,arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__water__SoluteTimeseries, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_SoluteTimeseries__SWIG_2(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::water::SoluteTimeseries *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + cmf::water::SoluteTimeseries *result = 0 ; + + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_cmf__water__SoluteTimeseries, 0 | 0); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SoluteTimeseries" "', argument " "1"" of type '" "cmf::water::SoluteTimeseries const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SoluteTimeseries" "', argument " "1"" of type '" "cmf::water::SoluteTimeseries const &""'"); + } + arg1 = reinterpret_cast< cmf::water::SoluteTimeseries * >(argp1); + { + try { + result = (cmf::water::SoluteTimeseries *)new cmf::water::SoluteTimeseries((cmf::water::SoluteTimeseries const &)*arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__water__SoluteTimeseries, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_SoluteTimeseries(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[4] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"new_SoluteTimeseries",0,3,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 0) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + if (argc == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_cmf__water__SoluteTimeseries, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + if (argc == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_cmf__water__solute_vector, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + _v = check_time(argv[1]); + } + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + _v = check_time(argv[2]); + } + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 3; + if (_rank == _rankm) goto dispatch; + } + } + check_3: + + dispatch: + switch(_index) { + case 1: + return _wrap_new_SoluteTimeseries__SWIG_0(self, argc, argv); + case 2: + return _wrap_new_SoluteTimeseries__SWIG_2(self, argc, argv); + case 3: + return _wrap_new_SoluteTimeseries__SWIG_1(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_SoluteTimeseries'.\n" + " Possible C/C++ prototypes are:\n" + " cmf::water::SoluteTimeseries::SoluteTimeseries()\n" + " cmf::water::SoluteTimeseries::SoluteTimeseries(cmf::water::solute_vector const &,cmf::math::Time,cmf::math::Time)\n" + " cmf::water::SoluteTimeseries::SoluteTimeseries(cmf::water::SoluteTimeseries const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_SoluteTimeseries___getitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::SoluteTimeseries *arg1 = (cmf::water::SoluteTimeseries *) 0 ; + cmf::water::solute *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "solute", NULL + }; + cmf::math::timeseries *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:SoluteTimeseries___getitem__",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__SoluteTimeseries, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SoluteTimeseries___getitem__" "', argument " "1"" of type '" "cmf::water::SoluteTimeseries *""'"); + } + arg1 = reinterpret_cast< cmf::water::SoluteTimeseries * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_cmf__water__solute, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SoluteTimeseries___getitem__" "', argument " "2"" of type '" "cmf::water::solute const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SoluteTimeseries___getitem__" "', argument " "2"" of type '" "cmf::water::solute const &""'"); + } + arg2 = reinterpret_cast< cmf::water::solute * >(argp2); + { + try { + result = (cmf::math::timeseries *) &cmf_water_SoluteTimeseries___getitem__(arg1,(cmf::water::solute const &)*arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SoluteTimeseries___setitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::SoluteTimeseries *arg1 = (cmf::water::SoluteTimeseries *) 0 ; + cmf::water::solute *arg2 = 0 ; + cmf::math::timeseries arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "solute",(char *) "concentration", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:SoluteTimeseries___setitem__",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__SoluteTimeseries, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SoluteTimeseries___setitem__" "', argument " "1"" of type '" "cmf::water::SoluteTimeseries *""'"); + } + arg1 = reinterpret_cast< cmf::water::SoluteTimeseries * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_cmf__water__solute, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SoluteTimeseries___setitem__" "', argument " "2"" of type '" "cmf::water::solute const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SoluteTimeseries___setitem__" "', argument " "2"" of type '" "cmf::water::solute const &""'"); + } + arg2 = reinterpret_cast< cmf::water::solute * >(argp2); + { + cmf::math::timeseries *p_ts = &arg3; + int res=SWIG_ConvertPtr(obj2,(void**)(&p_ts),SWIGTYPE_p_cmf__math__timeseries,0); + if (!(SWIG_IsOK(res)) || p_ts==0) { + if (PyNumber_Check(obj2)) { + double scalar = PyFloat_AsDouble(obj2); + arg3 = cmf::math::timeseries::from_scalar(scalar); + } else { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.timeseries object"); + } + } else { + arg3 = *p_ts; + } + } + { + try { + cmf_water_SoluteTimeseries___setitem__(arg1,(cmf::water::solute const &)*arg2,arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SoluteTimeseries___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::SoluteTimeseries *arg1 = (cmf::water::SoluteTimeseries *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + size_t result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__SoluteTimeseries, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SoluteTimeseries___len__" "', argument " "1"" of type '" "cmf::water::SoluteTimeseries const *""'"); + } + arg1 = reinterpret_cast< cmf::water::SoluteTimeseries * >(argp1); + { + try { + result = cmf_water_SoluteTimeseries___len__((cmf::water::SoluteTimeseries const *)arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_SoluteTimeseries(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::SoluteTimeseries *arg1 = (cmf::water::SoluteTimeseries *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__SoluteTimeseries, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SoluteTimeseries" "', argument " "1"" of type '" "cmf::water::SoluteTimeseries *""'"); + } + arg1 = reinterpret_cast< cmf::water::SoluteTimeseries * >(argp1); + { + try { + delete arg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *SoluteTimeseries_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__water__SoluteTimeseries, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *SoluteTimeseries_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_SoluteStorage_set_adsorption(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::SoluteStorage *arg1 = (cmf::water::SoluteStorage *) 0 ; + cmf::water::Adsorption *arg2 = 0 ; + real arg3 = (real) -1 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::water::SoluteStorage > tempshared1 ; + std::shared_ptr< cmf::water::SoluteStorage > *smartarg1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + double val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "newadsorption",(char *) "m", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:SoluteStorage_set_adsorption",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__SoluteStorage_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SoluteStorage_set_adsorption" "', argument " "1"" of type '" "cmf::water::SoluteStorage *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::SoluteStorage > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::water::SoluteStorage > * >(argp1); + arg1 = const_cast< cmf::water::SoluteStorage * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::SoluteStorage > * >(argp1); + arg1 = const_cast< cmf::water::SoluteStorage * >((smartarg1 ? smartarg1->get() : 0)); + } + } + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_cmf__water__Adsorption, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SoluteStorage_set_adsorption" "', argument " "2"" of type '" "cmf::water::Adsorption const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SoluteStorage_set_adsorption" "', argument " "2"" of type '" "cmf::water::Adsorption const &""'"); + } + arg2 = reinterpret_cast< cmf::water::Adsorption * >(argp2); + if (obj2) { + ecode3 = SWIG_AsVal_double(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SoluteStorage_set_adsorption" "', argument " "3"" of type '" "real""'"); + } + arg3 = static_cast< real >(val3); + } + { + try { + (arg1)->set_adsorption((cmf::water::Adsorption const &)*arg2,arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SoluteStorage_decay_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::SoluteStorage *arg1 = (cmf::water::SoluteStorage *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::water::SoluteStorage > tempshared1 ; + std::shared_ptr< cmf::water::SoluteStorage > *smartarg1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"SoluteStorage_decay_set",2,2,swig_obj)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__SoluteStorage_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SoluteStorage_decay_set" "', argument " "1"" of type '" "cmf::water::SoluteStorage *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::SoluteStorage > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::water::SoluteStorage > * >(argp1); + arg1 = const_cast< cmf::water::SoluteStorage * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::SoluteStorage > * >(argp1); + arg1 = const_cast< cmf::water::SoluteStorage * >((smartarg1 ? smartarg1->get() : 0)); + } + } + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SoluteStorage_decay_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->decay = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SoluteStorage_decay_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::SoluteStorage *arg1 = (cmf::water::SoluteStorage *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::water::SoluteStorage > tempshared1 ; + std::shared_ptr< cmf::water::SoluteStorage > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__SoluteStorage_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SoluteStorage_decay_get" "', argument " "1"" of type '" "cmf::water::SoluteStorage *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::SoluteStorage > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::water::SoluteStorage > * >(argp1); + arg1 = const_cast< cmf::water::SoluteStorage * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::SoluteStorage > * >(argp1); + arg1 = const_cast< cmf::water::SoluteStorage * >((smartarg1 ? smartarg1->get() : 0)); + } + } + result = (real) ((arg1)->decay); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SoluteStorage_source_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::SoluteStorage *arg1 = (cmf::water::SoluteStorage *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::water::SoluteStorage > tempshared1 ; + std::shared_ptr< cmf::water::SoluteStorage > *smartarg1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"SoluteStorage_source_set",2,2,swig_obj)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__SoluteStorage_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SoluteStorage_source_set" "', argument " "1"" of type '" "cmf::water::SoluteStorage *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::SoluteStorage > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::water::SoluteStorage > * >(argp1); + arg1 = const_cast< cmf::water::SoluteStorage * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::SoluteStorage > * >(argp1); + arg1 = const_cast< cmf::water::SoluteStorage * >((smartarg1 ? smartarg1->get() : 0)); + } + } + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SoluteStorage_source_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->source = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SoluteStorage_source_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::SoluteStorage *arg1 = (cmf::water::SoluteStorage *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::water::SoluteStorage > tempshared1 ; + std::shared_ptr< cmf::water::SoluteStorage > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__SoluteStorage_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SoluteStorage_source_get" "', argument " "1"" of type '" "cmf::water::SoluteStorage *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::SoluteStorage > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::water::SoluteStorage > * >(argp1); + arg1 = const_cast< cmf::water::SoluteStorage * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::SoluteStorage > * >(argp1); + arg1 = const_cast< cmf::water::SoluteStorage * >((smartarg1 ? smartarg1->get() : 0)); + } + } + result = (real) ((arg1)->source); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SoluteStorage_Solute_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::SoluteStorage *arg1 = (cmf::water::SoluteStorage *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::water::SoluteStorage > tempshared1 ; + std::shared_ptr< cmf::water::SoluteStorage > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + cmf::water::solute *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__SoluteStorage_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SoluteStorage_Solute_get" "', argument " "1"" of type '" "cmf::water::SoluteStorage *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::SoluteStorage > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::water::SoluteStorage > * >(argp1); + arg1 = const_cast< cmf::water::SoluteStorage * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::SoluteStorage > * >(argp1); + arg1 = const_cast< cmf::water::SoluteStorage * >((smartarg1 ? smartarg1->get() : 0)); + } + } + result = (cmf::water::solute *) &(cmf::water::solute const &) ((arg1)->Solute); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__water__solute, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SoluteStorage_conc(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::SoluteStorage *arg1 = (cmf::water::SoluteStorage *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::water::SoluteStorage const > tempshared1 ; + std::shared_ptr< cmf::water::SoluteStorage const > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__SoluteStorage_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SoluteStorage_conc" "', argument " "1"" of type '" "cmf::water::SoluteStorage const *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::water::SoluteStorage > * >(argp1); + delete reinterpret_cast< std::shared_ptr< const cmf::water::SoluteStorage > * >(argp1); + arg1 = const_cast< cmf::water::SoluteStorage * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::water::SoluteStorage > * >(argp1); + arg1 = const_cast< cmf::water::SoluteStorage * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + try { + result = (real)((cmf::water::SoluteStorage const *)arg1)->conc(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SoluteStorage_set_conc(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::SoluteStorage *arg1 = (cmf::water::SoluteStorage *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::water::SoluteStorage > tempshared1 ; + std::shared_ptr< cmf::water::SoluteStorage > *smartarg1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "NewConcentration", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:SoluteStorage_set_conc",kwnames,&obj0,&obj1)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__SoluteStorage_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SoluteStorage_set_conc" "', argument " "1"" of type '" "cmf::water::SoluteStorage *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::SoluteStorage > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::water::SoluteStorage > * >(argp1); + arg1 = const_cast< cmf::water::SoluteStorage * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::SoluteStorage > * >(argp1); + arg1 = const_cast< cmf::water::SoluteStorage * >((smartarg1 ? smartarg1->get() : 0)); + } + } + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SoluteStorage_set_conc" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + { + try { + (arg1)->set_conc(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_SoluteStorage(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::SoluteStorage *arg1 = (cmf::water::SoluteStorage *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::water::SoluteStorage > tempshared1 ; + std::shared_ptr< cmf::water::SoluteStorage > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__SoluteStorage_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SoluteStorage" "', argument " "1"" of type '" "cmf::water::SoluteStorage *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::SoluteStorage > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::water::SoluteStorage > * >(argp1); + arg1 = const_cast< cmf::water::SoluteStorage * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::SoluteStorage > * >(argp1); + arg1 = const_cast< cmf::water::SoluteStorage * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + try { + (void)arg1; delete smartarg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *SoluteStorage_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_cmf__water__SoluteStorage_t, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_flux_node_node_id_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::flux_node *arg1 = (cmf::water::flux_node *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::water::flux_node > tempshared1 ; + std::shared_ptr< cmf::water::flux_node > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flux_node_node_id_get" "', argument " "1"" of type '" "cmf::water::flux_node *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); + arg1 = const_cast< cmf::water::flux_node * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); + arg1 = const_cast< cmf::water::flux_node * >((smartarg1 ? smartarg1->get() : 0)); + } + } + result = (int)(int) ((arg1)->node_id); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_flux_node_is_storage(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::flux_node *arg1 = (cmf::water::flux_node *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::water::flux_node const > tempshared1 ; + std::shared_ptr< cmf::water::flux_node const > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + bool result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flux_node_is_storage" "', argument " "1"" of type '" "cmf::water::flux_node const *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::water::flux_node > * >(argp1); + delete reinterpret_cast< std::shared_ptr< const cmf::water::flux_node > * >(argp1); + arg1 = const_cast< cmf::water::flux_node * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::water::flux_node > * >(argp1); + arg1 = const_cast< cmf::water::flux_node * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + try { + result = (bool)((cmf::water::flux_node const *)arg1)->is_storage(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_flux_node_Name_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::flux_node *arg1 = (cmf::water::flux_node *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::water::flux_node > tempshared1 ; + std::shared_ptr< cmf::water::flux_node > *smartarg1 = 0 ; + int res2 = SWIG_OLDOBJ ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"flux_node_Name_set",2,2,swig_obj)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flux_node_Name_set" "', argument " "1"" of type '" "cmf::water::flux_node *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); + arg1 = const_cast< cmf::water::flux_node * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); + arg1 = const_cast< cmf::water::flux_node * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "flux_node_Name_set" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "flux_node_Name_set" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + if (arg1) (arg1)->Name = *arg2; + resultobj = SWIG_Py_Void(); + if (SWIG_IsNewObj(res2)) delete arg2; + return resultobj; +fail: + if (SWIG_IsNewObj(res2)) delete arg2; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_flux_node_Name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::flux_node *arg1 = (cmf::water::flux_node *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::water::flux_node > tempshared1 ; + std::shared_ptr< cmf::water::flux_node > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + std::string *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flux_node_Name_get" "', argument " "1"" of type '" "cmf::water::flux_node *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); + arg1 = const_cast< cmf::water::flux_node * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); + arg1 = const_cast< cmf::water::flux_node * >((smartarg1 ? smartarg1->get() : 0)); + } + } + result = (std::string *) & ((arg1)->Name); + resultobj = SWIG_From_std_string(static_cast< std::string >(*result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_flux_node_to_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::flux_node *arg1 = (cmf::water::flux_node *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::water::flux_node const > tempshared1 ; + std::shared_ptr< cmf::water::flux_node const > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + std::string result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flux_node_to_string" "', argument " "1"" of type '" "cmf::water::flux_node const *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::water::flux_node > * >(argp1); + delete reinterpret_cast< std::shared_ptr< const cmf::water::flux_node > * >(argp1); + arg1 = const_cast< cmf::water::flux_node * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::water::flux_node > * >(argp1); + arg1 = const_cast< cmf::water::flux_node * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + try { + result = ((cmf::water::flux_node const *)arg1)->to_string(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_flux_node(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::flux_node *arg1 = (cmf::water::flux_node *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::water::flux_node > tempshared1 ; + std::shared_ptr< cmf::water::flux_node > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_flux_node" "', argument " "1"" of type '" "cmf::water::flux_node *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); + arg1 = const_cast< cmf::water::flux_node * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); + arg1 = const_cast< cmf::water::flux_node * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + try { + (void)arg1; delete smartarg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_flux_node___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::flux_node *arg1 = (cmf::water::flux_node *) 0 ; + cmf::water::flux_node *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::water::flux_node const > tempshared1 ; + std::shared_ptr< cmf::water::flux_node const > *smartarg1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + std::shared_ptr< cmf::water::flux_node const > tempshared2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "other", NULL + }; + bool result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:flux_node___eq__",kwnames,&obj0,&obj1)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flux_node___eq__" "', argument " "1"" of type '" "cmf::water::flux_node const *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::water::flux_node > * >(argp1); + delete reinterpret_cast< std::shared_ptr< const cmf::water::flux_node > * >(argp1); + arg1 = const_cast< cmf::water::flux_node * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::water::flux_node > * >(argp1); + arg1 = const_cast< cmf::water::flux_node * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + int newmem = 0; + res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "flux_node___eq__" "', argument " "2"" of type '" "cmf::water::flux_node const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "flux_node___eq__" "', argument " "2"" of type '" "cmf::water::flux_node const &""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared2 = *reinterpret_cast< std::shared_ptr< const cmf::water::flux_node > * >(argp2); + delete reinterpret_cast< std::shared_ptr< const cmf::water::flux_node > * >(argp2); + arg2 = const_cast< cmf::water::flux_node * >(tempshared2.get()); + } else { + arg2 = const_cast< cmf::water::flux_node * >(reinterpret_cast< std::shared_ptr< const cmf::water::flux_node > * >(argp2)->get()); + } + } + { + try { + result = (bool)((cmf::water::flux_node const *)arg1)->operator ==((cmf::water::flux_node const &)*arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_flux_node_RecalcFluxes(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::flux_node *arg1 = (cmf::water::flux_node *) 0 ; + cmf::math::Time arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::water::flux_node > tempshared1 ; + std::shared_ptr< cmf::water::flux_node > *smartarg1 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "t", NULL + }; + bool result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:flux_node_RecalcFluxes",kwnames,&obj0,&obj1)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flux_node_RecalcFluxes" "', argument " "1"" of type '" "cmf::water::flux_node *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); + arg1 = const_cast< cmf::water::flux_node * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); + arg1 = const_cast< cmf::water::flux_node * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + arg2 = convert_datetime_to_cmftime(obj1); + if (arg2 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } + } + { + try { + result = (bool)(arg1)->RecalcFluxes(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_flux_node_connection_to(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::flux_node *arg1 = (cmf::water::flux_node *) 0 ; + cmf::water::flux_node *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::water::flux_node > tempshared1 ; + std::shared_ptr< cmf::water::flux_node > *smartarg1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + std::shared_ptr< cmf::water::flux_node const > tempshared2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "target", NULL + }; + cmf::water::flux_connection *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:flux_node_connection_to",kwnames,&obj0,&obj1)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flux_node_connection_to" "', argument " "1"" of type '" "cmf::water::flux_node *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); + arg1 = const_cast< cmf::water::flux_node * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); + arg1 = const_cast< cmf::water::flux_node * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + int newmem = 0; + res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "flux_node_connection_to" "', argument " "2"" of type '" "cmf::water::flux_node const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "flux_node_connection_to" "', argument " "2"" of type '" "cmf::water::flux_node const &""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared2 = *reinterpret_cast< std::shared_ptr< const cmf::water::flux_node > * >(argp2); + delete reinterpret_cast< std::shared_ptr< const cmf::water::flux_node > * >(argp2); + arg2 = const_cast< cmf::water::flux_node * >(tempshared2.get()); + } else { + arg2 = const_cast< cmf::water::flux_node * >(reinterpret_cast< std::shared_ptr< const cmf::water::flux_node > * >(argp2)->get()); + } + } + { + try { + result = (cmf::water::flux_connection *)(arg1)->connection_to((cmf::water::flux_node const &)*arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__water__flux_connection, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_flux_node_remove_connection(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::flux_node *arg1 = (cmf::water::flux_node *) 0 ; + cmf::water::flux_node::ptr arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::water::flux_node > tempshared1 ; + std::shared_ptr< cmf::water::flux_node > *smartarg1 = 0 ; + void *argp2 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "To", NULL + }; + bool result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:flux_node_remove_connection",kwnames,&obj0,&obj1)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flux_node_remove_connection" "', argument " "1"" of type '" "cmf::water::flux_node *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); + arg1 = const_cast< cmf::water::flux_node * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); + arg1 = const_cast< cmf::water::flux_node * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + int newmem = 0; + res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "flux_node_remove_connection" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); + } + if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); + } + { + try { + result = (bool)(arg1)->remove_connection(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_flux_node_flux_to(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::flux_node *arg1 = (cmf::water::flux_node *) 0 ; + cmf::water::flux_node *arg2 = 0 ; + cmf::math::Time arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::water::flux_node > tempshared1 ; + std::shared_ptr< cmf::water::flux_node > *smartarg1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + std::shared_ptr< cmf::water::flux_node const > tempshared2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "target",(char *) "t", NULL + }; + real result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:flux_node_flux_to",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flux_node_flux_to" "', argument " "1"" of type '" "cmf::water::flux_node *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); + arg1 = const_cast< cmf::water::flux_node * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); + arg1 = const_cast< cmf::water::flux_node * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + int newmem = 0; + res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "flux_node_flux_to" "', argument " "2"" of type '" "cmf::water::flux_node const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "flux_node_flux_to" "', argument " "2"" of type '" "cmf::water::flux_node const &""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared2 = *reinterpret_cast< std::shared_ptr< const cmf::water::flux_node > * >(argp2); + delete reinterpret_cast< std::shared_ptr< const cmf::water::flux_node > * >(argp2); + arg2 = const_cast< cmf::water::flux_node * >(tempshared2.get()); + } else { + arg2 = const_cast< cmf::water::flux_node * >(reinterpret_cast< std::shared_ptr< const cmf::water::flux_node > * >(argp2)->get()); + } + } + { + arg3 = convert_datetime_to_cmftime(obj2); + if (arg3 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } + } + { + try { + result = (real)(arg1)->flux_to((cmf::water::flux_node const &)*arg2,arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_flux_node_flux3d_to(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::flux_node *arg1 = (cmf::water::flux_node *) 0 ; + cmf::water::flux_node *arg2 = 0 ; + cmf::math::Time arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::water::flux_node > tempshared1 ; + std::shared_ptr< cmf::water::flux_node > *smartarg1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + std::shared_ptr< cmf::water::flux_node const > tempshared2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "target",(char *) "t", NULL + }; + cmf::geometry::point result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:flux_node_flux3d_to",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flux_node_flux3d_to" "', argument " "1"" of type '" "cmf::water::flux_node *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); + arg1 = const_cast< cmf::water::flux_node * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); + arg1 = const_cast< cmf::water::flux_node * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + int newmem = 0; + res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "flux_node_flux3d_to" "', argument " "2"" of type '" "cmf::water::flux_node const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "flux_node_flux3d_to" "', argument " "2"" of type '" "cmf::water::flux_node const &""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared2 = *reinterpret_cast< std::shared_ptr< const cmf::water::flux_node > * >(argp2); + delete reinterpret_cast< std::shared_ptr< const cmf::water::flux_node > * >(argp2); + arg2 = const_cast< cmf::water::flux_node * >(tempshared2.get()); + } else { + arg2 = const_cast< cmf::water::flux_node * >(reinterpret_cast< std::shared_ptr< const cmf::water::flux_node > * >(argp2)->get()); + } + } + { + arg3 = convert_datetime_to_cmftime(obj2); + if (arg3 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } + } + { + try { + result = (arg1)->flux3d_to((cmf::water::flux_node const &)*arg2,arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj((new cmf::geometry::point(static_cast< const cmf::geometry::point& >(result))), SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_flux_node_get_3d_flux(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::flux_node *arg1 = (cmf::water::flux_node *) 0 ; + cmf::math::Time arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::water::flux_node > tempshared1 ; + std::shared_ptr< cmf::water::flux_node > *smartarg1 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "t", NULL + }; + cmf::geometry::point result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:flux_node_get_3d_flux",kwnames,&obj0,&obj1)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flux_node_get_3d_flux" "', argument " "1"" of type '" "cmf::water::flux_node *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); + arg1 = const_cast< cmf::water::flux_node * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); + arg1 = const_cast< cmf::water::flux_node * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + arg2 = convert_datetime_to_cmftime(obj1); + if (arg2 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } + } + { + try { + result = (arg1)->get_3d_flux(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj((new cmf::geometry::point(static_cast< const cmf::geometry::point& >(result))), SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_flux_node_waterbalance(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::flux_node *arg1 = (cmf::water::flux_node *) 0 ; + cmf::math::Time arg2 ; + cmf::water::flux_connection *arg3 = (cmf::water::flux_connection *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::water::flux_node const > tempshared1 ; + std::shared_ptr< cmf::water::flux_node const > *smartarg1 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "t",(char *) "Without", NULL + }; + real result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:flux_node_waterbalance",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flux_node_waterbalance" "', argument " "1"" of type '" "cmf::water::flux_node const *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::water::flux_node > * >(argp1); + delete reinterpret_cast< std::shared_ptr< const cmf::water::flux_node > * >(argp1); + arg1 = const_cast< cmf::water::flux_node * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::water::flux_node > * >(argp1); + arg1 = const_cast< cmf::water::flux_node * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + arg2 = convert_datetime_to_cmftime(obj1); + if (arg2 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } + } + if (obj2) { + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_cmf__water__flux_connection, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "flux_node_waterbalance" "', argument " "3"" of type '" "cmf::water::flux_connection const *""'"); + } + arg3 = reinterpret_cast< cmf::water::flux_connection * >(argp3); + } + { + try { + result = (real)((cmf::water::flux_node const *)arg1)->waterbalance(arg2,(cmf::water::flux_connection const *)arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_flux_node___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::flux_node *arg1 = (cmf::water::flux_node *) 0 ; + cmf::math::Time arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::water::flux_node const > tempshared1 ; + std::shared_ptr< cmf::water::flux_node const > *smartarg1 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "t", NULL + }; + real result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:flux_node___call__",kwnames,&obj0,&obj1)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flux_node___call__" "', argument " "1"" of type '" "cmf::water::flux_node const *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::water::flux_node > * >(argp1); + delete reinterpret_cast< std::shared_ptr< const cmf::water::flux_node > * >(argp1); + arg1 = const_cast< cmf::water::flux_node * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::water::flux_node > * >(argp1); + arg1 = const_cast< cmf::water::flux_node * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + arg2 = convert_datetime_to_cmftime(obj1); + if (arg2 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } + } + { + try { + result = (real)((cmf::water::flux_node const *)arg1)->operator ()(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_flux_node_conc(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::flux_node *arg1 = (cmf::water::flux_node *) 0 ; + cmf::math::Time arg2 ; + cmf::water::solute *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::water::flux_node const > tempshared1 ; + std::shared_ptr< cmf::water::flux_node const > *smartarg1 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "t",(char *) "Solute", NULL + }; + real result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:flux_node_conc",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flux_node_conc" "', argument " "1"" of type '" "cmf::water::flux_node const *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::water::flux_node > * >(argp1); + delete reinterpret_cast< std::shared_ptr< const cmf::water::flux_node > * >(argp1); + arg1 = const_cast< cmf::water::flux_node * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::water::flux_node > * >(argp1); + arg1 = const_cast< cmf::water::flux_node * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + arg2 = convert_datetime_to_cmftime(obj1); + if (arg2 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } + } + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_cmf__water__solute, 0 | 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "flux_node_conc" "', argument " "3"" of type '" "cmf::water::solute const &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "flux_node_conc" "', argument " "3"" of type '" "cmf::water::solute const &""'"); + } + arg3 = reinterpret_cast< cmf::water::solute * >(argp3); + { + try { + result = (real)((cmf::water::flux_node const *)arg1)->conc(arg2,(cmf::water::solute const &)*arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_flux_node_position_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::flux_node *arg1 = (cmf::water::flux_node *) 0 ; + cmf::geometry::point *arg2 = (cmf::geometry::point *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::water::flux_node > tempshared1 ; + std::shared_ptr< cmf::water::flux_node > *smartarg1 = 0 ; + cmf::geometry::point p2 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"flux_node_position_set",2,2,swig_obj)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flux_node_position_set" "', argument " "1"" of type '" "cmf::water::flux_node *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); + arg1 = const_cast< cmf::water::flux_node * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); + arg1 = const_cast< cmf::water::flux_node * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + if (SWIG_ConvertPtr(swig_obj[1], (void **) &arg2, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { + if (check_xy(swig_obj[1])) { + std::string res = convert_xyz_to_point(swig_obj[1],p2); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + return NULL; + } + } + else if (PySequence_Check(swig_obj[1])) { + std::string res = convert_seq_to_point(swig_obj[1],p2); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError, res.c_str()); + } + } else { + std::string res="<"; + res+=pyrepr(swig_obj[1]); + res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + } + arg2 = &p2; + } + } + if (arg1) (arg1)->position = *arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_flux_node_position_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::flux_node *arg1 = (cmf::water::flux_node *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::water::flux_node > tempshared1 ; + std::shared_ptr< cmf::water::flux_node > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + cmf::geometry::point *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flux_node_position_get" "', argument " "1"" of type '" "cmf::water::flux_node *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); + arg1 = const_cast< cmf::water::flux_node * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); + arg1 = const_cast< cmf::water::flux_node * >((smartarg1 ? smartarg1->get() : 0)); + } + } + result = (cmf::geometry::point *)& ((arg1)->position); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__geometry__point, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_flux_node_is_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::flux_node *arg1 = (cmf::water::flux_node *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::water::flux_node const > tempshared1 ; + std::shared_ptr< cmf::water::flux_node const > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flux_node_is_empty" "', argument " "1"" of type '" "cmf::water::flux_node const *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::water::flux_node > * >(argp1); + delete reinterpret_cast< std::shared_ptr< const cmf::water::flux_node > * >(argp1); + arg1 = const_cast< cmf::water::flux_node * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::water::flux_node > * >(argp1); + arg1 = const_cast< cmf::water::flux_node * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + try { + result = (double)((cmf::water::flux_node const *)arg1)->is_empty(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_flux_node(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::project *arg1 = 0 ; + cmf::geometry::point arg2 = (cmf::geometry::point) cmf::geometry::point() ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "_project",(char *) "location", NULL + }; + cmf::water::flux_node *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:new_flux_node",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_cmf__project, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_flux_node" "', argument " "1"" of type '" "cmf::project &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_flux_node" "', argument " "1"" of type '" "cmf::project &""'"); + } + arg1 = reinterpret_cast< cmf::project * >(argp1); + if (obj1) { + { + if (check_xy(obj1)) { + std::string res = convert_xyz_to_point(obj1,arg2); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + return NULL; + } + } + else if (PySequence_Check(obj1)) { + std::string res = convert_seq_to_point(obj1,arg2); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError, res.c_str()); + } + } else { + std::string res="<"; + res+=pyrepr(obj1); + res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + } + } + } + { + try { + result = (cmf::water::flux_node *)new cmf::water::flux_node(*arg1,arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + std::shared_ptr< cmf::water::flux_node > *smartresult = result ? new std::shared_ptr< cmf::water::flux_node >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0; + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_flux_node_project_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::flux_node *arg1 = (cmf::water::flux_node *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::water::flux_node > tempshared1 ; + std::shared_ptr< cmf::water::flux_node > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + cmf::project *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flux_node_project_get" "', argument " "1"" of type '" "cmf::water::flux_node *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); + arg1 = const_cast< cmf::water::flux_node * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); + arg1 = const_cast< cmf::water::flux_node * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + try { + result = (cmf::project *)cmf_water_flux_node_project_get(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__project, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_flux_node_potential_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::flux_node *arg1 = (cmf::water::flux_node *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::water::flux_node > tempshared1 ; + std::shared_ptr< cmf::water::flux_node > *smartarg1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"flux_node_potential_set",2,2,swig_obj)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flux_node_potential_set" "', argument " "1"" of type '" "cmf::water::flux_node *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); + arg1 = const_cast< cmf::water::flux_node * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); + arg1 = const_cast< cmf::water::flux_node * >((smartarg1 ? smartarg1->get() : 0)); + } + } + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "flux_node_potential_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + { + try { + cmf_water_flux_node_potential_set(arg1,arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_flux_node_potential_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::flux_node *arg1 = (cmf::water::flux_node *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::water::flux_node > tempshared1 ; + std::shared_ptr< cmf::water::flux_node > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flux_node_potential_get" "', argument " "1"" of type '" "cmf::water::flux_node *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); + arg1 = const_cast< cmf::water::flux_node * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); + arg1 = const_cast< cmf::water::flux_node * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + try { + result = (real)cmf_water_flux_node_potential_get(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_flux_node_connections_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::flux_node *arg1 = (cmf::water::flux_node *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::water::flux_node > tempshared1 ; + std::shared_ptr< cmf::water::flux_node > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + cmf::water::connection_list *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flux_node_connections_get" "', argument " "1"" of type '" "cmf::water::flux_node *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); + arg1 = const_cast< cmf::water::flux_node * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); + arg1 = const_cast< cmf::water::flux_node * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + try { + result = (cmf::water::connection_list *)cmf_water_flux_node_connections_get(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + // %typemap(out) cmf::water::connection_vector { + resultobj = PyList_New(result->size()); + for (Py_ssize_t i = 0; i size()); ++i) { + cmf::water::flux_connection* item = (*result)[i].get(); + PyObject* py_item = SWIG_NewPointerObj(item,SWIGTYPE_p_cmf__water__flux_connection,0); + PyList_SetItem(resultobj,i,py_item); + } + delete result; + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *flux_node_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *flux_node_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_count_node_references(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::flux_node::ptr arg1 ; + void *argp1 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + char * kwnames[] = { + (char *) "node", NULL + }; + int result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:count_node_references",kwnames,&obj0)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "count_node_references" "', argument " "1"" of type '" "cmf::water::flux_node::ptr""'"); + } + if (argp1) arg1 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp1)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp1); + } + { + try { + result = (int)cmf::water::count_node_references(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_get_higher_node(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::flux_node::ptr arg1 ; + cmf::water::flux_node::ptr arg2 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "node1",(char *) "node2", NULL + }; + cmf::water::flux_node::ptr result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:get_higher_node",kwnames,&obj0,&obj1)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "get_higher_node" "', argument " "1"" of type '" "cmf::water::flux_node::ptr""'"); + } + if (argp1) arg1 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp1)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp1); + } + { + int newmem = 0; + res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "get_higher_node" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); + } + if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); + } + { + try { + result = cmf::water::get_higher_node(arg1,arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + std::shared_ptr< cmf::water::flux_node > *smartresult = result ? new std::shared_ptr< cmf::water::flux_node >(result) : 0; + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, SWIG_POINTER_OWN); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_get_lower_node(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::flux_node::ptr arg1 ; + cmf::water::flux_node::ptr arg2 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "node1",(char *) "node2", NULL + }; + cmf::water::flux_node::ptr result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:get_lower_node",kwnames,&obj0,&obj1)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "get_lower_node" "', argument " "1"" of type '" "cmf::water::flux_node::ptr""'"); + } + if (argp1) arg1 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp1)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp1); + } + { + int newmem = 0; + res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "get_lower_node" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); + } + if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); + } + { + try { + result = cmf::water::get_lower_node(arg1,arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + std::shared_ptr< cmf::water::flux_node > *smartresult = result ? new std::shared_ptr< cmf::water::flux_node >(result) : 0; + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, SWIG_POINTER_OWN); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_waterbalance_integrator_integration_t(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::waterbalance_integrator *arg1 = (cmf::water::waterbalance_integrator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::water::waterbalance_integrator const > tempshared1 ; + std::shared_ptr< cmf::water::waterbalance_integrator const > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + cmf::math::Time result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__waterbalance_integrator_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "waterbalance_integrator_integration_t" "', argument " "1"" of type '" "cmf::water::waterbalance_integrator const *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::water::waterbalance_integrator > * >(argp1); + delete reinterpret_cast< std::shared_ptr< const cmf::water::waterbalance_integrator > * >(argp1); + arg1 = const_cast< cmf::water::waterbalance_integrator * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::water::waterbalance_integrator > * >(argp1); + arg1 = const_cast< cmf::water::waterbalance_integrator * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + try { + result = ((cmf::water::waterbalance_integrator const *)arg1)->integration_t(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj((new cmf::math::Time(static_cast< const cmf::math::Time& >(result))), SWIGTYPE_p_cmf__math__Time, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_waterbalance_integrator_t0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::waterbalance_integrator *arg1 = (cmf::water::waterbalance_integrator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::water::waterbalance_integrator const > tempshared1 ; + std::shared_ptr< cmf::water::waterbalance_integrator const > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + cmf::math::Time result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__waterbalance_integrator_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "waterbalance_integrator_t0" "', argument " "1"" of type '" "cmf::water::waterbalance_integrator const *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::water::waterbalance_integrator > * >(argp1); + delete reinterpret_cast< std::shared_ptr< const cmf::water::waterbalance_integrator > * >(argp1); + arg1 = const_cast< cmf::water::waterbalance_integrator * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::water::waterbalance_integrator > * >(argp1); + arg1 = const_cast< cmf::water::waterbalance_integrator * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + try { + result = ((cmf::water::waterbalance_integrator const *)arg1)->t0(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj((new cmf::math::Time(static_cast< const cmf::math::Time& >(result))), SWIGTYPE_p_cmf__math__Time, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_waterbalance_integrator___get_node(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::waterbalance_integrator *arg1 = (cmf::water::waterbalance_integrator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::water::waterbalance_integrator const > tempshared1 ; + std::shared_ptr< cmf::water::waterbalance_integrator const > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + cmf::water::flux_node::ptr result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__waterbalance_integrator_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "waterbalance_integrator___get_node" "', argument " "1"" of type '" "cmf::water::waterbalance_integrator const *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::water::waterbalance_integrator > * >(argp1); + delete reinterpret_cast< std::shared_ptr< const cmf::water::waterbalance_integrator > * >(argp1); + arg1 = const_cast< cmf::water::waterbalance_integrator * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::water::waterbalance_integrator > * >(argp1); + arg1 = const_cast< cmf::water::waterbalance_integrator * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + try { + result = ((cmf::water::waterbalance_integrator const *)arg1)->get_node(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + std::shared_ptr< cmf::water::flux_node > *smartresult = result ? new std::shared_ptr< cmf::water::flux_node >(result) : 0; + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, SWIG_POINTER_OWN); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_waterbalance_integrator___set_node(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::waterbalance_integrator *arg1 = (cmf::water::waterbalance_integrator *) 0 ; + cmf::water::flux_node::ptr arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::water::waterbalance_integrator > tempshared1 ; + std::shared_ptr< cmf::water::waterbalance_integrator > *smartarg1 = 0 ; + void *argp2 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "node", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:waterbalance_integrator___set_node",kwnames,&obj0,&obj1)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__waterbalance_integrator_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "waterbalance_integrator___set_node" "', argument " "1"" of type '" "cmf::water::waterbalance_integrator *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::waterbalance_integrator > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::water::waterbalance_integrator > * >(argp1); + arg1 = const_cast< cmf::water::waterbalance_integrator * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::waterbalance_integrator > * >(argp1); + arg1 = const_cast< cmf::water::waterbalance_integrator * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + int newmem = 0; + res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "waterbalance_integrator___set_node" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); + } + if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); + } + { + try { + (arg1)->set_node(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_waterbalance_integrator(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::flux_node::ptr arg1 ; + void *argp1 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + char * kwnames[] = { + (char *) "node", NULL + }; + cmf::water::waterbalance_integrator *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:new_waterbalance_integrator",kwnames,&obj0)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_waterbalance_integrator" "', argument " "1"" of type '" "cmf::water::flux_node::ptr""'"); + } + if (argp1) arg1 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp1)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp1); + } + { + try { + result = (cmf::water::waterbalance_integrator *)new cmf::water::waterbalance_integrator(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + std::shared_ptr< cmf::water::waterbalance_integrator > *smartresult = result ? new std::shared_ptr< cmf::water::waterbalance_integrator >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0; + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__water__waterbalance_integrator_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_waterbalance_integrator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::waterbalance_integrator *arg1 = (cmf::water::waterbalance_integrator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::water::waterbalance_integrator > tempshared1 ; + std::shared_ptr< cmf::water::waterbalance_integrator > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__waterbalance_integrator_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_waterbalance_integrator" "', argument " "1"" of type '" "cmf::water::waterbalance_integrator *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::waterbalance_integrator > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::water::waterbalance_integrator > * >(argp1); + arg1 = const_cast< cmf::water::waterbalance_integrator * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::waterbalance_integrator > * >(argp1); + arg1 = const_cast< cmf::water::waterbalance_integrator * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + try { + (void)arg1; delete smartarg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *waterbalance_integrator_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_cmf__water__waterbalance_integrator_t, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *waterbalance_integrator_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_flux_connection_left_node(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::flux_connection *arg1 = (cmf::water::flux_connection *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::water::flux_node::ptr result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__flux_connection, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flux_connection_left_node" "', argument " "1"" of type '" "cmf::water::flux_connection const *""'"); + } + arg1 = reinterpret_cast< cmf::water::flux_connection * >(argp1); + { + try { + result = ((cmf::water::flux_connection const *)arg1)->left_node(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + std::shared_ptr< cmf::water::flux_node > *smartresult = result ? new std::shared_ptr< cmf::water::flux_node >(result) : 0; + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, SWIG_POINTER_OWN); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_flux_connection_right_node(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::flux_connection *arg1 = (cmf::water::flux_connection *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::water::flux_node::ptr result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__flux_connection, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flux_connection_right_node" "', argument " "1"" of type '" "cmf::water::flux_connection const *""'"); + } + arg1 = reinterpret_cast< cmf::water::flux_connection * >(argp1); + { + try { + result = ((cmf::water::flux_connection const *)arg1)->right_node(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + std::shared_ptr< cmf::water::flux_node > *smartresult = result ? new std::shared_ptr< cmf::water::flux_node >(result) : 0; + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, SWIG_POINTER_OWN); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_flux_connection_kill_me(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::flux_connection *arg1 = (cmf::water::flux_connection *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + bool result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__flux_connection, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flux_connection_kill_me" "', argument " "1"" of type '" "cmf::water::flux_connection *""'"); + } + arg1 = reinterpret_cast< cmf::water::flux_connection * >(argp1); + { + try { + result = (bool)(arg1)->kill_me(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_flux_connection_refresh(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::flux_connection *arg1 = (cmf::water::flux_connection *) 0 ; + cmf::math::Time arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "t", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:flux_connection_refresh",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__flux_connection, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flux_connection_refresh" "', argument " "1"" of type '" "cmf::water::flux_connection *""'"); + } + arg1 = reinterpret_cast< cmf::water::flux_connection * >(argp1); + { + arg2 = convert_datetime_to_cmftime(obj1); + if (arg2 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } + } + { + try { + (arg1)->refresh(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_flux_connection_connection_id_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::flux_connection *arg1 = (cmf::water::flux_connection *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__flux_connection, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flux_connection_connection_id_get" "', argument " "1"" of type '" "cmf::water::flux_connection *""'"); + } + arg1 = reinterpret_cast< cmf::water::flux_connection * >(argp1); + result = (int)(int) ((arg1)->connection_id); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_flux_connection___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::flux_connection *arg1 = (cmf::water::flux_connection *) 0 ; + cmf::water::flux_connection *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "other", NULL + }; + bool result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:flux_connection___eq__",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__flux_connection, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flux_connection___eq__" "', argument " "1"" of type '" "cmf::water::flux_connection *""'"); + } + arg1 = reinterpret_cast< cmf::water::flux_connection * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_cmf__water__flux_connection, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "flux_connection___eq__" "', argument " "2"" of type '" "cmf::water::flux_connection const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "flux_connection___eq__" "', argument " "2"" of type '" "cmf::water::flux_connection const &""'"); + } + arg2 = reinterpret_cast< cmf::water::flux_connection * >(argp2); + { + try { + result = (bool)(arg1)->operator ==((cmf::water::flux_connection const &)*arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_flux_connection_get_target__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::water::flux_connection *arg1 = (cmf::water::flux_connection *) 0 ; + cmf::water::flux_node *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + std::shared_ptr< cmf::water::flux_node const > tempshared2 ; + cmf::water::flux_node::ptr result; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__flux_connection, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flux_connection_get_target" "', argument " "1"" of type '" "cmf::water::flux_connection *""'"); + } + arg1 = reinterpret_cast< cmf::water::flux_connection * >(argp1); + { + int newmem = 0; + res2 = SWIG_ConvertPtrAndOwn(swig_obj[1], &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "flux_connection_get_target" "', argument " "2"" of type '" "cmf::water::flux_node const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "flux_connection_get_target" "', argument " "2"" of type '" "cmf::water::flux_node const &""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared2 = *reinterpret_cast< std::shared_ptr< const cmf::water::flux_node > * >(argp2); + delete reinterpret_cast< std::shared_ptr< const cmf::water::flux_node > * >(argp2); + arg2 = const_cast< cmf::water::flux_node * >(tempshared2.get()); + } else { + arg2 = const_cast< cmf::water::flux_node * >(reinterpret_cast< std::shared_ptr< const cmf::water::flux_node > * >(argp2)->get()); + } + } + { + try { + result = (arg1)->get_target((cmf::water::flux_node const &)*arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + if (!(result)) resultobj = SWIG_NewPointerObj(0,SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, SWIG_POINTER_OWN); + int dcast = 0; + /*@SWIG:/usr/share/swig/3.0.12/typemaps/swigmacros.swg,200,%formacro@*//*@SWIG:/usr/share/swig/3.0.12/typemaps/swigmacros.swg,192,%_formacro_1@*//*@SWIG:cmf/cmf_core_src/cmf_swiglib.i,74,%_node_down_cast@*/ + if (dcast==0 && result) /*check for cmf::atmosphere::RainSource*/ { + std::shared_ptr output = std::dynamic_pointer_cast(result); + if (output) /*flux_node is cmf::atmosphere::RainSource */ { + dcast=1; + resultobj = SWIG_NewPointerObj(new std::shared_ptr(output),SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__RainSource_t, SWIG_POINTER_OWN); + } + } + /*@SWIG@*/ + + /*@SWIG:/usr/share/swig/3.0.12/typemaps/swigmacros.swg,192,%_formacro_1@*//*@SWIG:cmf/cmf_core_src/cmf_swiglib.i,74,%_node_down_cast@*/ + if (dcast==0 && result) /*check for cmf::water::DirichletBoundary*/ { + std::shared_ptr output = std::dynamic_pointer_cast(result); + if (output) /*flux_node is cmf::water::DirichletBoundary */ { + dcast=1; + resultobj = SWIG_NewPointerObj(new std::shared_ptr(output),SWIGTYPE_p_std__shared_ptrT_cmf__water__DirichletBoundary_t, SWIG_POINTER_OWN); + } + } + /*@SWIG@*/ + + /*@SWIG:/usr/share/swig/3.0.12/typemaps/swigmacros.swg,192,%_formacro_1@*//*@SWIG:cmf/cmf_core_src/cmf_swiglib.i,74,%_node_down_cast@*/ + if (dcast==0 && result) /*check for cmf::water::NeumannBoundary*/ { + std::shared_ptr output = std::dynamic_pointer_cast(result); + if (output) /*flux_node is cmf::water::NeumannBoundary */ { + dcast=1; + resultobj = SWIG_NewPointerObj(new std::shared_ptr(output),SWIGTYPE_p_std__shared_ptrT_cmf__water__NeumannBoundary_t, SWIG_POINTER_OWN); + } + } + /*@SWIG@*/ + + /*@SWIG:/usr/share/swig/3.0.12/typemaps/swigmacros.swg,192,%_formacro_1@*//*@SWIG:cmf/cmf_core_src/cmf_swiglib.i,74,%_node_down_cast@*/ + if (dcast==0 && result) /*check for cmf::upslope::SoilLayer*/ { + std::shared_ptr output = std::dynamic_pointer_cast(result); + if (output) /*flux_node is cmf::upslope::SoilLayer */ { + dcast=1; + resultobj = SWIG_NewPointerObj(new std::shared_ptr(output),SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, SWIG_POINTER_OWN); + } + } + /*@SWIG@*/ + + /*@SWIG:/usr/share/swig/3.0.12/typemaps/swigmacros.swg,192,%_formacro_1@*//*@SWIG:cmf/cmf_core_src/cmf_swiglib.i,74,%_node_down_cast@*/ + if (dcast==0 && result) /*check for cmf::upslope::aquifer*/ { + std::shared_ptr output = std::dynamic_pointer_cast(result); + if (output) /*flux_node is cmf::upslope::aquifer */ { + dcast=1; + resultobj = SWIG_NewPointerObj(new std::shared_ptr(output),SWIGTYPE_p_std__shared_ptrT_cmf__upslope__aquifer_t, SWIG_POINTER_OWN); + } + } + /*@SWIG@*/ + + /*@SWIG:/usr/share/swig/3.0.12/typemaps/swigmacros.swg,192,%_formacro_1@*//*@SWIG:cmf/cmf_core_src/cmf_swiglib.i,74,%_node_down_cast@*/ + if (dcast==0 && result) /*check for cmf::river::Reach*/ { + std::shared_ptr output = std::dynamic_pointer_cast(result); + if (output) /*flux_node is cmf::river::Reach */ { + dcast=1; + resultobj = SWIG_NewPointerObj(new std::shared_ptr(output),SWIGTYPE_p_std__shared_ptrT_cmf__river__Reach_t, SWIG_POINTER_OWN); + } + } + /*@SWIG@*/ + + /*@SWIG:/usr/share/swig/3.0.12/typemaps/swigmacros.swg,192,%_formacro_1@*//*@SWIG:cmf/cmf_core_src/cmf_swiglib.i,74,%_node_down_cast@*/ + if (dcast==0 && result) /*check for cmf::river::OpenWaterStorage*/ { + std::shared_ptr output = std::dynamic_pointer_cast(result); + if (output) /*flux_node is cmf::river::OpenWaterStorage */ { + dcast=1; + resultobj = SWIG_NewPointerObj(new std::shared_ptr(output),SWIGTYPE_p_std__shared_ptrT_cmf__river__OpenWaterStorage_t, SWIG_POINTER_OWN); + } + } + /*@SWIG@*/ + + /*@SWIG:/usr/share/swig/3.0.12/typemaps/swigmacros.swg,192,%_formacro_1@*//*@SWIG:cmf/cmf_core_src/cmf_swiglib.i,74,%_node_down_cast@*/ + if (dcast==0 && result) /*check for cmf::water::WaterStorage*/ { + std::shared_ptr output = std::dynamic_pointer_cast(result); + if (output) /*flux_node is cmf::water::WaterStorage */ { + dcast=1; + resultobj = SWIG_NewPointerObj(new std::shared_ptr(output),SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, SWIG_POINTER_OWN); + } + } + /*@SWIG@*/ + + /*@SWIG:/usr/share/swig/3.0.12/typemaps/swigmacros.swg,192,%_formacro_1@*//*@SWIG:cmf/cmf_core_src/cmf_swiglib.i,74,%_node_down_cast@*/ + if (dcast==0 && result) /*check for cmf::upslope::MacroPore*/ { + std::shared_ptr output = std::dynamic_pointer_cast(result); + if (output) /*flux_node is cmf::upslope::MacroPore */ { + dcast=1; + resultobj = SWIG_NewPointerObj(new std::shared_ptr(output),SWIGTYPE_p_std__shared_ptrT_cmf__upslope__MacroPore_t, SWIG_POINTER_OWN); + } + } + /*@SWIG@*/ + + /*@SWIG:/usr/share/swig/3.0.12/typemaps/swigmacros.swg,192,%_formacro_1@*//*@SWIG:cmf/cmf_core_src/cmf_swiglib.i,74,%_node_down_cast@*/ + if (dcast==0 && result) /*check for cmf::upslope::SurfaceWater*/ { + std::shared_ptr output = std::dynamic_pointer_cast(result); + if (output) /*flux_node is cmf::upslope::SurfaceWater */ { + dcast=1; + resultobj = SWIG_NewPointerObj(new std::shared_ptr(output),SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SurfaceWater_t, SWIG_POINTER_OWN); + } + } + /*@SWIG@*/ + + + + /*@SWIG@*/ + + /*@SWIG@*/ + + /*@SWIG@*/ + + /*@SWIG@*/ + + /*@SWIG@*/ + + /*@SWIG@*/ + + /*@SWIG@*/ + + /*@SWIG@*/ + + /*@SWIG@*/ + + /*@SWIG@*//*@SWIG@*/ + if (!dcast) resultobj = SWIG_NewPointerObj(new std::shared_ptr(result),SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, SWIG_POINTER_OWN); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_flux_connection_get_target__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::water::flux_connection *arg1 = (cmf::water::flux_connection *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + cmf::water::flux_node::ptr result; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__flux_connection, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flux_connection_get_target" "', argument " "1"" of type '" "cmf::water::flux_connection const *""'"); + } + arg1 = reinterpret_cast< cmf::water::flux_connection * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "flux_connection_get_target" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + { + try { + result = ((cmf::water::flux_connection const *)arg1)->get_target(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + if (!(result)) resultobj = SWIG_NewPointerObj(0,SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, SWIG_POINTER_OWN); + int dcast = 0; + /*@SWIG:/usr/share/swig/3.0.12/typemaps/swigmacros.swg,200,%formacro@*//*@SWIG:/usr/share/swig/3.0.12/typemaps/swigmacros.swg,192,%_formacro_1@*//*@SWIG:cmf/cmf_core_src/cmf_swiglib.i,74,%_node_down_cast@*/ + if (dcast==0 && result) /*check for cmf::atmosphere::RainSource*/ { + std::shared_ptr output = std::dynamic_pointer_cast(result); + if (output) /*flux_node is cmf::atmosphere::RainSource */ { + dcast=1; + resultobj = SWIG_NewPointerObj(new std::shared_ptr(output),SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__RainSource_t, SWIG_POINTER_OWN); + } + } + /*@SWIG@*/ + + /*@SWIG:/usr/share/swig/3.0.12/typemaps/swigmacros.swg,192,%_formacro_1@*//*@SWIG:cmf/cmf_core_src/cmf_swiglib.i,74,%_node_down_cast@*/ + if (dcast==0 && result) /*check for cmf::water::DirichletBoundary*/ { + std::shared_ptr output = std::dynamic_pointer_cast(result); + if (output) /*flux_node is cmf::water::DirichletBoundary */ { + dcast=1; + resultobj = SWIG_NewPointerObj(new std::shared_ptr(output),SWIGTYPE_p_std__shared_ptrT_cmf__water__DirichletBoundary_t, SWIG_POINTER_OWN); + } + } + /*@SWIG@*/ + + /*@SWIG:/usr/share/swig/3.0.12/typemaps/swigmacros.swg,192,%_formacro_1@*//*@SWIG:cmf/cmf_core_src/cmf_swiglib.i,74,%_node_down_cast@*/ + if (dcast==0 && result) /*check for cmf::water::NeumannBoundary*/ { + std::shared_ptr output = std::dynamic_pointer_cast(result); + if (output) /*flux_node is cmf::water::NeumannBoundary */ { + dcast=1; + resultobj = SWIG_NewPointerObj(new std::shared_ptr(output),SWIGTYPE_p_std__shared_ptrT_cmf__water__NeumannBoundary_t, SWIG_POINTER_OWN); + } + } + /*@SWIG@*/ + + /*@SWIG:/usr/share/swig/3.0.12/typemaps/swigmacros.swg,192,%_formacro_1@*//*@SWIG:cmf/cmf_core_src/cmf_swiglib.i,74,%_node_down_cast@*/ + if (dcast==0 && result) /*check for cmf::upslope::SoilLayer*/ { + std::shared_ptr output = std::dynamic_pointer_cast(result); + if (output) /*flux_node is cmf::upslope::SoilLayer */ { + dcast=1; + resultobj = SWIG_NewPointerObj(new std::shared_ptr(output),SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, SWIG_POINTER_OWN); + } + } + /*@SWIG@*/ + + /*@SWIG:/usr/share/swig/3.0.12/typemaps/swigmacros.swg,192,%_formacro_1@*//*@SWIG:cmf/cmf_core_src/cmf_swiglib.i,74,%_node_down_cast@*/ + if (dcast==0 && result) /*check for cmf::upslope::aquifer*/ { + std::shared_ptr output = std::dynamic_pointer_cast(result); + if (output) /*flux_node is cmf::upslope::aquifer */ { + dcast=1; + resultobj = SWIG_NewPointerObj(new std::shared_ptr(output),SWIGTYPE_p_std__shared_ptrT_cmf__upslope__aquifer_t, SWIG_POINTER_OWN); + } + } + /*@SWIG@*/ + + /*@SWIG:/usr/share/swig/3.0.12/typemaps/swigmacros.swg,192,%_formacro_1@*//*@SWIG:cmf/cmf_core_src/cmf_swiglib.i,74,%_node_down_cast@*/ + if (dcast==0 && result) /*check for cmf::river::Reach*/ { + std::shared_ptr output = std::dynamic_pointer_cast(result); + if (output) /*flux_node is cmf::river::Reach */ { + dcast=1; + resultobj = SWIG_NewPointerObj(new std::shared_ptr(output),SWIGTYPE_p_std__shared_ptrT_cmf__river__Reach_t, SWIG_POINTER_OWN); + } + } + /*@SWIG@*/ + + /*@SWIG:/usr/share/swig/3.0.12/typemaps/swigmacros.swg,192,%_formacro_1@*//*@SWIG:cmf/cmf_core_src/cmf_swiglib.i,74,%_node_down_cast@*/ + if (dcast==0 && result) /*check for cmf::river::OpenWaterStorage*/ { + std::shared_ptr output = std::dynamic_pointer_cast(result); + if (output) /*flux_node is cmf::river::OpenWaterStorage */ { + dcast=1; + resultobj = SWIG_NewPointerObj(new std::shared_ptr(output),SWIGTYPE_p_std__shared_ptrT_cmf__river__OpenWaterStorage_t, SWIG_POINTER_OWN); + } + } + /*@SWIG@*/ + + /*@SWIG:/usr/share/swig/3.0.12/typemaps/swigmacros.swg,192,%_formacro_1@*//*@SWIG:cmf/cmf_core_src/cmf_swiglib.i,74,%_node_down_cast@*/ + if (dcast==0 && result) /*check for cmf::water::WaterStorage*/ { + std::shared_ptr output = std::dynamic_pointer_cast(result); + if (output) /*flux_node is cmf::water::WaterStorage */ { + dcast=1; + resultobj = SWIG_NewPointerObj(new std::shared_ptr(output),SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, SWIG_POINTER_OWN); + } + } + /*@SWIG@*/ + + /*@SWIG:/usr/share/swig/3.0.12/typemaps/swigmacros.swg,192,%_formacro_1@*//*@SWIG:cmf/cmf_core_src/cmf_swiglib.i,74,%_node_down_cast@*/ + if (dcast==0 && result) /*check for cmf::upslope::MacroPore*/ { + std::shared_ptr output = std::dynamic_pointer_cast(result); + if (output) /*flux_node is cmf::upslope::MacroPore */ { + dcast=1; + resultobj = SWIG_NewPointerObj(new std::shared_ptr(output),SWIGTYPE_p_std__shared_ptrT_cmf__upslope__MacroPore_t, SWIG_POINTER_OWN); + } + } + /*@SWIG@*/ + + /*@SWIG:/usr/share/swig/3.0.12/typemaps/swigmacros.swg,192,%_formacro_1@*//*@SWIG:cmf/cmf_core_src/cmf_swiglib.i,74,%_node_down_cast@*/ + if (dcast==0 && result) /*check for cmf::upslope::SurfaceWater*/ { + std::shared_ptr output = std::dynamic_pointer_cast(result); + if (output) /*flux_node is cmf::upslope::SurfaceWater */ { + dcast=1; + resultobj = SWIG_NewPointerObj(new std::shared_ptr(output),SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SurfaceWater_t, SWIG_POINTER_OWN); + } + } + /*@SWIG@*/ + + + + /*@SWIG@*/ + + /*@SWIG@*/ + + /*@SWIG@*/ + + /*@SWIG@*/ + + /*@SWIG@*/ + + /*@SWIG@*/ + + /*@SWIG@*/ + + /*@SWIG@*/ + + /*@SWIG@*/ + + /*@SWIG@*//*@SWIG@*/ + if (!dcast) resultobj = SWIG_NewPointerObj(new std::shared_ptr(result),SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, SWIG_POINTER_OWN); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_flux_connection_get_target(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"flux_connection_get_target",0,2,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__water__flux_connection, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__water__flux_connection, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_int(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_flux_connection_get_target__SWIG_0(self, argc, argv); + case 2: + return _wrap_flux_connection_get_target__SWIG_1(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'flux_connection_get_target'.\n" + " Possible C/C++ prototypes are:\n" + " cmf::water::flux_connection::get_target(cmf::water::flux_node const &)\n" + " cmf::water::flux_connection::get_target(int) const\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_flux_connection_exchange_target(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::flux_connection *arg1 = (cmf::water::flux_connection *) 0 ; + cmf::water::flux_node::ptr arg2 ; + cmf::water::flux_node::ptr arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + void *argp3 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "oldtarget",(char *) "newTarget", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:flux_connection_exchange_target",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__flux_connection, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flux_connection_exchange_target" "', argument " "1"" of type '" "cmf::water::flux_connection *""'"); + } + arg1 = reinterpret_cast< cmf::water::flux_connection * >(argp1); + { + int newmem = 0; + res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "flux_connection_exchange_target" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); + } + if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); + } + { + int newmem = 0; + res3 = SWIG_ConvertPtrAndOwn(obj2, &argp3, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "flux_connection_exchange_target" "', argument " "3"" of type '" "cmf::water::flux_node::ptr""'"); + } + if (argp3) arg3 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp3)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp3); + } + { + try { + (arg1)->exchange_target(arg2,arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_flux_connection_q(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::flux_connection *arg1 = (cmf::water::flux_connection *) 0 ; + cmf::water::flux_node *arg2 = 0 ; + cmf::math::Time arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + std::shared_ptr< cmf::water::flux_node const > tempshared2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "inquirer",(char *) "t", NULL + }; + real result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:flux_connection_q",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__flux_connection, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flux_connection_q" "', argument " "1"" of type '" "cmf::water::flux_connection *""'"); + } + arg1 = reinterpret_cast< cmf::water::flux_connection * >(argp1); + { + int newmem = 0; + res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "flux_connection_q" "', argument " "2"" of type '" "cmf::water::flux_node const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "flux_connection_q" "', argument " "2"" of type '" "cmf::water::flux_node const &""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared2 = *reinterpret_cast< std::shared_ptr< const cmf::water::flux_node > * >(argp2); + delete reinterpret_cast< std::shared_ptr< const cmf::water::flux_node > * >(argp2); + arg2 = const_cast< cmf::water::flux_node * >(tempshared2.get()); + } else { + arg2 = const_cast< cmf::water::flux_node * >(reinterpret_cast< std::shared_ptr< const cmf::water::flux_node > * >(argp2)->get()); + } + } + { + arg3 = convert_datetime_to_cmftime(obj2); + if (arg3 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } + } + { + try { + result = (real)(arg1)->q((cmf::water::flux_node const &)*arg2,arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_flux_connection_conc(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::flux_connection *arg1 = (cmf::water::flux_connection *) 0 ; + cmf::math::Time arg2 ; + cmf::water::solute *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "t",(char *) "_Solute", NULL + }; + real result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:flux_connection_conc",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__flux_connection, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flux_connection_conc" "', argument " "1"" of type '" "cmf::water::flux_connection *""'"); + } + arg1 = reinterpret_cast< cmf::water::flux_connection * >(argp1); + { + arg2 = convert_datetime_to_cmftime(obj1); + if (arg2 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } + } + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_cmf__water__solute, 0 | 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "flux_connection_conc" "', argument " "3"" of type '" "cmf::water::solute const &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "flux_connection_conc" "', argument " "3"" of type '" "cmf::water::solute const &""'"); + } + arg3 = reinterpret_cast< cmf::water::solute * >(argp3); + { + try { + result = (real)(arg1)->conc(arg2,(cmf::water::solute const &)*arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_flux_connection_type_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::flux_connection *arg1 = (cmf::water::flux_connection *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::string *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__flux_connection, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flux_connection_type_get" "', argument " "1"" of type '" "cmf::water::flux_connection *""'"); + } + arg1 = reinterpret_cast< cmf::water::flux_connection * >(argp1); + result = (std::string *) & ((arg1)->type); + resultobj = SWIG_From_std_string(static_cast< std::string >(*result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_flux_connection_get_tracer_filter__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::water::flux_connection *arg1 = (cmf::water::flux_connection *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + real result; + + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__flux_connection, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flux_connection_get_tracer_filter" "', argument " "1"" of type '" "cmf::water::flux_connection *""'"); + } + arg1 = reinterpret_cast< cmf::water::flux_connection * >(argp1); + { + try { + result = (real)(arg1)->get_tracer_filter(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_flux_connection_get_tracer_filter__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::water::flux_connection *arg1 = (cmf::water::flux_connection *) 0 ; + SwigValueWrapper< cmf::water::solute > arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + real result; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__flux_connection, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flux_connection_get_tracer_filter" "', argument " "1"" of type '" "cmf::water::flux_connection *""'"); + } + arg1 = reinterpret_cast< cmf::water::flux_connection * >(argp1); + { + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_cmf__water__solute, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "flux_connection_get_tracer_filter" "', argument " "2"" of type '" "cmf::water::solute""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "flux_connection_get_tracer_filter" "', argument " "2"" of type '" "cmf::water::solute""'"); + } else { + cmf::water::solute * temp = reinterpret_cast< cmf::water::solute * >(argp2); + arg2 = *temp; + if (SWIG_IsNewObj(res2)) delete temp; + } + } + { + try { + result = (real)(arg1)->get_tracer_filter(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_flux_connection_get_tracer_filter(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"flux_connection_get_tracer_filter",0,2,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__water__flux_connection, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__water__flux_connection, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_cmf__water__solute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_flux_connection_get_tracer_filter__SWIG_0(self, argc, argv); + case 2: + return _wrap_flux_connection_get_tracer_filter__SWIG_1(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'flux_connection_get_tracer_filter'.\n" + " Possible C/C++ prototypes are:\n" + " cmf::water::flux_connection::get_tracer_filter()\n" + " cmf::water::flux_connection::get_tracer_filter(cmf::water::solute)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_flux_connection_set_tracer_filter__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::water::flux_connection *arg1 = (cmf::water::flux_connection *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__flux_connection, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flux_connection_set_tracer_filter" "', argument " "1"" of type '" "cmf::water::flux_connection *""'"); + } + arg1 = reinterpret_cast< cmf::water::flux_connection * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "flux_connection_set_tracer_filter" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + { + try { + (arg1)->set_tracer_filter(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_flux_connection_set_tracer_filter__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::water::flux_connection *arg1 = (cmf::water::flux_connection *) 0 ; + SwigValueWrapper< cmf::water::solute > arg2 ; + real arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + double val3 ; + int ecode3 = 0 ; + + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__flux_connection, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flux_connection_set_tracer_filter" "', argument " "1"" of type '" "cmf::water::flux_connection *""'"); + } + arg1 = reinterpret_cast< cmf::water::flux_connection * >(argp1); + { + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_cmf__water__solute, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "flux_connection_set_tracer_filter" "', argument " "2"" of type '" "cmf::water::solute""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "flux_connection_set_tracer_filter" "', argument " "2"" of type '" "cmf::water::solute""'"); + } else { + cmf::water::solute * temp = reinterpret_cast< cmf::water::solute * >(argp2); + arg2 = *temp; + if (SWIG_IsNewObj(res2)) delete temp; + } + } + ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "flux_connection_set_tracer_filter" "', argument " "3"" of type '" "real""'"); + } + arg3 = static_cast< real >(val3); + { + try { + (arg1)->set_tracer_filter(arg2,arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_flux_connection_set_tracer_filter(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[4] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"flux_connection_set_tracer_filter",0,3,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__water__flux_connection, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_double(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__water__flux_connection, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_cmf__water__solute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_double(argv[2], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_flux_connection_set_tracer_filter__SWIG_0(self, argc, argv); + case 2: + return _wrap_flux_connection_set_tracer_filter__SWIG_1(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'flux_connection_set_tracer_filter'.\n" + " Possible C/C++ prototypes are:\n" + " cmf::water::flux_connection::set_tracer_filter(real)\n" + " cmf::water::flux_connection::set_tracer_filter(cmf::water::solute,real)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_flux_connection_to_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::flux_connection *arg1 = (cmf::water::flux_connection *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::string result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__flux_connection, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flux_connection_to_string" "', argument " "1"" of type '" "cmf::water::flux_connection const *""'"); + } + arg1 = reinterpret_cast< cmf::water::flux_connection * >(argp1); + { + try { + result = ((cmf::water::flux_connection const *)arg1)->to_string(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_flux_connection_short_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::flux_connection *arg1 = (cmf::water::flux_connection *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::string result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__flux_connection, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flux_connection_short_string" "', argument " "1"" of type '" "cmf::water::flux_connection const *""'"); + } + arg1 = reinterpret_cast< cmf::water::flux_connection * >(argp1); + { + try { + result = ((cmf::water::flux_connection const *)arg1)->short_string(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_flux_connection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::flux_connection *arg1 = (cmf::water::flux_connection *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__flux_connection, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_flux_connection" "', argument " "1"" of type '" "cmf::water::flux_connection *""'"); + } + arg1 = reinterpret_cast< cmf::water::flux_connection * >(argp1); + { + try { + + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *flux_connection_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__water__flux_connection, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_replace_node(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::flux_node::ptr arg1 ; + cmf::water::flux_node::ptr arg2 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "oldnode",(char *) "newnode", NULL + }; + int result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:replace_node",kwnames,&obj0,&obj1)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "replace_node" "', argument " "1"" of type '" "cmf::water::flux_node::ptr""'"); + } + if (argp1) arg1 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp1)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp1); + } + { + int newmem = 0; + res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "replace_node" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); + } + if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); + } + { + try { + result = (int)cmf::water::replace_node(arg1,arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_connection_list_append(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::connection_list *arg1 = (cmf::water::connection_list *) 0 ; + SwigValueWrapper< std::shared_ptr< cmf::water::flux_connection > > arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "connection", NULL + }; + bool result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:connection_list_append",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__connection_list, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "connection_list_append" "', argument " "1"" of type '" "cmf::water::connection_list *""'"); + } + arg1 = reinterpret_cast< cmf::water::connection_list * >(argp1); + { + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_connection_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "connection_list_append" "', argument " "2"" of type '" "cmf::water::flux_connection::ptr""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "connection_list_append" "', argument " "2"" of type '" "cmf::water::flux_connection::ptr""'"); + } else { + cmf::water::flux_connection::ptr * temp = reinterpret_cast< cmf::water::flux_connection::ptr * >(argp2); + arg2 = *temp; + if (SWIG_IsNewObj(res2)) delete temp; + } + } + { + try { + result = (bool)(arg1)->append(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_connection_list_extend(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::connection_list *arg1 = (cmf::water::connection_list *) 0 ; + cmf::water::connection_list *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + cmf::water::connection_list temp_list2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "connections", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:connection_list_extend",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__connection_list, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "connection_list_extend" "', argument " "1"" of type '" "cmf::water::connection_list *""'"); + } + arg1 = reinterpret_cast< cmf::water::connection_list * >(argp1); + { + if (SWIG_ConvertPtr(obj1, (void **) &arg2, SWIGTYPE_p_cmf__water__connection_list, SWIG_POINTER_EXCEPTION) == -1) { + int res = iterable_to_list(obj1,SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_connection_t, temp_list2); + if (SWIG_IsOK(res)) { + arg2 = &temp_list2; + } else { + SWIG_exception_fail(SWIG_TypeError,"Only iterables can be converted to cmf::water::connection_list"); + } + } + } + { + try { + (arg1)->extend((cmf::water::connection_list const &)*arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_connection_list_contains(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::connection_list *arg1 = (cmf::water::connection_list *) 0 ; + SwigValueWrapper< std::shared_ptr< cmf::water::flux_connection > > arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "connection", NULL + }; + bool result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:connection_list_contains",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__connection_list, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "connection_list_contains" "', argument " "1"" of type '" "cmf::water::connection_list const *""'"); + } + arg1 = reinterpret_cast< cmf::water::connection_list * >(argp1); + { + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_connection_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "connection_list_contains" "', argument " "2"" of type '" "cmf::water::flux_connection::ptr""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "connection_list_contains" "', argument " "2"" of type '" "cmf::water::flux_connection::ptr""'"); + } else { + cmf::water::flux_connection::ptr * temp = reinterpret_cast< cmf::water::flux_connection::ptr * >(argp2); + arg2 = *temp; + if (SWIG_IsNewObj(res2)) delete temp; + } + } + { + try { + result = (bool)((cmf::water::connection_list const *)arg1)->contains(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_connection_list_remove(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::connection_list *arg1 = (cmf::water::connection_list *) 0 ; + SwigValueWrapper< std::shared_ptr< cmf::water::flux_connection > > arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "connection", NULL + }; + bool result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:connection_list_remove",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__connection_list, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "connection_list_remove" "', argument " "1"" of type '" "cmf::water::connection_list *""'"); + } + arg1 = reinterpret_cast< cmf::water::connection_list * >(argp1); + { + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_connection_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "connection_list_remove" "', argument " "2"" of type '" "cmf::water::flux_connection::ptr""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "connection_list_remove" "', argument " "2"" of type '" "cmf::water::flux_connection::ptr""'"); + } else { + cmf::water::flux_connection::ptr * temp = reinterpret_cast< cmf::water::flux_connection::ptr * >(argp2); + arg2 = *temp; + if (SWIG_IsNewObj(res2)) delete temp; + } + } + { + try { + result = (bool)(arg1)->remove(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_connection_list_do_action(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::connection_list *arg1 = (cmf::water::connection_list *) 0 ; + cmf::math::Time arg2 ; + bool arg3 = (bool) true ; + void *argp1 = 0 ; + int res1 = 0 ; + bool val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "t",(char *) "use_OpenMP", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:connection_list_do_action",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__connection_list, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "connection_list_do_action" "', argument " "1"" of type '" "cmf::water::connection_list *""'"); + } + arg1 = reinterpret_cast< cmf::water::connection_list * >(argp1); + { + arg2 = convert_datetime_to_cmftime(obj1); + if (arg2 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } + } + if (obj2) { + ecode3 = SWIG_AsVal_bool(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "connection_list_do_action" "', argument " "3"" of type '" "bool""'"); + } + arg3 = static_cast< bool >(val3); + } + { + try { + (arg1)->do_action(arg2,arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_connection_list_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::connection_list *arg1 = (cmf::water::connection_list *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + size_t result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__connection_list, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "connection_list_size" "', argument " "1"" of type '" "cmf::water::connection_list const *""'"); + } + arg1 = reinterpret_cast< cmf::water::connection_list * >(argp1); + { + try { + result = ((cmf::water::connection_list const *)arg1)->size(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_connection_list_at(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::connection_list *arg1 = (cmf::water::connection_list *) 0 ; + size_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "pos", NULL + }; + SwigValueWrapper< std::shared_ptr< cmf::water::flux_connection > > result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:connection_list_at",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__connection_list, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "connection_list_at" "', argument " "1"" of type '" "cmf::water::connection_list const *""'"); + } + arg1 = reinterpret_cast< cmf::water::connection_list * >(argp1); + ecode2 = SWIG_AsVal_size_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "connection_list_at" "', argument " "2"" of type '" "size_t""'"); + } + arg2 = static_cast< size_t >(val2); + { + try { + result = ((cmf::water::connection_list const *)arg1)->at(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj((new cmf::water::flux_connection::ptr(static_cast< const cmf::water::flux_connection::ptr& >(result))), SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_connection_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_connection_list_begin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::water::connection_list *arg1 = (cmf::water::connection_list *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + SwigValueWrapper< std::vector< std::shared_ptr< cmf::water::flux_connection > >::iterator > result; + + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__connection_list, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "connection_list_begin" "', argument " "1"" of type '" "cmf::water::connection_list *""'"); + } + arg1 = reinterpret_cast< cmf::water::connection_list * >(argp1); + { + try { + result = (arg1)->begin(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj((new cmf::water::connection_list::iterator(static_cast< const cmf::water::connection_list::iterator& >(result))), SWIGTYPE_p_std__vectorT_std__shared_ptrT_cmf__water__flux_connection_t_t__iterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_connection_list_end__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::water::connection_list *arg1 = (cmf::water::connection_list *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + SwigValueWrapper< std::vector< std::shared_ptr< cmf::water::flux_connection > >::iterator > result; + + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__connection_list, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "connection_list_end" "', argument " "1"" of type '" "cmf::water::connection_list *""'"); + } + arg1 = reinterpret_cast< cmf::water::connection_list * >(argp1); + { + try { + result = (arg1)->end(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj((new cmf::water::connection_list::iterator(static_cast< const cmf::water::connection_list::iterator& >(result))), SWIGTYPE_p_std__vectorT_std__shared_ptrT_cmf__water__flux_connection_t_t__iterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_connection_list_begin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::water::connection_list *arg1 = (cmf::water::connection_list *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + SwigValueWrapper< std::vector< std::shared_ptr< cmf::water::flux_connection > >::const_iterator > result; + + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__connection_list, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "connection_list_begin" "', argument " "1"" of type '" "cmf::water::connection_list const *""'"); + } + arg1 = reinterpret_cast< cmf::water::connection_list * >(argp1); + { + try { + result = ((cmf::water::connection_list const *)arg1)->begin(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj((new cmf::water::connection_list::const_iterator(static_cast< const cmf::water::connection_list::const_iterator& >(result))), SWIGTYPE_p_std__vectorT_std__shared_ptrT_cmf__water__flux_connection_t_t__const_iterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_connection_list_begin(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[2] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"connection_list_begin",0,1,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__water__connection_list, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__water__connection_list, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_connection_list_begin__SWIG_0(self, argc, argv); + case 2: + return _wrap_connection_list_begin__SWIG_1(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'connection_list_begin'.\n" + " Possible C/C++ prototypes are:\n" + " cmf::water::connection_list::begin()\n" + " cmf::water::connection_list::begin() const\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_connection_list_end__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::water::connection_list *arg1 = (cmf::water::connection_list *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + SwigValueWrapper< std::vector< std::shared_ptr< cmf::water::flux_connection > >::const_iterator > result; + + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__connection_list, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "connection_list_end" "', argument " "1"" of type '" "cmf::water::connection_list const *""'"); + } + arg1 = reinterpret_cast< cmf::water::connection_list * >(argp1); + { + try { + result = ((cmf::water::connection_list const *)arg1)->end(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj((new cmf::water::connection_list::const_iterator(static_cast< const cmf::water::connection_list::const_iterator& >(result))), SWIGTYPE_p_std__vectorT_std__shared_ptrT_cmf__water__flux_connection_t_t__const_iterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_connection_list_end(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[2] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"connection_list_end",0,1,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__water__connection_list, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__water__connection_list, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_connection_list_end__SWIG_0(self, argc, argv); + case 2: + return _wrap_connection_list_end__SWIG_1(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'connection_list_end'.\n" + " Possible C/C++ prototypes are:\n" + " cmf::water::connection_list::end()\n" + " cmf::water::connection_list::end() const\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_delete_connection_list(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::connection_list *arg1 = (cmf::water::connection_list *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__connection_list, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_connection_list" "', argument " "1"" of type '" "cmf::water::connection_list *""'"); + } + arg1 = reinterpret_cast< cmf::water::connection_list * >(argp1); + { + try { + delete arg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_connection_list___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::connection_list *arg1 = (cmf::water::connection_list *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + size_t result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__connection_list, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "connection_list___len__" "', argument " "1"" of type '" "cmf::water::connection_list const *""'"); + } + arg1 = reinterpret_cast< cmf::water::connection_list * >(argp1); + { + try { + result = cmf_water_connection_list___len__((cmf::water::connection_list const *)arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_connection_list___contains__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::connection_list *arg1 = (cmf::water::connection_list *) 0 ; + cmf::water::flux_connection::ptr *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "con", NULL + }; + bool result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:connection_list___contains__",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__connection_list, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "connection_list___contains__" "', argument " "1"" of type '" "cmf::water::connection_list const *""'"); + } + arg1 = reinterpret_cast< cmf::water::connection_list * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_connection_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "connection_list___contains__" "', argument " "2"" of type '" "cmf::water::flux_connection::ptr const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "connection_list___contains__" "', argument " "2"" of type '" "cmf::water::flux_connection::ptr const &""'"); + } + arg2 = reinterpret_cast< cmf::water::flux_connection::ptr * >(argp2); + { + try { + result = (bool)cmf_water_connection_list___contains__((cmf::water::connection_list const *)arg1,(std::shared_ptr< cmf::water::flux_connection > const &)*arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_connection_list(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::connection_list *result = 0 ; + + if (!SWIG_Python_UnpackTuple(args,"new_connection_list",0,0,0)) SWIG_fail; + { + try { + result = (cmf::water::connection_list *)new cmf::water::connection_list(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + // %typemap(out) cmf::water::connection_vector { + resultobj = PyList_New(result->size()); + for (Py_ssize_t i = 0; i size()); ++i) { + cmf::water::flux_connection* item = (*result)[i].get(); + PyObject* py_item = SWIG_NewPointerObj(item,SWIGTYPE_p_cmf__water__flux_connection,0); + PyList_SetItem(resultobj,i,py_item); + } + delete result; + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *connection_list_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__water__connection_list, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *connection_list_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_flux_integrator_integration_t(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::flux_integrator *arg1 = (cmf::water::flux_integrator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::water::flux_integrator const > tempshared1 ; + std::shared_ptr< cmf::water::flux_integrator const > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + cmf::math::Time result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_integrator_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flux_integrator_integration_t" "', argument " "1"" of type '" "cmf::water::flux_integrator const *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::water::flux_integrator > * >(argp1); + delete reinterpret_cast< std::shared_ptr< const cmf::water::flux_integrator > * >(argp1); + arg1 = const_cast< cmf::water::flux_integrator * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::water::flux_integrator > * >(argp1); + arg1 = const_cast< cmf::water::flux_integrator * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + try { + result = ((cmf::water::flux_integrator const *)arg1)->integration_t(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj((new cmf::math::Time(static_cast< const cmf::math::Time& >(result))), SWIGTYPE_p_cmf__math__Time, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_flux_integrator_t0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::flux_integrator *arg1 = (cmf::water::flux_integrator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::water::flux_integrator const > tempshared1 ; + std::shared_ptr< cmf::water::flux_integrator const > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + cmf::math::Time result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_integrator_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flux_integrator_t0" "', argument " "1"" of type '" "cmf::water::flux_integrator const *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::water::flux_integrator > * >(argp1); + delete reinterpret_cast< std::shared_ptr< const cmf::water::flux_integrator > * >(argp1); + arg1 = const_cast< cmf::water::flux_integrator * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::water::flux_integrator > * >(argp1); + arg1 = const_cast< cmf::water::flux_integrator * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + try { + result = ((cmf::water::flux_integrator const *)arg1)->t0(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj((new cmf::math::Time(static_cast< const cmf::math::Time& >(result))), SWIGTYPE_p_cmf__math__Time, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_flux_integrator_invert_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::flux_integrator *arg1 = (cmf::water::flux_integrator *) 0 ; + bool arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::water::flux_integrator > tempshared1 ; + std::shared_ptr< cmf::water::flux_integrator > *smartarg1 = 0 ; + bool val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"flux_integrator_invert_set",2,2,swig_obj)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_integrator_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flux_integrator_invert_set" "', argument " "1"" of type '" "cmf::water::flux_integrator *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::flux_integrator > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::water::flux_integrator > * >(argp1); + arg1 = const_cast< cmf::water::flux_integrator * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::flux_integrator > * >(argp1); + arg1 = const_cast< cmf::water::flux_integrator * >((smartarg1 ? smartarg1->get() : 0)); + } + } + ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "flux_integrator_invert_set" "', argument " "2"" of type '" "bool""'"); + } + arg2 = static_cast< bool >(val2); + if (arg1) (arg1)->invert = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_flux_integrator_invert_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::flux_integrator *arg1 = (cmf::water::flux_integrator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::water::flux_integrator > tempshared1 ; + std::shared_ptr< cmf::water::flux_integrator > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + bool result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_integrator_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flux_integrator_invert_get" "', argument " "1"" of type '" "cmf::water::flux_integrator *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::flux_integrator > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::water::flux_integrator > * >(argp1); + arg1 = const_cast< cmf::water::flux_integrator * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::flux_integrator > * >(argp1); + arg1 = const_cast< cmf::water::flux_integrator * >((smartarg1 ? smartarg1->get() : 0)); + } + } + result = (bool) ((arg1)->invert); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_flux_integrator_connection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::flux_integrator *arg1 = (cmf::water::flux_integrator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::water::flux_integrator const > tempshared1 ; + std::shared_ptr< cmf::water::flux_integrator const > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + SwigValueWrapper< std::shared_ptr< cmf::water::flux_connection > > result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_integrator_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flux_integrator_connection" "', argument " "1"" of type '" "cmf::water::flux_integrator const *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::water::flux_integrator > * >(argp1); + delete reinterpret_cast< std::shared_ptr< const cmf::water::flux_integrator > * >(argp1); + arg1 = const_cast< cmf::water::flux_integrator * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::water::flux_integrator > * >(argp1); + arg1 = const_cast< cmf::water::flux_integrator * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + try { + result = ((cmf::water::flux_integrator const *)arg1)->connection(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj((new cmf::water::flux_connection::ptr(static_cast< const cmf::water::flux_connection::ptr& >(result))), SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_connection_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_flux_integrator__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::water::flux_connection *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + cmf::water::flux_integrator *result = 0 ; + + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_cmf__water__flux_connection, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_flux_integrator" "', argument " "1"" of type '" "cmf::water::flux_connection &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_flux_integrator" "', argument " "1"" of type '" "cmf::water::flux_connection &""'"); + } + arg1 = reinterpret_cast< cmf::water::flux_connection * >(argp1); + { + try { + result = (cmf::water::flux_integrator *)new cmf::water::flux_integrator(*arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + std::shared_ptr< cmf::water::flux_integrator > *smartresult = result ? new std::shared_ptr< cmf::water::flux_integrator >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0; + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_integrator_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_flux_integrator__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::water::flux_node::ptr arg1 ; + cmf::water::flux_node::ptr arg2 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + cmf::water::flux_integrator *result = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_flux_integrator" "', argument " "1"" of type '" "cmf::water::flux_node::ptr""'"); + } + if (argp1) arg1 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp1)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp1); + } + { + int newmem = 0; + res2 = SWIG_ConvertPtrAndOwn(swig_obj[1], &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_flux_integrator" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); + } + if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); + } + { + try { + result = (cmf::water::flux_integrator *)new cmf::water::flux_integrator(arg1,arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + std::shared_ptr< cmf::water::flux_integrator > *smartresult = result ? new std::shared_ptr< cmf::water::flux_integrator >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0; + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_integrator_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_flux_integrator(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"new_flux_integrator",0,2,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__water__flux_connection, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_new_flux_integrator__SWIG_0(self, argc, argv); + case 2: + return _wrap_new_flux_integrator__SWIG_1(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_flux_integrator'.\n" + " Possible C/C++ prototypes are:\n" + " cmf::water::flux_integrator::flux_integrator(cmf::water::flux_connection &)\n" + " cmf::water::flux_integrator::flux_integrator(cmf::water::flux_node::ptr,cmf::water::flux_node::ptr)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_delete_flux_integrator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::flux_integrator *arg1 = (cmf::water::flux_integrator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::water::flux_integrator > tempshared1 ; + std::shared_ptr< cmf::water::flux_integrator > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_integrator_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_flux_integrator" "', argument " "1"" of type '" "cmf::water::flux_integrator *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::flux_integrator > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::water::flux_integrator > * >(argp1); + arg1 = const_cast< cmf::water::flux_integrator * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::flux_integrator > * >(argp1); + arg1 = const_cast< cmf::water::flux_integrator * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + try { + (void)arg1; delete smartarg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *flux_integrator_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_integrator_t, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *flux_integrator_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_linear_scale_displacement_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::linear_scale *arg1 = (cmf::water::linear_scale *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"linear_scale_displacement_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__linear_scale, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "linear_scale_displacement_set" "', argument " "1"" of type '" "cmf::water::linear_scale *""'"); + } + arg1 = reinterpret_cast< cmf::water::linear_scale * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "linear_scale_displacement_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->displacement = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_linear_scale_displacement_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::linear_scale *arg1 = (cmf::water::linear_scale *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__linear_scale, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "linear_scale_displacement_get" "', argument " "1"" of type '" "cmf::water::linear_scale *""'"); + } + arg1 = reinterpret_cast< cmf::water::linear_scale * >(argp1); + result = (real) ((arg1)->displacement); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_linear_scale_slope_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::linear_scale *arg1 = (cmf::water::linear_scale *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"linear_scale_slope_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__linear_scale, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "linear_scale_slope_set" "', argument " "1"" of type '" "cmf::water::linear_scale *""'"); + } + arg1 = reinterpret_cast< cmf::water::linear_scale * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "linear_scale_slope_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->slope = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_linear_scale_slope_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::linear_scale *arg1 = (cmf::water::linear_scale *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__linear_scale, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "linear_scale_slope_get" "', argument " "1"" of type '" "cmf::water::linear_scale *""'"); + } + arg1 = reinterpret_cast< cmf::water::linear_scale * >(argp1); + result = (real) ((arg1)->slope); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_linear_scale___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::linear_scale *arg1 = (cmf::water::linear_scale *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "value", NULL + }; + real result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:linear_scale___call__",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__linear_scale, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "linear_scale___call__" "', argument " "1"" of type '" "cmf::water::linear_scale const *""'"); + } + arg1 = reinterpret_cast< cmf::water::linear_scale * >(argp1); + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "linear_scale___call__" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + { + try { + result = (real)((cmf::water::linear_scale const *)arg1)->operator ()(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_linear_scale(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + real arg1 = (real) 1 ; + real arg2 = (real) 0 ; + double val1 ; + int ecode1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "_slope",(char *) "_displacement", NULL + }; + cmf::water::linear_scale *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|OO:new_linear_scale",kwnames,&obj0,&obj1)) SWIG_fail; + if (obj0) { + ecode1 = SWIG_AsVal_double(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_linear_scale" "', argument " "1"" of type '" "real""'"); + } + arg1 = static_cast< real >(val1); + } + if (obj1) { + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_linear_scale" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + } + { + try { + result = (cmf::water::linear_scale *)new cmf::water::linear_scale(arg1,arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__water__linear_scale, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_linear_scale(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::linear_scale *arg1 = (cmf::water::linear_scale *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__linear_scale, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_linear_scale" "', argument " "1"" of type '" "cmf::water::linear_scale *""'"); + } + arg1 = reinterpret_cast< cmf::water::linear_scale * >(argp1); + { + try { + delete arg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *linear_scale_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__water__linear_scale, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *linear_scale_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_DirichletBoundary_set_conc(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::DirichletBoundary *arg1 = (cmf::water::DirichletBoundary *) 0 ; + cmf::water::solute *arg2 = 0 ; + double arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::water::DirichletBoundary > tempshared1 ; + std::shared_ptr< cmf::water::DirichletBoundary > *smartarg1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + double val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "_Solute",(char *) "value", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:DirichletBoundary_set_conc",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__DirichletBoundary_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DirichletBoundary_set_conc" "', argument " "1"" of type '" "cmf::water::DirichletBoundary *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::DirichletBoundary > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::water::DirichletBoundary > * >(argp1); + arg1 = const_cast< cmf::water::DirichletBoundary * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::DirichletBoundary > * >(argp1); + arg1 = const_cast< cmf::water::DirichletBoundary * >((smartarg1 ? smartarg1->get() : 0)); + } + } + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_cmf__water__solute, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DirichletBoundary_set_conc" "', argument " "2"" of type '" "cmf::water::solute const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DirichletBoundary_set_conc" "', argument " "2"" of type '" "cmf::water::solute const &""'"); + } + arg2 = reinterpret_cast< cmf::water::solute * >(argp2); + ecode3 = SWIG_AsVal_double(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DirichletBoundary_set_conc" "', argument " "3"" of type '" "double""'"); + } + arg3 = static_cast< double >(val3); + { + try { + (arg1)->set_conc((cmf::water::solute const &)*arg2,arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_DirichletBoundary_is_source_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::DirichletBoundary *arg1 = (cmf::water::DirichletBoundary *) 0 ; + bool arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::water::DirichletBoundary > tempshared1 ; + std::shared_ptr< cmf::water::DirichletBoundary > *smartarg1 = 0 ; + bool val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"DirichletBoundary_is_source_set",2,2,swig_obj)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__DirichletBoundary_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DirichletBoundary_is_source_set" "', argument " "1"" of type '" "cmf::water::DirichletBoundary *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::DirichletBoundary > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::water::DirichletBoundary > * >(argp1); + arg1 = const_cast< cmf::water::DirichletBoundary * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::DirichletBoundary > * >(argp1); + arg1 = const_cast< cmf::water::DirichletBoundary * >((smartarg1 ? smartarg1->get() : 0)); + } + } + ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DirichletBoundary_is_source_set" "', argument " "2"" of type '" "bool""'"); + } + arg2 = static_cast< bool >(val2); + if (arg1) (arg1)->is_source = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_DirichletBoundary_is_source_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::DirichletBoundary *arg1 = (cmf::water::DirichletBoundary *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::water::DirichletBoundary > tempshared1 ; + std::shared_ptr< cmf::water::DirichletBoundary > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + bool result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__DirichletBoundary_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DirichletBoundary_is_source_get" "', argument " "1"" of type '" "cmf::water::DirichletBoundary *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::DirichletBoundary > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::water::DirichletBoundary > * >(argp1); + arg1 = const_cast< cmf::water::DirichletBoundary * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::DirichletBoundary > * >(argp1); + arg1 = const_cast< cmf::water::DirichletBoundary * >((smartarg1 ? smartarg1->get() : 0)); + } + } + result = (bool) ((arg1)->is_source); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_DirichletBoundary_RecalcFluxes(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::DirichletBoundary *arg1 = (cmf::water::DirichletBoundary *) 0 ; + cmf::math::Time arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::water::DirichletBoundary const > tempshared1 ; + std::shared_ptr< cmf::water::DirichletBoundary const > *smartarg1 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "t", NULL + }; + bool result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:DirichletBoundary_RecalcFluxes",kwnames,&obj0,&obj1)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__DirichletBoundary_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DirichletBoundary_RecalcFluxes" "', argument " "1"" of type '" "cmf::water::DirichletBoundary const *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::water::DirichletBoundary > * >(argp1); + delete reinterpret_cast< std::shared_ptr< const cmf::water::DirichletBoundary > * >(argp1); + arg1 = const_cast< cmf::water::DirichletBoundary * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::water::DirichletBoundary > * >(argp1); + arg1 = const_cast< cmf::water::DirichletBoundary * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + arg2 = convert_datetime_to_cmftime(obj1); + if (arg2 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } + } + { + try { + result = (bool)((cmf::water::DirichletBoundary const *)arg1)->RecalcFluxes(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_DirichletBoundary(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::project *arg1 = 0 ; + real arg2 ; + cmf::geometry::point arg3 = (cmf::geometry::point) cmf::geometry::point() ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "_p",(char *) "potential",(char *) "Location", NULL + }; + cmf::water::DirichletBoundary *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:new_DirichletBoundary",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_cmf__project, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DirichletBoundary" "', argument " "1"" of type '" "cmf::project &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DirichletBoundary" "', argument " "1"" of type '" "cmf::project &""'"); + } + arg1 = reinterpret_cast< cmf::project * >(argp1); + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_DirichletBoundary" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (obj2) { + { + if (check_xy(obj2)) { + std::string res = convert_xyz_to_point(obj2,arg3); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + return NULL; + } + } + else if (PySequence_Check(obj2)) { + std::string res = convert_seq_to_point(obj2,arg3); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError, res.c_str()); + } + } else { + std::string res="<"; + res+=pyrepr(obj2); + res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + } + } + } + { + try { + result = (cmf::water::DirichletBoundary *)new cmf::water::DirichletBoundary(*arg1,arg2,arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + std::shared_ptr< cmf::water::DirichletBoundary > *smartresult = result ? new std::shared_ptr< cmf::water::DirichletBoundary >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0; + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__water__DirichletBoundary_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_DirichletBoundary(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::DirichletBoundary *arg1 = (cmf::water::DirichletBoundary *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::water::DirichletBoundary > tempshared1 ; + std::shared_ptr< cmf::water::DirichletBoundary > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__DirichletBoundary_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DirichletBoundary" "', argument " "1"" of type '" "cmf::water::DirichletBoundary *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::DirichletBoundary > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::water::DirichletBoundary > * >(argp1); + arg1 = const_cast< cmf::water::DirichletBoundary * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::DirichletBoundary > * >(argp1); + arg1 = const_cast< cmf::water::DirichletBoundary * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + try { + (void)arg1; delete smartarg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *DirichletBoundary_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_cmf__water__DirichletBoundary_t, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *DirichletBoundary_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_NeumannBoundary_get_flux(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::NeumannBoundary *arg1 = (cmf::water::NeumannBoundary *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::water::NeumannBoundary > tempshared1 ; + std::shared_ptr< cmf::water::NeumannBoundary > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + cmf::math::timeseries result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__NeumannBoundary_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NeumannBoundary_get_flux" "', argument " "1"" of type '" "cmf::water::NeumannBoundary *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::NeumannBoundary > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::water::NeumannBoundary > * >(argp1); + arg1 = const_cast< cmf::water::NeumannBoundary * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::NeumannBoundary > * >(argp1); + arg1 = const_cast< cmf::water::NeumannBoundary * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + try { + result = (arg1)->get_flux(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj((new cmf::math::timeseries(static_cast< const cmf::math::timeseries& >(result))), SWIGTYPE_p_cmf__math__timeseries, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_NeumannBoundary_set_flux__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::water::NeumannBoundary *arg1 = (cmf::water::NeumannBoundary *) 0 ; + cmf::math::timeseries arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::water::NeumannBoundary > tempshared1 ; + std::shared_ptr< cmf::water::NeumannBoundary > *smartarg1 = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__NeumannBoundary_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NeumannBoundary_set_flux" "', argument " "1"" of type '" "cmf::water::NeumannBoundary *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::NeumannBoundary > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::water::NeumannBoundary > * >(argp1); + arg1 = const_cast< cmf::water::NeumannBoundary * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::NeumannBoundary > * >(argp1); + arg1 = const_cast< cmf::water::NeumannBoundary * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + cmf::math::timeseries *p_ts = &arg2; + int res=SWIG_ConvertPtr(swig_obj[1],(void**)(&p_ts),SWIGTYPE_p_cmf__math__timeseries,0); + if (!(SWIG_IsOK(res)) || p_ts==0) { + if (PyNumber_Check(swig_obj[1])) { + double scalar = PyFloat_AsDouble(swig_obj[1]); + arg2 = cmf::math::timeseries::from_scalar(scalar); + } else { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.timeseries object"); + } + } else { + arg2 = *p_ts; + } + } + { + try { + (arg1)->set_flux(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_NeumannBoundary_set_flux__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::water::NeumannBoundary *arg1 = (cmf::water::NeumannBoundary *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::water::NeumannBoundary > tempshared1 ; + std::shared_ptr< cmf::water::NeumannBoundary > *smartarg1 = 0 ; + double val2 ; + int ecode2 = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__NeumannBoundary_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NeumannBoundary_set_flux" "', argument " "1"" of type '" "cmf::water::NeumannBoundary *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::NeumannBoundary > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::water::NeumannBoundary > * >(argp1); + arg1 = const_cast< cmf::water::NeumannBoundary * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::NeumannBoundary > * >(argp1); + arg1 = const_cast< cmf::water::NeumannBoundary * >((smartarg1 ? smartarg1->get() : 0)); + } + } + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "NeumannBoundary_set_flux" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + { + try { + (arg1)->set_flux(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_NeumannBoundary_set_flux(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"NeumannBoundary_set_flux",0,2,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_cmf__water__NeumannBoundary_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_double(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_cmf__water__NeumannBoundary_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + void * pt; + int res=SWIG_ConvertPtr(argv[1],&pt,SWIGTYPE_p_cmf__math__timeseries,0); + _v=SWIG_IsOK(res) || PyNumber_Check(argv[1]); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_NeumannBoundary_set_flux__SWIG_1(self, argc, argv); + case 2: + return _wrap_NeumannBoundary_set_flux__SWIG_0(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'NeumannBoundary_set_flux'.\n" + " Possible C/C++ prototypes are:\n" + " cmf::water::NeumannBoundary::set_flux(cmf::math::timeseries)\n" + " cmf::water::NeumannBoundary::set_flux(double)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_NeumannBoundary_flux_scale_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::NeumannBoundary *arg1 = (cmf::water::NeumannBoundary *) 0 ; + cmf::water::linear_scale *arg2 = (cmf::water::linear_scale *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::water::NeumannBoundary > tempshared1 ; + std::shared_ptr< cmf::water::NeumannBoundary > *smartarg1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"NeumannBoundary_flux_scale_set",2,2,swig_obj)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__NeumannBoundary_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NeumannBoundary_flux_scale_set" "', argument " "1"" of type '" "cmf::water::NeumannBoundary *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::NeumannBoundary > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::water::NeumannBoundary > * >(argp1); + arg1 = const_cast< cmf::water::NeumannBoundary * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::NeumannBoundary > * >(argp1); + arg1 = const_cast< cmf::water::NeumannBoundary * >((smartarg1 ? smartarg1->get() : 0)); + } + } + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_cmf__water__linear_scale, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "NeumannBoundary_flux_scale_set" "', argument " "2"" of type '" "cmf::water::linear_scale *""'"); + } + arg2 = reinterpret_cast< cmf::water::linear_scale * >(argp2); + if (arg1) (arg1)->flux_scale = *arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_NeumannBoundary_flux_scale_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::NeumannBoundary *arg1 = (cmf::water::NeumannBoundary *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::water::NeumannBoundary > tempshared1 ; + std::shared_ptr< cmf::water::NeumannBoundary > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + cmf::water::linear_scale *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__NeumannBoundary_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NeumannBoundary_flux_scale_get" "', argument " "1"" of type '" "cmf::water::NeumannBoundary *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::NeumannBoundary > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::water::NeumannBoundary > * >(argp1); + arg1 = const_cast< cmf::water::NeumannBoundary * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::NeumannBoundary > * >(argp1); + arg1 = const_cast< cmf::water::NeumannBoundary * >((smartarg1 ? smartarg1->get() : 0)); + } + } + result = (cmf::water::linear_scale *)& ((arg1)->flux_scale); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__water__linear_scale, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_NeumannBoundary_concentration_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::NeumannBoundary *arg1 = (cmf::water::NeumannBoundary *) 0 ; + cmf::water::SoluteTimeseries *arg2 = (cmf::water::SoluteTimeseries *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::water::NeumannBoundary > tempshared1 ; + std::shared_ptr< cmf::water::NeumannBoundary > *smartarg1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"NeumannBoundary_concentration_set",2,2,swig_obj)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__NeumannBoundary_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NeumannBoundary_concentration_set" "', argument " "1"" of type '" "cmf::water::NeumannBoundary *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::NeumannBoundary > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::water::NeumannBoundary > * >(argp1); + arg1 = const_cast< cmf::water::NeumannBoundary * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::NeumannBoundary > * >(argp1); + arg1 = const_cast< cmf::water::NeumannBoundary * >((smartarg1 ? smartarg1->get() : 0)); + } + } + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_cmf__water__SoluteTimeseries, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "NeumannBoundary_concentration_set" "', argument " "2"" of type '" "cmf::water::SoluteTimeseries *""'"); + } + arg2 = reinterpret_cast< cmf::water::SoluteTimeseries * >(argp2); + if (arg1) (arg1)->concentration = *arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_NeumannBoundary_concentration_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::NeumannBoundary *arg1 = (cmf::water::NeumannBoundary *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::water::NeumannBoundary > tempshared1 ; + std::shared_ptr< cmf::water::NeumannBoundary > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + cmf::water::SoluteTimeseries *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__NeumannBoundary_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NeumannBoundary_concentration_get" "', argument " "1"" of type '" "cmf::water::NeumannBoundary *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::NeumannBoundary > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::water::NeumannBoundary > * >(argp1); + arg1 = const_cast< cmf::water::NeumannBoundary * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::NeumannBoundary > * >(argp1); + arg1 = const_cast< cmf::water::NeumannBoundary * >((smartarg1 ? smartarg1->get() : 0)); + } + } + result = (cmf::water::SoluteTimeseries *)& ((arg1)->concentration); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__water__SoluteTimeseries, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_NeumannBoundary___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::NeumannBoundary *arg1 = (cmf::water::NeumannBoundary *) 0 ; + cmf::math::Time arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::water::NeumannBoundary const > tempshared1 ; + std::shared_ptr< cmf::water::NeumannBoundary const > *smartarg1 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "t", NULL + }; + real result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:NeumannBoundary___call__",kwnames,&obj0,&obj1)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__NeumannBoundary_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NeumannBoundary___call__" "', argument " "1"" of type '" "cmf::water::NeumannBoundary const *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::water::NeumannBoundary > * >(argp1); + delete reinterpret_cast< std::shared_ptr< const cmf::water::NeumannBoundary > * >(argp1); + arg1 = const_cast< cmf::water::NeumannBoundary * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::water::NeumannBoundary > * >(argp1); + arg1 = const_cast< cmf::water::NeumannBoundary * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + arg2 = convert_datetime_to_cmftime(obj1); + if (arg2 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } + } + { + try { + result = (real)((cmf::water::NeumannBoundary const *)arg1)->operator ()(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_NeumannBoundary_connect_to(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::NeumannBoundary *arg1 = (cmf::water::NeumannBoundary *) 0 ; + cmf::water::flux_node::ptr arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::water::NeumannBoundary > tempshared1 ; + std::shared_ptr< cmf::water::NeumannBoundary > *smartarg1 = 0 ; + void *argp2 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "target", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:NeumannBoundary_connect_to",kwnames,&obj0,&obj1)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__NeumannBoundary_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NeumannBoundary_connect_to" "', argument " "1"" of type '" "cmf::water::NeumannBoundary *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::NeumannBoundary > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::water::NeumannBoundary > * >(argp1); + arg1 = const_cast< cmf::water::NeumannBoundary * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::NeumannBoundary > * >(argp1); + arg1 = const_cast< cmf::water::NeumannBoundary * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + int newmem = 0; + res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "NeumannBoundary_connect_to" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); + } + if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); + } + { + try { + (arg1)->connect_to(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_NeumannBoundary__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::project *arg1 = 0 ; + cmf::math::timeseries arg2 ; + cmf::water::SoluteTimeseries arg3 = (cmf::water::SoluteTimeseries) cmf::water::SoluteTimeseries() ; + cmf::geometry::point arg4 = (cmf::geometry::point) cmf::geometry::point() ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp3 ; + int res3 = 0 ; + cmf::water::NeumannBoundary *result = 0 ; + + if ((nobjs < 2) || (nobjs > 4)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_cmf__project, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_NeumannBoundary" "', argument " "1"" of type '" "cmf::project &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NeumannBoundary" "', argument " "1"" of type '" "cmf::project &""'"); + } + arg1 = reinterpret_cast< cmf::project * >(argp1); + { + cmf::math::timeseries *p_ts = &arg2; + int res=SWIG_ConvertPtr(swig_obj[1],(void**)(&p_ts),SWIGTYPE_p_cmf__math__timeseries,0); + if (!(SWIG_IsOK(res)) || p_ts==0) { + if (PyNumber_Check(swig_obj[1])) { + double scalar = PyFloat_AsDouble(swig_obj[1]); + arg2 = cmf::math::timeseries::from_scalar(scalar); + } else { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.timeseries object"); + } + } else { + arg2 = *p_ts; + } + } + if (swig_obj[2]) { + { + res3 = SWIG_ConvertPtr(swig_obj[2], &argp3, SWIGTYPE_p_cmf__water__SoluteTimeseries, 0 | 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_NeumannBoundary" "', argument " "3"" of type '" "cmf::water::SoluteTimeseries""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NeumannBoundary" "', argument " "3"" of type '" "cmf::water::SoluteTimeseries""'"); + } else { + cmf::water::SoluteTimeseries * temp = reinterpret_cast< cmf::water::SoluteTimeseries * >(argp3); + arg3 = *temp; + if (SWIG_IsNewObj(res3)) delete temp; + } + } + } + if (swig_obj[3]) { + { + if (check_xy(swig_obj[3])) { + std::string res = convert_xyz_to_point(swig_obj[3],arg4); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + return NULL; + } + } + else if (PySequence_Check(swig_obj[3])) { + std::string res = convert_seq_to_point(swig_obj[3],arg4); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError, res.c_str()); + } + } else { + std::string res="<"; + res+=pyrepr(swig_obj[3]); + res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + } + } + } + { + try { + result = (cmf::water::NeumannBoundary *)new cmf::water::NeumannBoundary(*arg1,arg2,arg3,arg4); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + std::shared_ptr< cmf::water::NeumannBoundary > *smartresult = result ? new std::shared_ptr< cmf::water::NeumannBoundary >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0; + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__water__NeumannBoundary_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_NeumannBoundary__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::project *arg1 = 0 ; + cmf::geometry::point arg2 = (cmf::geometry::point) cmf::geometry::point() ; + void *argp1 = 0 ; + int res1 = 0 ; + cmf::water::NeumannBoundary *result = 0 ; + + if ((nobjs < 1) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_cmf__project, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_NeumannBoundary" "', argument " "1"" of type '" "cmf::project &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NeumannBoundary" "', argument " "1"" of type '" "cmf::project &""'"); + } + arg1 = reinterpret_cast< cmf::project * >(argp1); + if (swig_obj[1]) { + { + if (check_xy(swig_obj[1])) { + std::string res = convert_xyz_to_point(swig_obj[1],arg2); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + return NULL; + } + } + else if (PySequence_Check(swig_obj[1])) { + std::string res = convert_seq_to_point(swig_obj[1],arg2); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError, res.c_str()); + } + } else { + std::string res="<"; + res+=pyrepr(swig_obj[1]); + res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + } + } + } + { + try { + result = (cmf::water::NeumannBoundary *)new cmf::water::NeumannBoundary(*arg1,arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + std::shared_ptr< cmf::water::NeumannBoundary > *smartresult = result ? new std::shared_ptr< cmf::water::NeumannBoundary >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0; + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__water__NeumannBoundary_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_NeumannBoundary(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[5] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"new_NeumannBoundary",0,4,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if ((argc >= 1) && (argc <= 2)) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__project, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (argc > 1) { + { + { + cmf::geometry::point p; + _v=check_xy(argv[1]) || check_seq_point(argv[1]); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + } + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if ((argc >= 2) && (argc <= 4)) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__project, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + void * pt; + int res=SWIG_ConvertPtr(argv[1],&pt,SWIGTYPE_p_cmf__math__timeseries,0); + _v=SWIG_IsOK(res) || PyNumber_Check(argv[1]); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (argc > 2) { + { + int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_cmf__water__SoluteTimeseries, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (argc > 3) { + { + { + cmf::geometry::point p; + _v=check_xy(argv[3]) || check_seq_point(argv[3]); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + } + } + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_new_NeumannBoundary__SWIG_1(self, argc, argv); + case 2: + return _wrap_new_NeumannBoundary__SWIG_0(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_NeumannBoundary'.\n" + " Possible C/C++ prototypes are:\n" + " cmf::water::NeumannBoundary::NeumannBoundary(cmf::project &,cmf::math::timeseries,cmf::water::SoluteTimeseries,cmf::geometry::point)\n" + " cmf::water::NeumannBoundary::NeumannBoundary(cmf::project &,cmf::geometry::point)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_NeumannBoundary_create(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::flux_node::ptr arg1 ; + void *argp1 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + char * kwnames[] = { + (char *) "target", NULL + }; + cmf::water::NeumannBoundary::ptr result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:NeumannBoundary_create",kwnames,&obj0)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NeumannBoundary_create" "', argument " "1"" of type '" "cmf::water::flux_node::ptr""'"); + } + if (argp1) arg1 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp1)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp1); + } + { + try { + result = cmf::water::NeumannBoundary::create(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + std::shared_ptr< cmf::water::NeumannBoundary > *smartresult = result ? new std::shared_ptr< cmf::water::NeumannBoundary >(result) : 0; + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__water__NeumannBoundary_t, SWIG_POINTER_OWN); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_NeumannBoundary(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::NeumannBoundary *arg1 = (cmf::water::NeumannBoundary *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::water::NeumannBoundary > tempshared1 ; + std::shared_ptr< cmf::water::NeumannBoundary > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__NeumannBoundary_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_NeumannBoundary" "', argument " "1"" of type '" "cmf::water::NeumannBoundary *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::NeumannBoundary > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::water::NeumannBoundary > * >(argp1); + arg1 = const_cast< cmf::water::NeumannBoundary * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::NeumannBoundary > * >(argp1); + arg1 = const_cast< cmf::water::NeumannBoundary * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + try { + (void)arg1; delete smartarg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *NeumannBoundary_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_cmf__water__NeumannBoundary_t, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *NeumannBoundary_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_new_NeumannFlux(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + std::shared_ptr< cmf::water::NeumannBoundary > arg1 ; + cmf::water::flux_node::ptr arg2 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "left",(char *) "right", NULL + }; + cmf::water::NeumannFlux *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:new_NeumannFlux",kwnames,&obj0,&obj1)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__NeumannBoundary_t, 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_NeumannFlux" "', argument " "1"" of type '" "std::shared_ptr< cmf::water::NeumannBoundary >""'"); + } + if (argp1) arg1 = *(reinterpret_cast< std::shared_ptr< cmf::water::NeumannBoundary > * >(argp1)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< std::shared_ptr< cmf::water::NeumannBoundary > * >(argp1); + } + { + int newmem = 0; + res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_NeumannFlux" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); + } + if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); + } + { + try { + result = (cmf::water::NeumannFlux *)new cmf::water::NeumannFlux(arg1,arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__water__NeumannFlux, SWIG_POINTER_NEW | 0 ); + + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_NeumannFlux(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::NeumannFlux *arg1 = (cmf::water::NeumannFlux *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__NeumannFlux, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_NeumannFlux" "', argument " "1"" of type '" "cmf::water::NeumannFlux *""'"); + } + arg1 = reinterpret_cast< cmf::water::NeumannFlux * >(argp1); + { + try { + + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *NeumannFlux_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__water__NeumannFlux, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *NeumannFlux_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_new_WaterStorage(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::project *arg1 = 0 ; + std::string const &arg2_defvalue = "" ; + std::string *arg2 = (std::string *) &arg2_defvalue ; + double arg3 = (double) 0 ; + double arg4 = (double) 1 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + double val3 ; + int ecode3 = 0 ; + double val4 ; + int ecode4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + char * kwnames[] = { + (char *) "project",(char *) "Name",(char *) "InitialState",(char *) "scale", NULL + }; + cmf::water::WaterStorage *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOO:new_WaterStorage",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_cmf__project, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_WaterStorage" "', argument " "1"" of type '" "cmf::project &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_WaterStorage" "', argument " "1"" of type '" "cmf::project &""'"); + } + arg1 = reinterpret_cast< cmf::project * >(argp1); + if (obj1) { + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string(obj1, &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_WaterStorage" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_WaterStorage" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + } + if (obj2) { + ecode3 = SWIG_AsVal_double(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_WaterStorage" "', argument " "3"" of type '" "double""'"); + } + arg3 = static_cast< double >(val3); + } + if (obj3) { + ecode4 = SWIG_AsVal_double(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_WaterStorage" "', argument " "4"" of type '" "double""'"); + } + arg4 = static_cast< double >(val4); + } + { + try { + result = (cmf::water::WaterStorage *)new cmf::water::WaterStorage(*arg1,(std::string const &)*arg2,arg3,arg4); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + std::shared_ptr< cmf::water::WaterStorage > *smartresult = result ? new std::shared_ptr< cmf::water::WaterStorage >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0; + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN); + } + if (SWIG_IsNewObj(res2)) delete arg2; + return resultobj; +fail: + if (SWIG_IsNewObj(res2)) delete arg2; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_WaterStorage_from_node(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::flux_node::ptr arg1 ; + void *argp1 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + char * kwnames[] = { + (char *) "node", NULL + }; + std::shared_ptr< cmf::water::WaterStorage > result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:WaterStorage_from_node",kwnames,&obj0)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "WaterStorage_from_node" "', argument " "1"" of type '" "cmf::water::flux_node::ptr""'"); + } + if (argp1) arg1 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp1)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp1); + } + { + try { + result = cmf::water::WaterStorage::from_node(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + std::shared_ptr< cmf::water::WaterStorage > *smartresult = result ? new std::shared_ptr< cmf::water::WaterStorage >(result) : 0; + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, SWIG_POINTER_OWN); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_WaterStorage_Solute__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::water::WaterStorage *arg1 = (cmf::water::WaterStorage *) 0 ; + cmf::water::solute *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::water::WaterStorage > tempshared1 ; + std::shared_ptr< cmf::water::WaterStorage > *smartarg1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + cmf::water::SoluteStorage *result = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "WaterStorage_Solute" "', argument " "1"" of type '" "cmf::water::WaterStorage *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::WaterStorage > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::water::WaterStorage > * >(argp1); + arg1 = const_cast< cmf::water::WaterStorage * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::WaterStorage > * >(argp1); + arg1 = const_cast< cmf::water::WaterStorage * >((smartarg1 ? smartarg1->get() : 0)); + } + } + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_cmf__water__solute, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "WaterStorage_Solute" "', argument " "2"" of type '" "cmf::water::solute const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "WaterStorage_Solute" "', argument " "2"" of type '" "cmf::water::solute const &""'"); + } + arg2 = reinterpret_cast< cmf::water::solute * >(argp2); + { + try { + result = (cmf::water::SoluteStorage *) &(arg1)->Solute((cmf::water::solute const &)*arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + std::shared_ptr< cmf::water::SoluteStorage > *smartresult = new std::shared_ptr< cmf::water::SoluteStorage >(result SWIG_NO_NULL_DELETER_0); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__water__SoluteStorage_t, SWIG_POINTER_OWN); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_WaterStorage_Solute__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::water::WaterStorage *arg1 = (cmf::water::WaterStorage *) 0 ; + cmf::water::solute *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::water::WaterStorage const > tempshared1 ; + std::shared_ptr< cmf::water::WaterStorage const > *smartarg1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + cmf::water::SoluteStorage *result = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "WaterStorage_Solute" "', argument " "1"" of type '" "cmf::water::WaterStorage const *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::water::WaterStorage > * >(argp1); + delete reinterpret_cast< std::shared_ptr< const cmf::water::WaterStorage > * >(argp1); + arg1 = const_cast< cmf::water::WaterStorage * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::water::WaterStorage > * >(argp1); + arg1 = const_cast< cmf::water::WaterStorage * >((smartarg1 ? smartarg1->get() : 0)); + } + } + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_cmf__water__solute, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "WaterStorage_Solute" "', argument " "2"" of type '" "cmf::water::solute const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "WaterStorage_Solute" "', argument " "2"" of type '" "cmf::water::solute const &""'"); + } + arg2 = reinterpret_cast< cmf::water::solute * >(argp2); + { + try { + result = (cmf::water::SoluteStorage *) &((cmf::water::WaterStorage const *)arg1)->Solute((cmf::water::solute const &)*arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + std::shared_ptr< const cmf::water::SoluteStorage > *smartresult = new std::shared_ptr< const cmf::water::SoluteStorage >(result SWIG_NO_NULL_DELETER_0); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__water__SoluteStorage_t, SWIG_POINTER_OWN); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_WaterStorage_Solute(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"WaterStorage_Solute",0,2,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_cmf__water__solute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_cmf__water__solute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_WaterStorage_Solute__SWIG_0(self, argc, argv); + case 2: + return _wrap_WaterStorage_Solute__SWIG_1(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'WaterStorage_Solute'.\n" + " Possible C/C++ prototypes are:\n" + " cmf::water::WaterStorage::Solute(cmf::water::solute const &)\n" + " cmf::water::WaterStorage::Solute(cmf::water::solute const &) const\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_WaterStorage_conc__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::water::WaterStorage *arg1 = (cmf::water::WaterStorage *) 0 ; + cmf::water::solute *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::water::WaterStorage const > tempshared1 ; + std::shared_ptr< cmf::water::WaterStorage const > *smartarg1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + real result; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "WaterStorage_conc" "', argument " "1"" of type '" "cmf::water::WaterStorage const *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::water::WaterStorage > * >(argp1); + delete reinterpret_cast< std::shared_ptr< const cmf::water::WaterStorage > * >(argp1); + arg1 = const_cast< cmf::water::WaterStorage * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::water::WaterStorage > * >(argp1); + arg1 = const_cast< cmf::water::WaterStorage * >((smartarg1 ? smartarg1->get() : 0)); + } + } + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_cmf__water__solute, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "WaterStorage_conc" "', argument " "2"" of type '" "cmf::water::solute const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "WaterStorage_conc" "', argument " "2"" of type '" "cmf::water::solute const &""'"); + } + arg2 = reinterpret_cast< cmf::water::solute * >(argp2); + { + try { + result = (real)((cmf::water::WaterStorage const *)arg1)->conc((cmf::water::solute const &)*arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_WaterStorage_conc__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::water::WaterStorage *arg1 = (cmf::water::WaterStorage *) 0 ; + cmf::math::Time arg2 ; + cmf::water::solute *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::water::WaterStorage const > tempshared1 ; + std::shared_ptr< cmf::water::WaterStorage const > *smartarg1 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + real result; + + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "WaterStorage_conc" "', argument " "1"" of type '" "cmf::water::WaterStorage const *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::water::WaterStorage > * >(argp1); + delete reinterpret_cast< std::shared_ptr< const cmf::water::WaterStorage > * >(argp1); + arg1 = const_cast< cmf::water::WaterStorage * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::water::WaterStorage > * >(argp1); + arg1 = const_cast< cmf::water::WaterStorage * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + arg2 = convert_datetime_to_cmftime(swig_obj[1]); + if (arg2 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } + } + res3 = SWIG_ConvertPtr(swig_obj[2], &argp3, SWIGTYPE_p_cmf__water__solute, 0 | 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "WaterStorage_conc" "', argument " "3"" of type '" "cmf::water::solute const &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "WaterStorage_conc" "', argument " "3"" of type '" "cmf::water::solute const &""'"); + } + arg3 = reinterpret_cast< cmf::water::solute * >(argp3); + { + try { + result = (real)((cmf::water::WaterStorage const *)arg1)->conc(arg2,(cmf::water::solute const &)*arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_WaterStorage_conc__SWIG_2(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::water::WaterStorage *arg1 = (cmf::water::WaterStorage *) 0 ; + cmf::water::solute *arg2 = 0 ; + real arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::water::WaterStorage > tempshared1 ; + std::shared_ptr< cmf::water::WaterStorage > *smartarg1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + double val3 ; + int ecode3 = 0 ; + + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "WaterStorage_conc" "', argument " "1"" of type '" "cmf::water::WaterStorage *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::WaterStorage > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::water::WaterStorage > * >(argp1); + arg1 = const_cast< cmf::water::WaterStorage * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::WaterStorage > * >(argp1); + arg1 = const_cast< cmf::water::WaterStorage * >((smartarg1 ? smartarg1->get() : 0)); + } + } + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_cmf__water__solute, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "WaterStorage_conc" "', argument " "2"" of type '" "cmf::water::solute const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "WaterStorage_conc" "', argument " "2"" of type '" "cmf::water::solute const &""'"); + } + arg2 = reinterpret_cast< cmf::water::solute * >(argp2); + ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "WaterStorage_conc" "', argument " "3"" of type '" "real""'"); + } + arg3 = static_cast< real >(val3); + { + try { + (arg1)->conc((cmf::water::solute const &)*arg2,arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_WaterStorage_conc(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[4] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"WaterStorage_conc",0,3,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_cmf__water__solute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + _v = check_time(argv[1]); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_cmf__water__solute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + if (argc == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_cmf__water__solute, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_double(argv[2], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 3; + if (_rank == _rankm) goto dispatch; + } + } + check_3: + + dispatch: + switch(_index) { + case 1: + return _wrap_WaterStorage_conc__SWIG_0(self, argc, argv); + case 2: + return _wrap_WaterStorage_conc__SWIG_1(self, argc, argv); + case 3: + return _wrap_WaterStorage_conc__SWIG_2(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'WaterStorage_conc'.\n" + " Possible C/C++ prototypes are:\n" + " cmf::water::WaterStorage::conc(cmf::water::solute const &) const\n" + " cmf::water::WaterStorage::conc(cmf::math::Time,cmf::water::solute const &) const\n" + " cmf::water::WaterStorage::conc(cmf::water::solute const &,real)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_WaterStorage_cast(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + std::shared_ptr< cmf::water::flux_node > arg1 ; + void *argp1 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + char * kwnames[] = { + (char *) "node", NULL + }; + std::shared_ptr< cmf::water::WaterStorage > result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:WaterStorage_cast",kwnames,&obj0)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "WaterStorage_cast" "', argument " "1"" of type '" "std::shared_ptr< cmf::water::flux_node >""'"); + } + if (argp1) arg1 = *(reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< std::shared_ptr< cmf::water::flux_node > * >(argp1); + } + { + try { + result = cmf::water::WaterStorage::cast(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + std::shared_ptr< cmf::water::WaterStorage > *smartresult = result ? new std::shared_ptr< cmf::water::WaterStorage >(result) : 0; + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, SWIG_POINTER_OWN); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_WaterStorage_create(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::project *arg1 = 0 ; + real arg2 = (real) 0.0 ; + real arg3 = (real) 1.0 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + double val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "_project",(char *) "initial_state",(char *) "scale", NULL + }; + std::shared_ptr< cmf::water::WaterStorage > result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OO:WaterStorage_create",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_cmf__project, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "WaterStorage_create" "', argument " "1"" of type '" "cmf::project &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "WaterStorage_create" "', argument " "1"" of type '" "cmf::project &""'"); + } + arg1 = reinterpret_cast< cmf::project * >(argp1); + if (obj1) { + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "WaterStorage_create" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + } + if (obj2) { + ecode3 = SWIG_AsVal_double(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "WaterStorage_create" "', argument " "3"" of type '" "real""'"); + } + arg3 = static_cast< real >(val3); + } + { + try { + result = cmf::water::WaterStorage::create(*arg1,arg2,arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + std::shared_ptr< cmf::water::WaterStorage > *smartresult = result ? new std::shared_ptr< cmf::water::WaterStorage >(result) : 0; + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, SWIG_POINTER_OWN); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_WaterStorage_volume_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::WaterStorage *arg1 = (cmf::water::WaterStorage *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::water::WaterStorage > tempshared1 ; + std::shared_ptr< cmf::water::WaterStorage > *smartarg1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"WaterStorage_volume_set",2,2,swig_obj)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "WaterStorage_volume_set" "', argument " "1"" of type '" "cmf::water::WaterStorage *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::WaterStorage > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::water::WaterStorage > * >(argp1); + arg1 = const_cast< cmf::water::WaterStorage * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::WaterStorage > * >(argp1); + arg1 = const_cast< cmf::water::WaterStorage * >((smartarg1 ? smartarg1->get() : 0)); + } + } + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "WaterStorage_volume_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + { + try { + cmf_water_WaterStorage_volume_set(arg1,arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_WaterStorage_volume_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::WaterStorage *arg1 = (cmf::water::WaterStorage *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::water::WaterStorage > tempshared1 ; + std::shared_ptr< cmf::water::WaterStorage > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "WaterStorage_volume_get" "', argument " "1"" of type '" "cmf::water::WaterStorage *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::WaterStorage > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::water::WaterStorage > * >(argp1); + arg1 = const_cast< cmf::water::WaterStorage * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::WaterStorage > * >(argp1); + arg1 = const_cast< cmf::water::WaterStorage * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + try { + result = (real)cmf_water_WaterStorage_volume_get(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_WaterStorage_statevariable_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::WaterStorage *arg1 = (cmf::water::WaterStorage *) 0 ; + char arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::water::WaterStorage > tempshared1 ; + std::shared_ptr< cmf::water::WaterStorage > *smartarg1 = 0 ; + char val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"WaterStorage_statevariable_set",2,2,swig_obj)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "WaterStorage_statevariable_set" "', argument " "1"" of type '" "cmf::water::WaterStorage *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::WaterStorage > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::water::WaterStorage > * >(argp1); + arg1 = const_cast< cmf::water::WaterStorage * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::WaterStorage > * >(argp1); + arg1 = const_cast< cmf::water::WaterStorage * >((smartarg1 ? smartarg1->get() : 0)); + } + } + ecode2 = SWIG_AsVal_char(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "WaterStorage_statevariable_set" "', argument " "2"" of type '" "char""'"); + } + arg2 = static_cast< char >(val2); + { + try { + cmf_water_WaterStorage_statevariable_set(arg1,arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_WaterStorage_statevariable_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::WaterStorage *arg1 = (cmf::water::WaterStorage *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::water::WaterStorage > tempshared1 ; + std::shared_ptr< cmf::water::WaterStorage > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + char result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "WaterStorage_statevariable_get" "', argument " "1"" of type '" "cmf::water::WaterStorage *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::WaterStorage > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::water::WaterStorage > * >(argp1); + arg1 = const_cast< cmf::water::WaterStorage * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::WaterStorage > * >(argp1); + arg1 = const_cast< cmf::water::WaterStorage * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + try { + result = (char)cmf_water_WaterStorage_statevariable_get(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_char(static_cast< char >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_WaterStorage(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::WaterStorage *arg1 = (cmf::water::WaterStorage *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::water::WaterStorage > tempshared1 ; + std::shared_ptr< cmf::water::WaterStorage > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_WaterStorage" "', argument " "1"" of type '" "cmf::water::WaterStorage *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::WaterStorage > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::water::WaterStorage > * >(argp1); + arg1 = const_cast< cmf::water::WaterStorage * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::WaterStorage > * >(argp1); + arg1 = const_cast< cmf::water::WaterStorage * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + try { + (void)arg1; delete smartarg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *WaterStorage_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *WaterStorage_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_new_waterbalance_connection(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::flux_node::ptr arg1 ; + cmf::water::flux_node::ptr arg2 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "source",(char *) "target", NULL + }; + cmf::water::waterbalance_connection *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:new_waterbalance_connection",kwnames,&obj0,&obj1)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_waterbalance_connection" "', argument " "1"" of type '" "cmf::water::flux_node::ptr""'"); + } + if (argp1) arg1 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp1)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp1); + } + { + int newmem = 0; + res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_waterbalance_connection" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); + } + if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); + } + { + try { + result = (cmf::water::waterbalance_connection *)new cmf::water::waterbalance_connection(arg1,arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__water__waterbalance_connection, SWIG_POINTER_NEW | 0 ); + + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_waterbalance_connection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::waterbalance_connection *arg1 = (cmf::water::waterbalance_connection *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__waterbalance_connection, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_waterbalance_connection" "', argument " "1"" of type '" "cmf::water::waterbalance_connection *""'"); + } + arg1 = reinterpret_cast< cmf::water::waterbalance_connection * >(argp1); + { + try { + + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *waterbalance_connection_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__water__waterbalance_connection, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *waterbalance_connection_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_external_control_connection_flux_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::external_control_connection *arg1 = (cmf::water::external_control_connection *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"external_control_connection_flux_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__external_control_connection, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "external_control_connection_flux_set" "', argument " "1"" of type '" "cmf::water::external_control_connection *""'"); + } + arg1 = reinterpret_cast< cmf::water::external_control_connection * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "external_control_connection_flux_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->flux = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_external_control_connection_flux_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::external_control_connection *arg1 = (cmf::water::external_control_connection *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__external_control_connection, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "external_control_connection_flux_get" "', argument " "1"" of type '" "cmf::water::external_control_connection *""'"); + } + arg1 = reinterpret_cast< cmf::water::external_control_connection * >(argp1); + result = (real) ((arg1)->flux); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_external_control_connection(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::flux_node::ptr arg1 ; + cmf::water::flux_node::ptr arg2 ; + real arg3 = (real) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + double val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "source",(char *) "target",(char *) "flux_value", NULL + }; + cmf::water::external_control_connection *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:new_external_control_connection",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_external_control_connection" "', argument " "1"" of type '" "cmf::water::flux_node::ptr""'"); + } + if (argp1) arg1 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp1)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp1); + } + { + int newmem = 0; + res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_external_control_connection" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); + } + if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); + } + if (obj2) { + ecode3 = SWIG_AsVal_double(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_external_control_connection" "', argument " "3"" of type '" "real""'"); + } + arg3 = static_cast< real >(val3); + } + { + try { + result = (cmf::water::external_control_connection *)new cmf::water::external_control_connection(arg1,arg2,arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__water__external_control_connection, SWIG_POINTER_NEW | 0 ); + + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_external_control_connection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::external_control_connection *arg1 = (cmf::water::external_control_connection *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__external_control_connection, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_external_control_connection" "', argument " "1"" of type '" "cmf::water::external_control_connection *""'"); + } + arg1 = reinterpret_cast< cmf::water::external_control_connection * >(argp1); + { + try { + + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *external_control_connection_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__water__external_control_connection, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *external_control_connection_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_set_flux(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::flux_node::ptr arg1 ; + cmf::water::flux_node::ptr arg2 ; + real arg3 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + double val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "source",(char *) "target",(char *) "flux_value", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:set_flux",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "set_flux" "', argument " "1"" of type '" "cmf::water::flux_node::ptr""'"); + } + if (argp1) arg1 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp1)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp1); + } + { + int newmem = 0; + res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "set_flux" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); + } + if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); + } + ecode3 = SWIG_AsVal_double(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "set_flux" "', argument " "3"" of type '" "real""'"); + } + arg3 = static_cast< real >(val3); + { + try { + cmf::water::set_flux(arg1,arg2,arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_can_set_flux(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::flux_node::ptr arg1 ; + cmf::water::flux_node::ptr arg2 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "source",(char *) "target", NULL + }; + bool result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:can_set_flux",kwnames,&obj0,&obj1)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "can_set_flux" "', argument " "1"" of type '" "cmf::water::flux_node::ptr""'"); + } + if (argp1) arg1 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp1)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp1); + } + { + int newmem = 0; + res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "can_set_flux" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); + } + if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); + } + { + try { + result = (bool)cmf::water::can_set_flux(arg1,arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_kinematic_wave_residencetime_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::kinematic_wave *arg1 = (cmf::water::kinematic_wave *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"kinematic_wave_residencetime_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__kinematic_wave, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "kinematic_wave_residencetime_set" "', argument " "1"" of type '" "cmf::water::kinematic_wave *""'"); + } + arg1 = reinterpret_cast< cmf::water::kinematic_wave * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "kinematic_wave_residencetime_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->residencetime = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_kinematic_wave_residencetime_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::kinematic_wave *arg1 = (cmf::water::kinematic_wave *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__kinematic_wave, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "kinematic_wave_residencetime_get" "', argument " "1"" of type '" "cmf::water::kinematic_wave *""'"); + } + arg1 = reinterpret_cast< cmf::water::kinematic_wave * >(argp1); + result = (real) ((arg1)->residencetime); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_kinematic_wave_exponent_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::kinematic_wave *arg1 = (cmf::water::kinematic_wave *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"kinematic_wave_exponent_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__kinematic_wave, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "kinematic_wave_exponent_set" "', argument " "1"" of type '" "cmf::water::kinematic_wave *""'"); + } + arg1 = reinterpret_cast< cmf::water::kinematic_wave * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "kinematic_wave_exponent_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->exponent = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_kinematic_wave_exponent_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::kinematic_wave *arg1 = (cmf::water::kinematic_wave *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__kinematic_wave, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "kinematic_wave_exponent_get" "', argument " "1"" of type '" "cmf::water::kinematic_wave *""'"); + } + arg1 = reinterpret_cast< cmf::water::kinematic_wave * >(argp1); + result = (real) ((arg1)->exponent); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_kinematic_wave_residual_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::kinematic_wave *arg1 = (cmf::water::kinematic_wave *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"kinematic_wave_residual_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__kinematic_wave, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "kinematic_wave_residual_set" "', argument " "1"" of type '" "cmf::water::kinematic_wave *""'"); + } + arg1 = reinterpret_cast< cmf::water::kinematic_wave * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "kinematic_wave_residual_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->residual = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_kinematic_wave_residual_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::kinematic_wave *arg1 = (cmf::water::kinematic_wave *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__kinematic_wave, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "kinematic_wave_residual_get" "', argument " "1"" of type '" "cmf::water::kinematic_wave *""'"); + } + arg1 = reinterpret_cast< cmf::water::kinematic_wave * >(argp1); + result = (real) ((arg1)->residual); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_kinematic_wave_V0_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::kinematic_wave *arg1 = (cmf::water::kinematic_wave *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"kinematic_wave_V0_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__kinematic_wave, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "kinematic_wave_V0_set" "', argument " "1"" of type '" "cmf::water::kinematic_wave *""'"); + } + arg1 = reinterpret_cast< cmf::water::kinematic_wave * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "kinematic_wave_V0_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->V0 = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_kinematic_wave_V0_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::kinematic_wave *arg1 = (cmf::water::kinematic_wave *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__kinematic_wave, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "kinematic_wave_V0_get" "', argument " "1"" of type '" "cmf::water::kinematic_wave *""'"); + } + arg1 = reinterpret_cast< cmf::water::kinematic_wave * >(argp1); + result = (real) ((arg1)->V0); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_kinematic_wave(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::WaterStorage::ptr arg1 ; + cmf::water::flux_node::ptr arg2 ; + real arg3 ; + real arg4 = (real) 1.0 ; + real arg5 = (real) 0.0 ; + real arg6 = (real) 1.0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + double val3 ; + int ecode3 = 0 ; + double val4 ; + int ecode4 = 0 ; + double val5 ; + int ecode5 = 0 ; + double val6 ; + int ecode6 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + PyObject * obj5 = 0 ; + char * kwnames[] = { + (char *) "source",(char *) "target",(char *) "residencetime",(char *) "exponent",(char *) "residual",(char *) "V0", NULL + }; + cmf::water::kinematic_wave *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOO:new_kinematic_wave",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_kinematic_wave" "', argument " "1"" of type '" "cmf::water::WaterStorage::ptr""'"); + } + if (argp1) arg1 = *(reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp1)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp1); + } + { + int newmem = 0; + res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_kinematic_wave" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); + } + if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); + } + ecode3 = SWIG_AsVal_double(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_kinematic_wave" "', argument " "3"" of type '" "real""'"); + } + arg3 = static_cast< real >(val3); + if (obj3) { + ecode4 = SWIG_AsVal_double(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_kinematic_wave" "', argument " "4"" of type '" "real""'"); + } + arg4 = static_cast< real >(val4); + } + if (obj4) { + ecode5 = SWIG_AsVal_double(obj4, &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_kinematic_wave" "', argument " "5"" of type '" "real""'"); + } + arg5 = static_cast< real >(val5); + } + if (obj5) { + ecode6 = SWIG_AsVal_double(obj5, &val6); + if (!SWIG_IsOK(ecode6)) { + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_kinematic_wave" "', argument " "6"" of type '" "real""'"); + } + arg6 = static_cast< real >(val6); + } + { + try { + result = (cmf::water::kinematic_wave *)new cmf::water::kinematic_wave(arg1,arg2,arg3,arg4,arg5,arg6); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__water__kinematic_wave, SWIG_POINTER_NEW | 0 ); + + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_kinematic_wave(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::kinematic_wave *arg1 = (cmf::water::kinematic_wave *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__kinematic_wave, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_kinematic_wave" "', argument " "1"" of type '" "cmf::water::kinematic_wave *""'"); + } + arg1 = reinterpret_cast< cmf::water::kinematic_wave * >(argp1); + { + try { + + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *kinematic_wave_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__water__kinematic_wave, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *kinematic_wave_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_LinearStorageConnection_residencetime_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::LinearStorageConnection *arg1 = (cmf::water::LinearStorageConnection *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"LinearStorageConnection_residencetime_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__LinearStorageConnection, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LinearStorageConnection_residencetime_set" "', argument " "1"" of type '" "cmf::water::LinearStorageConnection *""'"); + } + arg1 = reinterpret_cast< cmf::water::LinearStorageConnection * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LinearStorageConnection_residencetime_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->residencetime = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_LinearStorageConnection_residencetime_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::LinearStorageConnection *arg1 = (cmf::water::LinearStorageConnection *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__LinearStorageConnection, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LinearStorageConnection_residencetime_get" "', argument " "1"" of type '" "cmf::water::LinearStorageConnection *""'"); + } + arg1 = reinterpret_cast< cmf::water::LinearStorageConnection * >(argp1); + result = (real) ((arg1)->residencetime); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_LinearStorageConnection_residual_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::LinearStorageConnection *arg1 = (cmf::water::LinearStorageConnection *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"LinearStorageConnection_residual_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__LinearStorageConnection, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LinearStorageConnection_residual_set" "', argument " "1"" of type '" "cmf::water::LinearStorageConnection *""'"); + } + arg1 = reinterpret_cast< cmf::water::LinearStorageConnection * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LinearStorageConnection_residual_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->residual = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_LinearStorageConnection_residual_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::LinearStorageConnection *arg1 = (cmf::water::LinearStorageConnection *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__LinearStorageConnection, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LinearStorageConnection_residual_get" "', argument " "1"" of type '" "cmf::water::LinearStorageConnection *""'"); + } + arg1 = reinterpret_cast< cmf::water::LinearStorageConnection * >(argp1); + result = (real) ((arg1)->residual); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_LinearStorageConnection(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::WaterStorage::ptr arg1 ; + cmf::water::flux_node::ptr arg2 ; + real arg3 ; + real arg4 = (real) 0.0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + double val3 ; + int ecode3 = 0 ; + double val4 ; + int ecode4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + char * kwnames[] = { + (char *) "source",(char *) "target",(char *) "residencetime",(char *) "residual", NULL + }; + cmf::water::LinearStorageConnection *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|O:new_LinearStorageConnection",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_LinearStorageConnection" "', argument " "1"" of type '" "cmf::water::WaterStorage::ptr""'"); + } + if (argp1) arg1 = *(reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp1)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp1); + } + { + int newmem = 0; + res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_LinearStorageConnection" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); + } + if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); + } + ecode3 = SWIG_AsVal_double(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_LinearStorageConnection" "', argument " "3"" of type '" "real""'"); + } + arg3 = static_cast< real >(val3); + if (obj3) { + ecode4 = SWIG_AsVal_double(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_LinearStorageConnection" "', argument " "4"" of type '" "real""'"); + } + arg4 = static_cast< real >(val4); + } + { + try { + result = (cmf::water::LinearStorageConnection *)new cmf::water::LinearStorageConnection(arg1,arg2,arg3,arg4); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__water__LinearStorageConnection, SWIG_POINTER_NEW | 0 ); + + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_LinearStorageConnection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::LinearStorageConnection *arg1 = (cmf::water::LinearStorageConnection *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__LinearStorageConnection, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_LinearStorageConnection" "', argument " "1"" of type '" "cmf::water::LinearStorageConnection *""'"); + } + arg1 = reinterpret_cast< cmf::water::LinearStorageConnection * >(argp1); + { + try { + + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *LinearStorageConnection_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__water__LinearStorageConnection, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *LinearStorageConnection_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_PowerLawConnection_Q0_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::PowerLawConnection *arg1 = (cmf::water::PowerLawConnection *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"PowerLawConnection_Q0_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__PowerLawConnection, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PowerLawConnection_Q0_set" "', argument " "1"" of type '" "cmf::water::PowerLawConnection *""'"); + } + arg1 = reinterpret_cast< cmf::water::PowerLawConnection * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "PowerLawConnection_Q0_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->Q0 = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_PowerLawConnection_Q0_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::PowerLawConnection *arg1 = (cmf::water::PowerLawConnection *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__PowerLawConnection, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PowerLawConnection_Q0_get" "', argument " "1"" of type '" "cmf::water::PowerLawConnection *""'"); + } + arg1 = reinterpret_cast< cmf::water::PowerLawConnection * >(argp1); + result = (real) ((arg1)->Q0); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_PowerLawConnection_beta_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::PowerLawConnection *arg1 = (cmf::water::PowerLawConnection *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"PowerLawConnection_beta_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__PowerLawConnection, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PowerLawConnection_beta_set" "', argument " "1"" of type '" "cmf::water::PowerLawConnection *""'"); + } + arg1 = reinterpret_cast< cmf::water::PowerLawConnection * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "PowerLawConnection_beta_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->beta = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_PowerLawConnection_beta_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::PowerLawConnection *arg1 = (cmf::water::PowerLawConnection *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__PowerLawConnection, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PowerLawConnection_beta_get" "', argument " "1"" of type '" "cmf::water::PowerLawConnection *""'"); + } + arg1 = reinterpret_cast< cmf::water::PowerLawConnection * >(argp1); + result = (real) ((arg1)->beta); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_PowerLawConnection_residual_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::PowerLawConnection *arg1 = (cmf::water::PowerLawConnection *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"PowerLawConnection_residual_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__PowerLawConnection, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PowerLawConnection_residual_set" "', argument " "1"" of type '" "cmf::water::PowerLawConnection *""'"); + } + arg1 = reinterpret_cast< cmf::water::PowerLawConnection * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "PowerLawConnection_residual_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->residual = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_PowerLawConnection_residual_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::PowerLawConnection *arg1 = (cmf::water::PowerLawConnection *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__PowerLawConnection, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PowerLawConnection_residual_get" "', argument " "1"" of type '" "cmf::water::PowerLawConnection *""'"); + } + arg1 = reinterpret_cast< cmf::water::PowerLawConnection * >(argp1); + result = (real) ((arg1)->residual); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_PowerLawConnection_V0_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::PowerLawConnection *arg1 = (cmf::water::PowerLawConnection *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"PowerLawConnection_V0_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__PowerLawConnection, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PowerLawConnection_V0_set" "', argument " "1"" of type '" "cmf::water::PowerLawConnection *""'"); + } + arg1 = reinterpret_cast< cmf::water::PowerLawConnection * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "PowerLawConnection_V0_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->V0 = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_PowerLawConnection_V0_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::PowerLawConnection *arg1 = (cmf::water::PowerLawConnection *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__PowerLawConnection, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PowerLawConnection_V0_get" "', argument " "1"" of type '" "cmf::water::PowerLawConnection *""'"); + } + arg1 = reinterpret_cast< cmf::water::PowerLawConnection * >(argp1); + result = (real) ((arg1)->V0); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_PowerLawConnection(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::WaterStorage::ptr arg1 ; + cmf::water::flux_node::ptr arg2 ; + real arg3 ; + real arg4 ; + real arg5 = (real) 1.0 ; + real arg6 = (real) 0.0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + double val3 ; + int ecode3 = 0 ; + double val4 ; + int ecode4 = 0 ; + double val5 ; + int ecode5 = 0 ; + double val6 ; + int ecode6 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + PyObject * obj5 = 0 ; + char * kwnames[] = { + (char *) "source",(char *) "target",(char *) "Q0",(char *) "V0",(char *) "beta",(char *) "residual", NULL + }; + cmf::water::PowerLawConnection *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO|OO:new_PowerLawConnection",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_PowerLawConnection" "', argument " "1"" of type '" "cmf::water::WaterStorage::ptr""'"); + } + if (argp1) arg1 = *(reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp1)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp1); + } + { + int newmem = 0; + res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_PowerLawConnection" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); + } + if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); + } + ecode3 = SWIG_AsVal_double(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_PowerLawConnection" "', argument " "3"" of type '" "real""'"); + } + arg3 = static_cast< real >(val3); + ecode4 = SWIG_AsVal_double(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_PowerLawConnection" "', argument " "4"" of type '" "real""'"); + } + arg4 = static_cast< real >(val4); + if (obj4) { + ecode5 = SWIG_AsVal_double(obj4, &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_PowerLawConnection" "', argument " "5"" of type '" "real""'"); + } + arg5 = static_cast< real >(val5); + } + if (obj5) { + ecode6 = SWIG_AsVal_double(obj5, &val6); + if (!SWIG_IsOK(ecode6)) { + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_PowerLawConnection" "', argument " "6"" of type '" "real""'"); + } + arg6 = static_cast< real >(val6); + } + { + try { + result = (cmf::water::PowerLawConnection *)new cmf::water::PowerLawConnection(arg1,arg2,arg3,arg4,arg5,arg6); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__water__PowerLawConnection, SWIG_POINTER_NEW | 0 ); + + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_PowerLawConnection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::PowerLawConnection *arg1 = (cmf::water::PowerLawConnection *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__PowerLawConnection, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_PowerLawConnection" "', argument " "1"" of type '" "cmf::water::PowerLawConnection *""'"); + } + arg1 = reinterpret_cast< cmf::water::PowerLawConnection * >(argp1); + { + try { + + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *PowerLawConnection_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__water__PowerLawConnection, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *PowerLawConnection_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_ExponentialDeclineConnection_Q0_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::ExponentialDeclineConnection *arg1 = (cmf::water::ExponentialDeclineConnection *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"ExponentialDeclineConnection_Q0_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__ExponentialDeclineConnection, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExponentialDeclineConnection_Q0_set" "', argument " "1"" of type '" "cmf::water::ExponentialDeclineConnection *""'"); + } + arg1 = reinterpret_cast< cmf::water::ExponentialDeclineConnection * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ExponentialDeclineConnection_Q0_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->Q0 = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ExponentialDeclineConnection_Q0_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::ExponentialDeclineConnection *arg1 = (cmf::water::ExponentialDeclineConnection *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__ExponentialDeclineConnection, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExponentialDeclineConnection_Q0_get" "', argument " "1"" of type '" "cmf::water::ExponentialDeclineConnection *""'"); + } + arg1 = reinterpret_cast< cmf::water::ExponentialDeclineConnection * >(argp1); + result = (real) ((arg1)->Q0); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ExponentialDeclineConnection_m_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::ExponentialDeclineConnection *arg1 = (cmf::water::ExponentialDeclineConnection *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"ExponentialDeclineConnection_m_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__ExponentialDeclineConnection, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExponentialDeclineConnection_m_set" "', argument " "1"" of type '" "cmf::water::ExponentialDeclineConnection *""'"); + } + arg1 = reinterpret_cast< cmf::water::ExponentialDeclineConnection * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ExponentialDeclineConnection_m_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->m = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ExponentialDeclineConnection_m_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::ExponentialDeclineConnection *arg1 = (cmf::water::ExponentialDeclineConnection *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__ExponentialDeclineConnection, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExponentialDeclineConnection_m_get" "', argument " "1"" of type '" "cmf::water::ExponentialDeclineConnection *""'"); + } + arg1 = reinterpret_cast< cmf::water::ExponentialDeclineConnection * >(argp1); + result = (real) ((arg1)->m); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ExponentialDeclineConnection_V0_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::ExponentialDeclineConnection *arg1 = (cmf::water::ExponentialDeclineConnection *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"ExponentialDeclineConnection_V0_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__ExponentialDeclineConnection, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExponentialDeclineConnection_V0_set" "', argument " "1"" of type '" "cmf::water::ExponentialDeclineConnection *""'"); + } + arg1 = reinterpret_cast< cmf::water::ExponentialDeclineConnection * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ExponentialDeclineConnection_V0_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->V0 = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ExponentialDeclineConnection_V0_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::ExponentialDeclineConnection *arg1 = (cmf::water::ExponentialDeclineConnection *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__ExponentialDeclineConnection, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExponentialDeclineConnection_V0_get" "', argument " "1"" of type '" "cmf::water::ExponentialDeclineConnection *""'"); + } + arg1 = reinterpret_cast< cmf::water::ExponentialDeclineConnection * >(argp1); + result = (real) ((arg1)->V0); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ExponentialDeclineConnection(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::WaterStorage::ptr arg1 ; + cmf::water::flux_node::ptr arg2 ; + real arg3 ; + real arg4 ; + real arg5 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + double val3 ; + int ecode3 = 0 ; + double val4 ; + int ecode4 = 0 ; + double val5 ; + int ecode5 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + char * kwnames[] = { + (char *) "source",(char *) "target",(char *) "Q0",(char *) "V0",(char *) "m", NULL + }; + cmf::water::ExponentialDeclineConnection *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOO:new_ExponentialDeclineConnection",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ExponentialDeclineConnection" "', argument " "1"" of type '" "cmf::water::WaterStorage::ptr""'"); + } + if (argp1) arg1 = *(reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp1)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp1); + } + { + int newmem = 0; + res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ExponentialDeclineConnection" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); + } + if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); + } + ecode3 = SWIG_AsVal_double(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_ExponentialDeclineConnection" "', argument " "3"" of type '" "real""'"); + } + arg3 = static_cast< real >(val3); + ecode4 = SWIG_AsVal_double(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_ExponentialDeclineConnection" "', argument " "4"" of type '" "real""'"); + } + arg4 = static_cast< real >(val4); + ecode5 = SWIG_AsVal_double(obj4, &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_ExponentialDeclineConnection" "', argument " "5"" of type '" "real""'"); + } + arg5 = static_cast< real >(val5); + { + try { + result = (cmf::water::ExponentialDeclineConnection *)new cmf::water::ExponentialDeclineConnection(arg1,arg2,arg3,arg4,arg5); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__water__ExponentialDeclineConnection, SWIG_POINTER_NEW | 0 ); + + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_ExponentialDeclineConnection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::ExponentialDeclineConnection *arg1 = (cmf::water::ExponentialDeclineConnection *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__ExponentialDeclineConnection, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ExponentialDeclineConnection" "', argument " "1"" of type '" "cmf::water::ExponentialDeclineConnection *""'"); + } + arg1 = reinterpret_cast< cmf::water::ExponentialDeclineConnection * >(argp1); + { + try { + + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *ExponentialDeclineConnection_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__water__ExponentialDeclineConnection, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *ExponentialDeclineConnection_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_ConstraintLinearStorageConnection_residencetime_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::ConstraintLinearStorageConnection *arg1 = (cmf::water::ConstraintLinearStorageConnection *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"ConstraintLinearStorageConnection_residencetime_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__ConstraintLinearStorageConnection, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ConstraintLinearStorageConnection_residencetime_set" "', argument " "1"" of type '" "cmf::water::ConstraintLinearStorageConnection *""'"); + } + arg1 = reinterpret_cast< cmf::water::ConstraintLinearStorageConnection * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ConstraintLinearStorageConnection_residencetime_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->residencetime = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ConstraintLinearStorageConnection_residencetime_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::ConstraintLinearStorageConnection *arg1 = (cmf::water::ConstraintLinearStorageConnection *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__ConstraintLinearStorageConnection, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ConstraintLinearStorageConnection_residencetime_get" "', argument " "1"" of type '" "cmf::water::ConstraintLinearStorageConnection *""'"); + } + arg1 = reinterpret_cast< cmf::water::ConstraintLinearStorageConnection * >(argp1); + result = (real) ((arg1)->residencetime); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ConstraintLinearStorageConnection_Vlmin_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::ConstraintLinearStorageConnection *arg1 = (cmf::water::ConstraintLinearStorageConnection *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"ConstraintLinearStorageConnection_Vlmin_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__ConstraintLinearStorageConnection, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ConstraintLinearStorageConnection_Vlmin_set" "', argument " "1"" of type '" "cmf::water::ConstraintLinearStorageConnection *""'"); + } + arg1 = reinterpret_cast< cmf::water::ConstraintLinearStorageConnection * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ConstraintLinearStorageConnection_Vlmin_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->Vlmin = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ConstraintLinearStorageConnection_Vlmin_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::ConstraintLinearStorageConnection *arg1 = (cmf::water::ConstraintLinearStorageConnection *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__ConstraintLinearStorageConnection, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ConstraintLinearStorageConnection_Vlmin_get" "', argument " "1"" of type '" "cmf::water::ConstraintLinearStorageConnection *""'"); + } + arg1 = reinterpret_cast< cmf::water::ConstraintLinearStorageConnection * >(argp1); + result = (real) ((arg1)->Vlmin); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ConstraintLinearStorageConnection_Vrmax_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::ConstraintLinearStorageConnection *arg1 = (cmf::water::ConstraintLinearStorageConnection *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"ConstraintLinearStorageConnection_Vrmax_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__ConstraintLinearStorageConnection, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ConstraintLinearStorageConnection_Vrmax_set" "', argument " "1"" of type '" "cmf::water::ConstraintLinearStorageConnection *""'"); + } + arg1 = reinterpret_cast< cmf::water::ConstraintLinearStorageConnection * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ConstraintLinearStorageConnection_Vrmax_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->Vrmax = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ConstraintLinearStorageConnection_Vrmax_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::ConstraintLinearStorageConnection *arg1 = (cmf::water::ConstraintLinearStorageConnection *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__ConstraintLinearStorageConnection, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ConstraintLinearStorageConnection_Vrmax_get" "', argument " "1"" of type '" "cmf::water::ConstraintLinearStorageConnection *""'"); + } + arg1 = reinterpret_cast< cmf::water::ConstraintLinearStorageConnection * >(argp1); + result = (real) ((arg1)->Vrmax); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ConstraintLinearStorageConnection(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::WaterStorage::ptr arg1 ; + cmf::water::WaterStorage::ptr arg2 ; + real arg3 = (real) 1.0 ; + real arg4 = (real) 0.0 ; + real arg5 = (real) 1.0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + double val3 ; + int ecode3 = 0 ; + double val4 ; + int ecode4 = 0 ; + double val5 ; + int ecode5 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + char * kwnames[] = { + (char *) "source",(char *) "target",(char *) "residencetime",(char *) "Vlmin",(char *) "Vrmax", NULL + }; + cmf::water::ConstraintLinearStorageConnection *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOO:new_ConstraintLinearStorageConnection",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ConstraintLinearStorageConnection" "', argument " "1"" of type '" "cmf::water::WaterStorage::ptr""'"); + } + if (argp1) arg1 = *(reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp1)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp1); + } + { + int newmem = 0; + res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0 , &newmem); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ConstraintLinearStorageConnection" "', argument " "2"" of type '" "cmf::water::WaterStorage::ptr""'"); + } + if (argp2) arg2 = *(reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp2)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp2); + } + if (obj2) { + ecode3 = SWIG_AsVal_double(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_ConstraintLinearStorageConnection" "', argument " "3"" of type '" "real""'"); + } + arg3 = static_cast< real >(val3); + } + if (obj3) { + ecode4 = SWIG_AsVal_double(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_ConstraintLinearStorageConnection" "', argument " "4"" of type '" "real""'"); + } + arg4 = static_cast< real >(val4); + } + if (obj4) { + ecode5 = SWIG_AsVal_double(obj4, &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_ConstraintLinearStorageConnection" "', argument " "5"" of type '" "real""'"); + } + arg5 = static_cast< real >(val5); + } + { + try { + result = (cmf::water::ConstraintLinearStorageConnection *)new cmf::water::ConstraintLinearStorageConnection(arg1,arg2,arg3,arg4,arg5); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__water__ConstraintLinearStorageConnection, SWIG_POINTER_NEW | 0 ); + + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_ConstraintLinearStorageConnection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::ConstraintLinearStorageConnection *arg1 = (cmf::water::ConstraintLinearStorageConnection *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__ConstraintLinearStorageConnection, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ConstraintLinearStorageConnection" "', argument " "1"" of type '" "cmf::water::ConstraintLinearStorageConnection *""'"); + } + arg1 = reinterpret_cast< cmf::water::ConstraintLinearStorageConnection * >(argp1); + { + try { + + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *ConstraintLinearStorageConnection_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__water__ConstraintLinearStorageConnection, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *ConstraintLinearStorageConnection_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_bidirectional_kinematic_exchange_Vmaxsuc_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::bidirectional_kinematic_exchange *arg1 = (cmf::water::bidirectional_kinematic_exchange *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"bidirectional_kinematic_exchange_Vmaxsuc_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__bidirectional_kinematic_exchange, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bidirectional_kinematic_exchange_Vmaxsuc_set" "', argument " "1"" of type '" "cmf::water::bidirectional_kinematic_exchange *""'"); + } + arg1 = reinterpret_cast< cmf::water::bidirectional_kinematic_exchange * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "bidirectional_kinematic_exchange_Vmaxsuc_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->Vmaxsuc = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_bidirectional_kinematic_exchange_Vmaxsuc_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::bidirectional_kinematic_exchange *arg1 = (cmf::water::bidirectional_kinematic_exchange *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__bidirectional_kinematic_exchange, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bidirectional_kinematic_exchange_Vmaxsuc_get" "', argument " "1"" of type '" "cmf::water::bidirectional_kinematic_exchange *""'"); + } + arg1 = reinterpret_cast< cmf::water::bidirectional_kinematic_exchange * >(argp1); + result = (real) ((arg1)->Vmaxsuc); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_bidirectional_kinematic_exchange_Vminspill_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::bidirectional_kinematic_exchange *arg1 = (cmf::water::bidirectional_kinematic_exchange *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"bidirectional_kinematic_exchange_Vminspill_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__bidirectional_kinematic_exchange, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bidirectional_kinematic_exchange_Vminspill_set" "', argument " "1"" of type '" "cmf::water::bidirectional_kinematic_exchange *""'"); + } + arg1 = reinterpret_cast< cmf::water::bidirectional_kinematic_exchange * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "bidirectional_kinematic_exchange_Vminspill_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->Vminspill = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_bidirectional_kinematic_exchange_Vminspill_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::bidirectional_kinematic_exchange *arg1 = (cmf::water::bidirectional_kinematic_exchange *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__bidirectional_kinematic_exchange, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bidirectional_kinematic_exchange_Vminspill_get" "', argument " "1"" of type '" "cmf::water::bidirectional_kinematic_exchange *""'"); + } + arg1 = reinterpret_cast< cmf::water::bidirectional_kinematic_exchange * >(argp1); + result = (real) ((arg1)->Vminspill); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_bidirectional_kinematic_exchange_qspill_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::bidirectional_kinematic_exchange *arg1 = (cmf::water::bidirectional_kinematic_exchange *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"bidirectional_kinematic_exchange_qspill_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__bidirectional_kinematic_exchange, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bidirectional_kinematic_exchange_qspill_set" "', argument " "1"" of type '" "cmf::water::bidirectional_kinematic_exchange *""'"); + } + arg1 = reinterpret_cast< cmf::water::bidirectional_kinematic_exchange * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "bidirectional_kinematic_exchange_qspill_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->qspill = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_bidirectional_kinematic_exchange_qspill_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::bidirectional_kinematic_exchange *arg1 = (cmf::water::bidirectional_kinematic_exchange *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__bidirectional_kinematic_exchange, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bidirectional_kinematic_exchange_qspill_get" "', argument " "1"" of type '" "cmf::water::bidirectional_kinematic_exchange *""'"); + } + arg1 = reinterpret_cast< cmf::water::bidirectional_kinematic_exchange * >(argp1); + result = (real) ((arg1)->qspill); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_bidirectional_kinematic_exchange_qsuc_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::bidirectional_kinematic_exchange *arg1 = (cmf::water::bidirectional_kinematic_exchange *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"bidirectional_kinematic_exchange_qsuc_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__bidirectional_kinematic_exchange, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bidirectional_kinematic_exchange_qsuc_set" "', argument " "1"" of type '" "cmf::water::bidirectional_kinematic_exchange *""'"); + } + arg1 = reinterpret_cast< cmf::water::bidirectional_kinematic_exchange * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "bidirectional_kinematic_exchange_qsuc_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->qsuc = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_bidirectional_kinematic_exchange_qsuc_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::bidirectional_kinematic_exchange *arg1 = (cmf::water::bidirectional_kinematic_exchange *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__bidirectional_kinematic_exchange, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bidirectional_kinematic_exchange_qsuc_get" "', argument " "1"" of type '" "cmf::water::bidirectional_kinematic_exchange *""'"); + } + arg1 = reinterpret_cast< cmf::water::bidirectional_kinematic_exchange * >(argp1); + result = (real) ((arg1)->qsuc); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_bidirectional_kinematic_exchange_beta_suc_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::bidirectional_kinematic_exchange *arg1 = (cmf::water::bidirectional_kinematic_exchange *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"bidirectional_kinematic_exchange_beta_suc_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__bidirectional_kinematic_exchange, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bidirectional_kinematic_exchange_beta_suc_set" "', argument " "1"" of type '" "cmf::water::bidirectional_kinematic_exchange *""'"); + } + arg1 = reinterpret_cast< cmf::water::bidirectional_kinematic_exchange * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "bidirectional_kinematic_exchange_beta_suc_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->beta_suc = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_bidirectional_kinematic_exchange_beta_suc_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::bidirectional_kinematic_exchange *arg1 = (cmf::water::bidirectional_kinematic_exchange *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__bidirectional_kinematic_exchange, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bidirectional_kinematic_exchange_beta_suc_get" "', argument " "1"" of type '" "cmf::water::bidirectional_kinematic_exchange *""'"); + } + arg1 = reinterpret_cast< cmf::water::bidirectional_kinematic_exchange * >(argp1); + result = (real) ((arg1)->beta_suc); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_bidirectional_kinematic_exchange_beta_spill_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::bidirectional_kinematic_exchange *arg1 = (cmf::water::bidirectional_kinematic_exchange *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"bidirectional_kinematic_exchange_beta_spill_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__bidirectional_kinematic_exchange, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bidirectional_kinematic_exchange_beta_spill_set" "', argument " "1"" of type '" "cmf::water::bidirectional_kinematic_exchange *""'"); + } + arg1 = reinterpret_cast< cmf::water::bidirectional_kinematic_exchange * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "bidirectional_kinematic_exchange_beta_spill_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->beta_spill = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_bidirectional_kinematic_exchange_beta_spill_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::bidirectional_kinematic_exchange *arg1 = (cmf::water::bidirectional_kinematic_exchange *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__bidirectional_kinematic_exchange, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bidirectional_kinematic_exchange_beta_spill_get" "', argument " "1"" of type '" "cmf::water::bidirectional_kinematic_exchange *""'"); + } + arg1 = reinterpret_cast< cmf::water::bidirectional_kinematic_exchange * >(argp1); + result = (real) ((arg1)->beta_spill); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_bidirectional_kinematic_exchange(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::WaterStorage::ptr arg1 ; + cmf::water::flux_node::ptr arg2 ; + real arg3 ; + real arg4 ; + real arg5 ; + real arg6 ; + real arg7 ; + real arg8 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + double val3 ; + int ecode3 = 0 ; + double val4 ; + int ecode4 = 0 ; + double val5 ; + int ecode5 = 0 ; + double val6 ; + int ecode6 = 0 ; + double val7 ; + int ecode7 = 0 ; + double val8 ; + int ecode8 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + PyObject * obj5 = 0 ; + PyObject * obj6 = 0 ; + PyObject * obj7 = 0 ; + char * kwnames[] = { + (char *) "source",(char *) "target",(char *) "Vminspill",(char *) "Vmaxsuc",(char *) "qspill",(char *) "qsuc",(char *) "beta_spill",(char *) "beta_suc", NULL + }; + cmf::water::bidirectional_kinematic_exchange *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOOOOO:new_bidirectional_kinematic_exchange",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_bidirectional_kinematic_exchange" "', argument " "1"" of type '" "cmf::water::WaterStorage::ptr""'"); + } + if (argp1) arg1 = *(reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp1)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp1); + } + { + int newmem = 0; + res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_bidirectional_kinematic_exchange" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); + } + if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); + } + ecode3 = SWIG_AsVal_double(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_bidirectional_kinematic_exchange" "', argument " "3"" of type '" "real""'"); + } + arg3 = static_cast< real >(val3); + ecode4 = SWIG_AsVal_double(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_bidirectional_kinematic_exchange" "', argument " "4"" of type '" "real""'"); + } + arg4 = static_cast< real >(val4); + ecode5 = SWIG_AsVal_double(obj4, &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_bidirectional_kinematic_exchange" "', argument " "5"" of type '" "real""'"); + } + arg5 = static_cast< real >(val5); + ecode6 = SWIG_AsVal_double(obj5, &val6); + if (!SWIG_IsOK(ecode6)) { + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_bidirectional_kinematic_exchange" "', argument " "6"" of type '" "real""'"); + } + arg6 = static_cast< real >(val6); + ecode7 = SWIG_AsVal_double(obj6, &val7); + if (!SWIG_IsOK(ecode7)) { + SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_bidirectional_kinematic_exchange" "', argument " "7"" of type '" "real""'"); + } + arg7 = static_cast< real >(val7); + ecode8 = SWIG_AsVal_double(obj7, &val8); + if (!SWIG_IsOK(ecode8)) { + SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_bidirectional_kinematic_exchange" "', argument " "8"" of type '" "real""'"); + } + arg8 = static_cast< real >(val8); + { + try { + result = (cmf::water::bidirectional_kinematic_exchange *)new cmf::water::bidirectional_kinematic_exchange(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__water__bidirectional_kinematic_exchange, SWIG_POINTER_NEW | 0 ); + + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_bidirectional_kinematic_exchange(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::bidirectional_kinematic_exchange *arg1 = (cmf::water::bidirectional_kinematic_exchange *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__bidirectional_kinematic_exchange, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_bidirectional_kinematic_exchange" "', argument " "1"" of type '" "cmf::water::bidirectional_kinematic_exchange *""'"); + } + arg1 = reinterpret_cast< cmf::water::bidirectional_kinematic_exchange * >(argp1); + { + try { + + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *bidirectional_kinematic_exchange_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__water__bidirectional_kinematic_exchange, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *bidirectional_kinematic_exchange_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_constraint_kinematic_wave_residencetime_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::constraint_kinematic_wave *arg1 = (cmf::water::constraint_kinematic_wave *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"constraint_kinematic_wave_residencetime_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__constraint_kinematic_wave, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "constraint_kinematic_wave_residencetime_set" "', argument " "1"" of type '" "cmf::water::constraint_kinematic_wave *""'"); + } + arg1 = reinterpret_cast< cmf::water::constraint_kinematic_wave * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "constraint_kinematic_wave_residencetime_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->residencetime = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_constraint_kinematic_wave_residencetime_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::constraint_kinematic_wave *arg1 = (cmf::water::constraint_kinematic_wave *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__constraint_kinematic_wave, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "constraint_kinematic_wave_residencetime_get" "', argument " "1"" of type '" "cmf::water::constraint_kinematic_wave *""'"); + } + arg1 = reinterpret_cast< cmf::water::constraint_kinematic_wave * >(argp1); + result = (real) ((arg1)->residencetime); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_constraint_kinematic_wave_beta_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::constraint_kinematic_wave *arg1 = (cmf::water::constraint_kinematic_wave *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"constraint_kinematic_wave_beta_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__constraint_kinematic_wave, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "constraint_kinematic_wave_beta_set" "', argument " "1"" of type '" "cmf::water::constraint_kinematic_wave *""'"); + } + arg1 = reinterpret_cast< cmf::water::constraint_kinematic_wave * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "constraint_kinematic_wave_beta_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->beta = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_constraint_kinematic_wave_beta_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::constraint_kinematic_wave *arg1 = (cmf::water::constraint_kinematic_wave *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__constraint_kinematic_wave, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "constraint_kinematic_wave_beta_get" "', argument " "1"" of type '" "cmf::water::constraint_kinematic_wave *""'"); + } + arg1 = reinterpret_cast< cmf::water::constraint_kinematic_wave * >(argp1); + result = (real) ((arg1)->beta); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_constraint_kinematic_wave_residual_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::constraint_kinematic_wave *arg1 = (cmf::water::constraint_kinematic_wave *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"constraint_kinematic_wave_residual_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__constraint_kinematic_wave, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "constraint_kinematic_wave_residual_set" "', argument " "1"" of type '" "cmf::water::constraint_kinematic_wave *""'"); + } + arg1 = reinterpret_cast< cmf::water::constraint_kinematic_wave * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "constraint_kinematic_wave_residual_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->residual = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_constraint_kinematic_wave_residual_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::constraint_kinematic_wave *arg1 = (cmf::water::constraint_kinematic_wave *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__constraint_kinematic_wave, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "constraint_kinematic_wave_residual_get" "', argument " "1"" of type '" "cmf::water::constraint_kinematic_wave *""'"); + } + arg1 = reinterpret_cast< cmf::water::constraint_kinematic_wave * >(argp1); + result = (real) ((arg1)->residual); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_constraint_kinematic_wave_V0_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::constraint_kinematic_wave *arg1 = (cmf::water::constraint_kinematic_wave *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"constraint_kinematic_wave_V0_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__constraint_kinematic_wave, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "constraint_kinematic_wave_V0_set" "', argument " "1"" of type '" "cmf::water::constraint_kinematic_wave *""'"); + } + arg1 = reinterpret_cast< cmf::water::constraint_kinematic_wave * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "constraint_kinematic_wave_V0_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->V0 = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_constraint_kinematic_wave_V0_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::constraint_kinematic_wave *arg1 = (cmf::water::constraint_kinematic_wave *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__constraint_kinematic_wave, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "constraint_kinematic_wave_V0_get" "', argument " "1"" of type '" "cmf::water::constraint_kinematic_wave *""'"); + } + arg1 = reinterpret_cast< cmf::water::constraint_kinematic_wave * >(argp1); + result = (real) ((arg1)->V0); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_constraint_kinematic_wave_Vrmax_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::constraint_kinematic_wave *arg1 = (cmf::water::constraint_kinematic_wave *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"constraint_kinematic_wave_Vrmax_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__constraint_kinematic_wave, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "constraint_kinematic_wave_Vrmax_set" "', argument " "1"" of type '" "cmf::water::constraint_kinematic_wave *""'"); + } + arg1 = reinterpret_cast< cmf::water::constraint_kinematic_wave * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "constraint_kinematic_wave_Vrmax_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->Vrmax = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_constraint_kinematic_wave_Vrmax_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::constraint_kinematic_wave *arg1 = (cmf::water::constraint_kinematic_wave *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__constraint_kinematic_wave, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "constraint_kinematic_wave_Vrmax_get" "', argument " "1"" of type '" "cmf::water::constraint_kinematic_wave *""'"); + } + arg1 = reinterpret_cast< cmf::water::constraint_kinematic_wave * >(argp1); + result = (real) ((arg1)->Vrmax); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_constraint_kinematic_wave_gamma_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::constraint_kinematic_wave *arg1 = (cmf::water::constraint_kinematic_wave *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"constraint_kinematic_wave_gamma_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__constraint_kinematic_wave, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "constraint_kinematic_wave_gamma_set" "', argument " "1"" of type '" "cmf::water::constraint_kinematic_wave *""'"); + } + arg1 = reinterpret_cast< cmf::water::constraint_kinematic_wave * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "constraint_kinematic_wave_gamma_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->gamma = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_constraint_kinematic_wave_gamma_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::constraint_kinematic_wave *arg1 = (cmf::water::constraint_kinematic_wave *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__constraint_kinematic_wave, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "constraint_kinematic_wave_gamma_get" "', argument " "1"" of type '" "cmf::water::constraint_kinematic_wave *""'"); + } + arg1 = reinterpret_cast< cmf::water::constraint_kinematic_wave * >(argp1); + result = (real) ((arg1)->gamma); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_constraint_kinematic_wave(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::WaterStorage::ptr arg1 ; + cmf::water::WaterStorage::ptr arg2 ; + real arg3 = (real) 1.0 ; + real arg4 = (real) 1.0 ; + real arg5 = (real) 0.0 ; + real arg6 = (real) 1.0 ; + real arg7 = (real) 1.0 ; + real arg8 = (real) 1.0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + double val3 ; + int ecode3 = 0 ; + double val4 ; + int ecode4 = 0 ; + double val5 ; + int ecode5 = 0 ; + double val6 ; + int ecode6 = 0 ; + double val7 ; + int ecode7 = 0 ; + double val8 ; + int ecode8 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + PyObject * obj5 = 0 ; + PyObject * obj6 = 0 ; + PyObject * obj7 = 0 ; + char * kwnames[] = { + (char *) "source",(char *) "target",(char *) "residencetime",(char *) "exponent",(char *) "residual",(char *) "V0",(char *) "Vrmax",(char *) "gamma", NULL + }; + cmf::water::constraint_kinematic_wave *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOOOO:new_constraint_kinematic_wave",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_constraint_kinematic_wave" "', argument " "1"" of type '" "cmf::water::WaterStorage::ptr""'"); + } + if (argp1) arg1 = *(reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp1)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp1); + } + { + int newmem = 0; + res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0 , &newmem); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_constraint_kinematic_wave" "', argument " "2"" of type '" "cmf::water::WaterStorage::ptr""'"); + } + if (argp2) arg2 = *(reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp2)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp2); + } + if (obj2) { + ecode3 = SWIG_AsVal_double(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_constraint_kinematic_wave" "', argument " "3"" of type '" "real""'"); + } + arg3 = static_cast< real >(val3); + } + if (obj3) { + ecode4 = SWIG_AsVal_double(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_constraint_kinematic_wave" "', argument " "4"" of type '" "real""'"); + } + arg4 = static_cast< real >(val4); + } + if (obj4) { + ecode5 = SWIG_AsVal_double(obj4, &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_constraint_kinematic_wave" "', argument " "5"" of type '" "real""'"); + } + arg5 = static_cast< real >(val5); + } + if (obj5) { + ecode6 = SWIG_AsVal_double(obj5, &val6); + if (!SWIG_IsOK(ecode6)) { + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_constraint_kinematic_wave" "', argument " "6"" of type '" "real""'"); + } + arg6 = static_cast< real >(val6); + } + if (obj6) { + ecode7 = SWIG_AsVal_double(obj6, &val7); + if (!SWIG_IsOK(ecode7)) { + SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_constraint_kinematic_wave" "', argument " "7"" of type '" "real""'"); + } + arg7 = static_cast< real >(val7); + } + if (obj7) { + ecode8 = SWIG_AsVal_double(obj7, &val8); + if (!SWIG_IsOK(ecode8)) { + SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_constraint_kinematic_wave" "', argument " "8"" of type '" "real""'"); + } + arg8 = static_cast< real >(val8); + } + { + try { + result = (cmf::water::constraint_kinematic_wave *)new cmf::water::constraint_kinematic_wave(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__water__constraint_kinematic_wave, SWIG_POINTER_NEW | 0 ); + + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_constraint_kinematic_wave(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::constraint_kinematic_wave *arg1 = (cmf::water::constraint_kinematic_wave *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__constraint_kinematic_wave, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_constraint_kinematic_wave" "', argument " "1"" of type '" "cmf::water::constraint_kinematic_wave *""'"); + } + arg1 = reinterpret_cast< cmf::water::constraint_kinematic_wave * >(argp1); + { + try { + + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *constraint_kinematic_wave_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__water__constraint_kinematic_wave, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *constraint_kinematic_wave_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_TechnicalFlux_MaxFlux_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::TechnicalFlux *arg1 = (cmf::water::TechnicalFlux *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"TechnicalFlux_MaxFlux_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__TechnicalFlux, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TechnicalFlux_MaxFlux_set" "', argument " "1"" of type '" "cmf::water::TechnicalFlux *""'"); + } + arg1 = reinterpret_cast< cmf::water::TechnicalFlux * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "TechnicalFlux_MaxFlux_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->MaxFlux = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TechnicalFlux_MaxFlux_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::TechnicalFlux *arg1 = (cmf::water::TechnicalFlux *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__TechnicalFlux, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TechnicalFlux_MaxFlux_get" "', argument " "1"" of type '" "cmf::water::TechnicalFlux *""'"); + } + arg1 = reinterpret_cast< cmf::water::TechnicalFlux * >(argp1); + result = (real) ((arg1)->MaxFlux); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TechnicalFlux_MinState_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::TechnicalFlux *arg1 = (cmf::water::TechnicalFlux *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"TechnicalFlux_MinState_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__TechnicalFlux, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TechnicalFlux_MinState_set" "', argument " "1"" of type '" "cmf::water::TechnicalFlux *""'"); + } + arg1 = reinterpret_cast< cmf::water::TechnicalFlux * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "TechnicalFlux_MinState_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->MinState = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TechnicalFlux_MinState_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::TechnicalFlux *arg1 = (cmf::water::TechnicalFlux *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__TechnicalFlux, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TechnicalFlux_MinState_get" "', argument " "1"" of type '" "cmf::water::TechnicalFlux *""'"); + } + arg1 = reinterpret_cast< cmf::water::TechnicalFlux * >(argp1); + result = (real) ((arg1)->MinState); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TechnicalFlux_FluxDecreaseTime_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::TechnicalFlux *arg1 = (cmf::water::TechnicalFlux *) 0 ; + cmf::math::Time *arg2 = (cmf::math::Time *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"TechnicalFlux_FluxDecreaseTime_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__TechnicalFlux, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TechnicalFlux_FluxDecreaseTime_set" "', argument " "1"" of type '" "cmf::water::TechnicalFlux *""'"); + } + arg1 = reinterpret_cast< cmf::water::TechnicalFlux * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_cmf__math__Time, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TechnicalFlux_FluxDecreaseTime_set" "', argument " "2"" of type '" "cmf::math::Time *""'"); + } + arg2 = reinterpret_cast< cmf::math::Time * >(argp2); + if (arg1) (arg1)->FluxDecreaseTime = *arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TechnicalFlux_FluxDecreaseTime_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::TechnicalFlux *arg1 = (cmf::water::TechnicalFlux *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::math::Time *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__TechnicalFlux, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TechnicalFlux_FluxDecreaseTime_get" "', argument " "1"" of type '" "cmf::water::TechnicalFlux *""'"); + } + arg1 = reinterpret_cast< cmf::water::TechnicalFlux * >(argp1); + result = (cmf::math::Time *)& ((arg1)->FluxDecreaseTime); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__Time, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_TechnicalFlux(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::WaterStorage::ptr arg1 ; + cmf::water::flux_node::ptr arg2 ; + real arg3 ; + real arg4 = (real) 0 ; + cmf::math::Time arg5 = (cmf::math::Time) cmf::math::h ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + double val3 ; + int ecode3 = 0 ; + double val4 ; + int ecode4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + char * kwnames[] = { + (char *) "source",(char *) "target",(char *) "maximum_flux",(char *) "minimal_state",(char *) "flux_decrease_time", NULL + }; + cmf::water::TechnicalFlux *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OO:new_TechnicalFlux",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_TechnicalFlux" "', argument " "1"" of type '" "cmf::water::WaterStorage::ptr""'"); + } + if (argp1) arg1 = *(reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp1)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp1); + } + { + int newmem = 0; + res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_TechnicalFlux" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); + } + if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); + } + ecode3 = SWIG_AsVal_double(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_TechnicalFlux" "', argument " "3"" of type '" "real""'"); + } + arg3 = static_cast< real >(val3); + if (obj3) { + ecode4 = SWIG_AsVal_double(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_TechnicalFlux" "', argument " "4"" of type '" "real""'"); + } + arg4 = static_cast< real >(val4); + } + if (obj4) { + { + arg5 = convert_datetime_to_cmftime(obj4); + if (arg5 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } + } + } + { + try { + result = (cmf::water::TechnicalFlux *)new cmf::water::TechnicalFlux(arg1,arg2,arg3,arg4,arg5); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__water__TechnicalFlux, SWIG_POINTER_NEW | 0 ); + + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_TechnicalFlux(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::TechnicalFlux *arg1 = (cmf::water::TechnicalFlux *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__TechnicalFlux, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_TechnicalFlux" "', argument " "1"" of type '" "cmf::water::TechnicalFlux *""'"); + } + arg1 = reinterpret_cast< cmf::water::TechnicalFlux * >(argp1); + { + try { + + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *TechnicalFlux_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__water__TechnicalFlux, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *TechnicalFlux_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_generic_gradient_connection_K_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::generic_gradient_connection *arg1 = (cmf::water::generic_gradient_connection *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"generic_gradient_connection_K_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__generic_gradient_connection, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "generic_gradient_connection_K_set" "', argument " "1"" of type '" "cmf::water::generic_gradient_connection *""'"); + } + arg1 = reinterpret_cast< cmf::water::generic_gradient_connection * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "generic_gradient_connection_K_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->K = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_generic_gradient_connection_K_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::generic_gradient_connection *arg1 = (cmf::water::generic_gradient_connection *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__generic_gradient_connection, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "generic_gradient_connection_K_get" "', argument " "1"" of type '" "cmf::water::generic_gradient_connection *""'"); + } + arg1 = reinterpret_cast< cmf::water::generic_gradient_connection * >(argp1); + result = (real) ((arg1)->K); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_generic_gradient_connection_A_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::generic_gradient_connection *arg1 = (cmf::water::generic_gradient_connection *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"generic_gradient_connection_A_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__generic_gradient_connection, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "generic_gradient_connection_A_set" "', argument " "1"" of type '" "cmf::water::generic_gradient_connection *""'"); + } + arg1 = reinterpret_cast< cmf::water::generic_gradient_connection * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "generic_gradient_connection_A_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->A = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_generic_gradient_connection_A_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::generic_gradient_connection *arg1 = (cmf::water::generic_gradient_connection *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__generic_gradient_connection, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "generic_gradient_connection_A_get" "', argument " "1"" of type '" "cmf::water::generic_gradient_connection *""'"); + } + arg1 = reinterpret_cast< cmf::water::generic_gradient_connection * >(argp1); + result = (real) ((arg1)->A); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_generic_gradient_connection_d_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::generic_gradient_connection *arg1 = (cmf::water::generic_gradient_connection *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"generic_gradient_connection_d_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__generic_gradient_connection, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "generic_gradient_connection_d_set" "', argument " "1"" of type '" "cmf::water::generic_gradient_connection *""'"); + } + arg1 = reinterpret_cast< cmf::water::generic_gradient_connection * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "generic_gradient_connection_d_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->d = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_generic_gradient_connection_d_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::generic_gradient_connection *arg1 = (cmf::water::generic_gradient_connection *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__generic_gradient_connection, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "generic_gradient_connection_d_get" "', argument " "1"" of type '" "cmf::water::generic_gradient_connection *""'"); + } + arg1 = reinterpret_cast< cmf::water::generic_gradient_connection * >(argp1); + result = (real) ((arg1)->d); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_generic_gradient_connection(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::WaterStorage::ptr arg1 ; + cmf::water::WaterStorage::ptr arg2 ; + real arg3 ; + real arg4 = (real) 1.0 ; + real arg5 = (real) 1.0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + double val3 ; + int ecode3 = 0 ; + double val4 ; + int ecode4 = 0 ; + double val5 ; + int ecode5 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + char * kwnames[] = { + (char *) "left",(char *) "right",(char *) "K",(char *) "d",(char *) "A", NULL + }; + cmf::water::generic_gradient_connection *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OO:new_generic_gradient_connection",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_generic_gradient_connection" "', argument " "1"" of type '" "cmf::water::WaterStorage::ptr""'"); + } + if (argp1) arg1 = *(reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp1)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp1); + } + { + int newmem = 0; + res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0 , &newmem); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_generic_gradient_connection" "', argument " "2"" of type '" "cmf::water::WaterStorage::ptr""'"); + } + if (argp2) arg2 = *(reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp2)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp2); + } + ecode3 = SWIG_AsVal_double(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_generic_gradient_connection" "', argument " "3"" of type '" "real""'"); + } + arg3 = static_cast< real >(val3); + if (obj3) { + ecode4 = SWIG_AsVal_double(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_generic_gradient_connection" "', argument " "4"" of type '" "real""'"); + } + arg4 = static_cast< real >(val4); + } + if (obj4) { + ecode5 = SWIG_AsVal_double(obj4, &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_generic_gradient_connection" "', argument " "5"" of type '" "real""'"); + } + arg5 = static_cast< real >(val5); + } + { + try { + result = (cmf::water::generic_gradient_connection *)new cmf::water::generic_gradient_connection(arg1,arg2,arg3,arg4,arg5); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__water__generic_gradient_connection, SWIG_POINTER_NEW | 0 ); + + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_generic_gradient_connection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::generic_gradient_connection *arg1 = (cmf::water::generic_gradient_connection *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__generic_gradient_connection, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_generic_gradient_connection" "', argument " "1"" of type '" "cmf::water::generic_gradient_connection *""'"); + } + arg1 = reinterpret_cast< cmf::water::generic_gradient_connection * >(argp1); + { + try { + + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *generic_gradient_connection_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__water__generic_gradient_connection, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *generic_gradient_connection_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_statecontrol_connection_reaction_time_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::statecontrol_connection *arg1 = (cmf::water::statecontrol_connection *) 0 ; + cmf::math::Time *arg2 = (cmf::math::Time *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"statecontrol_connection_reaction_time_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__statecontrol_connection, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "statecontrol_connection_reaction_time_set" "', argument " "1"" of type '" "cmf::water::statecontrol_connection *""'"); + } + arg1 = reinterpret_cast< cmf::water::statecontrol_connection * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_cmf__math__Time, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "statecontrol_connection_reaction_time_set" "', argument " "2"" of type '" "cmf::math::Time *""'"); + } + arg2 = reinterpret_cast< cmf::math::Time * >(argp2); + if (arg1) (arg1)->reaction_time = *arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_statecontrol_connection_reaction_time_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::statecontrol_connection *arg1 = (cmf::water::statecontrol_connection *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::math::Time *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__statecontrol_connection, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "statecontrol_connection_reaction_time_get" "', argument " "1"" of type '" "cmf::water::statecontrol_connection *""'"); + } + arg1 = reinterpret_cast< cmf::water::statecontrol_connection * >(argp1); + result = (cmf::math::Time *)& ((arg1)->reaction_time); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__Time, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_statecontrol_connection_target_state_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::statecontrol_connection *arg1 = (cmf::water::statecontrol_connection *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"statecontrol_connection_target_state_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__statecontrol_connection, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "statecontrol_connection_target_state_set" "', argument " "1"" of type '" "cmf::water::statecontrol_connection *""'"); + } + arg1 = reinterpret_cast< cmf::water::statecontrol_connection * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "statecontrol_connection_target_state_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->target_state = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_statecontrol_connection_target_state_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::statecontrol_connection *arg1 = (cmf::water::statecontrol_connection *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__statecontrol_connection, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "statecontrol_connection_target_state_get" "', argument " "1"" of type '" "cmf::water::statecontrol_connection *""'"); + } + arg1 = reinterpret_cast< cmf::water::statecontrol_connection * >(argp1); + result = (real) ((arg1)->target_state); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_statecontrol_connection(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::WaterStorage::ptr arg1 ; + cmf::water::flux_node::ptr arg2 ; + real arg3 ; + cmf::math::Time arg4 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + double val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + char * kwnames[] = { + (char *) "controlled_storage",(char *) "other_end",(char *) "target_state",(char *) "reaction_time", NULL + }; + cmf::water::statecontrol_connection *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO:new_statecontrol_connection",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_statecontrol_connection" "', argument " "1"" of type '" "cmf::water::WaterStorage::ptr""'"); + } + if (argp1) arg1 = *(reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp1)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp1); + } + { + int newmem = 0; + res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_statecontrol_connection" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); + } + if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); + } + ecode3 = SWIG_AsVal_double(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_statecontrol_connection" "', argument " "3"" of type '" "real""'"); + } + arg3 = static_cast< real >(val3); + { + arg4 = convert_datetime_to_cmftime(obj3); + if (arg4 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } + } + { + try { + result = (cmf::water::statecontrol_connection *)new cmf::water::statecontrol_connection(arg1,arg2,arg3,arg4); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__water__statecontrol_connection, SWIG_POINTER_NEW | 0 ); + + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_statecontrol_connection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::statecontrol_connection *arg1 = (cmf::water::statecontrol_connection *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__statecontrol_connection, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_statecontrol_connection" "', argument " "1"" of type '" "cmf::water::statecontrol_connection *""'"); + } + arg1 = reinterpret_cast< cmf::water::statecontrol_connection * >(argp1); + { + try { + + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *statecontrol_connection_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__water__statecontrol_connection, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *statecontrol_connection_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_node_list_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::node_list *arg1 = (cmf::water::node_list *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + size_t result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__node_list, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "node_list_size" "', argument " "1"" of type '" "cmf::water::node_list const *""'"); + } + arg1 = reinterpret_cast< cmf::water::node_list * >(argp1); + { + try { + result = ((cmf::water::node_list const *)arg1)->size(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_node_list__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) { + PyObject *resultobj = 0; + cmf::water::node_list *result = 0 ; + + if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; + { + try { + result = (cmf::water::node_list *)new cmf::water::node_list(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__water__node_list, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_node_list__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::water::node_list *arg1 = 0 ; + cmf::water::node_list temp_list1 ; + cmf::water::node_list *result = 0 ; + + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + { + if (SWIG_ConvertPtr(swig_obj[0], (void **) &arg1, SWIGTYPE_p_cmf__water__node_list, SWIG_POINTER_EXCEPTION) == -1) { + int res = iterable_to_list(swig_obj[0],SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, temp_list1); + if (SWIG_IsOK(res)) { + arg1 = &temp_list1; + } else { + SWIG_exception_fail(SWIG_TypeError,"Only iterables can be converted to cmf::water::node_list"); + } + } + } + { + try { + result = (cmf::water::node_list *)new cmf::water::node_list((cmf::water::node_list const &)*arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__water__node_list, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_node_list(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[2] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"new_node_list",0,1,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 0) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + if (argc == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + { + _v = is_listtype_or_iterable(argv[0],SWIGTYPE_p_cmf__water__node_list); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_new_node_list__SWIG_0(self, argc, argv); + case 2: + return _wrap_new_node_list__SWIG_1(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_node_list'.\n" + " Possible C/C++ prototypes are:\n" + " cmf::water::node_list::node_list()\n" + " cmf::water::node_list::node_list(cmf::water::node_list const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_node_list___iadd__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::node_list *arg1 = (cmf::water::node_list *) 0 ; + cmf::water::node_list *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + cmf::water::node_list temp_list2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "right", NULL + }; + cmf::water::node_list *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:node_list___iadd__",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__node_list, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "node_list___iadd__" "', argument " "1"" of type '" "cmf::water::node_list *""'"); + } + arg1 = reinterpret_cast< cmf::water::node_list * >(argp1); + { + if (SWIG_ConvertPtr(obj1, (void **) &arg2, SWIGTYPE_p_cmf__water__node_list, SWIG_POINTER_EXCEPTION) == -1) { + int res = iterable_to_list(obj1,SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, temp_list2); + if (SWIG_IsOK(res)) { + arg2 = &temp_list2; + } else { + SWIG_exception_fail(SWIG_TypeError,"Only iterables can be converted to cmf::water::node_list"); + } + } + } + { + try { + result = (cmf::water::node_list *) &(arg1)->operator +=((cmf::water::node_list const &)*arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__water__node_list, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_node_list___add__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::node_list *arg1 = (cmf::water::node_list *) 0 ; + cmf::water::node_list *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + cmf::water::node_list temp_list2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "right", NULL + }; + cmf::water::node_list result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:node_list___add__",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__node_list, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "node_list___add__" "', argument " "1"" of type '" "cmf::water::node_list const *""'"); + } + arg1 = reinterpret_cast< cmf::water::node_list * >(argp1); + { + if (SWIG_ConvertPtr(obj1, (void **) &arg2, SWIGTYPE_p_cmf__water__node_list, SWIG_POINTER_EXCEPTION) == -1) { + int res = iterable_to_list(obj1,SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, temp_list2); + if (SWIG_IsOK(res)) { + arg2 = &temp_list2; + } else { + SWIG_exception_fail(SWIG_TypeError,"Only iterables can be converted to cmf::water::node_list"); + } + } + } + { + try { + result = ((cmf::water::node_list const *)arg1)->operator +((cmf::water::node_list const &)*arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj((new cmf::water::node_list(static_cast< const cmf::water::node_list& >(result))), SWIGTYPE_p_cmf__water__node_list, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_node_list___get(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::node_list *arg1 = (cmf::water::node_list *) 0 ; + ptrdiff_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "index", NULL + }; + cmf::water::flux_node::ptr result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:node_list___get",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__node_list, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "node_list___get" "', argument " "1"" of type '" "cmf::water::node_list const *""'"); + } + arg1 = reinterpret_cast< cmf::water::node_list * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "node_list___get" "', argument " "2"" of type '" "ptrdiff_t""'"); + } + arg2 = static_cast< ptrdiff_t >(val2); + { + try { + result = ((cmf::water::node_list const *)arg1)->get(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + if (!(result)) resultobj = SWIG_NewPointerObj(0,SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, SWIG_POINTER_OWN); + int dcast = 0; + /*@SWIG:/usr/share/swig/3.0.12/typemaps/swigmacros.swg,200,%formacro@*//*@SWIG:/usr/share/swig/3.0.12/typemaps/swigmacros.swg,192,%_formacro_1@*//*@SWIG:cmf/cmf_core_src/cmf_swiglib.i,74,%_node_down_cast@*/ + if (dcast==0 && result) /*check for cmf::atmosphere::RainSource*/ { + std::shared_ptr output = std::dynamic_pointer_cast(result); + if (output) /*flux_node is cmf::atmosphere::RainSource */ { + dcast=1; + resultobj = SWIG_NewPointerObj(new std::shared_ptr(output),SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__RainSource_t, SWIG_POINTER_OWN); + } + } + /*@SWIG@*/ + + /*@SWIG:/usr/share/swig/3.0.12/typemaps/swigmacros.swg,192,%_formacro_1@*//*@SWIG:cmf/cmf_core_src/cmf_swiglib.i,74,%_node_down_cast@*/ + if (dcast==0 && result) /*check for cmf::water::DirichletBoundary*/ { + std::shared_ptr output = std::dynamic_pointer_cast(result); + if (output) /*flux_node is cmf::water::DirichletBoundary */ { + dcast=1; + resultobj = SWIG_NewPointerObj(new std::shared_ptr(output),SWIGTYPE_p_std__shared_ptrT_cmf__water__DirichletBoundary_t, SWIG_POINTER_OWN); + } + } + /*@SWIG@*/ + + /*@SWIG:/usr/share/swig/3.0.12/typemaps/swigmacros.swg,192,%_formacro_1@*//*@SWIG:cmf/cmf_core_src/cmf_swiglib.i,74,%_node_down_cast@*/ + if (dcast==0 && result) /*check for cmf::water::NeumannBoundary*/ { + std::shared_ptr output = std::dynamic_pointer_cast(result); + if (output) /*flux_node is cmf::water::NeumannBoundary */ { + dcast=1; + resultobj = SWIG_NewPointerObj(new std::shared_ptr(output),SWIGTYPE_p_std__shared_ptrT_cmf__water__NeumannBoundary_t, SWIG_POINTER_OWN); + } + } + /*@SWIG@*/ + + /*@SWIG:/usr/share/swig/3.0.12/typemaps/swigmacros.swg,192,%_formacro_1@*//*@SWIG:cmf/cmf_core_src/cmf_swiglib.i,74,%_node_down_cast@*/ + if (dcast==0 && result) /*check for cmf::upslope::SoilLayer*/ { + std::shared_ptr output = std::dynamic_pointer_cast(result); + if (output) /*flux_node is cmf::upslope::SoilLayer */ { + dcast=1; + resultobj = SWIG_NewPointerObj(new std::shared_ptr(output),SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, SWIG_POINTER_OWN); + } + } + /*@SWIG@*/ + + /*@SWIG:/usr/share/swig/3.0.12/typemaps/swigmacros.swg,192,%_formacro_1@*//*@SWIG:cmf/cmf_core_src/cmf_swiglib.i,74,%_node_down_cast@*/ + if (dcast==0 && result) /*check for cmf::upslope::aquifer*/ { + std::shared_ptr output = std::dynamic_pointer_cast(result); + if (output) /*flux_node is cmf::upslope::aquifer */ { + dcast=1; + resultobj = SWIG_NewPointerObj(new std::shared_ptr(output),SWIGTYPE_p_std__shared_ptrT_cmf__upslope__aquifer_t, SWIG_POINTER_OWN); + } + } + /*@SWIG@*/ + + /*@SWIG:/usr/share/swig/3.0.12/typemaps/swigmacros.swg,192,%_formacro_1@*//*@SWIG:cmf/cmf_core_src/cmf_swiglib.i,74,%_node_down_cast@*/ + if (dcast==0 && result) /*check for cmf::river::Reach*/ { + std::shared_ptr output = std::dynamic_pointer_cast(result); + if (output) /*flux_node is cmf::river::Reach */ { + dcast=1; + resultobj = SWIG_NewPointerObj(new std::shared_ptr(output),SWIGTYPE_p_std__shared_ptrT_cmf__river__Reach_t, SWIG_POINTER_OWN); + } + } + /*@SWIG@*/ + + /*@SWIG:/usr/share/swig/3.0.12/typemaps/swigmacros.swg,192,%_formacro_1@*//*@SWIG:cmf/cmf_core_src/cmf_swiglib.i,74,%_node_down_cast@*/ + if (dcast==0 && result) /*check for cmf::river::OpenWaterStorage*/ { + std::shared_ptr output = std::dynamic_pointer_cast(result); + if (output) /*flux_node is cmf::river::OpenWaterStorage */ { + dcast=1; + resultobj = SWIG_NewPointerObj(new std::shared_ptr(output),SWIGTYPE_p_std__shared_ptrT_cmf__river__OpenWaterStorage_t, SWIG_POINTER_OWN); + } + } + /*@SWIG@*/ + + /*@SWIG:/usr/share/swig/3.0.12/typemaps/swigmacros.swg,192,%_formacro_1@*//*@SWIG:cmf/cmf_core_src/cmf_swiglib.i,74,%_node_down_cast@*/ + if (dcast==0 && result) /*check for cmf::water::WaterStorage*/ { + std::shared_ptr output = std::dynamic_pointer_cast(result); + if (output) /*flux_node is cmf::water::WaterStorage */ { + dcast=1; + resultobj = SWIG_NewPointerObj(new std::shared_ptr(output),SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, SWIG_POINTER_OWN); + } + } + /*@SWIG@*/ + + /*@SWIG:/usr/share/swig/3.0.12/typemaps/swigmacros.swg,192,%_formacro_1@*//*@SWIG:cmf/cmf_core_src/cmf_swiglib.i,74,%_node_down_cast@*/ + if (dcast==0 && result) /*check for cmf::upslope::MacroPore*/ { + std::shared_ptr output = std::dynamic_pointer_cast(result); + if (output) /*flux_node is cmf::upslope::MacroPore */ { + dcast=1; + resultobj = SWIG_NewPointerObj(new std::shared_ptr(output),SWIGTYPE_p_std__shared_ptrT_cmf__upslope__MacroPore_t, SWIG_POINTER_OWN); + } + } + /*@SWIG@*/ + + /*@SWIG:/usr/share/swig/3.0.12/typemaps/swigmacros.swg,192,%_formacro_1@*//*@SWIG:cmf/cmf_core_src/cmf_swiglib.i,74,%_node_down_cast@*/ + if (dcast==0 && result) /*check for cmf::upslope::SurfaceWater*/ { + std::shared_ptr output = std::dynamic_pointer_cast(result); + if (output) /*flux_node is cmf::upslope::SurfaceWater */ { + dcast=1; + resultobj = SWIG_NewPointerObj(new std::shared_ptr(output),SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SurfaceWater_t, SWIG_POINTER_OWN); + } + } + /*@SWIG@*/ + + + + /*@SWIG@*/ + + /*@SWIG@*/ + + /*@SWIG@*/ + + /*@SWIG@*/ + + /*@SWIG@*/ + + /*@SWIG@*/ + + /*@SWIG@*/ + + /*@SWIG@*/ + + /*@SWIG@*/ + + /*@SWIG@*//*@SWIG@*/ + if (!dcast) resultobj = SWIG_NewPointerObj(new std::shared_ptr(result),SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, SWIG_POINTER_OWN); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_node_list___getslice(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::node_list *arg1 = (cmf::water::node_list *) 0 ; + ptrdiff_t arg2 ; + ptrdiff_t arg3 ; + ptrdiff_t arg4 = (ptrdiff_t) 1 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + ptrdiff_t val3 ; + int ecode3 = 0 ; + ptrdiff_t val4 ; + int ecode4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "begin",(char *) "end",(char *) "step", NULL + }; + cmf::water::node_list result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|O:node_list___getslice",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__node_list, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "node_list___getslice" "', argument " "1"" of type '" "cmf::water::node_list const *""'"); + } + arg1 = reinterpret_cast< cmf::water::node_list * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "node_list___getslice" "', argument " "2"" of type '" "ptrdiff_t""'"); + } + arg2 = static_cast< ptrdiff_t >(val2); + ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "node_list___getslice" "', argument " "3"" of type '" "ptrdiff_t""'"); + } + arg3 = static_cast< ptrdiff_t >(val3); + if (obj3) { + ecode4 = SWIG_AsVal_ptrdiff_t(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "node_list___getslice" "', argument " "4"" of type '" "ptrdiff_t""'"); + } + arg4 = static_cast< ptrdiff_t >(val4); + } + { + try { + result = ((cmf::water::node_list const *)arg1)->getslice(arg2,arg3,arg4); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj((new cmf::water::node_list(static_cast< const cmf::water::node_list& >(result))), SWIGTYPE_p_cmf__water__node_list, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_node_list_append(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::node_list *arg1 = (cmf::water::node_list *) 0 ; + cmf::water::flux_node::ptr arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "node", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:node_list_append",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__node_list, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "node_list_append" "', argument " "1"" of type '" "cmf::water::node_list *""'"); + } + arg1 = reinterpret_cast< cmf::water::node_list * >(argp1); + { + int newmem = 0; + res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "node_list_append" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); + } + if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); + } + { + try { + (arg1)->append(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_node_list_remove(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::node_list *arg1 = (cmf::water::node_list *) 0 ; + cmf::water::flux_node::ptr arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "node", NULL + }; + bool result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:node_list_remove",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__node_list, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "node_list_remove" "', argument " "1"" of type '" "cmf::water::node_list *""'"); + } + arg1 = reinterpret_cast< cmf::water::node_list * >(argp1); + { + int newmem = 0; + res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "node_list_remove" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); + } + if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); + } + { + try { + result = (bool)(arg1)->remove(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_node_list_global_water_balance(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::node_list *arg1 = (cmf::water::node_list *) 0 ; + cmf::math::Time arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "t", NULL + }; + real result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:node_list_global_water_balance",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__node_list, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "node_list_global_water_balance" "', argument " "1"" of type '" "cmf::water::node_list const *""'"); + } + arg1 = reinterpret_cast< cmf::water::node_list * >(argp1); + { + arg2 = convert_datetime_to_cmftime(obj1); + if (arg2 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } + } + { + try { + result = (real)((cmf::water::node_list const *)arg1)->global_water_balance(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_node_list_water_balance(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::node_list *arg1 = (cmf::water::node_list *) 0 ; + cmf::math::Time arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "t", NULL + }; + cmf::math::num_array result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:node_list_water_balance",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__node_list, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "node_list_water_balance" "', argument " "1"" of type '" "cmf::water::node_list const *""'"); + } + arg1 = reinterpret_cast< cmf::water::node_list * >(argp1); + { + arg2 = convert_datetime_to_cmftime(obj1); + if (arg2 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } + } + { + try { + result = ((cmf::water::node_list const *)arg1)->water_balance(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + resultobj = as_npy_array(result); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_node_list_conc(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::node_list *arg1 = (cmf::water::node_list *) 0 ; + cmf::math::Time arg2 ; + cmf::water::solute *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "t",(char *) "_Solute", NULL + }; + cmf::math::num_array result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:node_list_conc",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__node_list, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "node_list_conc" "', argument " "1"" of type '" "cmf::water::node_list const *""'"); + } + arg1 = reinterpret_cast< cmf::water::node_list * >(argp1); + { + arg2 = convert_datetime_to_cmftime(obj1); + if (arg2 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } + } + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_cmf__water__solute, 0 | 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "node_list_conc" "', argument " "3"" of type '" "cmf::water::solute const &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "node_list_conc" "', argument " "3"" of type '" "cmf::water::solute const &""'"); + } + arg3 = reinterpret_cast< cmf::water::solute * >(argp3); + { + try { + result = ((cmf::water::node_list const *)arg1)->conc(arg2,(cmf::water::solute const &)*arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + resultobj = as_npy_array(result); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_node_list_set_solute_source(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::node_list *arg1 = (cmf::water::node_list *) 0 ; + cmf::water::solute *arg2 = 0 ; + cmf::math::num_array arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "_Solute",(char *) "source_fluxes", NULL + }; + ptrdiff_t result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:node_list_set_solute_source",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__node_list, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "node_list_set_solute_source" "', argument " "1"" of type '" "cmf::water::node_list *""'"); + } + arg1 = reinterpret_cast< cmf::water::node_list * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_cmf__water__solute, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "node_list_set_solute_source" "', argument " "2"" of type '" "cmf::water::solute const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "node_list_set_solute_source" "', argument " "2"" of type '" "cmf::water::solute const &""'"); + } + arg2 = reinterpret_cast< cmf::water::solute * >(argp2); + { + // Convert a array_wrapper from numpy array + double * data=0; + ptrdiff_t size = from_npy_array(obj2,&data); + if (!data) { + SWIG_exception_fail(SWIG_TypeError,"Input data is not 'array-like' (in the sense of numpy arrays)"); + return NULL; + } + arg3 = cmf::math::num_array(size,data); + } + { + try { + result = (arg1)->set_solute_source((cmf::water::solute const &)*arg2,arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_ptrdiff_t(static_cast< ptrdiff_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_node_list_get_fluxes_to(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::node_list *arg1 = (cmf::water::node_list *) 0 ; + cmf::water::node_list *arg2 = 0 ; + cmf::math::Time arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + cmf::water::node_list temp_list2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "targets",(char *) "t", NULL + }; + cmf::math::num_array result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:node_list_get_fluxes_to",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__node_list, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "node_list_get_fluxes_to" "', argument " "1"" of type '" "cmf::water::node_list const *""'"); + } + arg1 = reinterpret_cast< cmf::water::node_list * >(argp1); + { + if (SWIG_ConvertPtr(obj1, (void **) &arg2, SWIGTYPE_p_cmf__water__node_list, SWIG_POINTER_EXCEPTION) == -1) { + int res = iterable_to_list(obj1,SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, temp_list2); + if (SWIG_IsOK(res)) { + arg2 = &temp_list2; + } else { + SWIG_exception_fail(SWIG_TypeError,"Only iterables can be converted to cmf::water::node_list"); + } + } + } + { + arg3 = convert_datetime_to_cmftime(obj2); + if (arg3 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } + } + { + try { + result = ((cmf::water::node_list const *)arg1)->get_fluxes_to((cmf::water::node_list const &)*arg2,arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + resultobj = as_npy_array(result); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_node_list_get_fluxes3d_to(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::node_list *arg1 = (cmf::water::node_list *) 0 ; + cmf::water::node_list *arg2 = 0 ; + cmf::math::Time arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + cmf::water::node_list temp_list2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "targets",(char *) "t", NULL + }; + SwigValueWrapper< cmf::geometry::point_vector > result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:node_list_get_fluxes3d_to",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__node_list, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "node_list_get_fluxes3d_to" "', argument " "1"" of type '" "cmf::water::node_list const *""'"); + } + arg1 = reinterpret_cast< cmf::water::node_list * >(argp1); + { + if (SWIG_ConvertPtr(obj1, (void **) &arg2, SWIGTYPE_p_cmf__water__node_list, SWIG_POINTER_EXCEPTION) == -1) { + int res = iterable_to_list(obj1,SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, temp_list2); + if (SWIG_IsOK(res)) { + arg2 = &temp_list2; + } else { + SWIG_exception_fail(SWIG_TypeError,"Only iterables can be converted to cmf::water::node_list"); + } + } + } + { + arg3 = convert_datetime_to_cmftime(obj2); + if (arg3 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } + } + { + try { + result = ((cmf::water::node_list const *)arg1)->get_fluxes3d_to((cmf::water::node_list const &)*arg2,arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj((new cmf::geometry::point_vector(static_cast< const cmf::geometry::point_vector& >(result))), SWIGTYPE_p_cmf__geometry__point_vector, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_node_list_get_fluxes3d(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::node_list *arg1 = (cmf::water::node_list *) 0 ; + cmf::math::Time arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "t", NULL + }; + SwigValueWrapper< cmf::geometry::point_vector > result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:node_list_get_fluxes3d",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__node_list, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "node_list_get_fluxes3d" "', argument " "1"" of type '" "cmf::water::node_list const *""'"); + } + arg1 = reinterpret_cast< cmf::water::node_list * >(argp1); + { + arg2 = convert_datetime_to_cmftime(obj1); + if (arg2 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } + } + { + try { + result = ((cmf::water::node_list const *)arg1)->get_fluxes3d(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj((new cmf::geometry::point_vector(static_cast< const cmf::geometry::point_vector& >(result))), SWIGTYPE_p_cmf__geometry__point_vector, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_node_list_get_positions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::node_list *arg1 = (cmf::water::node_list *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + SwigValueWrapper< cmf::geometry::point_vector > result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__node_list, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "node_list_get_positions" "', argument " "1"" of type '" "cmf::water::node_list const *""'"); + } + arg1 = reinterpret_cast< cmf::water::node_list * >(argp1); + { + try { + result = ((cmf::water::node_list const *)arg1)->get_positions(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj((new cmf::geometry::point_vector(static_cast< const cmf::geometry::point_vector& >(result))), SWIGTYPE_p_cmf__geometry__point_vector, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_node_list(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::node_list *arg1 = (cmf::water::node_list *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__node_list, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_node_list" "', argument " "1"" of type '" "cmf::water::node_list *""'"); + } + arg1 = reinterpret_cast< cmf::water::node_list * >(argp1); + { + try { + delete arg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_node_list_potentials_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::node_list *arg1 = (cmf::water::node_list *) 0 ; + cmf::math::num_array arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"node_list_potentials_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__node_list, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "node_list_potentials_set" "', argument " "1"" of type '" "cmf::water::node_list *""'"); + } + arg1 = reinterpret_cast< cmf::water::node_list * >(argp1); + { + // Convert a array_wrapper from numpy array + double * data=0; + ptrdiff_t size = from_npy_array(swig_obj[1],&data); + if (!data) { + SWIG_exception_fail(SWIG_TypeError,"Input data is not 'array-like' (in the sense of numpy arrays)"); + return NULL; + } + arg2 = cmf::math::num_array(size,data); + } + { + try { + cmf_water_node_list_potentials_set(arg1,arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_node_list_potentials_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::node_list *arg1 = (cmf::water::node_list *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::math::num_array result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__node_list, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "node_list_potentials_get" "', argument " "1"" of type '" "cmf::water::node_list *""'"); + } + arg1 = reinterpret_cast< cmf::water::node_list * >(argp1); + { + try { + result = cmf_water_node_list_potentials_get(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + resultobj = as_npy_array(result); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *node_list_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__water__node_list, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *node_list_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_NeumannBoundary_list_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::NeumannBoundary_list *arg1 = (cmf::water::NeumannBoundary_list *) 0 ; + ptrdiff_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "index", NULL + }; + cmf::water::NeumannBoundary::ptr result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:NeumannBoundary_list_get",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__NeumannBoundary_list, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NeumannBoundary_list_get" "', argument " "1"" of type '" "cmf::water::NeumannBoundary_list const *""'"); + } + arg1 = reinterpret_cast< cmf::water::NeumannBoundary_list * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "NeumannBoundary_list_get" "', argument " "2"" of type '" "ptrdiff_t""'"); + } + arg2 = static_cast< ptrdiff_t >(val2); + { + try { + result = ((cmf::water::NeumannBoundary_list const *)arg1)->get(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + std::shared_ptr< cmf::water::NeumannBoundary > *smartresult = result ? new std::shared_ptr< cmf::water::NeumannBoundary >(result) : 0; + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__water__NeumannBoundary_t, SWIG_POINTER_OWN); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_NeumannBoundary_list_get_fluxes(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::NeumannBoundary_list *arg1 = (cmf::water::NeumannBoundary_list *) 0 ; + cmf::math::Time arg2 = (cmf::math::Time) cmf::math::Time() ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "t", NULL + }; + cmf::math::num_array result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:NeumannBoundary_list_get_fluxes",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__NeumannBoundary_list, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NeumannBoundary_list_get_fluxes" "', argument " "1"" of type '" "cmf::water::NeumannBoundary_list const *""'"); + } + arg1 = reinterpret_cast< cmf::water::NeumannBoundary_list * >(argp1); + if (obj1) { + { + arg2 = convert_datetime_to_cmftime(obj1); + if (arg2 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } + } + } + { + try { + result = ((cmf::water::NeumannBoundary_list const *)arg1)->get_fluxes(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + resultobj = as_npy_array(result); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_NeumannBoundary_list_append(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::NeumannBoundary_list *arg1 = (cmf::water::NeumannBoundary_list *) 0 ; + cmf::water::NeumannBoundary::ptr arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "nbc", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:NeumannBoundary_list_append",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__NeumannBoundary_list, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NeumannBoundary_list_append" "', argument " "1"" of type '" "cmf::water::NeumannBoundary_list *""'"); + } + arg1 = reinterpret_cast< cmf::water::NeumannBoundary_list * >(argp1); + { + int newmem = 0; + res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__NeumannBoundary_t, 0 , &newmem); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "NeumannBoundary_list_append" "', argument " "2"" of type '" "cmf::water::NeumannBoundary::ptr""'"); + } + if (argp2) arg2 = *(reinterpret_cast< cmf::water::NeumannBoundary::ptr * >(argp2)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::NeumannBoundary::ptr * >(argp2); + } + { + try { + (arg1)->append(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_NeumannBoundary_list_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::NeumannBoundary_list *arg1 = (cmf::water::NeumannBoundary_list *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + size_t result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__NeumannBoundary_list, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NeumannBoundary_list_size" "', argument " "1"" of type '" "cmf::water::NeumannBoundary_list const *""'"); + } + arg1 = reinterpret_cast< cmf::water::NeumannBoundary_list * >(argp1); + { + try { + result = ((cmf::water::NeumannBoundary_list const *)arg1)->size(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_NeumannBoundary_list__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) { + PyObject *resultobj = 0; + cmf::water::NeumannBoundary_list *result = 0 ; + + if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; + { + try { + result = (cmf::water::NeumannBoundary_list *)new cmf::water::NeumannBoundary_list(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__water__NeumannBoundary_list, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_NeumannBoundary_list__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::water::node_list *arg1 = 0 ; + cmf::water::node_list temp_list1 ; + cmf::water::NeumannBoundary_list *result = 0 ; + + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + { + if (SWIG_ConvertPtr(swig_obj[0], (void **) &arg1, SWIGTYPE_p_cmf__water__node_list, SWIG_POINTER_EXCEPTION) == -1) { + int res = iterable_to_list(swig_obj[0],SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, temp_list1); + if (SWIG_IsOK(res)) { + arg1 = &temp_list1; + } else { + SWIG_exception_fail(SWIG_TypeError,"Only iterables can be converted to cmf::water::node_list"); + } + } + } + { + try { + result = (cmf::water::NeumannBoundary_list *)new cmf::water::NeumannBoundary_list((cmf::water::node_list const &)*arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__water__NeumannBoundary_list, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_NeumannBoundary_list__SWIG_2(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::water::NeumannBoundary_list *arg1 = 0 ; + cmf::water::NeumannBoundary_list temp_list1 ; + cmf::water::NeumannBoundary_list *result = 0 ; + + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + { + if (SWIG_ConvertPtr(swig_obj[0], (void **) &arg1, SWIGTYPE_p_cmf__water__NeumannBoundary_list, SWIG_POINTER_EXCEPTION) == -1) { + int res = iterable_to_list(swig_obj[0],SWIGTYPE_p_std__shared_ptrT_cmf__water__NeumannBoundary_t, temp_list1); + if (SWIG_IsOK(res)) { + arg1 = &temp_list1; + } else { + SWIG_exception_fail(SWIG_TypeError,"Only iterables can be converted to cmf::water::NeumannBoundary_list"); + } + } + } + { + try { + result = (cmf::water::NeumannBoundary_list *)new cmf::water::NeumannBoundary_list((cmf::water::NeumannBoundary_list const &)*arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__water__NeumannBoundary_list, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_NeumannBoundary_list(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[2] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"new_NeumannBoundary_list",0,1,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 0) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + if (argc == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + { + _v = is_listtype_or_iterable(argv[0],SWIGTYPE_p_cmf__water__node_list); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + if (argc == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + { + _v = is_listtype_or_iterable(argv[0],SWIGTYPE_p_cmf__water__NeumannBoundary_list); + } + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 3; + if (_rank == _rankm) goto dispatch; + } + } + check_3: + + dispatch: + switch(_index) { + case 1: + return _wrap_new_NeumannBoundary_list__SWIG_0(self, argc, argv); + case 2: + return _wrap_new_NeumannBoundary_list__SWIG_1(self, argc, argv); + case 3: + return _wrap_new_NeumannBoundary_list__SWIG_2(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_NeumannBoundary_list'.\n" + " Possible C/C++ prototypes are:\n" + " cmf::water::NeumannBoundary_list::NeumannBoundary_list()\n" + " cmf::water::NeumannBoundary_list::NeumannBoundary_list(cmf::water::node_list const &)\n" + " cmf::water::NeumannBoundary_list::NeumannBoundary_list(cmf::water::NeumannBoundary_list const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_NeumannBoundary_list_to_node_list(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::NeumannBoundary_list *arg1 = (cmf::water::NeumannBoundary_list *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::water::node_list result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__NeumannBoundary_list, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NeumannBoundary_list_to_node_list" "', argument " "1"" of type '" "cmf::water::NeumannBoundary_list const *""'"); + } + arg1 = reinterpret_cast< cmf::water::NeumannBoundary_list * >(argp1); + { + try { + result = ((cmf::water::NeumannBoundary_list const *)arg1)->to_node_list(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj((new cmf::water::node_list(static_cast< const cmf::water::node_list& >(result))), SWIGTYPE_p_cmf__water__node_list, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_NeumannBoundary_list_global_water_balance(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::NeumannBoundary_list *arg1 = (cmf::water::NeumannBoundary_list *) 0 ; + cmf::math::Time arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "t", NULL + }; + real result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:NeumannBoundary_list_global_water_balance",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__NeumannBoundary_list, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NeumannBoundary_list_global_water_balance" "', argument " "1"" of type '" "cmf::water::NeumannBoundary_list const *""'"); + } + arg1 = reinterpret_cast< cmf::water::NeumannBoundary_list * >(argp1); + { + arg2 = convert_datetime_to_cmftime(obj1); + if (arg2 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } + } + { + try { + result = (real)((cmf::water::NeumannBoundary_list const *)arg1)->global_water_balance(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_NeumannBoundary_list_water_balance(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::NeumannBoundary_list *arg1 = (cmf::water::NeumannBoundary_list *) 0 ; + cmf::math::Time arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "t", NULL + }; + cmf::math::num_array result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:NeumannBoundary_list_water_balance",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__water__NeumannBoundary_list, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NeumannBoundary_list_water_balance" "', argument " "1"" of type '" "cmf::water::NeumannBoundary_list const *""'"); + } + arg1 = reinterpret_cast< cmf::water::NeumannBoundary_list * >(argp1); + { + arg2 = convert_datetime_to_cmftime(obj1); + if (arg2 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } + } + { + try { + result = ((cmf::water::NeumannBoundary_list const *)arg1)->water_balance(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + resultobj = as_npy_array(result); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_NeumannBoundary_list_fluxes_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::NeumannBoundary_list *arg1 = (cmf::water::NeumannBoundary_list *) 0 ; + cmf::math::num_array arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"NeumannBoundary_list_fluxes_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__NeumannBoundary_list, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NeumannBoundary_list_fluxes_set" "', argument " "1"" of type '" "cmf::water::NeumannBoundary_list *""'"); + } + arg1 = reinterpret_cast< cmf::water::NeumannBoundary_list * >(argp1); + { + // Convert a array_wrapper from numpy array + double * data=0; + ptrdiff_t size = from_npy_array(swig_obj[1],&data); + if (!data) { + SWIG_exception_fail(SWIG_TypeError,"Input data is not 'array-like' (in the sense of numpy arrays)"); + return NULL; + } + arg2 = cmf::math::num_array(size,data); + } + { + try { + cmf_water_NeumannBoundary_list_fluxes_set(arg1,arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_NeumannBoundary_list_fluxes_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::NeumannBoundary_list *arg1 = (cmf::water::NeumannBoundary_list *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::math::num_array result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__NeumannBoundary_list, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NeumannBoundary_list_fluxes_get" "', argument " "1"" of type '" "cmf::water::NeumannBoundary_list *""'"); + } + arg1 = reinterpret_cast< cmf::water::NeumannBoundary_list * >(argp1); + { + try { + result = cmf_water_NeumannBoundary_list_fluxes_get(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + resultobj = as_npy_array(result); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_NeumannBoundary_list(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::NeumannBoundary_list *arg1 = (cmf::water::NeumannBoundary_list *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__NeumannBoundary_list, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_NeumannBoundary_list" "', argument " "1"" of type '" "cmf::water::NeumannBoundary_list *""'"); + } + arg1 = reinterpret_cast< cmf::water::NeumannBoundary_list * >(argp1); + { + try { + delete arg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *NeumannBoundary_list_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__water__NeumannBoundary_list, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *NeumannBoundary_list_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_SystemBridge_get_upper_node(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::SystemBridge *arg1 = (cmf::water::SystemBridge *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::water::SystemBridge const > tempshared1 ; + std::shared_ptr< cmf::water::SystemBridge const > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + cmf::water::flux_node::ptr result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__SystemBridge_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SystemBridge_get_upper_node" "', argument " "1"" of type '" "cmf::water::SystemBridge const *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::water::SystemBridge > * >(argp1); + delete reinterpret_cast< std::shared_ptr< const cmf::water::SystemBridge > * >(argp1); + arg1 = const_cast< cmf::water::SystemBridge * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::water::SystemBridge > * >(argp1); + arg1 = const_cast< cmf::water::SystemBridge * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + try { + result = ((cmf::water::SystemBridge const *)arg1)->get_upper_node(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + std::shared_ptr< cmf::water::flux_node > *smartresult = result ? new std::shared_ptr< cmf::water::flux_node >(result) : 0; + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, SWIG_POINTER_OWN); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SystemBridge_get_lower_node(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::SystemBridge *arg1 = (cmf::water::SystemBridge *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::water::SystemBridge const > tempshared1 ; + std::shared_ptr< cmf::water::SystemBridge const > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + cmf::water::flux_node::ptr result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__SystemBridge_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SystemBridge_get_lower_node" "', argument " "1"" of type '" "cmf::water::SystemBridge const *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::water::SystemBridge > * >(argp1); + delete reinterpret_cast< std::shared_ptr< const cmf::water::SystemBridge > * >(argp1); + arg1 = const_cast< cmf::water::SystemBridge * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::water::SystemBridge > * >(argp1); + arg1 = const_cast< cmf::water::SystemBridge * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + try { + result = ((cmf::water::SystemBridge const *)arg1)->get_lower_node(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + std::shared_ptr< cmf::water::flux_node > *smartresult = result ? new std::shared_ptr< cmf::water::flux_node >(result) : 0; + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, SWIG_POINTER_OWN); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SystemBridge_get_down_flux(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::SystemBridge *arg1 = (cmf::water::SystemBridge *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::water::SystemBridge const > tempshared1 ; + std::shared_ptr< cmf::water::SystemBridge const > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__SystemBridge_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SystemBridge_get_down_flux" "', argument " "1"" of type '" "cmf::water::SystemBridge const *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::water::SystemBridge > * >(argp1); + delete reinterpret_cast< std::shared_ptr< const cmf::water::SystemBridge > * >(argp1); + arg1 = const_cast< cmf::water::SystemBridge * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::water::SystemBridge > * >(argp1); + arg1 = const_cast< cmf::water::SystemBridge * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + try { + result = (double)((cmf::water::SystemBridge const *)arg1)->get_down_flux(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SystemBridge_down_flux_integrator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::SystemBridge *arg1 = (cmf::water::SystemBridge *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::water::SystemBridge const > tempshared1 ; + std::shared_ptr< cmf::water::SystemBridge const > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + cmf::water::flux_integrator::ptr result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__SystemBridge_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SystemBridge_down_flux_integrator" "', argument " "1"" of type '" "cmf::water::SystemBridge const *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::water::SystemBridge > * >(argp1); + delete reinterpret_cast< std::shared_ptr< const cmf::water::SystemBridge > * >(argp1); + arg1 = const_cast< cmf::water::SystemBridge * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::water::SystemBridge > * >(argp1); + arg1 = const_cast< cmf::water::SystemBridge * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + try { + result = ((cmf::water::SystemBridge const *)arg1)->down_flux_integrator(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + std::shared_ptr< cmf::math::integratable > *smartresult = result ? new std::shared_ptr< cmf::math::integratable >(result) : 0; + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__math__integratable_t, SWIG_POINTER_OWN); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_SystemBridge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::SystemBridge *arg1 = (cmf::water::SystemBridge *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::water::SystemBridge > tempshared1 ; + std::shared_ptr< cmf::water::SystemBridge > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__SystemBridge_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SystemBridge" "', argument " "1"" of type '" "cmf::water::SystemBridge *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::water::SystemBridge > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::water::SystemBridge > * >(argp1); + arg1 = const_cast< cmf::water::SystemBridge * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::water::SystemBridge > * >(argp1); + arg1 = const_cast< cmf::water::SystemBridge * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + try { + (void)arg1; delete smartarg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *SystemBridge_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_cmf__water__SystemBridge_t, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_delete_SystemBridgeConnection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::water::SystemBridgeConnection *arg1 = (cmf::water::SystemBridgeConnection *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__SystemBridgeConnection, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SystemBridgeConnection" "', argument " "1"" of type '" "cmf::water::SystemBridgeConnection *""'"); + } + arg1 = reinterpret_cast< cmf::water::SystemBridgeConnection * >(argp1); + { + try { + + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *SystemBridgeConnection_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__water__SystemBridgeConnection, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_system_bridge(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::project *arg1 = 0 ; + cmf::water::flux_node::ptr arg2 ; + cmf::water::flux_node::ptr arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + void *argp3 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "p",(char *) "upper",(char *) "lower", NULL + }; + cmf::water::SystemBridge::ptr result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:system_bridge",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_cmf__project, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "system_bridge" "', argument " "1"" of type '" "cmf::project &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "system_bridge" "', argument " "1"" of type '" "cmf::project &""'"); + } + arg1 = reinterpret_cast< cmf::project * >(argp1); + { + int newmem = 0; + res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "system_bridge" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); + } + if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); + } + { + int newmem = 0; + res3 = SWIG_ConvertPtrAndOwn(obj2, &argp3, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "system_bridge" "', argument " "3"" of type '" "cmf::water::flux_node::ptr""'"); + } + if (argp3) arg3 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp3)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp3); + } + { + try { + result = cmf::water::system_bridge(*arg1,arg2,arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + std::shared_ptr< cmf::water::SystemBridge > *smartresult = result ? new std::shared_ptr< cmf::water::SystemBridge >(result) : 0; + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__water__SystemBridge_t, SWIG_POINTER_OWN); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vapour_pressure(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + double arg1 ; + double val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + char * kwnames[] = { + (char *) "T", NULL + }; + double result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:vapour_pressure",kwnames,&obj0)) SWIG_fail; + ecode1 = SWIG_AsVal_double(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "vapour_pressure" "', argument " "1"" of type '" "double""'"); + } + arg1 = static_cast< double >(val1); + { + try { + result = (double)cmf::atmosphere::vapour_pressure(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vpd_from_rH(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + double arg1 ; + double arg2 ; + double val1 ; + int ecode1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "T",(char *) "rH", NULL + }; + double result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:vpd_from_rH",kwnames,&obj0,&obj1)) SWIG_fail; + ecode1 = SWIG_AsVal_double(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "vpd_from_rH" "', argument " "1"" of type '" "double""'"); + } + arg1 = static_cast< double >(val1); + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vpd_from_rH" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + { + try { + result = (double)cmf::atmosphere::vpd_from_rH(arg1,arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_rH_from_vpd(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + double arg1 ; + double arg2 ; + double val1 ; + int ecode1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "T",(char *) "vpd", NULL + }; + double result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:rH_from_vpd",kwnames,&obj0,&obj1)) SWIG_fail; + ecode1 = SWIG_AsVal_double(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "rH_from_vpd" "', argument " "1"" of type '" "double""'"); + } + arg1 = static_cast< double >(val1); + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "rH_from_vpd" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + { + try { + result = (double)cmf::atmosphere::rH_from_vpd(arg1,arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_global_radiation(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::math::Time arg1 ; + double arg2 ; + double arg3 ; + double arg4 = (double) 8 ; + double arg5 = (double) 51 ; + double arg6 = (double) 1 ; + bool arg7 = (bool) 0 ; + double val2 ; + int ecode2 = 0 ; + double val3 ; + int ecode3 = 0 ; + double val4 ; + int ecode4 = 0 ; + double val5 ; + int ecode5 = 0 ; + double val6 ; + int ecode6 = 0 ; + bool val7 ; + int ecode7 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + PyObject * obj5 = 0 ; + PyObject * obj6 = 0 ; + char * kwnames[] = { + (char *) "t",(char *) "height",(char *) "sunshine_fraction",(char *) "longitude",(char *) "latitude",(char *) "time_zone",(char *) "daily", NULL + }; + double result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOOO:global_radiation",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail; + { + arg1 = convert_datetime_to_cmftime(obj0); + if (arg1 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } + } + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "global_radiation" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + ecode3 = SWIG_AsVal_double(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "global_radiation" "', argument " "3"" of type '" "double""'"); + } + arg3 = static_cast< double >(val3); + if (obj3) { + ecode4 = SWIG_AsVal_double(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "global_radiation" "', argument " "4"" of type '" "double""'"); + } + arg4 = static_cast< double >(val4); + } + if (obj4) { + ecode5 = SWIG_AsVal_double(obj4, &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "global_radiation" "', argument " "5"" of type '" "double""'"); + } + arg5 = static_cast< double >(val5); + } + if (obj5) { + ecode6 = SWIG_AsVal_double(obj5, &val6); + if (!SWIG_IsOK(ecode6)) { + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "global_radiation" "', argument " "6"" of type '" "double""'"); + } + arg6 = static_cast< double >(val6); + } + if (obj6) { + ecode7 = SWIG_AsVal_bool(obj6, &val7); + if (!SWIG_IsOK(ecode7)) { + SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "global_radiation" "', argument " "7"" of type '" "bool""'"); + } + arg7 = static_cast< bool >(val7); + } + { + try { + result = (double)cmf::atmosphere::global_radiation(arg1,arg2,arg3,arg4,arg5,arg6,arg7); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Pressure(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + double arg1 ; + double val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + char * kwnames[] = { + (char *) "height", NULL + }; + double result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:Pressure",kwnames,&obj0)) SWIG_fail; + ecode1 = SWIG_AsVal_double(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "Pressure" "', argument " "1"" of type '" "double""'"); + } + arg1 = static_cast< double >(val1); + { + try { + result = (double)cmf::atmosphere::Pressure(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Weather_T_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::Weather *arg1 = (cmf::atmosphere::Weather *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"Weather_T_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__atmosphere__Weather, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Weather_T_set" "', argument " "1"" of type '" "cmf::atmosphere::Weather *""'"); + } + arg1 = reinterpret_cast< cmf::atmosphere::Weather * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Weather_T_set" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + if (arg1) (arg1)->T = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Weather_T_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::Weather *arg1 = (cmf::atmosphere::Weather *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__atmosphere__Weather, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Weather_T_get" "', argument " "1"" of type '" "cmf::atmosphere::Weather *""'"); + } + arg1 = reinterpret_cast< cmf::atmosphere::Weather * >(argp1); + result = (double) ((arg1)->T); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Weather_Tmax_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::Weather *arg1 = (cmf::atmosphere::Weather *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"Weather_Tmax_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__atmosphere__Weather, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Weather_Tmax_set" "', argument " "1"" of type '" "cmf::atmosphere::Weather *""'"); + } + arg1 = reinterpret_cast< cmf::atmosphere::Weather * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Weather_Tmax_set" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + if (arg1) (arg1)->Tmax = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Weather_Tmax_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::Weather *arg1 = (cmf::atmosphere::Weather *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__atmosphere__Weather, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Weather_Tmax_get" "', argument " "1"" of type '" "cmf::atmosphere::Weather *""'"); + } + arg1 = reinterpret_cast< cmf::atmosphere::Weather * >(argp1); + result = (double) ((arg1)->Tmax); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Weather_Tmin_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::Weather *arg1 = (cmf::atmosphere::Weather *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"Weather_Tmin_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__atmosphere__Weather, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Weather_Tmin_set" "', argument " "1"" of type '" "cmf::atmosphere::Weather *""'"); + } + arg1 = reinterpret_cast< cmf::atmosphere::Weather * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Weather_Tmin_set" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + if (arg1) (arg1)->Tmin = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Weather_Tmin_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::Weather *arg1 = (cmf::atmosphere::Weather *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__atmosphere__Weather, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Weather_Tmin_get" "', argument " "1"" of type '" "cmf::atmosphere::Weather *""'"); + } + arg1 = reinterpret_cast< cmf::atmosphere::Weather * >(argp1); + result = (double) ((arg1)->Tmin); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Weather_Tground_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::Weather *arg1 = (cmf::atmosphere::Weather *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"Weather_Tground_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__atmosphere__Weather, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Weather_Tground_set" "', argument " "1"" of type '" "cmf::atmosphere::Weather *""'"); + } + arg1 = reinterpret_cast< cmf::atmosphere::Weather * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Weather_Tground_set" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + if (arg1) (arg1)->Tground = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Weather_Tground_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::Weather *arg1 = (cmf::atmosphere::Weather *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__atmosphere__Weather, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Weather_Tground_get" "', argument " "1"" of type '" "cmf::atmosphere::Weather *""'"); + } + arg1 = reinterpret_cast< cmf::atmosphere::Weather * >(argp1); + result = (double) ((arg1)->Tground); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Weather_Windspeed_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::Weather *arg1 = (cmf::atmosphere::Weather *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"Weather_Windspeed_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__atmosphere__Weather, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Weather_Windspeed_set" "', argument " "1"" of type '" "cmf::atmosphere::Weather *""'"); + } + arg1 = reinterpret_cast< cmf::atmosphere::Weather * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Weather_Windspeed_set" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + if (arg1) (arg1)->Windspeed = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Weather_Windspeed_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::Weather *arg1 = (cmf::atmosphere::Weather *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__atmosphere__Weather, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Weather_Windspeed_get" "', argument " "1"" of type '" "cmf::atmosphere::Weather *""'"); + } + arg1 = reinterpret_cast< cmf::atmosphere::Weather * >(argp1); + result = (double) ((arg1)->Windspeed); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Weather_e_a_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::Weather *arg1 = (cmf::atmosphere::Weather *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"Weather_e_a_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__atmosphere__Weather, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Weather_e_a_set" "', argument " "1"" of type '" "cmf::atmosphere::Weather *""'"); + } + arg1 = reinterpret_cast< cmf::atmosphere::Weather * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Weather_e_a_set" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + if (arg1) (arg1)->e_a = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Weather_e_a_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::Weather *arg1 = (cmf::atmosphere::Weather *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__atmosphere__Weather, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Weather_e_a_get" "', argument " "1"" of type '" "cmf::atmosphere::Weather *""'"); + } + arg1 = reinterpret_cast< cmf::atmosphere::Weather * >(argp1); + result = (double) ((arg1)->e_a); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Weather_e_s_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::Weather *arg1 = (cmf::atmosphere::Weather *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"Weather_e_s_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__atmosphere__Weather, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Weather_e_s_set" "', argument " "1"" of type '" "cmf::atmosphere::Weather *""'"); + } + arg1 = reinterpret_cast< cmf::atmosphere::Weather * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Weather_e_s_set" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + if (arg1) (arg1)->e_s = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Weather_e_s_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::Weather *arg1 = (cmf::atmosphere::Weather *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__atmosphere__Weather, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Weather_e_s_get" "', argument " "1"" of type '" "cmf::atmosphere::Weather *""'"); + } + arg1 = reinterpret_cast< cmf::atmosphere::Weather * >(argp1); + result = (double) ((arg1)->e_s); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Weather_sunshine_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::Weather *arg1 = (cmf::atmosphere::Weather *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"Weather_sunshine_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__atmosphere__Weather, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Weather_sunshine_set" "', argument " "1"" of type '" "cmf::atmosphere::Weather *""'"); + } + arg1 = reinterpret_cast< cmf::atmosphere::Weather * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Weather_sunshine_set" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + if (arg1) (arg1)->sunshine = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Weather_sunshine_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::Weather *arg1 = (cmf::atmosphere::Weather *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__atmosphere__Weather, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Weather_sunshine_get" "', argument " "1"" of type '" "cmf::atmosphere::Weather *""'"); + } + arg1 = reinterpret_cast< cmf::atmosphere::Weather * >(argp1); + result = (double) ((arg1)->sunshine); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Weather_Rs_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::Weather *arg1 = (cmf::atmosphere::Weather *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"Weather_Rs_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__atmosphere__Weather, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Weather_Rs_set" "', argument " "1"" of type '" "cmf::atmosphere::Weather *""'"); + } + arg1 = reinterpret_cast< cmf::atmosphere::Weather * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Weather_Rs_set" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + if (arg1) (arg1)->Rs = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Weather_Rs_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::Weather *arg1 = (cmf::atmosphere::Weather *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__atmosphere__Weather, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Weather_Rs_get" "', argument " "1"" of type '" "cmf::atmosphere::Weather *""'"); + } + arg1 = reinterpret_cast< cmf::atmosphere::Weather * >(argp1); + result = (double) ((arg1)->Rs); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Weather_daylength_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::Weather *arg1 = (cmf::atmosphere::Weather *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"Weather_daylength_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__atmosphere__Weather, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Weather_daylength_set" "', argument " "1"" of type '" "cmf::atmosphere::Weather *""'"); + } + arg1 = reinterpret_cast< cmf::atmosphere::Weather * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Weather_daylength_set" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + if (arg1) (arg1)->daylength = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Weather_daylength_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::Weather *arg1 = (cmf::atmosphere::Weather *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__atmosphere__Weather, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Weather_daylength_get" "', argument " "1"" of type '" "cmf::atmosphere::Weather *""'"); + } + arg1 = reinterpret_cast< cmf::atmosphere::Weather * >(argp1); + result = (double) ((arg1)->daylength); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Weather_instrument_height_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::Weather *arg1 = (cmf::atmosphere::Weather *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"Weather_instrument_height_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__atmosphere__Weather, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Weather_instrument_height_set" "', argument " "1"" of type '" "cmf::atmosphere::Weather *""'"); + } + arg1 = reinterpret_cast< cmf::atmosphere::Weather * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Weather_instrument_height_set" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + if (arg1) (arg1)->instrument_height = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Weather_instrument_height_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::Weather *arg1 = (cmf::atmosphere::Weather *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__atmosphere__Weather, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Weather_instrument_height_get" "', argument " "1"" of type '" "cmf::atmosphere::Weather *""'"); + } + arg1 = reinterpret_cast< cmf::atmosphere::Weather * >(argp1); + result = (double) ((arg1)->instrument_height); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Weather_Rn(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::atmosphere::Weather *arg1 = (cmf::atmosphere::Weather *) 0 ; + double arg2 ; + bool arg3 = (bool) false ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + bool val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "albedo",(char *) "daily", NULL + }; + double result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:Weather_Rn",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__atmosphere__Weather, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Weather_Rn" "', argument " "1"" of type '" "cmf::atmosphere::Weather const *""'"); + } + arg1 = reinterpret_cast< cmf::atmosphere::Weather * >(argp1); + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Weather_Rn" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + if (obj2) { + ecode3 = SWIG_AsVal_bool(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Weather_Rn" "', argument " "3"" of type '" "bool""'"); + } + arg3 = static_cast< bool >(val3); + } + { + try { + result = (double)((cmf::atmosphere::Weather const *)arg1)->Rn(arg2,arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_Weather(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + double arg1 = (double) 15.0 ; + double arg2 = (double) 17.0 ; + double arg3 = (double) 13.0 ; + double arg4 = (double) 70.0 ; + double arg5 = (double) 2.0 ; + double arg6 = (double) 0.5 ; + double arg7 = (double) 15 ; + double arg8 = (double) 12 ; + double val1 ; + int ecode1 = 0 ; + double val2 ; + int ecode2 = 0 ; + double val3 ; + int ecode3 = 0 ; + double val4 ; + int ecode4 = 0 ; + double val5 ; + int ecode5 = 0 ; + double val6 ; + int ecode6 = 0 ; + double val7 ; + int ecode7 = 0 ; + double val8 ; + int ecode8 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + PyObject * obj5 = 0 ; + PyObject * obj6 = 0 ; + PyObject * obj7 = 0 ; + char * kwnames[] = { + (char *) "T",(char *) "Tmax",(char *) "Tmin",(char *) "rH",(char *) "wind",(char *) "sunshine",(char *) "Rs",(char *) "daylength", NULL + }; + cmf::atmosphere::Weather *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|OOOOOOOO:new_Weather",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail; + if (obj0) { + ecode1 = SWIG_AsVal_double(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Weather" "', argument " "1"" of type '" "double""'"); + } + arg1 = static_cast< double >(val1); + } + if (obj1) { + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Weather" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + } + if (obj2) { + ecode3 = SWIG_AsVal_double(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Weather" "', argument " "3"" of type '" "double""'"); + } + arg3 = static_cast< double >(val3); + } + if (obj3) { + ecode4 = SWIG_AsVal_double(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_Weather" "', argument " "4"" of type '" "double""'"); + } + arg4 = static_cast< double >(val4); + } + if (obj4) { + ecode5 = SWIG_AsVal_double(obj4, &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_Weather" "', argument " "5"" of type '" "double""'"); + } + arg5 = static_cast< double >(val5); + } + if (obj5) { + ecode6 = SWIG_AsVal_double(obj5, &val6); + if (!SWIG_IsOK(ecode6)) { + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_Weather" "', argument " "6"" of type '" "double""'"); + } + arg6 = static_cast< double >(val6); + } + if (obj6) { + ecode7 = SWIG_AsVal_double(obj6, &val7); + if (!SWIG_IsOK(ecode7)) { + SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_Weather" "', argument " "7"" of type '" "double""'"); + } + arg7 = static_cast< double >(val7); + } + if (obj7) { + ecode8 = SWIG_AsVal_double(obj7, &val8); + if (!SWIG_IsOK(ecode8)) { + SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_Weather" "', argument " "8"" of type '" "double""'"); + } + arg8 = static_cast< double >(val8); + } + { + try { + result = (cmf::atmosphere::Weather *)new cmf::atmosphere::Weather(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__atmosphere__Weather, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Weather_to_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::Weather *arg1 = (cmf::atmosphere::Weather *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::string result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__atmosphere__Weather, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Weather_to_string" "', argument " "1"" of type '" "cmf::atmosphere::Weather const *""'"); + } + arg1 = reinterpret_cast< cmf::atmosphere::Weather * >(argp1); + { + try { + result = ((cmf::atmosphere::Weather const *)arg1)->to_string(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Weather_set_snow_threshold(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + double arg1 ; + double val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + char * kwnames[] = { + (char *) "new_threshold", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:Weather_set_snow_threshold",kwnames,&obj0)) SWIG_fail; + ecode1 = SWIG_AsVal_double(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "Weather_set_snow_threshold" "', argument " "1"" of type '" "double""'"); + } + arg1 = static_cast< double >(val1); + { + try { + cmf::atmosphere::Weather::set_snow_threshold(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Weather_get_snow_threshold(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + double result; + + if (!SWIG_Python_UnpackTuple(args,"Weather_get_snow_threshold",0,0,0)) SWIG_fail; + { + try { + result = (double)cmf::atmosphere::Weather::get_snow_threshold(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Weather___iadd__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::atmosphere::Weather *arg1 = (cmf::atmosphere::Weather *) 0 ; + cmf::atmosphere::Weather *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "w", NULL + }; + cmf::atmosphere::Weather *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Weather___iadd__",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__atmosphere__Weather, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Weather___iadd__" "', argument " "1"" of type '" "cmf::atmosphere::Weather *""'"); + } + arg1 = reinterpret_cast< cmf::atmosphere::Weather * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_cmf__atmosphere__Weather, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Weather___iadd__" "', argument " "2"" of type '" "cmf::atmosphere::Weather const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Weather___iadd__" "', argument " "2"" of type '" "cmf::atmosphere::Weather const &""'"); + } + arg2 = reinterpret_cast< cmf::atmosphere::Weather * >(argp2); + { + try { + result = (cmf::atmosphere::Weather *) &(arg1)->operator +=((cmf::atmosphere::Weather const &)*arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__atmosphere__Weather, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Weather___imul__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::atmosphere::Weather *arg1 = (cmf::atmosphere::Weather *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "factor", NULL + }; + cmf::atmosphere::Weather *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Weather___imul__",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__atmosphere__Weather, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Weather___imul__" "', argument " "1"" of type '" "cmf::atmosphere::Weather *""'"); + } + arg1 = reinterpret_cast< cmf::atmosphere::Weather * >(argp1); + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Weather___imul__" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + { + try { + result = (cmf::atmosphere::Weather *) &(arg1)->operator *=(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__atmosphere__Weather, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Weather___add__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::atmosphere::Weather *arg1 = (cmf::atmosphere::Weather *) 0 ; + cmf::atmosphere::Weather *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "w", NULL + }; + cmf::atmosphere::Weather result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Weather___add__",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__atmosphere__Weather, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Weather___add__" "', argument " "1"" of type '" "cmf::atmosphere::Weather *""'"); + } + arg1 = reinterpret_cast< cmf::atmosphere::Weather * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_cmf__atmosphere__Weather, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Weather___add__" "', argument " "2"" of type '" "cmf::atmosphere::Weather const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Weather___add__" "', argument " "2"" of type '" "cmf::atmosphere::Weather const &""'"); + } + arg2 = reinterpret_cast< cmf::atmosphere::Weather * >(argp2); + { + try { + result = (arg1)->operator +((cmf::atmosphere::Weather const &)*arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj((new cmf::atmosphere::Weather(static_cast< const cmf::atmosphere::Weather& >(result))), SWIGTYPE_p_cmf__atmosphere__Weather, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Weather___mul__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::atmosphere::Weather *arg1 = (cmf::atmosphere::Weather *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "factor", NULL + }; + cmf::atmosphere::Weather result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Weather___mul__",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__atmosphere__Weather, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Weather___mul__" "', argument " "1"" of type '" "cmf::atmosphere::Weather *""'"); + } + arg1 = reinterpret_cast< cmf::atmosphere::Weather * >(argp1); + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Weather___mul__" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + { + try { + result = (arg1)->operator *(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj((new cmf::atmosphere::Weather(static_cast< const cmf::atmosphere::Weather& >(result))), SWIGTYPE_p_cmf__atmosphere__Weather, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_Weather(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::Weather *arg1 = (cmf::atmosphere::Weather *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__atmosphere__Weather, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Weather" "', argument " "1"" of type '" "cmf::atmosphere::Weather *""'"); + } + arg1 = reinterpret_cast< cmf::atmosphere::Weather * >(argp1); + { + try { + delete arg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *Weather_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__atmosphere__Weather, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *Weather_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_Meteorology___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::atmosphere::Meteorology *arg1 = (cmf::atmosphere::Meteorology *) 0 ; + cmf::math::Time arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "t", NULL + }; + cmf::atmosphere::Weather result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Meteorology___call__",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__atmosphere__Meteorology, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Meteorology___call__" "', argument " "1"" of type '" "cmf::atmosphere::Meteorology *""'"); + } + arg1 = reinterpret_cast< cmf::atmosphere::Meteorology * >(argp1); + { + arg2 = convert_datetime_to_cmftime(obj1); + if (arg2 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } + } + { + try { + result = (arg1)->operator ()(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj((new cmf::atmosphere::Weather(static_cast< const cmf::atmosphere::Weather& >(result))), SWIGTYPE_p_cmf__atmosphere__Weather, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Meteorology_get_weather(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::atmosphere::Meteorology *arg1 = (cmf::atmosphere::Meteorology *) 0 ; + cmf::math::Time arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "t", NULL + }; + cmf::atmosphere::Weather result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Meteorology_get_weather",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__atmosphere__Meteorology, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Meteorology_get_weather" "', argument " "1"" of type '" "cmf::atmosphere::Meteorology const *""'"); + } + arg1 = reinterpret_cast< cmf::atmosphere::Meteorology * >(argp1); + { + arg2 = convert_datetime_to_cmftime(obj1); + if (arg2 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } + } + { + try { + result = ((cmf::atmosphere::Meteorology const *)arg1)->get_weather(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj((new cmf::atmosphere::Weather(static_cast< const cmf::atmosphere::Weather& >(result))), SWIGTYPE_p_cmf__atmosphere__Weather, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Meteorology_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::Meteorology *arg1 = (cmf::atmosphere::Meteorology *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::atmosphere::Meteorology *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__atmosphere__Meteorology, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Meteorology_copy" "', argument " "1"" of type '" "cmf::atmosphere::Meteorology const *""'"); + } + arg1 = reinterpret_cast< cmf::atmosphere::Meteorology * >(argp1); + { + try { + result = (cmf::atmosphere::Meteorology *)((cmf::atmosphere::Meteorology const *)arg1)->copy(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__atmosphere__Meteorology, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Meteorology_get_instrument_height(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::Meteorology *arg1 = (cmf::atmosphere::Meteorology *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__atmosphere__Meteorology, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Meteorology_get_instrument_height" "', argument " "1"" of type '" "cmf::atmosphere::Meteorology const *""'"); + } + arg1 = reinterpret_cast< cmf::atmosphere::Meteorology * >(argp1); + { + try { + result = (real)((cmf::atmosphere::Meteorology const *)arg1)->get_instrument_height(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_Meteorology(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::Meteorology *arg1 = (cmf::atmosphere::Meteorology *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__atmosphere__Meteorology, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Meteorology" "', argument " "1"" of type '" "cmf::atmosphere::Meteorology *""'"); + } + arg1 = reinterpret_cast< cmf::atmosphere::Meteorology * >(argp1); + { + try { + delete arg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *Meteorology_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__atmosphere__Meteorology, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_ConstantMeteorology_weather_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::ConstantMeteorology *arg1 = (cmf::atmosphere::ConstantMeteorology *) 0 ; + cmf::atmosphere::Weather *arg2 = (cmf::atmosphere::Weather *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"ConstantMeteorology_weather_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__atmosphere__ConstantMeteorology, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ConstantMeteorology_weather_set" "', argument " "1"" of type '" "cmf::atmosphere::ConstantMeteorology *""'"); + } + arg1 = reinterpret_cast< cmf::atmosphere::ConstantMeteorology * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_cmf__atmosphere__Weather, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ConstantMeteorology_weather_set" "', argument " "2"" of type '" "cmf::atmosphere::Weather *""'"); + } + arg2 = reinterpret_cast< cmf::atmosphere::Weather * >(argp2); + if (arg1) (arg1)->weather = *arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ConstantMeteorology_weather_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::ConstantMeteorology *arg1 = (cmf::atmosphere::ConstantMeteorology *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::atmosphere::Weather *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__atmosphere__ConstantMeteorology, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ConstantMeteorology_weather_get" "', argument " "1"" of type '" "cmf::atmosphere::ConstantMeteorology *""'"); + } + arg1 = reinterpret_cast< cmf::atmosphere::ConstantMeteorology * >(argp1); + result = (cmf::atmosphere::Weather *)& ((arg1)->weather); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__atmosphere__Weather, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ConstantMeteorology__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) { + PyObject *resultobj = 0; + cmf::atmosphere::ConstantMeteorology *result = 0 ; + + if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; + { + try { + result = (cmf::atmosphere::ConstantMeteorology *)new cmf::atmosphere::ConstantMeteorology(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__atmosphere__ConstantMeteorology, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ConstantMeteorology__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::atmosphere::Weather *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + cmf::atmosphere::ConstantMeteorology *result = 0 ; + + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_cmf__atmosphere__Weather, 0 | 0); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ConstantMeteorology" "', argument " "1"" of type '" "cmf::atmosphere::Weather const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConstantMeteorology" "', argument " "1"" of type '" "cmf::atmosphere::Weather const &""'"); + } + arg1 = reinterpret_cast< cmf::atmosphere::Weather * >(argp1); + { + try { + result = (cmf::atmosphere::ConstantMeteorology *)new cmf::atmosphere::ConstantMeteorology((cmf::atmosphere::Weather const &)*arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__atmosphere__ConstantMeteorology, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ConstantMeteorology__SWIG_2(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::atmosphere::ConstantMeteorology *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + cmf::atmosphere::ConstantMeteorology *result = 0 ; + + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_cmf__atmosphere__ConstantMeteorology, 0 | 0); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ConstantMeteorology" "', argument " "1"" of type '" "cmf::atmosphere::ConstantMeteorology const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConstantMeteorology" "', argument " "1"" of type '" "cmf::atmosphere::ConstantMeteorology const &""'"); + } + arg1 = reinterpret_cast< cmf::atmosphere::ConstantMeteorology * >(argp1); + { + try { + result = (cmf::atmosphere::ConstantMeteorology *)new cmf::atmosphere::ConstantMeteorology((cmf::atmosphere::ConstantMeteorology const &)*arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__atmosphere__ConstantMeteorology, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ConstantMeteorology(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[2] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"new_ConstantMeteorology",0,1,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 0) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + if (argc == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_cmf__atmosphere__Weather, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + if (argc == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_cmf__atmosphere__ConstantMeteorology, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 3; + if (_rank == _rankm) goto dispatch; + } + } + check_3: + + dispatch: + switch(_index) { + case 1: + return _wrap_new_ConstantMeteorology__SWIG_0(self, argc, argv); + case 2: + return _wrap_new_ConstantMeteorology__SWIG_1(self, argc, argv); + case 3: + return _wrap_new_ConstantMeteorology__SWIG_2(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_ConstantMeteorology'.\n" + " Possible C/C++ prototypes are:\n" + " cmf::atmosphere::ConstantMeteorology::ConstantMeteorology()\n" + " cmf::atmosphere::ConstantMeteorology::ConstantMeteorology(cmf::atmosphere::Weather const &)\n" + " cmf::atmosphere::ConstantMeteorology::ConstantMeteorology(cmf::atmosphere::ConstantMeteorology const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_ConstantMeteorology_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::ConstantMeteorology *arg1 = (cmf::atmosphere::ConstantMeteorology *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::atmosphere::ConstantMeteorology *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__atmosphere__ConstantMeteorology, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ConstantMeteorology_copy" "', argument " "1"" of type '" "cmf::atmosphere::ConstantMeteorology const *""'"); + } + arg1 = reinterpret_cast< cmf::atmosphere::ConstantMeteorology * >(argp1); + { + try { + result = (cmf::atmosphere::ConstantMeteorology *)((cmf::atmosphere::ConstantMeteorology const *)arg1)->copy(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__atmosphere__ConstantMeteorology, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_ConstantMeteorology(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::ConstantMeteorology *arg1 = (cmf::atmosphere::ConstantMeteorology *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__atmosphere__ConstantMeteorology, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ConstantMeteorology" "', argument " "1"" of type '" "cmf::atmosphere::ConstantMeteorology *""'"); + } + arg1 = reinterpret_cast< cmf::atmosphere::ConstantMeteorology * >(argp1); + { + try { + delete arg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *ConstantMeteorology_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__atmosphere__ConstantMeteorology, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *ConstantMeteorology_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_MeteoStation_Latitude_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::MeteoStation *arg1 = (cmf::atmosphere::MeteoStation *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::atmosphere::MeteoStation > tempshared1 ; + std::shared_ptr< cmf::atmosphere::MeteoStation > *smartarg1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"MeteoStation_Latitude_set",2,2,swig_obj)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStation_Latitude_set" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::MeteoStation * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::MeteoStation * >((smartarg1 ? smartarg1->get() : 0)); + } + } + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MeteoStation_Latitude_set" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + if (arg1) (arg1)->Latitude = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_MeteoStation_Latitude_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::MeteoStation *arg1 = (cmf::atmosphere::MeteoStation *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::atmosphere::MeteoStation > tempshared1 ; + std::shared_ptr< cmf::atmosphere::MeteoStation > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStation_Latitude_get" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::MeteoStation * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::MeteoStation * >((smartarg1 ? smartarg1->get() : 0)); + } + } + result = (double) ((arg1)->Latitude); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_MeteoStation_Longitude_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::MeteoStation *arg1 = (cmf::atmosphere::MeteoStation *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::atmosphere::MeteoStation > tempshared1 ; + std::shared_ptr< cmf::atmosphere::MeteoStation > *smartarg1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"MeteoStation_Longitude_set",2,2,swig_obj)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStation_Longitude_set" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::MeteoStation * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::MeteoStation * >((smartarg1 ? smartarg1->get() : 0)); + } + } + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MeteoStation_Longitude_set" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + if (arg1) (arg1)->Longitude = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_MeteoStation_Longitude_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::MeteoStation *arg1 = (cmf::atmosphere::MeteoStation *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::atmosphere::MeteoStation > tempshared1 ; + std::shared_ptr< cmf::atmosphere::MeteoStation > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStation_Longitude_get" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::MeteoStation * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::MeteoStation * >((smartarg1 ? smartarg1->get() : 0)); + } + } + result = (double) ((arg1)->Longitude); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_MeteoStation_Timezone_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::MeteoStation *arg1 = (cmf::atmosphere::MeteoStation *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::atmosphere::MeteoStation > tempshared1 ; + std::shared_ptr< cmf::atmosphere::MeteoStation > *smartarg1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"MeteoStation_Timezone_set",2,2,swig_obj)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStation_Timezone_set" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::MeteoStation * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::MeteoStation * >((smartarg1 ? smartarg1->get() : 0)); + } + } + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MeteoStation_Timezone_set" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + if (arg1) (arg1)->Timezone = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_MeteoStation_Timezone_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::MeteoStation *arg1 = (cmf::atmosphere::MeteoStation *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::atmosphere::MeteoStation > tempshared1 ; + std::shared_ptr< cmf::atmosphere::MeteoStation > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStation_Timezone_get" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::MeteoStation * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::MeteoStation * >((smartarg1 ? smartarg1->get() : 0)); + } + } + result = (double) ((arg1)->Timezone); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_MeteoStation_x_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::MeteoStation *arg1 = (cmf::atmosphere::MeteoStation *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::atmosphere::MeteoStation > tempshared1 ; + std::shared_ptr< cmf::atmosphere::MeteoStation > *smartarg1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"MeteoStation_x_set",2,2,swig_obj)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStation_x_set" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::MeteoStation * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::MeteoStation * >((smartarg1 ? smartarg1->get() : 0)); + } + } + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MeteoStation_x_set" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + if (arg1) (arg1)->x = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_MeteoStation_x_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::MeteoStation *arg1 = (cmf::atmosphere::MeteoStation *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::atmosphere::MeteoStation > tempshared1 ; + std::shared_ptr< cmf::atmosphere::MeteoStation > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStation_x_get" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::MeteoStation * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::MeteoStation * >((smartarg1 ? smartarg1->get() : 0)); + } + } + result = (double) ((arg1)->x); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_MeteoStation_y_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::MeteoStation *arg1 = (cmf::atmosphere::MeteoStation *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::atmosphere::MeteoStation > tempshared1 ; + std::shared_ptr< cmf::atmosphere::MeteoStation > *smartarg1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"MeteoStation_y_set",2,2,swig_obj)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStation_y_set" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::MeteoStation * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::MeteoStation * >((smartarg1 ? smartarg1->get() : 0)); + } + } + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MeteoStation_y_set" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + if (arg1) (arg1)->y = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_MeteoStation_y_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::MeteoStation *arg1 = (cmf::atmosphere::MeteoStation *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::atmosphere::MeteoStation > tempshared1 ; + std::shared_ptr< cmf::atmosphere::MeteoStation > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStation_y_get" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::MeteoStation * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::MeteoStation * >((smartarg1 ? smartarg1->get() : 0)); + } + } + result = (double) ((arg1)->y); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_MeteoStation_z_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::MeteoStation *arg1 = (cmf::atmosphere::MeteoStation *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::atmosphere::MeteoStation > tempshared1 ; + std::shared_ptr< cmf::atmosphere::MeteoStation > *smartarg1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"MeteoStation_z_set",2,2,swig_obj)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStation_z_set" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::MeteoStation * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::MeteoStation * >((smartarg1 ? smartarg1->get() : 0)); + } + } + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MeteoStation_z_set" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + if (arg1) (arg1)->z = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_MeteoStation_z_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::MeteoStation *arg1 = (cmf::atmosphere::MeteoStation *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::atmosphere::MeteoStation > tempshared1 ; + std::shared_ptr< cmf::atmosphere::MeteoStation > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStation_z_get" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::MeteoStation * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::MeteoStation * >((smartarg1 ? smartarg1->get() : 0)); + } + } + result = (double) ((arg1)->z); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_MeteoStation_Name_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::MeteoStation *arg1 = (cmf::atmosphere::MeteoStation *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::atmosphere::MeteoStation > tempshared1 ; + std::shared_ptr< cmf::atmosphere::MeteoStation > *smartarg1 = 0 ; + int res2 = SWIG_OLDOBJ ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"MeteoStation_Name_set",2,2,swig_obj)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStation_Name_set" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::MeteoStation * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::MeteoStation * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MeteoStation_Name_set" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MeteoStation_Name_set" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + if (arg1) (arg1)->Name = *arg2; + resultobj = SWIG_Py_Void(); + if (SWIG_IsNewObj(res2)) delete arg2; + return resultobj; +fail: + if (SWIG_IsNewObj(res2)) delete arg2; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_MeteoStation_Name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::MeteoStation *arg1 = (cmf::atmosphere::MeteoStation *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::atmosphere::MeteoStation > tempshared1 ; + std::shared_ptr< cmf::atmosphere::MeteoStation > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + std::string *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStation_Name_get" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::MeteoStation * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::MeteoStation * >((smartarg1 ? smartarg1->get() : 0)); + } + } + result = (std::string *) & ((arg1)->Name); + resultobj = SWIG_From_std_string(static_cast< std::string >(*result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_MeteoStation_get_position(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::MeteoStation *arg1 = (cmf::atmosphere::MeteoStation *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::atmosphere::MeteoStation const > tempshared1 ; + std::shared_ptr< cmf::atmosphere::MeteoStation const > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + cmf::geometry::point result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStation_get_position" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation const *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::atmosphere::MeteoStation > * >(argp1); + delete reinterpret_cast< std::shared_ptr< const cmf::atmosphere::MeteoStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::MeteoStation * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::atmosphere::MeteoStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::MeteoStation * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + try { + result = ((cmf::atmosphere::MeteoStation const *)arg1)->get_position(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj((new cmf::geometry::point(static_cast< const cmf::geometry::point& >(result))), SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_MeteoStation_daily_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::MeteoStation *arg1 = (cmf::atmosphere::MeteoStation *) 0 ; + bool arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::atmosphere::MeteoStation > tempshared1 ; + std::shared_ptr< cmf::atmosphere::MeteoStation > *smartarg1 = 0 ; + bool val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"MeteoStation_daily_set",2,2,swig_obj)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStation_daily_set" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::MeteoStation * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::MeteoStation * >((smartarg1 ? smartarg1->get() : 0)); + } + } + ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MeteoStation_daily_set" "', argument " "2"" of type '" "bool""'"); + } + arg2 = static_cast< bool >(val2); + if (arg1) (arg1)->daily = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_MeteoStation_daily_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::MeteoStation *arg1 = (cmf::atmosphere::MeteoStation *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::atmosphere::MeteoStation > tempshared1 ; + std::shared_ptr< cmf::atmosphere::MeteoStation > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + bool result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStation_daily_get" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::MeteoStation * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::MeteoStation * >((smartarg1 ? smartarg1->get() : 0)); + } + } + result = (bool) ((arg1)->daily); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_MeteoStation_InstrumentHeight_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::MeteoStation *arg1 = (cmf::atmosphere::MeteoStation *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::atmosphere::MeteoStation > tempshared1 ; + std::shared_ptr< cmf::atmosphere::MeteoStation > *smartarg1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"MeteoStation_InstrumentHeight_set",2,2,swig_obj)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStation_InstrumentHeight_set" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::MeteoStation * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::MeteoStation * >((smartarg1 ? smartarg1->get() : 0)); + } + } + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MeteoStation_InstrumentHeight_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->InstrumentHeight = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_MeteoStation_InstrumentHeight_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::MeteoStation *arg1 = (cmf::atmosphere::MeteoStation *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::atmosphere::MeteoStation > tempshared1 ; + std::shared_ptr< cmf::atmosphere::MeteoStation > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStation_InstrumentHeight_get" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::MeteoStation * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::MeteoStation * >((smartarg1 ? smartarg1->get() : 0)); + } + } + result = (real) ((arg1)->InstrumentHeight); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_MeteoStation(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::atmosphere::MeteoStation *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::atmosphere::MeteoStation const > tempshared1 ; + PyObject * obj0 = 0 ; + char * kwnames[] = { + (char *) "other", NULL + }; + cmf::atmosphere::MeteoStation *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:new_MeteoStation",kwnames,&obj0)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MeteoStation" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MeteoStation" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation const &""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::atmosphere::MeteoStation > * >(argp1); + delete reinterpret_cast< std::shared_ptr< const cmf::atmosphere::MeteoStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::MeteoStation * >(tempshared1.get()); + } else { + arg1 = const_cast< cmf::atmosphere::MeteoStation * >(reinterpret_cast< std::shared_ptr< const cmf::atmosphere::MeteoStation > * >(argp1)->get()); + } + } + { + try { + result = (cmf::atmosphere::MeteoStation *)new cmf::atmosphere::MeteoStation((cmf::atmosphere::MeteoStation const &)*arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + std::shared_ptr< cmf::atmosphere::MeteoStation > *smartresult = result ? new std::shared_ptr< cmf::atmosphere::MeteoStation >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0; + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_MeteoStation_get_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::atmosphere::MeteoStation *arg1 = (cmf::atmosphere::MeteoStation *) 0 ; + cmf::math::Time arg2 ; + double arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::atmosphere::MeteoStation const > tempshared1 ; + std::shared_ptr< cmf::atmosphere::MeteoStation const > *smartarg1 = 0 ; + double val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "t",(char *) "height", NULL + }; + cmf::atmosphere::Weather result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:MeteoStation_get_data",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStation_get_data" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation const *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::atmosphere::MeteoStation > * >(argp1); + delete reinterpret_cast< std::shared_ptr< const cmf::atmosphere::MeteoStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::MeteoStation * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::atmosphere::MeteoStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::MeteoStation * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + arg2 = convert_datetime_to_cmftime(obj1); + if (arg2 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } + } + ecode3 = SWIG_AsVal_double(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MeteoStation_get_data" "', argument " "3"" of type '" "double""'"); + } + arg3 = static_cast< double >(val3); + { + try { + result = ((cmf::atmosphere::MeteoStation const *)arg1)->get_data(arg2,arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj((new cmf::atmosphere::Weather(static_cast< const cmf::atmosphere::Weather& >(result))), SWIGTYPE_p_cmf__atmosphere__Weather, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_MeteoStation_use_for_cell(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::atmosphere::MeteoStation *arg1 = (cmf::atmosphere::MeteoStation *) 0 ; + cmf::upslope::Cell *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::atmosphere::MeteoStation > tempshared1 ; + std::shared_ptr< cmf::atmosphere::MeteoStation > *smartarg1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "c", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:MeteoStation_use_for_cell",kwnames,&obj0,&obj1)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStation_use_for_cell" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::MeteoStation * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::MeteoStation * >((smartarg1 ? smartarg1->get() : 0)); + } + } + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_cmf__upslope__Cell, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MeteoStation_use_for_cell" "', argument " "2"" of type '" "cmf::upslope::Cell &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MeteoStation_use_for_cell" "', argument " "2"" of type '" "cmf::upslope::Cell &""'"); + } + arg2 = reinterpret_cast< cmf::upslope::Cell * >(argp2); + { + try { + (arg1)->use_for_cell(*arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_MeteoStation_SetSunshineFraction(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::atmosphere::MeteoStation *arg1 = (cmf::atmosphere::MeteoStation *) 0 ; + cmf::math::timeseries arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::atmosphere::MeteoStation > tempshared1 ; + std::shared_ptr< cmf::atmosphere::MeteoStation > *smartarg1 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "sunshine_duration", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:MeteoStation_SetSunshineFraction",kwnames,&obj0,&obj1)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStation_SetSunshineFraction" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::MeteoStation * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::MeteoStation * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + cmf::math::timeseries *p_ts = &arg2; + int res=SWIG_ConvertPtr(obj1,(void**)(&p_ts),SWIGTYPE_p_cmf__math__timeseries,0); + if (!(SWIG_IsOK(res)) || p_ts==0) { + if (PyNumber_Check(obj1)) { + double scalar = PyFloat_AsDouble(obj1); + arg2 = cmf::math::timeseries::from_scalar(scalar); + } else { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.timeseries object"); + } + } else { + arg2 = *p_ts; + } + } + { + try { + (arg1)->SetSunshineFraction(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_MeteoStation_T_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::MeteoStation *arg1 = (cmf::atmosphere::MeteoStation *) 0 ; + cmf::math::timeseries *arg2 = (cmf::math::timeseries *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::atmosphere::MeteoStation > tempshared1 ; + std::shared_ptr< cmf::atmosphere::MeteoStation > *smartarg1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"MeteoStation_T_set",2,2,swig_obj)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStation_T_set" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::MeteoStation * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::MeteoStation * >((smartarg1 ? smartarg1->get() : 0)); + } + } + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MeteoStation_T_set" "', argument " "2"" of type '" "cmf::math::timeseries *""'"); + } + arg2 = reinterpret_cast< cmf::math::timeseries * >(argp2); + if (arg1) (arg1)->T = *arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_MeteoStation_T_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::MeteoStation *arg1 = (cmf::atmosphere::MeteoStation *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::atmosphere::MeteoStation > tempshared1 ; + std::shared_ptr< cmf::atmosphere::MeteoStation > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + cmf::math::timeseries *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStation_T_get" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::MeteoStation * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::MeteoStation * >((smartarg1 ? smartarg1->get() : 0)); + } + } + result = (cmf::math::timeseries *)& ((arg1)->T); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_MeteoStation_Tmax_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::MeteoStation *arg1 = (cmf::atmosphere::MeteoStation *) 0 ; + cmf::math::timeseries *arg2 = (cmf::math::timeseries *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::atmosphere::MeteoStation > tempshared1 ; + std::shared_ptr< cmf::atmosphere::MeteoStation > *smartarg1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"MeteoStation_Tmax_set",2,2,swig_obj)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStation_Tmax_set" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::MeteoStation * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::MeteoStation * >((smartarg1 ? smartarg1->get() : 0)); + } + } + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MeteoStation_Tmax_set" "', argument " "2"" of type '" "cmf::math::timeseries *""'"); + } + arg2 = reinterpret_cast< cmf::math::timeseries * >(argp2); + if (arg1) (arg1)->Tmax = *arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_MeteoStation_Tmax_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::MeteoStation *arg1 = (cmf::atmosphere::MeteoStation *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::atmosphere::MeteoStation > tempshared1 ; + std::shared_ptr< cmf::atmosphere::MeteoStation > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + cmf::math::timeseries *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStation_Tmax_get" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::MeteoStation * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::MeteoStation * >((smartarg1 ? smartarg1->get() : 0)); + } + } + result = (cmf::math::timeseries *)& ((arg1)->Tmax); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_MeteoStation_Tmin_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::MeteoStation *arg1 = (cmf::atmosphere::MeteoStation *) 0 ; + cmf::math::timeseries *arg2 = (cmf::math::timeseries *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::atmosphere::MeteoStation > tempshared1 ; + std::shared_ptr< cmf::atmosphere::MeteoStation > *smartarg1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"MeteoStation_Tmin_set",2,2,swig_obj)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStation_Tmin_set" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::MeteoStation * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::MeteoStation * >((smartarg1 ? smartarg1->get() : 0)); + } + } + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MeteoStation_Tmin_set" "', argument " "2"" of type '" "cmf::math::timeseries *""'"); + } + arg2 = reinterpret_cast< cmf::math::timeseries * >(argp2); + if (arg1) (arg1)->Tmin = *arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_MeteoStation_Tmin_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::MeteoStation *arg1 = (cmf::atmosphere::MeteoStation *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::atmosphere::MeteoStation > tempshared1 ; + std::shared_ptr< cmf::atmosphere::MeteoStation > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + cmf::math::timeseries *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStation_Tmin_get" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::MeteoStation * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::MeteoStation * >((smartarg1 ? smartarg1->get() : 0)); + } + } + result = (cmf::math::timeseries *)& ((arg1)->Tmin); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_MeteoStation_Tground_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::MeteoStation *arg1 = (cmf::atmosphere::MeteoStation *) 0 ; + cmf::math::timeseries *arg2 = (cmf::math::timeseries *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::atmosphere::MeteoStation > tempshared1 ; + std::shared_ptr< cmf::atmosphere::MeteoStation > *smartarg1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"MeteoStation_Tground_set",2,2,swig_obj)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStation_Tground_set" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::MeteoStation * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::MeteoStation * >((smartarg1 ? smartarg1->get() : 0)); + } + } + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MeteoStation_Tground_set" "', argument " "2"" of type '" "cmf::math::timeseries *""'"); + } + arg2 = reinterpret_cast< cmf::math::timeseries * >(argp2); + if (arg1) (arg1)->Tground = *arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_MeteoStation_Tground_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::MeteoStation *arg1 = (cmf::atmosphere::MeteoStation *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::atmosphere::MeteoStation > tempshared1 ; + std::shared_ptr< cmf::atmosphere::MeteoStation > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + cmf::math::timeseries *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStation_Tground_get" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::MeteoStation * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::MeteoStation * >((smartarg1 ? smartarg1->get() : 0)); + } + } + result = (cmf::math::timeseries *)& ((arg1)->Tground); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_MeteoStation_Windspeed_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::MeteoStation *arg1 = (cmf::atmosphere::MeteoStation *) 0 ; + cmf::math::timeseries *arg2 = (cmf::math::timeseries *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::atmosphere::MeteoStation > tempshared1 ; + std::shared_ptr< cmf::atmosphere::MeteoStation > *smartarg1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"MeteoStation_Windspeed_set",2,2,swig_obj)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStation_Windspeed_set" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::MeteoStation * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::MeteoStation * >((smartarg1 ? smartarg1->get() : 0)); + } + } + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MeteoStation_Windspeed_set" "', argument " "2"" of type '" "cmf::math::timeseries *""'"); + } + arg2 = reinterpret_cast< cmf::math::timeseries * >(argp2); + if (arg1) (arg1)->Windspeed = *arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_MeteoStation_Windspeed_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::MeteoStation *arg1 = (cmf::atmosphere::MeteoStation *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::atmosphere::MeteoStation > tempshared1 ; + std::shared_ptr< cmf::atmosphere::MeteoStation > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + cmf::math::timeseries *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStation_Windspeed_get" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::MeteoStation * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::MeteoStation * >((smartarg1 ? smartarg1->get() : 0)); + } + } + result = (cmf::math::timeseries *)& ((arg1)->Windspeed); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_MeteoStation_rHmean_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::MeteoStation *arg1 = (cmf::atmosphere::MeteoStation *) 0 ; + cmf::math::timeseries *arg2 = (cmf::math::timeseries *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::atmosphere::MeteoStation > tempshared1 ; + std::shared_ptr< cmf::atmosphere::MeteoStation > *smartarg1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"MeteoStation_rHmean_set",2,2,swig_obj)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStation_rHmean_set" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::MeteoStation * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::MeteoStation * >((smartarg1 ? smartarg1->get() : 0)); + } + } + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MeteoStation_rHmean_set" "', argument " "2"" of type '" "cmf::math::timeseries *""'"); + } + arg2 = reinterpret_cast< cmf::math::timeseries * >(argp2); + if (arg1) (arg1)->rHmean = *arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_MeteoStation_rHmean_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::MeteoStation *arg1 = (cmf::atmosphere::MeteoStation *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::atmosphere::MeteoStation > tempshared1 ; + std::shared_ptr< cmf::atmosphere::MeteoStation > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + cmf::math::timeseries *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStation_rHmean_get" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::MeteoStation * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::MeteoStation * >((smartarg1 ? smartarg1->get() : 0)); + } + } + result = (cmf::math::timeseries *)& ((arg1)->rHmean); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_MeteoStation_rHmin_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::MeteoStation *arg1 = (cmf::atmosphere::MeteoStation *) 0 ; + cmf::math::timeseries *arg2 = (cmf::math::timeseries *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::atmosphere::MeteoStation > tempshared1 ; + std::shared_ptr< cmf::atmosphere::MeteoStation > *smartarg1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"MeteoStation_rHmin_set",2,2,swig_obj)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStation_rHmin_set" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::MeteoStation * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::MeteoStation * >((smartarg1 ? smartarg1->get() : 0)); + } + } + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MeteoStation_rHmin_set" "', argument " "2"" of type '" "cmf::math::timeseries *""'"); + } + arg2 = reinterpret_cast< cmf::math::timeseries * >(argp2); + if (arg1) (arg1)->rHmin = *arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_MeteoStation_rHmin_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::MeteoStation *arg1 = (cmf::atmosphere::MeteoStation *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::atmosphere::MeteoStation > tempshared1 ; + std::shared_ptr< cmf::atmosphere::MeteoStation > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + cmf::math::timeseries *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStation_rHmin_get" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::MeteoStation * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::MeteoStation * >((smartarg1 ? smartarg1->get() : 0)); + } + } + result = (cmf::math::timeseries *)& ((arg1)->rHmin); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_MeteoStation_rHmax_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::MeteoStation *arg1 = (cmf::atmosphere::MeteoStation *) 0 ; + cmf::math::timeseries *arg2 = (cmf::math::timeseries *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::atmosphere::MeteoStation > tempshared1 ; + std::shared_ptr< cmf::atmosphere::MeteoStation > *smartarg1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"MeteoStation_rHmax_set",2,2,swig_obj)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStation_rHmax_set" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::MeteoStation * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::MeteoStation * >((smartarg1 ? smartarg1->get() : 0)); + } + } + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MeteoStation_rHmax_set" "', argument " "2"" of type '" "cmf::math::timeseries *""'"); + } + arg2 = reinterpret_cast< cmf::math::timeseries * >(argp2); + if (arg1) (arg1)->rHmax = *arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_MeteoStation_rHmax_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::MeteoStation *arg1 = (cmf::atmosphere::MeteoStation *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::atmosphere::MeteoStation > tempshared1 ; + std::shared_ptr< cmf::atmosphere::MeteoStation > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + cmf::math::timeseries *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStation_rHmax_get" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::MeteoStation * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::MeteoStation * >((smartarg1 ? smartarg1->get() : 0)); + } + } + result = (cmf::math::timeseries *)& ((arg1)->rHmax); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_MeteoStation_Tdew_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::MeteoStation *arg1 = (cmf::atmosphere::MeteoStation *) 0 ; + cmf::math::timeseries *arg2 = (cmf::math::timeseries *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::atmosphere::MeteoStation > tempshared1 ; + std::shared_ptr< cmf::atmosphere::MeteoStation > *smartarg1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"MeteoStation_Tdew_set",2,2,swig_obj)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStation_Tdew_set" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::MeteoStation * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::MeteoStation * >((smartarg1 ? smartarg1->get() : 0)); + } + } + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MeteoStation_Tdew_set" "', argument " "2"" of type '" "cmf::math::timeseries *""'"); + } + arg2 = reinterpret_cast< cmf::math::timeseries * >(argp2); + if (arg1) (arg1)->Tdew = *arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_MeteoStation_Tdew_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::MeteoStation *arg1 = (cmf::atmosphere::MeteoStation *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::atmosphere::MeteoStation > tempshared1 ; + std::shared_ptr< cmf::atmosphere::MeteoStation > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + cmf::math::timeseries *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStation_Tdew_get" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::MeteoStation * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::MeteoStation * >((smartarg1 ? smartarg1->get() : 0)); + } + } + result = (cmf::math::timeseries *)& ((arg1)->Tdew); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_MeteoStation_Sunshine_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::MeteoStation *arg1 = (cmf::atmosphere::MeteoStation *) 0 ; + cmf::math::timeseries *arg2 = (cmf::math::timeseries *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::atmosphere::MeteoStation > tempshared1 ; + std::shared_ptr< cmf::atmosphere::MeteoStation > *smartarg1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"MeteoStation_Sunshine_set",2,2,swig_obj)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStation_Sunshine_set" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::MeteoStation * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::MeteoStation * >((smartarg1 ? smartarg1->get() : 0)); + } + } + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MeteoStation_Sunshine_set" "', argument " "2"" of type '" "cmf::math::timeseries *""'"); + } + arg2 = reinterpret_cast< cmf::math::timeseries * >(argp2); + if (arg1) (arg1)->Sunshine = *arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_MeteoStation_Sunshine_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::MeteoStation *arg1 = (cmf::atmosphere::MeteoStation *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::atmosphere::MeteoStation > tempshared1 ; + std::shared_ptr< cmf::atmosphere::MeteoStation > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + cmf::math::timeseries *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStation_Sunshine_get" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::MeteoStation * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::MeteoStation * >((smartarg1 ? smartarg1->get() : 0)); + } + } + result = (cmf::math::timeseries *)& ((arg1)->Sunshine); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_MeteoStation_Rs_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::MeteoStation *arg1 = (cmf::atmosphere::MeteoStation *) 0 ; + cmf::math::timeseries *arg2 = (cmf::math::timeseries *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::atmosphere::MeteoStation > tempshared1 ; + std::shared_ptr< cmf::atmosphere::MeteoStation > *smartarg1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"MeteoStation_Rs_set",2,2,swig_obj)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStation_Rs_set" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::MeteoStation * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::MeteoStation * >((smartarg1 ? smartarg1->get() : 0)); + } + } + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MeteoStation_Rs_set" "', argument " "2"" of type '" "cmf::math::timeseries *""'"); + } + arg2 = reinterpret_cast< cmf::math::timeseries * >(argp2); + if (arg1) (arg1)->Rs = *arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_MeteoStation_Rs_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::MeteoStation *arg1 = (cmf::atmosphere::MeteoStation *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::atmosphere::MeteoStation > tempshared1 ; + std::shared_ptr< cmf::atmosphere::MeteoStation > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + cmf::math::timeseries *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStation_Rs_get" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::MeteoStation * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::MeteoStation * >((smartarg1 ? smartarg1->get() : 0)); + } + } + result = (cmf::math::timeseries *)& ((arg1)->Rs); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_MeteoStation_T_lapse_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::MeteoStation *arg1 = (cmf::atmosphere::MeteoStation *) 0 ; + cmf::math::timeseries *arg2 = (cmf::math::timeseries *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::atmosphere::MeteoStation > tempshared1 ; + std::shared_ptr< cmf::atmosphere::MeteoStation > *smartarg1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"MeteoStation_T_lapse_set",2,2,swig_obj)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStation_T_lapse_set" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::MeteoStation * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::MeteoStation * >((smartarg1 ? smartarg1->get() : 0)); + } + } + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MeteoStation_T_lapse_set" "', argument " "2"" of type '" "cmf::math::timeseries *""'"); + } + arg2 = reinterpret_cast< cmf::math::timeseries * >(argp2); + if (arg1) (arg1)->T_lapse = *arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_MeteoStation_T_lapse_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::MeteoStation *arg1 = (cmf::atmosphere::MeteoStation *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::atmosphere::MeteoStation > tempshared1 ; + std::shared_ptr< cmf::atmosphere::MeteoStation > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + cmf::math::timeseries *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStation_T_lapse_get" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::MeteoStation * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::MeteoStation * >((smartarg1 ? smartarg1->get() : 0)); + } + } + result = (cmf::math::timeseries *)& ((arg1)->T_lapse); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_MeteoStation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::MeteoStation *arg1 = (cmf::atmosphere::MeteoStation *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::atmosphere::MeteoStation > tempshared1 ; + std::shared_ptr< cmf::atmosphere::MeteoStation > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MeteoStation" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::MeteoStation * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::MeteoStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::MeteoStation * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + try { + (void)arg1; delete smartarg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *MeteoStation_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *MeteoStation_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_MeteoStationReference_get_station(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::MeteoStationReference *arg1 = (cmf::atmosphere::MeteoStationReference *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::atmosphere::MeteoStation::ptr result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__atmosphere__MeteoStationReference, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStationReference_get_station" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStationReference const *""'"); + } + arg1 = reinterpret_cast< cmf::atmosphere::MeteoStationReference * >(argp1); + { + try { + result = ((cmf::atmosphere::MeteoStationReference const *)arg1)->get_station(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + std::shared_ptr< cmf::atmosphere::MeteoStation > *smartresult = result ? new std::shared_ptr< cmf::atmosphere::MeteoStation >(result) : 0; + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, SWIG_POINTER_OWN); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_MeteoStationReference_get_position(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::MeteoStationReference *arg1 = (cmf::atmosphere::MeteoStationReference *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::geometry::point result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__atmosphere__MeteoStationReference, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStationReference_get_position" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStationReference const *""'"); + } + arg1 = reinterpret_cast< cmf::atmosphere::MeteoStationReference * >(argp1); + { + try { + result = ((cmf::atmosphere::MeteoStationReference const *)arg1)->get_position(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj((new cmf::geometry::point(static_cast< const cmf::geometry::point& >(result))), SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_MeteoStationReference__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::atmosphere::MeteoStation::ptr arg1 ; + cmf::geometry::point arg2 ; + void *argp1 ; + int res1 = 0 ; + cmf::atmosphere::MeteoStationReference *result = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MeteoStationReference" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStation::ptr""'"); + } + if (argp1) arg1 = *(reinterpret_cast< cmf::atmosphere::MeteoStation::ptr * >(argp1)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::atmosphere::MeteoStation::ptr * >(argp1); + } + { + if (check_xy(swig_obj[1])) { + std::string res = convert_xyz_to_point(swig_obj[1],arg2); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + return NULL; + } + } + else if (PySequence_Check(swig_obj[1])) { + std::string res = convert_seq_to_point(swig_obj[1],arg2); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError, res.c_str()); + } + } else { + std::string res="<"; + res+=pyrepr(swig_obj[1]); + res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + } + } + { + try { + result = (cmf::atmosphere::MeteoStationReference *)new cmf::atmosphere::MeteoStationReference(arg1,arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__atmosphere__MeteoStationReference, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_MeteoStationReference__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::atmosphere::MeteoStationReference *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + cmf::atmosphere::MeteoStationReference *result = 0 ; + + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_cmf__atmosphere__MeteoStationReference, 0 | 0); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MeteoStationReference" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStationReference const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MeteoStationReference" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStationReference const &""'"); + } + arg1 = reinterpret_cast< cmf::atmosphere::MeteoStationReference * >(argp1); + { + try { + result = (cmf::atmosphere::MeteoStationReference *)new cmf::atmosphere::MeteoStationReference((cmf::atmosphere::MeteoStationReference const &)*arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__atmosphere__MeteoStationReference, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_MeteoStationReference(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"new_MeteoStationReference",0,2,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_cmf__atmosphere__MeteoStationReference, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + cmf::geometry::point p; + _v=check_xy(argv[1]) || check_seq_point(argv[1]); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_new_MeteoStationReference__SWIG_1(self, argc, argv); + case 2: + return _wrap_new_MeteoStationReference__SWIG_0(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_MeteoStationReference'.\n" + " Possible C/C++ prototypes are:\n" + " cmf::atmosphere::MeteoStationReference::MeteoStationReference(cmf::atmosphere::MeteoStation::ptr,cmf::geometry::point)\n" + " cmf::atmosphere::MeteoStationReference::MeteoStationReference(cmf::atmosphere::MeteoStationReference const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_MeteoStationReference_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::MeteoStationReference *arg1 = (cmf::atmosphere::MeteoStationReference *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::atmosphere::MeteoStationReference *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__atmosphere__MeteoStationReference, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStationReference_copy" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStationReference const *""'"); + } + arg1 = reinterpret_cast< cmf::atmosphere::MeteoStationReference * >(argp1); + { + try { + result = (cmf::atmosphere::MeteoStationReference *)((cmf::atmosphere::MeteoStationReference const *)arg1)->copy(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__atmosphere__MeteoStationReference, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_MeteoStationReference(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::MeteoStationReference *arg1 = (cmf::atmosphere::MeteoStationReference *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__atmosphere__MeteoStationReference, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MeteoStationReference" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStationReference *""'"); + } + arg1 = reinterpret_cast< cmf::atmosphere::MeteoStationReference * >(argp1); + { + try { + delete arg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *MeteoStationReference_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__atmosphere__MeteoStationReference, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *MeteoStationReference_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_MeteoStationList___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::MeteoStationList *arg1 = (cmf::atmosphere::MeteoStationList *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + size_t result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__atmosphere__MeteoStationList, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStationList___len__" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStationList const *""'"); + } + arg1 = reinterpret_cast< cmf::atmosphere::MeteoStationList * >(argp1); + { + try { + result = ((cmf::atmosphere::MeteoStationList const *)arg1)->size(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_MeteoStationList___getitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::atmosphere::MeteoStationList *arg1 = (cmf::atmosphere::MeteoStationList *) 0 ; + ptrdiff_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + cmf::atmosphere::MeteoStation::ptr result; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__atmosphere__MeteoStationList, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStationList___getitem__" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStationList const *""'"); + } + arg1 = reinterpret_cast< cmf::atmosphere::MeteoStationList * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MeteoStationList___getitem__" "', argument " "2"" of type '" "ptrdiff_t""'"); + } + arg2 = static_cast< ptrdiff_t >(val2); + { + try { + result = ((cmf::atmosphere::MeteoStationList const *)arg1)->operator [](arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + std::shared_ptr< cmf::atmosphere::MeteoStation > *smartresult = result ? new std::shared_ptr< cmf::atmosphere::MeteoStation >(result) : 0; + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, SWIG_POINTER_OWN); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_MeteoStationList___getitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::atmosphere::MeteoStationList *arg1 = (cmf::atmosphere::MeteoStationList *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + cmf::atmosphere::MeteoStation::ptr result; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__atmosphere__MeteoStationList, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStationList___getitem__" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStationList const *""'"); + } + arg1 = reinterpret_cast< cmf::atmosphere::MeteoStationList * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MeteoStationList___getitem__" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MeteoStationList___getitem__" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + { + try { + result = ((cmf::atmosphere::MeteoStationList const *)arg1)->operator []((std::string const &)*arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + std::shared_ptr< cmf::atmosphere::MeteoStation > *smartresult = result ? new std::shared_ptr< cmf::atmosphere::MeteoStation >(result) : 0; + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, SWIG_POINTER_OWN); + } + if (SWIG_IsNewObj(res2)) delete arg2; + return resultobj; +fail: + if (SWIG_IsNewObj(res2)) delete arg2; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_MeteoStationList___getitem__(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"MeteoStationList___getitem__",0,2,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__atmosphere__MeteoStationList, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__atmosphere__MeteoStationList, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_MeteoStationList___getitem____SWIG_0(self, argc, argv); + case 2: + return _wrap_MeteoStationList___getitem____SWIG_1(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'MeteoStationList___getitem__'.\n" + " Possible C/C++ prototypes are:\n" + " cmf::atmosphere::MeteoStationList::operator [](ptrdiff_t) const\n" + " cmf::atmosphere::MeteoStationList::operator [](std::string const &) const\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_MeteoStationList_calculate_Temp_lapse(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::atmosphere::MeteoStationList *arg1 = (cmf::atmosphere::MeteoStationList *) 0 ; + cmf::math::Time arg2 ; + cmf::math::Time arg3 ; + cmf::math::Time arg4 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "begin",(char *) "step",(char *) "end", NULL + }; + double result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO:MeteoStationList_calculate_Temp_lapse",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__atmosphere__MeteoStationList, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStationList_calculate_Temp_lapse" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStationList *""'"); + } + arg1 = reinterpret_cast< cmf::atmosphere::MeteoStationList * >(argp1); + { + arg2 = convert_datetime_to_cmftime(obj1); + if (arg2 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } + } + { + arg3 = convert_datetime_to_cmftime(obj2); + if (arg3 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } + } + { + arg4 = convert_datetime_to_cmftime(obj3); + if (arg4 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } + } + { + try { + result = (double)(arg1)->calculate_Temp_lapse(arg2,arg3,arg4); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_MeteoStationList_add_station(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::atmosphere::MeteoStationList *arg1 = (cmf::atmosphere::MeteoStationList *) 0 ; + std::string arg2 ; + cmf::geometry::point arg3 ; + double arg4 = (double) 51.0 ; + double arg5 = (double) 8.0 ; + double arg6 = (double) 1.0 ; + cmf::math::Time arg7 = (cmf::math::Time) cmf::math::Time(1,1,2001) ; + cmf::math::Time arg8 = (cmf::math::Time) cmf::math::day ; + void *argp1 = 0 ; + int res1 = 0 ; + double val4 ; + int ecode4 = 0 ; + double val5 ; + int ecode5 = 0 ; + double val6 ; + int ecode6 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + PyObject * obj5 = 0 ; + PyObject * obj6 = 0 ; + PyObject * obj7 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "name",(char *) "position",(char *) "latitude",(char *) "longitude",(char *) "tz",(char *) "startTime",(char *) "timestep", NULL + }; + cmf::atmosphere::MeteoStation::ptr result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOOOO:MeteoStationList_add_station",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__atmosphere__MeteoStationList, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStationList_add_station" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStationList *""'"); + } + arg1 = reinterpret_cast< cmf::atmosphere::MeteoStationList * >(argp1); + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string(obj1, &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "MeteoStationList_add_station" "', argument " "2"" of type '" "std::string""'"); + } + arg2 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + { + if (check_xy(obj2)) { + std::string res = convert_xyz_to_point(obj2,arg3); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + return NULL; + } + } + else if (PySequence_Check(obj2)) { + std::string res = convert_seq_to_point(obj2,arg3); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError, res.c_str()); + } + } else { + std::string res="<"; + res+=pyrepr(obj2); + res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + } + } + if (obj3) { + ecode4 = SWIG_AsVal_double(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "MeteoStationList_add_station" "', argument " "4"" of type '" "double""'"); + } + arg4 = static_cast< double >(val4); + } + if (obj4) { + ecode5 = SWIG_AsVal_double(obj4, &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "MeteoStationList_add_station" "', argument " "5"" of type '" "double""'"); + } + arg5 = static_cast< double >(val5); + } + if (obj5) { + ecode6 = SWIG_AsVal_double(obj5, &val6); + if (!SWIG_IsOK(ecode6)) { + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "MeteoStationList_add_station" "', argument " "6"" of type '" "double""'"); + } + arg6 = static_cast< double >(val6); + } + if (obj6) { + { + arg7 = convert_datetime_to_cmftime(obj6); + if (arg7 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } + } + } + if (obj7) { + { + arg8 = convert_datetime_to_cmftime(obj7); + if (arg8 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } + } + } + { + try { + result = (arg1)->add_station(arg2,arg3,arg4,arg5,arg6,arg7,arg8); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + std::shared_ptr< cmf::atmosphere::MeteoStation > *smartresult = result ? new std::shared_ptr< cmf::atmosphere::MeteoStation >(result) : 0; + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, SWIG_POINTER_OWN); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_MeteoStationList_remove_station(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::atmosphere::MeteoStationList *arg1 = (cmf::atmosphere::MeteoStationList *) 0 ; + ptrdiff_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "index", NULL + }; + ptrdiff_t result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:MeteoStationList_remove_station",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__atmosphere__MeteoStationList, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStationList_remove_station" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStationList *""'"); + } + arg1 = reinterpret_cast< cmf::atmosphere::MeteoStationList * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MeteoStationList_remove_station" "', argument " "2"" of type '" "ptrdiff_t""'"); + } + arg2 = static_cast< ptrdiff_t >(val2); + { + try { + result = (arg1)->remove_station(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_ptrdiff_t(static_cast< ptrdiff_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_MeteoStationList__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) { + PyObject *resultobj = 0; + cmf::atmosphere::MeteoStationList *result = 0 ; + + if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; + { + try { + result = (cmf::atmosphere::MeteoStationList *)new cmf::atmosphere::MeteoStationList(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__atmosphere__MeteoStationList, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_MeteoStationList__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::atmosphere::MeteoStationList *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + cmf::atmosphere::MeteoStationList *result = 0 ; + + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_cmf__atmosphere__MeteoStationList, 0 | 0); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MeteoStationList" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStationList const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MeteoStationList" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStationList const &""'"); + } + arg1 = reinterpret_cast< cmf::atmosphere::MeteoStationList * >(argp1); + { + try { + result = (cmf::atmosphere::MeteoStationList *)new cmf::atmosphere::MeteoStationList((cmf::atmosphere::MeteoStationList const &)*arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__atmosphere__MeteoStationList, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_MeteoStationList(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[2] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"new_MeteoStationList",0,1,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 0) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + if (argc == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_cmf__atmosphere__MeteoStationList, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_new_MeteoStationList__SWIG_0(self, argc, argv); + case 2: + return _wrap_new_MeteoStationList__SWIG_1(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_MeteoStationList'.\n" + " Possible C/C++ prototypes are:\n" + " cmf::atmosphere::MeteoStationList::MeteoStationList()\n" + " cmf::atmosphere::MeteoStationList::MeteoStationList(cmf::atmosphere::MeteoStationList const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_MeteoStationList_reference_to_nearest(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::atmosphere::MeteoStationList *arg1 = (cmf::atmosphere::MeteoStationList *) 0 ; + cmf::geometry::point *arg2 = 0 ; + double arg3 = (double) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + cmf::geometry::point p2 ; + double val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "position",(char *) "z_weight", NULL + }; + SwigValueWrapper< cmf::atmosphere::MeteoStationReference > result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:MeteoStationList_reference_to_nearest",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__atmosphere__MeteoStationList, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeteoStationList_reference_to_nearest" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStationList const *""'"); + } + arg1 = reinterpret_cast< cmf::atmosphere::MeteoStationList * >(argp1); + { + if (SWIG_ConvertPtr(obj1, (void **) &arg2, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { + if (check_xy(obj1)) { + std::string res = convert_xyz_to_point(obj1,p2); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + return NULL; + } + } + else if (PySequence_Check(obj1)) { + std::string res = convert_seq_to_point(obj1,p2); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError, res.c_str()); + } + } else { + std::string res="<"; + res+=pyrepr(obj1); + res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + } + arg2 = &p2; + } + } + if (obj2) { + ecode3 = SWIG_AsVal_double(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MeteoStationList_reference_to_nearest" "', argument " "3"" of type '" "double""'"); + } + arg3 = static_cast< double >(val3); + } + { + try { + result = ((cmf::atmosphere::MeteoStationList const *)arg1)->reference_to_nearest((cmf::geometry::point const &)*arg2,arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj((new cmf::atmosphere::MeteoStationReference(static_cast< const cmf::atmosphere::MeteoStationReference& >(result))), SWIGTYPE_p_cmf__atmosphere__MeteoStationReference, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_MeteoStationList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::MeteoStationList *arg1 = (cmf::atmosphere::MeteoStationList *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__atmosphere__MeteoStationList, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MeteoStationList" "', argument " "1"" of type '" "cmf::atmosphere::MeteoStationList *""'"); + } + arg1 = reinterpret_cast< cmf::atmosphere::MeteoStationList * >(argp1); + { + try { + delete arg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *MeteoStationList_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__atmosphere__MeteoStationList, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *MeteoStationList_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_new_IDW_Meteorology__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::geometry::point *arg1 = 0 ; + cmf::atmosphere::MeteoStationList *arg2 = 0 ; + double arg3 ; + double arg4 ; + cmf::geometry::point p1 ; + void *argp2 = 0 ; + int res2 = 0 ; + double val3 ; + int ecode3 = 0 ; + double val4 ; + int ecode4 = 0 ; + cmf::atmosphere::IDW_Meteorology *result = 0 ; + + if ((nobjs < 4) || (nobjs > 4)) SWIG_fail; + { + if (SWIG_ConvertPtr(swig_obj[0], (void **) &arg1, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { + if (check_xy(swig_obj[0])) { + std::string res = convert_xyz_to_point(swig_obj[0],p1); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + return NULL; + } + } + else if (PySequence_Check(swig_obj[0])) { + std::string res = convert_seq_to_point(swig_obj[0],p1); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError, res.c_str()); + } + } else { + std::string res="<"; + res+=pyrepr(swig_obj[0]); + res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + } + arg1 = &p1; + } + } + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_cmf__atmosphere__MeteoStationList, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_IDW_Meteorology" "', argument " "2"" of type '" "cmf::atmosphere::MeteoStationList const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_IDW_Meteorology" "', argument " "2"" of type '" "cmf::atmosphere::MeteoStationList const &""'"); + } + arg2 = reinterpret_cast< cmf::atmosphere::MeteoStationList * >(argp2); + ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_IDW_Meteorology" "', argument " "3"" of type '" "double""'"); + } + arg3 = static_cast< double >(val3); + ecode4 = SWIG_AsVal_double(swig_obj[3], &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_IDW_Meteorology" "', argument " "4"" of type '" "double""'"); + } + arg4 = static_cast< double >(val4); + { + try { + result = (cmf::atmosphere::IDW_Meteorology *)new cmf::atmosphere::IDW_Meteorology((cmf::geometry::point const &)*arg1,(cmf::atmosphere::MeteoStationList const &)*arg2,arg3,arg4); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__atmosphere__IDW_Meteorology, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_IDW_Meteorology__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::atmosphere::IDW_Meteorology *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + cmf::atmosphere::IDW_Meteorology *result = 0 ; + + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_cmf__atmosphere__IDW_Meteorology, 0 | 0); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_IDW_Meteorology" "', argument " "1"" of type '" "cmf::atmosphere::IDW_Meteorology const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_IDW_Meteorology" "', argument " "1"" of type '" "cmf::atmosphere::IDW_Meteorology const &""'"); + } + arg1 = reinterpret_cast< cmf::atmosphere::IDW_Meteorology * >(argp1); + { + try { + result = (cmf::atmosphere::IDW_Meteorology *)new cmf::atmosphere::IDW_Meteorology((cmf::atmosphere::IDW_Meteorology const &)*arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__atmosphere__IDW_Meteorology, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_IDW_Meteorology(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[5] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"new_IDW_Meteorology",0,4,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_cmf__atmosphere__IDW_Meteorology, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + { + cmf::geometry::point p; + _v=check_xy(argv[0]) || check_seq_point(argv[0]); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_cmf__atmosphere__MeteoStationList, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_double(argv[2], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_double(argv[3], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_new_IDW_Meteorology__SWIG_1(self, argc, argv); + case 2: + return _wrap_new_IDW_Meteorology__SWIG_0(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_IDW_Meteorology'.\n" + " Possible C/C++ prototypes are:\n" + " cmf::atmosphere::IDW_Meteorology::IDW_Meteorology(cmf::geometry::point const &,cmf::atmosphere::MeteoStationList const &,double,double)\n" + " cmf::atmosphere::IDW_Meteorology::IDW_Meteorology(cmf::atmosphere::IDW_Meteorology const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_IDW_Meteorology_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::IDW_Meteorology *arg1 = (cmf::atmosphere::IDW_Meteorology *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::atmosphere::IDW_Meteorology *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__atmosphere__IDW_Meteorology, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDW_Meteorology_copy" "', argument " "1"" of type '" "cmf::atmosphere::IDW_Meteorology const *""'"); + } + arg1 = reinterpret_cast< cmf::atmosphere::IDW_Meteorology * >(argp1); + { + try { + result = (cmf::atmosphere::IDW_Meteorology *)((cmf::atmosphere::IDW_Meteorology const *)arg1)->copy(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__atmosphere__IDW_Meteorology, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_IDW_Meteorology(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::IDW_Meteorology *arg1 = (cmf::atmosphere::IDW_Meteorology *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__atmosphere__IDW_Meteorology, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IDW_Meteorology" "', argument " "1"" of type '" "cmf::atmosphere::IDW_Meteorology *""'"); + } + arg1 = reinterpret_cast< cmf::atmosphere::IDW_Meteorology * >(argp1); + { + try { + delete arg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *IDW_Meteorology_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__atmosphere__IDW_Meteorology, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *IDW_Meteorology_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_aerodynamic_resistance_get_aerodynamic_resistance(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::atmosphere::aerodynamic_resistance *arg1 = (cmf::atmosphere::aerodynamic_resistance *) 0 ; + double *arg2 = 0 ; + double *arg3 = 0 ; + cmf::math::Time arg4 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "r_ag",(char *) "r_ac",(char *) "t", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO:aerodynamic_resistance_get_aerodynamic_resistance",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__atmosphere__aerodynamic_resistance, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "aerodynamic_resistance_get_aerodynamic_resistance" "', argument " "1"" of type '" "cmf::atmosphere::aerodynamic_resistance const *""'"); + } + arg1 = reinterpret_cast< cmf::atmosphere::aerodynamic_resistance * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_double, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "aerodynamic_resistance_get_aerodynamic_resistance" "', argument " "2"" of type '" "double &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "aerodynamic_resistance_get_aerodynamic_resistance" "', argument " "2"" of type '" "double &""'"); + } + arg2 = reinterpret_cast< double * >(argp2); + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_double, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "aerodynamic_resistance_get_aerodynamic_resistance" "', argument " "3"" of type '" "double &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "aerodynamic_resistance_get_aerodynamic_resistance" "', argument " "3"" of type '" "double &""'"); + } + arg3 = reinterpret_cast< double * >(argp3); + { + arg4 = convert_datetime_to_cmftime(obj3); + if (arg4 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } + } + { + try { + ((cmf::atmosphere::aerodynamic_resistance const *)arg1)->get_aerodynamic_resistance(*arg2,*arg3,arg4); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_aerodynamic_resistance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::aerodynamic_resistance *arg1 = (cmf::atmosphere::aerodynamic_resistance *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__atmosphere__aerodynamic_resistance, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_aerodynamic_resistance" "', argument " "1"" of type '" "cmf::atmosphere::aerodynamic_resistance *""'"); + } + arg1 = reinterpret_cast< cmf::atmosphere::aerodynamic_resistance * >(argp1); + { + try { + delete arg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *aerodynamic_resistance_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__atmosphere__aerodynamic_resistance, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_RainSource___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::atmosphere::RainSource *arg1 = (cmf::atmosphere::RainSource *) 0 ; + cmf::math::Time arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::atmosphere::RainSource const > tempshared1 ; + std::shared_ptr< cmf::atmosphere::RainSource const > *smartarg1 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "t", NULL + }; + real result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:RainSource___call__",kwnames,&obj0,&obj1)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__RainSource_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RainSource___call__" "', argument " "1"" of type '" "cmf::atmosphere::RainSource const *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::atmosphere::RainSource > * >(argp1); + delete reinterpret_cast< std::shared_ptr< const cmf::atmosphere::RainSource > * >(argp1); + arg1 = const_cast< cmf::atmosphere::RainSource * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::atmosphere::RainSource > * >(argp1); + arg1 = const_cast< cmf::atmosphere::RainSource * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + arg2 = convert_datetime_to_cmftime(obj1); + if (arg2 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } + } + { + try { + result = (real)((cmf::atmosphere::RainSource const *)arg1)->operator ()(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_RainSource_get_intensity(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::atmosphere::RainSource *arg1 = (cmf::atmosphere::RainSource *) 0 ; + cmf::math::Time arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::atmosphere::RainSource const > tempshared1 ; + std::shared_ptr< cmf::atmosphere::RainSource const > *smartarg1 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "t", NULL + }; + real result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:RainSource_get_intensity",kwnames,&obj0,&obj1)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__RainSource_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RainSource_get_intensity" "', argument " "1"" of type '" "cmf::atmosphere::RainSource const *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::atmosphere::RainSource > * >(argp1); + delete reinterpret_cast< std::shared_ptr< const cmf::atmosphere::RainSource > * >(argp1); + arg1 = const_cast< cmf::atmosphere::RainSource * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::atmosphere::RainSource > * >(argp1); + arg1 = const_cast< cmf::atmosphere::RainSource * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + arg2 = convert_datetime_to_cmftime(obj1); + if (arg2 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } + } + { + try { + result = (real)((cmf::atmosphere::RainSource const *)arg1)->get_intensity(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_RainSource(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::RainSource *arg1 = (cmf::atmosphere::RainSource *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::atmosphere::RainSource > tempshared1 ; + std::shared_ptr< cmf::atmosphere::RainSource > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__RainSource_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_RainSource" "', argument " "1"" of type '" "cmf::atmosphere::RainSource *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::RainSource > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::RainSource > * >(argp1); + arg1 = const_cast< cmf::atmosphere::RainSource * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::RainSource > * >(argp1); + arg1 = const_cast< cmf::atmosphere::RainSource * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + try { + (void)arg1; delete smartarg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *RainSource_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__RainSource_t, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_ConstantRainSource_intensity_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::ConstantRainSource *arg1 = (cmf::atmosphere::ConstantRainSource *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::atmosphere::ConstantRainSource > tempshared1 ; + std::shared_ptr< cmf::atmosphere::ConstantRainSource > *smartarg1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"ConstantRainSource_intensity_set",2,2,swig_obj)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__ConstantRainSource_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ConstantRainSource_intensity_set" "', argument " "1"" of type '" "cmf::atmosphere::ConstantRainSource *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::ConstantRainSource > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::ConstantRainSource > * >(argp1); + arg1 = const_cast< cmf::atmosphere::ConstantRainSource * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::ConstantRainSource > * >(argp1); + arg1 = const_cast< cmf::atmosphere::ConstantRainSource * >((smartarg1 ? smartarg1->get() : 0)); + } + } + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ConstantRainSource_intensity_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->intensity = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ConstantRainSource_intensity_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::ConstantRainSource *arg1 = (cmf::atmosphere::ConstantRainSource *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::atmosphere::ConstantRainSource > tempshared1 ; + std::shared_ptr< cmf::atmosphere::ConstantRainSource > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__ConstantRainSource_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ConstantRainSource_intensity_get" "', argument " "1"" of type '" "cmf::atmosphere::ConstantRainSource *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::ConstantRainSource > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::ConstantRainSource > * >(argp1); + arg1 = const_cast< cmf::atmosphere::ConstantRainSource * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::ConstantRainSource > * >(argp1); + arg1 = const_cast< cmf::atmosphere::ConstantRainSource * >((smartarg1 ? smartarg1->get() : 0)); + } + } + result = (real) ((arg1)->intensity); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ConstantRainSource(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::project *arg1 = 0 ; + cmf::geometry::point arg2 ; + real arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "_project",(char *) "location",(char *) "_intensity", NULL + }; + cmf::atmosphere::ConstantRainSource *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:new_ConstantRainSource",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_cmf__project, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ConstantRainSource" "', argument " "1"" of type '" "cmf::project &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConstantRainSource" "', argument " "1"" of type '" "cmf::project &""'"); + } + arg1 = reinterpret_cast< cmf::project * >(argp1); + { + if (check_xy(obj1)) { + std::string res = convert_xyz_to_point(obj1,arg2); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + return NULL; + } + } + else if (PySequence_Check(obj1)) { + std::string res = convert_seq_to_point(obj1,arg2); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError, res.c_str()); + } + } else { + std::string res="<"; + res+=pyrepr(obj1); + res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + } + } + ecode3 = SWIG_AsVal_double(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_ConstantRainSource" "', argument " "3"" of type '" "real""'"); + } + arg3 = static_cast< real >(val3); + { + try { + result = (cmf::atmosphere::ConstantRainSource *)new cmf::atmosphere::ConstantRainSource(*arg1,arg2,arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + std::shared_ptr< cmf::atmosphere::ConstantRainSource > *smartresult = result ? new std::shared_ptr< cmf::atmosphere::ConstantRainSource >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0; + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__ConstantRainSource_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ConstantRainSource_set_conc(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::atmosphere::ConstantRainSource *arg1 = (cmf::atmosphere::ConstantRainSource *) 0 ; + cmf::water::solute *arg2 = 0 ; + real arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::atmosphere::ConstantRainSource > tempshared1 ; + std::shared_ptr< cmf::atmosphere::ConstantRainSource > *smartarg1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + double val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "Solute",(char *) "value", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:ConstantRainSource_set_conc",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__ConstantRainSource_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ConstantRainSource_set_conc" "', argument " "1"" of type '" "cmf::atmosphere::ConstantRainSource *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::ConstantRainSource > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::ConstantRainSource > * >(argp1); + arg1 = const_cast< cmf::atmosphere::ConstantRainSource * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::ConstantRainSource > * >(argp1); + arg1 = const_cast< cmf::atmosphere::ConstantRainSource * >((smartarg1 ? smartarg1->get() : 0)); + } + } + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_cmf__water__solute, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ConstantRainSource_set_conc" "', argument " "2"" of type '" "cmf::water::solute const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ConstantRainSource_set_conc" "', argument " "2"" of type '" "cmf::water::solute const &""'"); + } + arg2 = reinterpret_cast< cmf::water::solute * >(argp2); + ecode3 = SWIG_AsVal_double(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ConstantRainSource_set_conc" "', argument " "3"" of type '" "real""'"); + } + arg3 = static_cast< real >(val3); + { + try { + (arg1)->set_conc((cmf::water::solute const &)*arg2,arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_ConstantRainSource(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::ConstantRainSource *arg1 = (cmf::atmosphere::ConstantRainSource *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::atmosphere::ConstantRainSource > tempshared1 ; + std::shared_ptr< cmf::atmosphere::ConstantRainSource > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__ConstantRainSource_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ConstantRainSource" "', argument " "1"" of type '" "cmf::atmosphere::ConstantRainSource *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::ConstantRainSource > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::ConstantRainSource > * >(argp1); + arg1 = const_cast< cmf::atmosphere::ConstantRainSource * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::ConstantRainSource > * >(argp1); + arg1 = const_cast< cmf::atmosphere::ConstantRainSource * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + try { + (void)arg1; delete smartarg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *ConstantRainSource_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__ConstantRainSource_t, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *ConstantRainSource_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_TimeseriesRainSource_data_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::TimeseriesRainSource *arg1 = (cmf::atmosphere::TimeseriesRainSource *) 0 ; + cmf::math::timeseries *arg2 = (cmf::math::timeseries *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::atmosphere::TimeseriesRainSource > tempshared1 ; + std::shared_ptr< cmf::atmosphere::TimeseriesRainSource > *smartarg1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"TimeseriesRainSource_data_set",2,2,swig_obj)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__TimeseriesRainSource_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TimeseriesRainSource_data_set" "', argument " "1"" of type '" "cmf::atmosphere::TimeseriesRainSource *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::TimeseriesRainSource > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::TimeseriesRainSource > * >(argp1); + arg1 = const_cast< cmf::atmosphere::TimeseriesRainSource * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::TimeseriesRainSource > * >(argp1); + arg1 = const_cast< cmf::atmosphere::TimeseriesRainSource * >((smartarg1 ? smartarg1->get() : 0)); + } + } + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TimeseriesRainSource_data_set" "', argument " "2"" of type '" "cmf::math::timeseries *""'"); + } + arg2 = reinterpret_cast< cmf::math::timeseries * >(argp2); + if (arg1) (arg1)->data = *arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TimeseriesRainSource_data_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::TimeseriesRainSource *arg1 = (cmf::atmosphere::TimeseriesRainSource *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::atmosphere::TimeseriesRainSource > tempshared1 ; + std::shared_ptr< cmf::atmosphere::TimeseriesRainSource > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + cmf::math::timeseries *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__TimeseriesRainSource_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TimeseriesRainSource_data_get" "', argument " "1"" of type '" "cmf::atmosphere::TimeseriesRainSource *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::TimeseriesRainSource > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::TimeseriesRainSource > * >(argp1); + arg1 = const_cast< cmf::atmosphere::TimeseriesRainSource * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::TimeseriesRainSource > * >(argp1); + arg1 = const_cast< cmf::atmosphere::TimeseriesRainSource * >((smartarg1 ? smartarg1->get() : 0)); + } + } + result = (cmf::math::timeseries *)& ((arg1)->data); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TimeseriesRainSource_concentrations_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::TimeseriesRainSource *arg1 = (cmf::atmosphere::TimeseriesRainSource *) 0 ; + cmf::water::SoluteTimeseries *arg2 = (cmf::water::SoluteTimeseries *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::atmosphere::TimeseriesRainSource > tempshared1 ; + std::shared_ptr< cmf::atmosphere::TimeseriesRainSource > *smartarg1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"TimeseriesRainSource_concentrations_set",2,2,swig_obj)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__TimeseriesRainSource_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TimeseriesRainSource_concentrations_set" "', argument " "1"" of type '" "cmf::atmosphere::TimeseriesRainSource *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::TimeseriesRainSource > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::TimeseriesRainSource > * >(argp1); + arg1 = const_cast< cmf::atmosphere::TimeseriesRainSource * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::TimeseriesRainSource > * >(argp1); + arg1 = const_cast< cmf::atmosphere::TimeseriesRainSource * >((smartarg1 ? smartarg1->get() : 0)); + } + } + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_cmf__water__SoluteTimeseries, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TimeseriesRainSource_concentrations_set" "', argument " "2"" of type '" "cmf::water::SoluteTimeseries *""'"); + } + arg2 = reinterpret_cast< cmf::water::SoluteTimeseries * >(argp2); + if (arg1) (arg1)->concentrations = *arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TimeseriesRainSource_concentrations_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::TimeseriesRainSource *arg1 = (cmf::atmosphere::TimeseriesRainSource *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::atmosphere::TimeseriesRainSource > tempshared1 ; + std::shared_ptr< cmf::atmosphere::TimeseriesRainSource > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + cmf::water::SoluteTimeseries *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__TimeseriesRainSource_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TimeseriesRainSource_concentrations_get" "', argument " "1"" of type '" "cmf::atmosphere::TimeseriesRainSource *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::TimeseriesRainSource > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::TimeseriesRainSource > * >(argp1); + arg1 = const_cast< cmf::atmosphere::TimeseriesRainSource * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::TimeseriesRainSource > * >(argp1); + arg1 = const_cast< cmf::atmosphere::TimeseriesRainSource * >((smartarg1 ? smartarg1->get() : 0)); + } + } + result = (cmf::water::SoluteTimeseries *)& ((arg1)->concentrations); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__water__SoluteTimeseries, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_TimeseriesRainSource(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::TimeseriesRainSource *arg1 = (cmf::atmosphere::TimeseriesRainSource *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::atmosphere::TimeseriesRainSource > tempshared1 ; + std::shared_ptr< cmf::atmosphere::TimeseriesRainSource > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__TimeseriesRainSource_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_TimeseriesRainSource" "', argument " "1"" of type '" "cmf::atmosphere::TimeseriesRainSource *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::TimeseriesRainSource > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::TimeseriesRainSource > * >(argp1); + arg1 = const_cast< cmf::atmosphere::TimeseriesRainSource * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::TimeseriesRainSource > * >(argp1); + arg1 = const_cast< cmf::atmosphere::TimeseriesRainSource * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + try { + (void)arg1; delete smartarg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *TimeseriesRainSource_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__TimeseriesRainSource_t, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_RainfallStation_Location_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::RainfallStation *arg1 = (cmf::atmosphere::RainfallStation *) 0 ; + cmf::geometry::point *arg2 = (cmf::geometry::point *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::atmosphere::RainfallStation > tempshared1 ; + std::shared_ptr< cmf::atmosphere::RainfallStation > *smartarg1 = 0 ; + cmf::geometry::point p2 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"RainfallStation_Location_set",2,2,swig_obj)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__RainfallStation_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RainfallStation_Location_set" "', argument " "1"" of type '" "cmf::atmosphere::RainfallStation *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::RainfallStation > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::RainfallStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::RainfallStation * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::RainfallStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::RainfallStation * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + if (SWIG_ConvertPtr(swig_obj[1], (void **) &arg2, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { + if (check_xy(swig_obj[1])) { + std::string res = convert_xyz_to_point(swig_obj[1],p2); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + return NULL; + } + } + else if (PySequence_Check(swig_obj[1])) { + std::string res = convert_seq_to_point(swig_obj[1],p2); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError, res.c_str()); + } + } else { + std::string res="<"; + res+=pyrepr(swig_obj[1]); + res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + } + arg2 = &p2; + } + } + if (arg1) (arg1)->Location = *arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_RainfallStation_Location_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::RainfallStation *arg1 = (cmf::atmosphere::RainfallStation *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::atmosphere::RainfallStation > tempshared1 ; + std::shared_ptr< cmf::atmosphere::RainfallStation > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + cmf::geometry::point *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__RainfallStation_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RainfallStation_Location_get" "', argument " "1"" of type '" "cmf::atmosphere::RainfallStation *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::RainfallStation > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::RainfallStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::RainfallStation * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::RainfallStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::RainfallStation * >((smartarg1 ? smartarg1->get() : 0)); + } + } + result = (cmf::geometry::point *)& ((arg1)->Location); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__geometry__point, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_RainfallStation_create(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + size_t arg1 ; + std::string arg2 ; + cmf::math::timeseries arg3 ; + cmf::geometry::point arg4 ; + size_t val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + char * kwnames[] = { + (char *) "Id",(char *) "Name",(char *) "Data",(char *) "position", NULL + }; + cmf::atmosphere::RainfallStation::ptr result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO:RainfallStation_create",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + ecode1 = SWIG_AsVal_size_t(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "RainfallStation_create" "', argument " "1"" of type '" "size_t""'"); + } + arg1 = static_cast< size_t >(val1); + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string(obj1, &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "RainfallStation_create" "', argument " "2"" of type '" "std::string""'"); + } + arg2 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + { + cmf::math::timeseries *p_ts = &arg3; + int res=SWIG_ConvertPtr(obj2,(void**)(&p_ts),SWIGTYPE_p_cmf__math__timeseries,0); + if (!(SWIG_IsOK(res)) || p_ts==0) { + if (PyNumber_Check(obj2)) { + double scalar = PyFloat_AsDouble(obj2); + arg3 = cmf::math::timeseries::from_scalar(scalar); + } else { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.timeseries object"); + } + } else { + arg3 = *p_ts; + } + } + { + if (check_xy(obj3)) { + std::string res = convert_xyz_to_point(obj3,arg4); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + return NULL; + } + } + else if (PySequence_Check(obj3)) { + std::string res = convert_seq_to_point(obj3,arg4); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError, res.c_str()); + } + } else { + std::string res="<"; + res+=pyrepr(obj3); + res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + } + } + { + try { + result = cmf::atmosphere::RainfallStation::create(arg1,arg2,arg3,arg4); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + std::shared_ptr< cmf::atmosphere::RainfallStation > *smartresult = result ? new std::shared_ptr< cmf::atmosphere::RainfallStation >(result) : 0; + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__RainfallStation_t, SWIG_POINTER_OWN); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_RainfallStation_id_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::RainfallStation *arg1 = (cmf::atmosphere::RainfallStation *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::atmosphere::RainfallStation > tempshared1 ; + std::shared_ptr< cmf::atmosphere::RainfallStation > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + size_t result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__RainfallStation_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RainfallStation_id_get" "', argument " "1"" of type '" "cmf::atmosphere::RainfallStation *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::RainfallStation > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::RainfallStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::RainfallStation * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::RainfallStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::RainfallStation * >((smartarg1 ? smartarg1->get() : 0)); + } + } + result = (size_t) ((arg1)->id); + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_RainfallStation_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::RainfallStation *arg1 = (cmf::atmosphere::RainfallStation *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::atmosphere::RainfallStation > tempshared1 ; + std::shared_ptr< cmf::atmosphere::RainfallStation > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + std::string *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__RainfallStation_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RainfallStation_name_get" "', argument " "1"" of type '" "cmf::atmosphere::RainfallStation *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::RainfallStation > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::RainfallStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::RainfallStation * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::RainfallStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::RainfallStation * >((smartarg1 ? smartarg1->get() : 0)); + } + } + result = (std::string *) & ((arg1)->name); + resultobj = SWIG_From_std_string(static_cast< std::string >(*result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_RainfallStation_data_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::RainfallStation *arg1 = (cmf::atmosphere::RainfallStation *) 0 ; + cmf::math::timeseries *arg2 = (cmf::math::timeseries *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::atmosphere::RainfallStation > tempshared1 ; + std::shared_ptr< cmf::atmosphere::RainfallStation > *smartarg1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"RainfallStation_data_set",2,2,swig_obj)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__RainfallStation_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RainfallStation_data_set" "', argument " "1"" of type '" "cmf::atmosphere::RainfallStation *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::RainfallStation > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::RainfallStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::RainfallStation * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::RainfallStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::RainfallStation * >((smartarg1 ? smartarg1->get() : 0)); + } + } + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "RainfallStation_data_set" "', argument " "2"" of type '" "cmf::math::timeseries *""'"); + } + arg2 = reinterpret_cast< cmf::math::timeseries * >(argp2); + if (arg1) (arg1)->data = *arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_RainfallStation_data_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::RainfallStation *arg1 = (cmf::atmosphere::RainfallStation *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::atmosphere::RainfallStation > tempshared1 ; + std::shared_ptr< cmf::atmosphere::RainfallStation > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + cmf::math::timeseries *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__RainfallStation_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RainfallStation_data_get" "', argument " "1"" of type '" "cmf::atmosphere::RainfallStation *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::RainfallStation > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::RainfallStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::RainfallStation * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::RainfallStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::RainfallStation * >((smartarg1 ? smartarg1->get() : 0)); + } + } + result = (cmf::math::timeseries *)& ((arg1)->data); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_RainfallStation___repr__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::RainfallStation *arg1 = (cmf::atmosphere::RainfallStation *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::atmosphere::RainfallStation const > tempshared1 ; + std::shared_ptr< cmf::atmosphere::RainfallStation const > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + std::string result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__RainfallStation_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RainfallStation___repr__" "', argument " "1"" of type '" "cmf::atmosphere::RainfallStation const *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::atmosphere::RainfallStation > * >(argp1); + delete reinterpret_cast< std::shared_ptr< const cmf::atmosphere::RainfallStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::RainfallStation * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::atmosphere::RainfallStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::RainfallStation * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + try { + result = ((cmf::atmosphere::RainfallStation const *)arg1)->tostring(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_RainfallStation_concentration_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::RainfallStation *arg1 = (cmf::atmosphere::RainfallStation *) 0 ; + cmf::water::SoluteTimeseries *arg2 = (cmf::water::SoluteTimeseries *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::atmosphere::RainfallStation > tempshared1 ; + std::shared_ptr< cmf::atmosphere::RainfallStation > *smartarg1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"RainfallStation_concentration_set",2,2,swig_obj)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__RainfallStation_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RainfallStation_concentration_set" "', argument " "1"" of type '" "cmf::atmosphere::RainfallStation *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::RainfallStation > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::RainfallStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::RainfallStation * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::RainfallStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::RainfallStation * >((smartarg1 ? smartarg1->get() : 0)); + } + } + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_cmf__water__SoluteTimeseries, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "RainfallStation_concentration_set" "', argument " "2"" of type '" "cmf::water::SoluteTimeseries *""'"); + } + arg2 = reinterpret_cast< cmf::water::SoluteTimeseries * >(argp2); + if (arg1) (arg1)->concentration = *arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_RainfallStation_concentration_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::RainfallStation *arg1 = (cmf::atmosphere::RainfallStation *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::atmosphere::RainfallStation > tempshared1 ; + std::shared_ptr< cmf::atmosphere::RainfallStation > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + cmf::water::SoluteTimeseries *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__RainfallStation_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RainfallStation_concentration_get" "', argument " "1"" of type '" "cmf::atmosphere::RainfallStation *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::RainfallStation > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::RainfallStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::RainfallStation * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::RainfallStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::RainfallStation * >((smartarg1 ? smartarg1->get() : 0)); + } + } + result = (cmf::water::SoluteTimeseries *)& ((arg1)->concentration); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__water__SoluteTimeseries, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_RainfallStation_use_for_cell(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::atmosphere::RainfallStation *arg1 = (cmf::atmosphere::RainfallStation *) 0 ; + cmf::upslope::Cell *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::atmosphere::RainfallStation > tempshared1 ; + std::shared_ptr< cmf::atmosphere::RainfallStation > *smartarg1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "c", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:RainfallStation_use_for_cell",kwnames,&obj0,&obj1)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__RainfallStation_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RainfallStation_use_for_cell" "', argument " "1"" of type '" "cmf::atmosphere::RainfallStation *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::RainfallStation > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::RainfallStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::RainfallStation * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::RainfallStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::RainfallStation * >((smartarg1 ? smartarg1->get() : 0)); + } + } + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_cmf__upslope__Cell, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "RainfallStation_use_for_cell" "', argument " "2"" of type '" "cmf::upslope::Cell &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "RainfallStation_use_for_cell" "', argument " "2"" of type '" "cmf::upslope::Cell &""'"); + } + arg2 = reinterpret_cast< cmf::upslope::Cell * >(argp2); + { + try { + (arg1)->use_for_cell(*arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_RainfallStation(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::atmosphere::RainfallStation *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::atmosphere::RainfallStation const > tempshared1 ; + PyObject * obj0 = 0 ; + char * kwnames[] = { + (char *) "copy", NULL + }; + cmf::atmosphere::RainfallStation *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:new_RainfallStation",kwnames,&obj0)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__RainfallStation_t, 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_RainfallStation" "', argument " "1"" of type '" "cmf::atmosphere::RainfallStation const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_RainfallStation" "', argument " "1"" of type '" "cmf::atmosphere::RainfallStation const &""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::atmosphere::RainfallStation > * >(argp1); + delete reinterpret_cast< std::shared_ptr< const cmf::atmosphere::RainfallStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::RainfallStation * >(tempshared1.get()); + } else { + arg1 = const_cast< cmf::atmosphere::RainfallStation * >(reinterpret_cast< std::shared_ptr< const cmf::atmosphere::RainfallStation > * >(argp1)->get()); + } + } + { + try { + result = (cmf::atmosphere::RainfallStation *)new cmf::atmosphere::RainfallStation((cmf::atmosphere::RainfallStation const &)*arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + std::shared_ptr< cmf::atmosphere::RainfallStation > *smartresult = result ? new std::shared_ptr< cmf::atmosphere::RainfallStation >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0; + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__RainfallStation_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_RainfallStation___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::atmosphere::RainfallStation *arg1 = (cmf::atmosphere::RainfallStation *) 0 ; + cmf::math::Time arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::atmosphere::RainfallStation const > tempshared1 ; + std::shared_ptr< cmf::atmosphere::RainfallStation const > *smartarg1 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "t", NULL + }; + double result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:RainfallStation___call__",kwnames,&obj0,&obj1)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__RainfallStation_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RainfallStation___call__" "', argument " "1"" of type '" "cmf::atmosphere::RainfallStation const *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::atmosphere::RainfallStation > * >(argp1); + delete reinterpret_cast< std::shared_ptr< const cmf::atmosphere::RainfallStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::RainfallStation * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::atmosphere::RainfallStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::RainfallStation * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + arg2 = convert_datetime_to_cmftime(obj1); + if (arg2 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } + } + { + try { + result = (double)cmf_atmosphere_RainfallStation___call__((cmf::atmosphere::RainfallStation const *)arg1,arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_RainfallStation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::RainfallStation *arg1 = (cmf::atmosphere::RainfallStation *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::atmosphere::RainfallStation > tempshared1 ; + std::shared_ptr< cmf::atmosphere::RainfallStation > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__RainfallStation_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_RainfallStation" "', argument " "1"" of type '" "cmf::atmosphere::RainfallStation *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::RainfallStation > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::RainfallStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::RainfallStation * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::RainfallStation > * >(argp1); + arg1 = const_cast< cmf::atmosphere::RainfallStation * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + try { + (void)arg1; delete smartarg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *RainfallStation_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__RainfallStation_t, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *RainfallStation_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_RainfallStationList___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::RainfallStationList *arg1 = (cmf::atmosphere::RainfallStationList *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + size_t result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__atmosphere__RainfallStationList, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RainfallStationList___len__" "', argument " "1"" of type '" "cmf::atmosphere::RainfallStationList const *""'"); + } + arg1 = reinterpret_cast< cmf::atmosphere::RainfallStationList * >(argp1); + { + try { + result = ((cmf::atmosphere::RainfallStationList const *)arg1)->size(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_RainfallStationList___getitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::atmosphere::RainfallStationList *arg1 = (cmf::atmosphere::RainfallStationList *) 0 ; + ptrdiff_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + cmf::atmosphere::RainfallStation::ptr result; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__atmosphere__RainfallStationList, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RainfallStationList___getitem__" "', argument " "1"" of type '" "cmf::atmosphere::RainfallStationList *""'"); + } + arg1 = reinterpret_cast< cmf::atmosphere::RainfallStationList * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RainfallStationList___getitem__" "', argument " "2"" of type '" "ptrdiff_t""'"); + } + arg2 = static_cast< ptrdiff_t >(val2); + { + try { + result = (arg1)->operator [](arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + std::shared_ptr< cmf::atmosphere::RainfallStation > *smartresult = result ? new std::shared_ptr< cmf::atmosphere::RainfallStation >(result) : 0; + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__RainfallStation_t, SWIG_POINTER_OWN); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_RainfallStationList___getitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::atmosphere::RainfallStationList *arg1 = (cmf::atmosphere::RainfallStationList *) 0 ; + ptrdiff_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + cmf::atmosphere::RainfallStation::ptr result; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__atmosphere__RainfallStationList, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RainfallStationList___getitem__" "', argument " "1"" of type '" "cmf::atmosphere::RainfallStationList const *""'"); + } + arg1 = reinterpret_cast< cmf::atmosphere::RainfallStationList * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RainfallStationList___getitem__" "', argument " "2"" of type '" "ptrdiff_t""'"); + } + arg2 = static_cast< ptrdiff_t >(val2); + { + try { + result = ((cmf::atmosphere::RainfallStationList const *)arg1)->operator [](arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + std::shared_ptr< cmf::atmosphere::RainfallStation > *smartresult = result ? new std::shared_ptr< cmf::atmosphere::RainfallStation >(result) : 0; + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__RainfallStation_t, SWIG_POINTER_OWN); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_RainfallStationList___getitem__(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"RainfallStationList___getitem__",0,2,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__atmosphere__RainfallStationList, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__atmosphere__RainfallStationList, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_RainfallStationList___getitem____SWIG_0(self, argc, argv); + case 2: + return _wrap_RainfallStationList___getitem____SWIG_1(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'RainfallStationList___getitem__'.\n" + " Possible C/C++ prototypes are:\n" + " cmf::atmosphere::RainfallStationList::operator [](ptrdiff_t)\n" + " cmf::atmosphere::RainfallStationList::operator [](ptrdiff_t) const\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_RainfallStationList_add(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::atmosphere::RainfallStationList *arg1 = (cmf::atmosphere::RainfallStationList *) 0 ; + std::string arg2 ; + cmf::math::timeseries arg3 ; + cmf::geometry::point arg4 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "Name",(char *) "Data",(char *) "Position", NULL + }; + cmf::atmosphere::RainfallStation::ptr result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO:RainfallStationList_add",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__atmosphere__RainfallStationList, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RainfallStationList_add" "', argument " "1"" of type '" "cmf::atmosphere::RainfallStationList *""'"); + } + arg1 = reinterpret_cast< cmf::atmosphere::RainfallStationList * >(argp1); + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string(obj1, &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "RainfallStationList_add" "', argument " "2"" of type '" "std::string""'"); + } + arg2 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + { + cmf::math::timeseries *p_ts = &arg3; + int res=SWIG_ConvertPtr(obj2,(void**)(&p_ts),SWIGTYPE_p_cmf__math__timeseries,0); + if (!(SWIG_IsOK(res)) || p_ts==0) { + if (PyNumber_Check(obj2)) { + double scalar = PyFloat_AsDouble(obj2); + arg3 = cmf::math::timeseries::from_scalar(scalar); + } else { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.timeseries object"); + } + } else { + arg3 = *p_ts; + } + } + { + if (check_xy(obj3)) { + std::string res = convert_xyz_to_point(obj3,arg4); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + return NULL; + } + } + else if (PySequence_Check(obj3)) { + std::string res = convert_seq_to_point(obj3,arg4); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError, res.c_str()); + } + } else { + std::string res="<"; + res+=pyrepr(obj3); + res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + } + } + { + try { + result = (arg1)->add(arg2,arg3,arg4); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + std::shared_ptr< cmf::atmosphere::RainfallStation > *smartresult = result ? new std::shared_ptr< cmf::atmosphere::RainfallStation >(result) : 0; + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__RainfallStation_t, SWIG_POINTER_OWN); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_RainfallStationList_remove(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::atmosphere::RainfallStationList *arg1 = (cmf::atmosphere::RainfallStationList *) 0 ; + ptrdiff_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "index", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:RainfallStationList_remove",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__atmosphere__RainfallStationList, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RainfallStationList_remove" "', argument " "1"" of type '" "cmf::atmosphere::RainfallStationList *""'"); + } + arg1 = reinterpret_cast< cmf::atmosphere::RainfallStationList * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RainfallStationList_remove" "', argument " "2"" of type '" "ptrdiff_t""'"); + } + arg2 = static_cast< ptrdiff_t >(val2); + { + try { + (arg1)->remove(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_RainfallStationList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::RainfallStationList *result = 0 ; + + if (!SWIG_Python_UnpackTuple(args,"new_RainfallStationList",0,0,0)) SWIG_fail; + { + try { + result = (cmf::atmosphere::RainfallStationList *)new cmf::atmosphere::RainfallStationList(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__atmosphere__RainfallStationList, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_RainfallStationList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::RainfallStationList *arg1 = (cmf::atmosphere::RainfallStationList *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__atmosphere__RainfallStationList, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_RainfallStationList" "', argument " "1"" of type '" "cmf::atmosphere::RainfallStationList *""'"); + } + arg1 = reinterpret_cast< cmf::atmosphere::RainfallStationList * >(argp1); + { + try { + delete arg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *RainfallStationList_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__atmosphere__RainfallStationList, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *RainfallStationList_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_RainfallStationReference_from_nearest_station(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::project *arg1 = 0 ; + cmf::geometry::point arg2 ; + double arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "project",(char *) "position",(char *) "z_weight", NULL + }; + cmf::atmosphere::RainfallStationReference::ptr result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:RainfallStationReference_from_nearest_station",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_cmf__project, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RainfallStationReference_from_nearest_station" "', argument " "1"" of type '" "cmf::project &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "RainfallStationReference_from_nearest_station" "', argument " "1"" of type '" "cmf::project &""'"); + } + arg1 = reinterpret_cast< cmf::project * >(argp1); + { + if (check_xy(obj1)) { + std::string res = convert_xyz_to_point(obj1,arg2); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + return NULL; + } + } + else if (PySequence_Check(obj1)) { + std::string res = convert_seq_to_point(obj1,arg2); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError, res.c_str()); + } + } else { + std::string res="<"; + res+=pyrepr(obj1); + res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + } + } + ecode3 = SWIG_AsVal_double(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RainfallStationReference_from_nearest_station" "', argument " "3"" of type '" "double""'"); + } + arg3 = static_cast< double >(val3); + { + try { + result = cmf::atmosphere::RainfallStationReference::from_nearest_station(*arg1,arg2,arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + std::shared_ptr< cmf::atmosphere::RainfallStationReference > *smartresult = result ? new std::shared_ptr< cmf::atmosphere::RainfallStationReference >(result) : 0; + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__RainfallStationReference_t, SWIG_POINTER_OWN); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_RainfallStationReference_from_station_id(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::project *arg1 = 0 ; + cmf::geometry::point arg2 ; + size_t arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "project",(char *) "position",(char *) "id", NULL + }; + cmf::atmosphere::RainfallStationReference::ptr result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:RainfallStationReference_from_station_id",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_cmf__project, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RainfallStationReference_from_station_id" "', argument " "1"" of type '" "cmf::project &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "RainfallStationReference_from_station_id" "', argument " "1"" of type '" "cmf::project &""'"); + } + arg1 = reinterpret_cast< cmf::project * >(argp1); + { + if (check_xy(obj1)) { + std::string res = convert_xyz_to_point(obj1,arg2); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + return NULL; + } + } + else if (PySequence_Check(obj1)) { + std::string res = convert_seq_to_point(obj1,arg2); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError, res.c_str()); + } + } else { + std::string res="<"; + res+=pyrepr(obj1); + res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + } + } + ecode3 = SWIG_AsVal_size_t(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RainfallStationReference_from_station_id" "', argument " "3"" of type '" "size_t""'"); + } + arg3 = static_cast< size_t >(val3); + { + try { + result = cmf::atmosphere::RainfallStationReference::from_station_id(*arg1,arg2,arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + std::shared_ptr< cmf::atmosphere::RainfallStationReference > *smartresult = result ? new std::shared_ptr< cmf::atmosphere::RainfallStationReference >(result) : 0; + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__RainfallStationReference_t, SWIG_POINTER_OWN); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_RainfallStationReference(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::RainfallStationReference *arg1 = (cmf::atmosphere::RainfallStationReference *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::atmosphere::RainfallStationReference > tempshared1 ; + std::shared_ptr< cmf::atmosphere::RainfallStationReference > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__RainfallStationReference_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_RainfallStationReference" "', argument " "1"" of type '" "cmf::atmosphere::RainfallStationReference *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::RainfallStationReference > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::RainfallStationReference > * >(argp1); + arg1 = const_cast< cmf::atmosphere::RainfallStationReference * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::RainfallStationReference > * >(argp1); + arg1 = const_cast< cmf::atmosphere::RainfallStationReference * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + try { + (void)arg1; delete smartarg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *RainfallStationReference_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__RainfallStationReference_t, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_IDWRainfall_create(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::project *arg1 = 0 ; + cmf::geometry::point arg2 ; + double arg3 ; + double arg4 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val3 ; + int ecode3 = 0 ; + double val4 ; + int ecode4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + char * kwnames[] = { + (char *) "project",(char *) "position",(char *) "z_weight",(char *) "power", NULL + }; + cmf::atmosphere::RainSource::ptr result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO:IDWRainfall_create",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_cmf__project, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDWRainfall_create" "', argument " "1"" of type '" "cmf::project &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IDWRainfall_create" "', argument " "1"" of type '" "cmf::project &""'"); + } + arg1 = reinterpret_cast< cmf::project * >(argp1); + { + if (check_xy(obj1)) { + std::string res = convert_xyz_to_point(obj1,arg2); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + return NULL; + } + } + else if (PySequence_Check(obj1)) { + std::string res = convert_seq_to_point(obj1,arg2); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError, res.c_str()); + } + } else { + std::string res="<"; + res+=pyrepr(obj1); + res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + } + } + ecode3 = SWIG_AsVal_double(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IDWRainfall_create" "', argument " "3"" of type '" "double""'"); + } + arg3 = static_cast< double >(val3); + ecode4 = SWIG_AsVal_double(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IDWRainfall_create" "', argument " "4"" of type '" "double""'"); + } + arg4 = static_cast< double >(val4); + { + try { + result = cmf::atmosphere::IDWRainfall::create(*arg1,arg2,arg3,arg4); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + std::shared_ptr< cmf::atmosphere::RainSource > *smartresult = result ? new std::shared_ptr< cmf::atmosphere::RainSource >(result) : 0; + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__RainSource_t, SWIG_POINTER_OWN); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_IDWRainfall(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::IDWRainfall *arg1 = (cmf::atmosphere::IDWRainfall *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::atmosphere::IDWRainfall > tempshared1 ; + std::shared_ptr< cmf::atmosphere::IDWRainfall > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__IDWRainfall_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IDWRainfall" "', argument " "1"" of type '" "cmf::atmosphere::IDWRainfall *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::atmosphere::IDWRainfall > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::atmosphere::IDWRainfall > * >(argp1); + arg1 = const_cast< cmf::atmosphere::IDWRainfall * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::atmosphere::IDWRainfall > * >(argp1); + arg1 = const_cast< cmf::atmosphere::IDWRainfall * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + try { + (void)arg1; delete smartarg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *IDWRainfall_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__IDWRainfall_t, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_Vegetation_LAI_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::vegetation::Vegetation *arg1 = (cmf::upslope::vegetation::Vegetation *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"Vegetation_LAI_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__vegetation__Vegetation, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vegetation_LAI_set" "', argument " "1"" of type '" "cmf::upslope::vegetation::Vegetation *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::vegetation::Vegetation * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vegetation_LAI_set" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + if (arg1) (arg1)->LAI = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vegetation_LAI_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::vegetation::Vegetation *arg1 = (cmf::upslope::vegetation::Vegetation *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__vegetation__Vegetation, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vegetation_LAI_get" "', argument " "1"" of type '" "cmf::upslope::vegetation::Vegetation *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::vegetation::Vegetation * >(argp1); + result = (double) ((arg1)->LAI); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vegetation_Height_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::vegetation::Vegetation *arg1 = (cmf::upslope::vegetation::Vegetation *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"Vegetation_Height_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__vegetation__Vegetation, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vegetation_Height_set" "', argument " "1"" of type '" "cmf::upslope::vegetation::Vegetation *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::vegetation::Vegetation * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vegetation_Height_set" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + if (arg1) (arg1)->Height = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vegetation_Height_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::vegetation::Vegetation *arg1 = (cmf::upslope::vegetation::Vegetation *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__vegetation__Vegetation, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vegetation_Height_get" "', argument " "1"" of type '" "cmf::upslope::vegetation::Vegetation *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::vegetation::Vegetation * >(argp1); + result = (double) ((arg1)->Height); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vegetation_albedo_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::vegetation::Vegetation *arg1 = (cmf::upslope::vegetation::Vegetation *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"Vegetation_albedo_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__vegetation__Vegetation, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vegetation_albedo_set" "', argument " "1"" of type '" "cmf::upslope::vegetation::Vegetation *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::vegetation::Vegetation * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vegetation_albedo_set" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + if (arg1) (arg1)->albedo = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vegetation_albedo_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::vegetation::Vegetation *arg1 = (cmf::upslope::vegetation::Vegetation *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__vegetation__Vegetation, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vegetation_albedo_get" "', argument " "1"" of type '" "cmf::upslope::vegetation::Vegetation *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::vegetation::Vegetation * >(argp1); + result = (double) ((arg1)->albedo); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vegetation_snow_albedo_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::vegetation::Vegetation *arg1 = (cmf::upslope::vegetation::Vegetation *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"Vegetation_snow_albedo_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__vegetation__Vegetation, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vegetation_snow_albedo_set" "', argument " "1"" of type '" "cmf::upslope::vegetation::Vegetation *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::vegetation::Vegetation * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vegetation_snow_albedo_set" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + if (arg1) (arg1)->snow_albedo = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vegetation_snow_albedo_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::vegetation::Vegetation *arg1 = (cmf::upslope::vegetation::Vegetation *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__vegetation__Vegetation, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vegetation_snow_albedo_get" "', argument " "1"" of type '" "cmf::upslope::vegetation::Vegetation *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::vegetation::Vegetation * >(argp1); + result = (double) ((arg1)->snow_albedo); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vegetation_CanopyCapacityPerLAI_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::vegetation::Vegetation *arg1 = (cmf::upslope::vegetation::Vegetation *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"Vegetation_CanopyCapacityPerLAI_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__vegetation__Vegetation, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vegetation_CanopyCapacityPerLAI_set" "', argument " "1"" of type '" "cmf::upslope::vegetation::Vegetation *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::vegetation::Vegetation * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vegetation_CanopyCapacityPerLAI_set" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + if (arg1) (arg1)->CanopyCapacityPerLAI = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vegetation_CanopyCapacityPerLAI_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::vegetation::Vegetation *arg1 = (cmf::upslope::vegetation::Vegetation *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__vegetation__Vegetation, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vegetation_CanopyCapacityPerLAI_get" "', argument " "1"" of type '" "cmf::upslope::vegetation::Vegetation *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::vegetation::Vegetation * >(argp1); + result = (double) ((arg1)->CanopyCapacityPerLAI); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vegetation_RootDepth_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::vegetation::Vegetation *arg1 = (cmf::upslope::vegetation::Vegetation *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"Vegetation_RootDepth_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__vegetation__Vegetation, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vegetation_RootDepth_set" "', argument " "1"" of type '" "cmf::upslope::vegetation::Vegetation *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::vegetation::Vegetation * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vegetation_RootDepth_set" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + if (arg1) (arg1)->RootDepth = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vegetation_RootDepth_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::vegetation::Vegetation *arg1 = (cmf::upslope::vegetation::Vegetation *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__vegetation__Vegetation, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vegetation_RootDepth_get" "', argument " "1"" of type '" "cmf::upslope::vegetation::Vegetation *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::vegetation::Vegetation * >(argp1); + result = (double) ((arg1)->RootDepth); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vegetation_RootContent_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::vegetation::Vegetation *arg1 = (cmf::upslope::vegetation::Vegetation *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"Vegetation_RootContent_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__vegetation__Vegetation, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vegetation_RootContent_set" "', argument " "1"" of type '" "cmf::upslope::vegetation::Vegetation *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::vegetation::Vegetation * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vegetation_RootContent_set" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + if (arg1) (arg1)->RootContent = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vegetation_RootContent_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::vegetation::Vegetation *arg1 = (cmf::upslope::vegetation::Vegetation *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__vegetation__Vegetation, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vegetation_RootContent_get" "', argument " "1"" of type '" "cmf::upslope::vegetation::Vegetation *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::vegetation::Vegetation * >(argp1); + result = (double) ((arg1)->RootContent); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vegetation_fraction_at_rootdepth_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::vegetation::Vegetation *arg1 = (cmf::upslope::vegetation::Vegetation *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"Vegetation_fraction_at_rootdepth_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__vegetation__Vegetation, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vegetation_fraction_at_rootdepth_set" "', argument " "1"" of type '" "cmf::upslope::vegetation::Vegetation *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::vegetation::Vegetation * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vegetation_fraction_at_rootdepth_set" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + if (arg1) (arg1)->fraction_at_rootdepth = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vegetation_fraction_at_rootdepth_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::vegetation::Vegetation *arg1 = (cmf::upslope::vegetation::Vegetation *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__vegetation__Vegetation, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vegetation_fraction_at_rootdepth_get" "', argument " "1"" of type '" "cmf::upslope::vegetation::Vegetation *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::vegetation::Vegetation * >(argp1); + result = (double) ((arg1)->fraction_at_rootdepth); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vegetation_StomatalResistance_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::vegetation::Vegetation *arg1 = (cmf::upslope::vegetation::Vegetation *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"Vegetation_StomatalResistance_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__vegetation__Vegetation, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vegetation_StomatalResistance_set" "', argument " "1"" of type '" "cmf::upslope::vegetation::Vegetation *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::vegetation::Vegetation * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vegetation_StomatalResistance_set" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + if (arg1) (arg1)->StomatalResistance = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vegetation_StomatalResistance_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::vegetation::Vegetation *arg1 = (cmf::upslope::vegetation::Vegetation *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__vegetation__Vegetation, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vegetation_StomatalResistance_get" "', argument " "1"" of type '" "cmf::upslope::vegetation::Vegetation *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::vegetation::Vegetation * >(argp1); + result = (double) ((arg1)->StomatalResistance); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vegetation_CanopyClosure_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::vegetation::Vegetation *arg1 = (cmf::upslope::vegetation::Vegetation *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"Vegetation_CanopyClosure_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__vegetation__Vegetation, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vegetation_CanopyClosure_set" "', argument " "1"" of type '" "cmf::upslope::vegetation::Vegetation *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::vegetation::Vegetation * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vegetation_CanopyClosure_set" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + if (arg1) (arg1)->CanopyClosure = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vegetation_CanopyClosure_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::vegetation::Vegetation *arg1 = (cmf::upslope::vegetation::Vegetation *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__vegetation__Vegetation, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vegetation_CanopyClosure_get" "', argument " "1"" of type '" "cmf::upslope::vegetation::Vegetation *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::vegetation::Vegetation * >(argp1); + result = (double) ((arg1)->CanopyClosure); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vegetation_CanopyPARExtinction_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::vegetation::Vegetation *arg1 = (cmf::upslope::vegetation::Vegetation *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"Vegetation_CanopyPARExtinction_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__vegetation__Vegetation, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vegetation_CanopyPARExtinction_set" "', argument " "1"" of type '" "cmf::upslope::vegetation::Vegetation *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::vegetation::Vegetation * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vegetation_CanopyPARExtinction_set" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + if (arg1) (arg1)->CanopyPARExtinction = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vegetation_CanopyPARExtinction_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::vegetation::Vegetation *arg1 = (cmf::upslope::vegetation::Vegetation *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__vegetation__Vegetation, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vegetation_CanopyPARExtinction_get" "', argument " "1"" of type '" "cmf::upslope::vegetation::Vegetation *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::vegetation::Vegetation * >(argp1); + result = (double) ((arg1)->CanopyPARExtinction); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vegetation_LeafWidth_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::vegetation::Vegetation *arg1 = (cmf::upslope::vegetation::Vegetation *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"Vegetation_LeafWidth_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__vegetation__Vegetation, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vegetation_LeafWidth_set" "', argument " "1"" of type '" "cmf::upslope::vegetation::Vegetation *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::vegetation::Vegetation * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vegetation_LeafWidth_set" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + if (arg1) (arg1)->LeafWidth = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vegetation_LeafWidth_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::vegetation::Vegetation *arg1 = (cmf::upslope::vegetation::Vegetation *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__vegetation__Vegetation, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vegetation_LeafWidth_get" "', argument " "1"" of type '" "cmf::upslope::vegetation::Vegetation *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::vegetation::Vegetation * >(argp1); + result = (double) ((arg1)->LeafWidth); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vegetation_RootLength(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::vegetation::Vegetation *arg1 = (cmf::upslope::vegetation::Vegetation *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__vegetation__Vegetation, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vegetation_RootLength" "', argument " "1"" of type '" "cmf::upslope::vegetation::Vegetation const *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::vegetation::Vegetation * >(argp1); + { + try { + result = (double)((cmf::upslope::vegetation::Vegetation const *)arg1)->RootLength(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vegetation_RootFraction__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::upslope::vegetation::Vegetation *arg1 = (cmf::upslope::vegetation::Vegetation *) 0 ; + double arg2 ; + double arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + double val3 ; + int ecode3 = 0 ; + double result; + + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__vegetation__Vegetation, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vegetation_RootFraction" "', argument " "1"" of type '" "cmf::upslope::vegetation::Vegetation const *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::vegetation::Vegetation * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vegetation_RootFraction" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Vegetation_RootFraction" "', argument " "3"" of type '" "double""'"); + } + arg3 = static_cast< double >(val3); + { + try { + result = (double)((cmf::upslope::vegetation::Vegetation const *)arg1)->RootFraction(arg2,arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vegetation_RootFraction__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::upslope::vegetation::Vegetation *arg1 = (cmf::upslope::vegetation::Vegetation *) 0 ; + cmf::math::num_array *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + cmf::math::num_array result; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__vegetation__Vegetation, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vegetation_RootFraction" "', argument " "1"" of type '" "cmf::upslope::vegetation::Vegetation const *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::vegetation::Vegetation * >(argp1); + { + // Convert a array_wrapper from numpy array + double * data=0; + ptrdiff_t size = from_npy_array(swig_obj[1],&data); + if (!data) { + SWIG_exception_fail(SWIG_TypeError,"Input data is not 'array-like' (in the sense of numpy arrays)"); + return NULL; + } + arg2 = new cmf::math::num_array(size,data); + } + { + try { + result = ((cmf::upslope::vegetation::Vegetation const *)arg1)->RootFraction((cmf::math::num_array const &)*arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + resultobj = as_npy_array(result); + } + { + delete arg2; + } + return resultobj; +fail: + { + delete arg2; + } + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vegetation_RootFraction(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[4] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"Vegetation_RootFraction",0,3,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__upslope__vegetation__Vegetation, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + _v = test_npy_array(argv[1]); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__upslope__vegetation__Vegetation, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_double(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_double(argv[2], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_Vegetation_RootFraction__SWIG_1(self, argc, argv); + case 2: + return _wrap_Vegetation_RootFraction__SWIG_0(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'Vegetation_RootFraction'.\n" + " Possible C/C++ prototypes are:\n" + " cmf::upslope::vegetation::Vegetation::RootFraction(double,double) const\n" + " cmf::upslope::vegetation::Vegetation::RootFraction(cmf::math::num_array const &) const\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_new_Vegetation(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + double arg1 = (double) 2.88 ; + double arg2 = (double) 0.12 ; + double arg3 = (double) 0.25 ; + double arg4 = (double) 100 ; + double arg5 = (double) 0.23 ; + double arg6 = (double) 1 ; + double arg7 = (double) 0.1 ; + double arg8 = (double) 1.0 ; + double val1 ; + int ecode1 = 0 ; + double val2 ; + int ecode2 = 0 ; + double val3 ; + int ecode3 = 0 ; + double val4 ; + int ecode4 = 0 ; + double val5 ; + int ecode5 = 0 ; + double val6 ; + int ecode6 = 0 ; + double val7 ; + int ecode7 = 0 ; + double val8 ; + int ecode8 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + PyObject * obj5 = 0 ; + PyObject * obj6 = 0 ; + PyObject * obj7 = 0 ; + char * kwnames[] = { + (char *) "_LAI",(char *) "_Height",(char *) "_RootDepth",(char *) "_StomatalResistance",(char *) "_albedo",(char *) "_CanopyClosure",(char *) "_CanopyCapacityPerLAI",(char *) "_fraction_at_rootdepth", NULL + }; + cmf::upslope::vegetation::Vegetation *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|OOOOOOOO:new_Vegetation",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail; + if (obj0) { + ecode1 = SWIG_AsVal_double(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vegetation" "', argument " "1"" of type '" "double""'"); + } + arg1 = static_cast< double >(val1); + } + if (obj1) { + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Vegetation" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + } + if (obj2) { + ecode3 = SWIG_AsVal_double(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Vegetation" "', argument " "3"" of type '" "double""'"); + } + arg3 = static_cast< double >(val3); + } + if (obj3) { + ecode4 = SWIG_AsVal_double(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_Vegetation" "', argument " "4"" of type '" "double""'"); + } + arg4 = static_cast< double >(val4); + } + if (obj4) { + ecode5 = SWIG_AsVal_double(obj4, &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_Vegetation" "', argument " "5"" of type '" "double""'"); + } + arg5 = static_cast< double >(val5); + } + if (obj5) { + ecode6 = SWIG_AsVal_double(obj5, &val6); + if (!SWIG_IsOK(ecode6)) { + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_Vegetation" "', argument " "6"" of type '" "double""'"); + } + arg6 = static_cast< double >(val6); + } + if (obj6) { + ecode7 = SWIG_AsVal_double(obj6, &val7); + if (!SWIG_IsOK(ecode7)) { + SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_Vegetation" "', argument " "7"" of type '" "double""'"); + } + arg7 = static_cast< double >(val7); + } + if (obj7) { + ecode8 = SWIG_AsVal_double(obj7, &val8); + if (!SWIG_IsOK(ecode8)) { + SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_Vegetation" "', argument " "8"" of type '" "double""'"); + } + arg8 = static_cast< double >(val8); + } + { + try { + result = (cmf::upslope::vegetation::Vegetation *)new cmf::upslope::vegetation::Vegetation(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__vegetation__Vegetation, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vegetation___repr__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::vegetation::Vegetation *arg1 = (cmf::upslope::vegetation::Vegetation *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::string result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__vegetation__Vegetation, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vegetation___repr__" "', argument " "1"" of type '" "cmf::upslope::vegetation::Vegetation *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::vegetation::Vegetation * >(argp1); + { + try { + result = cmf_upslope_vegetation_Vegetation___repr__(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_Vegetation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::vegetation::Vegetation *arg1 = (cmf::upslope::vegetation::Vegetation *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__vegetation__Vegetation, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vegetation" "', argument " "1"" of type '" "cmf::upslope::vegetation::Vegetation *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::vegetation::Vegetation * >(argp1); + { + try { + delete arg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *Vegetation_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__vegetation__Vegetation, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *Vegetation_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_new_CellConnector(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::connectorfunction arg1 = (cmf::upslope::connectorfunction) 0 ; + PyObject * obj0 = 0 ; + char * kwnames[] = { + (char *) "connector", NULL + }; + cmf::upslope::CellConnector *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:new_CellConnector",kwnames,&obj0)) SWIG_fail; + { + int res = SWIG_ConvertFunctionPtr(obj0, (void**)(&arg1), SWIGTYPE_p_f_r_cmf__upslope__Cell_r_cmf__upslope__Cell_ptrdiff_t__void); + if (!SWIG_IsOK(res)) { + SWIG_exception_fail(SWIG_ArgError(res), "in method '" "new_CellConnector" "', argument " "1"" of type '" "cmf::upslope::connectorfunction""'"); + } + } + { + try { + result = (cmf::upslope::CellConnector *)new cmf::upslope::CellConnector(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__CellConnector, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CellConnector___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::CellConnector *arg1 = (cmf::upslope::CellConnector *) 0 ; + cmf::upslope::Cell *arg2 = 0 ; + cmf::upslope::Cell *arg3 = 0 ; + ptrdiff_t arg4 = (ptrdiff_t) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + ptrdiff_t val4 ; + int ecode4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "cell1",(char *) "cell2",(char *) "start_at_layer", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|O:CellConnector___call__",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__CellConnector, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CellConnector___call__" "', argument " "1"" of type '" "cmf::upslope::CellConnector const *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::CellConnector * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_cmf__upslope__Cell, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CellConnector___call__" "', argument " "2"" of type '" "cmf::upslope::Cell &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CellConnector___call__" "', argument " "2"" of type '" "cmf::upslope::Cell &""'"); + } + arg2 = reinterpret_cast< cmf::upslope::Cell * >(argp2); + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_cmf__upslope__Cell, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CellConnector___call__" "', argument " "3"" of type '" "cmf::upslope::Cell &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CellConnector___call__" "', argument " "3"" of type '" "cmf::upslope::Cell &""'"); + } + arg3 = reinterpret_cast< cmf::upslope::Cell * >(argp3); + if (obj3) { + ecode4 = SWIG_AsVal_ptrdiff_t(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CellConnector___call__" "', argument " "4"" of type '" "ptrdiff_t""'"); + } + arg4 = static_cast< ptrdiff_t >(val4); + } + { + try { + ((cmf::upslope::CellConnector const *)arg1)->operator ()(*arg2,*arg3,arg4); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CellConnector_connect(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::CellConnector *arg1 = (cmf::upslope::CellConnector *) 0 ; + cmf::upslope::Cell *arg2 = 0 ; + cmf::upslope::Cell *arg3 = 0 ; + ptrdiff_t arg4 = (ptrdiff_t) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + ptrdiff_t val4 ; + int ecode4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "cell1",(char *) "cell2",(char *) "start_at_layer", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|O:CellConnector_connect",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__CellConnector, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CellConnector_connect" "', argument " "1"" of type '" "cmf::upslope::CellConnector const *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::CellConnector * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_cmf__upslope__Cell, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CellConnector_connect" "', argument " "2"" of type '" "cmf::upslope::Cell &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CellConnector_connect" "', argument " "2"" of type '" "cmf::upslope::Cell &""'"); + } + arg2 = reinterpret_cast< cmf::upslope::Cell * >(argp2); + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_cmf__upslope__Cell, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CellConnector_connect" "', argument " "3"" of type '" "cmf::upslope::Cell &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CellConnector_connect" "', argument " "3"" of type '" "cmf::upslope::Cell &""'"); + } + arg3 = reinterpret_cast< cmf::upslope::Cell * >(argp3); + if (obj3) { + ecode4 = SWIG_AsVal_ptrdiff_t(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CellConnector_connect" "', argument " "4"" of type '" "ptrdiff_t""'"); + } + arg4 = static_cast< ptrdiff_t >(val4); + } + { + try { + ((cmf::upslope::CellConnector const *)arg1)->connect(*arg2,*arg3,arg4); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_CellConnector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::CellConnector *arg1 = (cmf::upslope::CellConnector *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__CellConnector, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CellConnector" "', argument " "1"" of type '" "cmf::upslope::CellConnector *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::CellConnector * >(argp1); + { + try { + delete arg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *CellConnector_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__CellConnector, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *CellConnector_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_Cell_x_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"Cell_x_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_x_set" "', argument " "1"" of type '" "cmf::upslope::Cell *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Cell_x_set" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + if (arg1) (arg1)->x = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Cell_x_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_x_get" "', argument " "1"" of type '" "cmf::upslope::Cell *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); + result = (double) ((arg1)->x); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Cell_y_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"Cell_y_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_y_set" "', argument " "1"" of type '" "cmf::upslope::Cell *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Cell_y_set" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + if (arg1) (arg1)->y = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Cell_y_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_y_get" "', argument " "1"" of type '" "cmf::upslope::Cell *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); + result = (double) ((arg1)->y); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Cell_z_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"Cell_z_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_z_set" "', argument " "1"" of type '" "cmf::upslope::Cell *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Cell_z_set" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + if (arg1) (arg1)->z = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Cell_z_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_z_get" "', argument " "1"" of type '" "cmf::upslope::Cell *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); + result = (double) ((arg1)->z); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Cell_get_position(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::geometry::point result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_get_position" "', argument " "1"" of type '" "cmf::upslope::Cell const *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); + { + try { + result = ((cmf::upslope::Cell const *)arg1)->get_position(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj((new cmf::geometry::point(static_cast< const cmf::geometry::point& >(result))), SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Cell_m3_to_mm(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "volume", NULL + }; + double result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Cell_m3_to_mm",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_m3_to_mm" "', argument " "1"" of type '" "cmf::upslope::Cell const *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Cell_m3_to_mm" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + { + try { + result = (double)((cmf::upslope::Cell const *)arg1)->m3_to_mm(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Cell_mm_to_m3(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "depth", NULL + }; + double result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Cell_mm_to_m3",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_mm_to_m3" "', argument " "1"" of type '" "cmf::upslope::Cell const *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Cell_mm_to_m3" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + { + try { + result = (double)((cmf::upslope::Cell const *)arg1)->mm_to_m3(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Cell_InvalidateSatDepth(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_InvalidateSatDepth" "', argument " "1"" of type '" "cmf::upslope::Cell const *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); + { + try { + ((cmf::upslope::Cell const *)arg1)->InvalidateSatDepth(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Cell_vegetation_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; + cmf::upslope::vegetation::Vegetation *arg2 = (cmf::upslope::vegetation::Vegetation *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"Cell_vegetation_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_vegetation_set" "', argument " "1"" of type '" "cmf::upslope::Cell *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_cmf__upslope__vegetation__Vegetation, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Cell_vegetation_set" "', argument " "2"" of type '" "cmf::upslope::vegetation::Vegetation *""'"); + } + arg2 = reinterpret_cast< cmf::upslope::vegetation::Vegetation * >(argp2); + if (arg1) (arg1)->vegetation = *arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Cell_vegetation_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::upslope::vegetation::Vegetation *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_vegetation_get" "', argument " "1"" of type '" "cmf::upslope::Cell *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); + result = (cmf::upslope::vegetation::Vegetation *)& ((arg1)->vegetation); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__vegetation__Vegetation, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Cell_set_aerodynamic_resistance(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; + SwigValueWrapper< std::shared_ptr< cmf::atmosphere::aerodynamic_resistance > > arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "Ra", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Cell_set_aerodynamic_resistance",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_set_aerodynamic_resistance" "', argument " "1"" of type '" "cmf::upslope::Cell *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); + { + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__aerodynamic_resistance_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Cell_set_aerodynamic_resistance" "', argument " "2"" of type '" "cmf::atmosphere::aerodynamic_resistance::ptr""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Cell_set_aerodynamic_resistance" "', argument " "2"" of type '" "cmf::atmosphere::aerodynamic_resistance::ptr""'"); + } else { + cmf::atmosphere::aerodynamic_resistance::ptr * temp = reinterpret_cast< cmf::atmosphere::aerodynamic_resistance::ptr * >(argp2); + arg2 = *temp; + if (SWIG_IsNewObj(res2)) delete temp; + } + } + { + try { + (arg1)->set_aerodynamic_resistance(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Cell_set_weather(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; + cmf::atmosphere::Weather *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "weather", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Cell_set_weather",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_set_weather" "', argument " "1"" of type '" "cmf::upslope::Cell *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_cmf__atmosphere__Weather, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Cell_set_weather" "', argument " "2"" of type '" "cmf::atmosphere::Weather const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Cell_set_weather" "', argument " "2"" of type '" "cmf::atmosphere::Weather const &""'"); + } + arg2 = reinterpret_cast< cmf::atmosphere::Weather * >(argp2); + { + try { + (arg1)->set_weather((cmf::atmosphere::Weather const &)*arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Cell_set_rainfall(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "rainfall", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Cell_set_rainfall",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_set_rainfall" "', argument " "1"" of type '" "cmf::upslope::Cell *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Cell_set_rainfall" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + { + try { + (arg1)->set_rainfall(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Cell_get_rainfall(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; + cmf::math::Time arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "t", NULL + }; + double result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Cell_get_rainfall",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_get_rainfall" "', argument " "1"" of type '" "cmf::upslope::Cell const *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); + { + arg2 = convert_datetime_to_cmftime(obj1); + if (arg2 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } + } + { + try { + result = (double)((cmf::upslope::Cell const *)arg1)->get_rainfall(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Cell___set_rain_source(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; + cmf::atmosphere::RainSource::ptr arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "new_source", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Cell___set_rain_source",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell___set_rain_source" "', argument " "1"" of type '" "cmf::upslope::Cell *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); + { + int newmem = 0; + res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__RainSource_t, 0 , &newmem); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Cell___set_rain_source" "', argument " "2"" of type '" "cmf::atmosphere::RainSource::ptr""'"); + } + if (argp2) arg2 = *(reinterpret_cast< cmf::atmosphere::RainSource::ptr * >(argp2)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::atmosphere::RainSource::ptr * >(argp2); + } + { + try { + (arg1)->set_rain_source(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Cell___get_rain_source(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::atmosphere::RainSource::ptr result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell___get_rain_source" "', argument " "1"" of type '" "cmf::upslope::Cell *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); + { + try { + result = (arg1)->get_rain_source(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + if (!(result)) resultobj = SWIG_NewPointerObj(0,SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, SWIG_POINTER_OWN); + int dcast = 0; + /*@SWIG:/usr/share/swig/3.0.12/typemaps/swigmacros.swg,200,%formacro@*//*@SWIG:/usr/share/swig/3.0.12/typemaps/swigmacros.swg,192,%_formacro_1@*//*@SWIG:cmf/cmf_core_src/cmf_swiglib.i,74,%_node_down_cast@*/ + if (dcast==0 && result) /*check for cmf::atmosphere::RainfallStationReference::ptr*/ { + std::shared_ptr output = std::dynamic_pointer_cast(result); + if (output) /*flux_node is cmf::atmosphere::RainfallStationReference::ptr */ { + dcast=1; + resultobj = SWIG_NewPointerObj(new std::shared_ptr(output),SWIGTYPE_p_std__shared_ptrT_std__shared_ptrT_cmf__atmosphere__RainfallStationReference_t_t, SWIG_POINTER_OWN); + } + } + /*@SWIG@*/ + + /*@SWIG:/usr/share/swig/3.0.12/typemaps/swigmacros.swg,192,%_formacro_1@*//*@SWIG:cmf/cmf_core_src/cmf_swiglib.i,74,%_node_down_cast@*/ + if (dcast==0 && result) /*check for cmf::atmosphere::ConstantRainSource::ptr*/ { + std::shared_ptr output = std::dynamic_pointer_cast(result); + if (output) /*flux_node is cmf::atmosphere::ConstantRainSource::ptr */ { + dcast=1; + resultobj = SWIG_NewPointerObj(new std::shared_ptr(output),SWIGTYPE_p_std__shared_ptrT_std__shared_ptrT_cmf__atmosphere__ConstantRainSource_t_t, SWIG_POINTER_OWN); + } + } + /*@SWIG@*/ + + /*@SWIG:/usr/share/swig/3.0.12/typemaps/swigmacros.swg,192,%_formacro_1@*//*@SWIG:cmf/cmf_core_src/cmf_swiglib.i,74,%_node_down_cast@*/ + if (dcast==0 && result) /*check for cmf::atmosphere::IDWRainfall*/ { + std::shared_ptr output = std::dynamic_pointer_cast(result); + if (output) /*flux_node is cmf::atmosphere::IDWRainfall */ { + dcast=1; + resultobj = SWIG_NewPointerObj(new std::shared_ptr(output),SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__IDWRainfall_t, SWIG_POINTER_OWN); + } + } + /*@SWIG@*/ + + + + /*@SWIG@*/ + + /*@SWIG@*/ + + /*@SWIG@*//*@SWIG@*/ + if (!dcast) resultobj = SWIG_NewPointerObj(new std::shared_ptr(result),SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, SWIG_POINTER_OWN); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Cell_set_uptakestress(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; + cmf::upslope::ET::RootUptakeStessFunction *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "stressfunction", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Cell_set_uptakestress",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_set_uptakestress" "', argument " "1"" of type '" "cmf::upslope::Cell *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_cmf__upslope__ET__RootUptakeStessFunction, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Cell_set_uptakestress" "', argument " "2"" of type '" "cmf::upslope::ET::RootUptakeStessFunction const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Cell_set_uptakestress" "', argument " "2"" of type '" "cmf::upslope::ET::RootUptakeStessFunction const &""'"); + } + arg2 = reinterpret_cast< cmf::upslope::ET::RootUptakeStessFunction * >(argp2); + { + try { + (arg1)->set_uptakestress((cmf::upslope::ET::RootUptakeStessFunction const &)*arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Cell___get_evaporation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::water::flux_node::ptr result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell___get_evaporation" "', argument " "1"" of type '" "cmf::upslope::Cell *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); + { + try { + result = (arg1)->get_evaporation(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + std::shared_ptr< cmf::water::flux_node > *smartresult = result ? new std::shared_ptr< cmf::water::flux_node >(result) : 0; + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, SWIG_POINTER_OWN); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Cell___get_transpiration(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::water::flux_node::ptr result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell___get_transpiration" "', argument " "1"" of type '" "cmf::upslope::Cell *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); + { + try { + result = (arg1)->get_transpiration(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + std::shared_ptr< cmf::water::flux_node > *smartresult = result ? new std::shared_ptr< cmf::water::flux_node >(result) : 0; + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, SWIG_POINTER_OWN); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Cell_get_surfacewater(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::water::flux_node::ptr result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_get_surfacewater" "', argument " "1"" of type '" "cmf::upslope::Cell *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); + { + try { + result = (arg1)->get_surfacewater(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + if (!(result)) resultobj = SWIG_NewPointerObj(0,SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, SWIG_POINTER_OWN); + int dcast = 0; + /*@SWIG:/usr/share/swig/3.0.12/typemaps/swigmacros.swg,200,%formacro@*//*@SWIG:/usr/share/swig/3.0.12/typemaps/swigmacros.swg,192,%_formacro_1@*//*@SWIG:cmf/cmf_core_src/cmf_swiglib.i,74,%_node_down_cast@*/ + if (dcast==0 && result) /*check for cmf::upslope::SurfaceWater*/ { + std::shared_ptr output = std::dynamic_pointer_cast(result); + if (output) /*flux_node is cmf::upslope::SurfaceWater */ { + dcast=1; + resultobj = SWIG_NewPointerObj(new std::shared_ptr(output),SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SurfaceWater_t, SWIG_POINTER_OWN); + } + } + /*@SWIG@*/ + + /*@SWIG:/usr/share/swig/3.0.12/typemaps/swigmacros.swg,192,%_formacro_1@*//*@SWIG:cmf/cmf_core_src/cmf_swiglib.i,74,%_node_down_cast@*/ + if (dcast==0 && result) /*check for cmf::water::DirichletBoundary*/ { + std::shared_ptr output = std::dynamic_pointer_cast(result); + if (output) /*flux_node is cmf::water::DirichletBoundary */ { + dcast=1; + resultobj = SWIG_NewPointerObj(new std::shared_ptr(output),SWIGTYPE_p_std__shared_ptrT_cmf__water__DirichletBoundary_t, SWIG_POINTER_OWN); + } + } + /*@SWIG@*/ + + + + /*@SWIG@*/ + + /*@SWIG@*//*@SWIG@*/ + if (!dcast) resultobj = SWIG_NewPointerObj(new std::shared_ptr(result),SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, SWIG_POINTER_OWN); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Cell_surfacewater_as_storage(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_surfacewater_as_storage" "', argument " "1"" of type '" "cmf::upslope::Cell *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); + { + try { + (arg1)->surfacewater_as_storage(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Cell_add_storage__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; + std::string arg2 ; + char arg3 = (char) 'N' ; + bool arg4 = (bool) false ; + void *argp1 = 0 ; + int res1 = 0 ; + char val3 ; + int ecode3 = 0 ; + bool val4 ; + int ecode4 = 0 ; + cmf::water::WaterStorage::ptr result; + + if ((nobjs < 2) || (nobjs > 4)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_add_storage" "', argument " "1"" of type '" "cmf::upslope::Cell *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string(swig_obj[1], &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "Cell_add_storage" "', argument " "2"" of type '" "std::string""'"); + } + arg2 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + if (swig_obj[2]) { + ecode3 = SWIG_AsVal_char(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Cell_add_storage" "', argument " "3"" of type '" "char""'"); + } + arg3 = static_cast< char >(val3); + } + if (swig_obj[3]) { + ecode4 = SWIG_AsVal_bool(swig_obj[3], &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Cell_add_storage" "', argument " "4"" of type '" "bool""'"); + } + arg4 = static_cast< bool >(val4); + } + { + try { + result = (arg1)->add_storage(arg2,arg3,arg4); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + std::shared_ptr< cmf::water::WaterStorage > *smartresult = result ? new std::shared_ptr< cmf::water::WaterStorage >(result) : 0; + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, SWIG_POINTER_OWN); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Cell_add_storage__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; + cmf::water::WaterStorage::ptr arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + ptrdiff_t result; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_add_storage" "', argument " "1"" of type '" "cmf::upslope::Cell *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); + { + int newmem = 0; + res2 = SWIG_ConvertPtrAndOwn(swig_obj[1], &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0 , &newmem); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Cell_add_storage" "', argument " "2"" of type '" "cmf::water::WaterStorage::ptr""'"); + } + if (argp2) arg2 = *(reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp2)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp2); + } + { + try { + result = (arg1)->add_storage(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_ptrdiff_t(static_cast< ptrdiff_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Cell_add_storage(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[5] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"Cell_add_storage",0,4,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__upslope__Cell, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if ((argc >= 2) && (argc <= 4)) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__upslope__Cell, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (argc > 2) { + { + { + int res = SWIG_AsVal_char(argv[2], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (argc > 3) { + { + { + int res = SWIG_AsVal_bool(argv[3], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + } + } + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_Cell_add_storage__SWIG_1(self, argc, argv); + case 2: + return _wrap_Cell_add_storage__SWIG_0(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'Cell_add_storage'.\n" + " Possible C/C++ prototypes are:\n" + " cmf::upslope::Cell::add_storage(std::string,char,bool)\n" + " cmf::upslope::Cell::add_storage(cmf::water::WaterStorage::ptr)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_Cell_remove_storage(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; + cmf::water::WaterStorage::ptr arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "storage", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Cell_remove_storage",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_remove_storage" "', argument " "1"" of type '" "cmf::upslope::Cell *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); + { + int newmem = 0; + res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0 , &newmem); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Cell_remove_storage" "', argument " "2"" of type '" "cmf::water::WaterStorage::ptr""'"); + } + if (argp2) arg2 = *(reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp2)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp2); + } + { + try { + (arg1)->remove_storage(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Cell_storage_count(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + size_t result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_storage_count" "', argument " "1"" of type '" "cmf::upslope::Cell const *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); + { + try { + result = ((cmf::upslope::Cell const *)arg1)->storage_count(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Cell_get_storage(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; + ptrdiff_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "index", NULL + }; + cmf::water::WaterStorage::ptr result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Cell_get_storage",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_get_storage" "', argument " "1"" of type '" "cmf::upslope::Cell const *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Cell_get_storage" "', argument " "2"" of type '" "ptrdiff_t""'"); + } + arg2 = static_cast< ptrdiff_t >(val2); + { + try { + result = ((cmf::upslope::Cell const *)arg1)->get_storage(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + if (!(result)) resultobj = SWIG_NewPointerObj(0,SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, SWIG_POINTER_OWN); + int dcast = 0; + /*@SWIG:/usr/share/swig/3.0.12/typemaps/swigmacros.swg,200,%formacro@*//*@SWIG:/usr/share/swig/3.0.12/typemaps/swigmacros.swg,192,%_formacro_1@*//*@SWIG:cmf/cmf_core_src/cmf_swiglib.i,74,%_node_down_cast@*/ + if (dcast==0 && result) /*check for cmf::river::OpenWaterStorage*/ { + std::shared_ptr output = std::dynamic_pointer_cast(result); + if (output) /*flux_node is cmf::river::OpenWaterStorage */ { + dcast=1; + resultobj = SWIG_NewPointerObj(new std::shared_ptr(output),SWIGTYPE_p_std__shared_ptrT_cmf__river__OpenWaterStorage_t, SWIG_POINTER_OWN); + } + } + /*@SWIG@*/ + + /*@SWIG:/usr/share/swig/3.0.12/typemaps/swigmacros.swg,192,%_formacro_1@*//*@SWIG:cmf/cmf_core_src/cmf_swiglib.i,74,%_node_down_cast@*/ + if (dcast==0 && result) /*check for cmf::water::WaterStorage*/ { + std::shared_ptr output = std::dynamic_pointer_cast(result); + if (output) /*flux_node is cmf::water::WaterStorage */ { + dcast=1; + resultobj = SWIG_NewPointerObj(new std::shared_ptr(output),SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, SWIG_POINTER_OWN); + } + } + /*@SWIG@*/ + + + + /*@SWIG@*/ + + /*@SWIG@*//*@SWIG@*/ + if (!dcast) resultobj = SWIG_NewPointerObj(new std::shared_ptr(result),SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, SWIG_POINTER_OWN); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Cell_get_canopy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::water::WaterStorage::ptr result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_get_canopy" "', argument " "1"" of type '" "cmf::upslope::Cell const *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); + { + try { + result = ((cmf::upslope::Cell const *)arg1)->get_canopy(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + std::shared_ptr< cmf::water::WaterStorage > *smartresult = result ? new std::shared_ptr< cmf::water::WaterStorage >(result) : 0; + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, SWIG_POINTER_OWN); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Cell_get_snow(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::water::WaterStorage::ptr result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_get_snow" "', argument " "1"" of type '" "cmf::upslope::Cell const *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); + { + try { + result = ((cmf::upslope::Cell const *)arg1)->get_snow(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + std::shared_ptr< cmf::water::WaterStorage > *smartresult = result ? new std::shared_ptr< cmf::water::WaterStorage >(result) : 0; + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, SWIG_POINTER_OWN); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Cell_snow_coverage(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_snow_coverage" "', argument " "1"" of type '" "cmf::upslope::Cell const *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); + { + try { + result = (real)((cmf::upslope::Cell const *)arg1)->snow_coverage(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Cell_albedo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_albedo" "', argument " "1"" of type '" "cmf::upslope::Cell const *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); + { + try { + result = (real)((cmf::upslope::Cell const *)arg1)->albedo(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Cell_surface_amplitude_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"Cell_surface_amplitude_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_surface_amplitude_set" "', argument " "1"" of type '" "cmf::upslope::Cell *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Cell_surface_amplitude_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->surface_amplitude = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Cell_surface_amplitude_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_surface_amplitude_get" "', argument " "1"" of type '" "cmf::upslope::Cell *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); + result = (real) ((arg1)->surface_amplitude); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Cell_surface_water_coverage(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_surface_water_coverage" "', argument " "1"" of type '" "cmf::upslope::Cell const *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); + { + try { + result = (real)((cmf::upslope::Cell const *)arg1)->surface_water_coverage(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Cell_heat_flux(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; + cmf::math::Time arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "t", NULL + }; + real result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Cell_heat_flux",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_heat_flux" "', argument " "1"" of type '" "cmf::upslope::Cell const *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); + { + arg2 = convert_datetime_to_cmftime(obj1); + if (arg2 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } + } + { + try { + result = (real)((cmf::upslope::Cell const *)arg1)->heat_flux(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Cell_Tground_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"Cell_Tground_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_Tground_set" "', argument " "1"" of type '" "cmf::upslope::Cell *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Cell_Tground_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->Tground = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Cell_Tground_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_Tground_get" "', argument " "1"" of type '" "cmf::upslope::Cell *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); + result = (real) ((arg1)->Tground); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Cell_leave_wetness(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_leave_wetness" "', argument " "1"" of type '" "cmf::upslope::Cell const *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); + { + try { + result = (real)((cmf::upslope::Cell const *)arg1)->leave_wetness(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Cell_Id_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; + ptrdiff_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"Cell_Id_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_Id_set" "', argument " "1"" of type '" "cmf::upslope::Cell *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Cell_Id_set" "', argument " "2"" of type '" "ptrdiff_t""'"); + } + arg2 = static_cast< ptrdiff_t >(val2); + if (arg1) (arg1)->Id = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Cell_Id_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + ptrdiff_t result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_Id_get" "', argument " "1"" of type '" "cmf::upslope::Cell *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); + result = ((arg1)->Id); + resultobj = SWIG_From_ptrdiff_t(static_cast< ptrdiff_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Cell_get_WKB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::bytestring result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_get_WKB" "', argument " "1"" of type '" "cmf::upslope::Cell const *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); + { + try { + result = ((cmf::upslope::Cell const *)arg1)->get_WKB(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + // Converting cmf::bytestring to PyBytes + resultobj = PyBytes_FromStringAndSize((&result)->c_str(), (&result)->size()); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Cell_set_WKB(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; + cmf::bytestring arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "wkb", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Cell_set_WKB",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_set_WKB" "', argument " "1"" of type '" "cmf::upslope::Cell *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); + { + // Convert PyBytes to cmf::bytestring + if (PyBytes_Check(obj1)) { + Py_ssize_t size = PyBytes_Size(obj1); + arg2 = cmf::bytestring(PyBytes_AsString(obj1), size); + } else { + SWIG_exception_fail(SWIG_TypeError,"WKB expects byte string"); + } + } + { + try { + (arg1)->set_WKB(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Cell_get_weather(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; + cmf::math::Time arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "t", NULL + }; + cmf::atmosphere::Weather result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Cell_get_weather",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_get_weather" "', argument " "1"" of type '" "cmf::upslope::Cell const *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); + { + arg2 = convert_datetime_to_cmftime(obj1); + if (arg2 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } + } + { + try { + result = ((cmf::upslope::Cell const *)arg1)->get_weather(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj((new cmf::atmosphere::Weather(static_cast< const cmf::atmosphere::Weather& >(result))), SWIGTYPE_p_cmf__atmosphere__Weather, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Cell_layer_count(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + size_t result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_layer_count" "', argument " "1"" of type '" "cmf::upslope::Cell const *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); + { + try { + result = ((cmf::upslope::Cell const *)arg1)->layer_count(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Cell_get_layer(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; + ptrdiff_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "ndx", NULL + }; + cmf::upslope::SoilLayer::ptr result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Cell_get_layer",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_get_layer" "', argument " "1"" of type '" "cmf::upslope::Cell const *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Cell_get_layer" "', argument " "2"" of type '" "ptrdiff_t""'"); + } + arg2 = static_cast< ptrdiff_t >(val2); + { + try { + result = ((cmf::upslope::Cell const *)arg1)->get_layer(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj((new cmf::upslope::SoilLayer::ptr(static_cast< const cmf::upslope::SoilLayer::ptr& >(result))), SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Cell_add_layer__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; + real arg2 ; + cmf::upslope::RetentionCurve *arg3 = 0 ; + real arg4 = (real) 10 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + double val4 ; + int ecode4 = 0 ; + cmf::upslope::SoilLayer::ptr result; + + if ((nobjs < 3) || (nobjs > 4)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_add_layer" "', argument " "1"" of type '" "cmf::upslope::Cell *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Cell_add_layer" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + res3 = SWIG_ConvertPtr(swig_obj[2], &argp3, SWIGTYPE_p_cmf__upslope__RetentionCurve, 0 | 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Cell_add_layer" "', argument " "3"" of type '" "cmf::upslope::RetentionCurve const &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Cell_add_layer" "', argument " "3"" of type '" "cmf::upslope::RetentionCurve const &""'"); + } + arg3 = reinterpret_cast< cmf::upslope::RetentionCurve * >(argp3); + if (swig_obj[3]) { + ecode4 = SWIG_AsVal_double(swig_obj[3], &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Cell_add_layer" "', argument " "4"" of type '" "real""'"); + } + arg4 = static_cast< real >(val4); + } + { + try { + result = (arg1)->add_layer(arg2,(cmf::upslope::RetentionCurve const &)*arg3,arg4); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj((new cmf::upslope::SoilLayer::ptr(static_cast< const cmf::upslope::SoilLayer::ptr& >(result))), SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Cell_add_layer__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + cmf::upslope::SoilLayer::ptr result; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_add_layer" "', argument " "1"" of type '" "cmf::upslope::Cell *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Cell_add_layer" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + { + try { + result = (arg1)->add_layer(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj((new cmf::upslope::SoilLayer::ptr(static_cast< const cmf::upslope::SoilLayer::ptr& >(result))), SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Cell_add_layer(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[5] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"Cell_add_layer",0,4,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__upslope__Cell, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_double(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if ((argc >= 3) && (argc <= 4)) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__upslope__Cell, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_double(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_cmf__upslope__RetentionCurve, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (argc > 3) { + { + { + int res = SWIG_AsVal_double(argv[3], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + } + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_Cell_add_layer__SWIG_1(self, argc, argv); + case 2: + return _wrap_Cell_add_layer__SWIG_0(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'Cell_add_layer'.\n" + " Possible C/C++ prototypes are:\n" + " cmf::upslope::Cell::add_layer(real,cmf::upslope::RetentionCurve const &,real)\n" + " cmf::upslope::Cell::add_layer(real)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_Cell_remove_last_layer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_remove_last_layer" "', argument " "1"" of type '" "cmf::upslope::Cell *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); + { + try { + (arg1)->remove_last_layer(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Cell_remove_layers(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_remove_layers" "', argument " "1"" of type '" "cmf::upslope::Cell *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); + { + try { + (arg1)->remove_layers(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_Cell(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Cell, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Cell" "', argument " "1"" of type '" "cmf::upslope::Cell *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); + { + try { + delete arg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_Cell(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + double arg1 ; + double arg2 ; + double arg3 ; + double arg4 ; + cmf::project *arg5 = 0 ; + double val1 ; + int ecode1 = 0 ; + double val2 ; + int ecode2 = 0 ; + double val3 ; + int ecode3 = 0 ; + double val4 ; + int ecode4 = 0 ; + void *argp5 = 0 ; + int res5 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + char * kwnames[] = { + (char *) "x",(char *) "y",(char *) "z",(char *) "area",(char *) "_project", NULL + }; + cmf::upslope::Cell *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOO:new_Cell",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; + ecode1 = SWIG_AsVal_double(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Cell" "', argument " "1"" of type '" "double""'"); + } + arg1 = static_cast< double >(val1); + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Cell" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + ecode3 = SWIG_AsVal_double(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Cell" "', argument " "3"" of type '" "double""'"); + } + arg3 = static_cast< double >(val3); + ecode4 = SWIG_AsVal_double(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_Cell" "', argument " "4"" of type '" "double""'"); + } + arg4 = static_cast< double >(val4); + res5 = SWIG_ConvertPtr(obj4, &argp5, SWIGTYPE_p_cmf__project, 0 ); + if (!SWIG_IsOK(res5)) { + SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_Cell" "', argument " "5"" of type '" "cmf::project &""'"); + } + if (!argp5) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Cell" "', argument " "5"" of type '" "cmf::project &""'"); + } + arg5 = reinterpret_cast< cmf::project * >(argp5); + { + try { + result = (cmf::upslope::Cell *)new cmf::upslope::Cell(arg1,arg2,arg3,arg4,*arg5); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__Cell, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Cell_to_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::string result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_to_string" "', argument " "1"" of type '" "cmf::upslope::Cell const *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); + { + try { + result = ((cmf::upslope::Cell const *)arg1)->to_string(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Cell_topology_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::upslope::Topology *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_topology_get" "', argument " "1"" of type '" "cmf::upslope::Cell *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); + { + try { + result = (cmf::upslope::Topology *)cmf_upslope_Cell_topology_get(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__Topology, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Cell_meteorology_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; + cmf::atmosphere::Meteorology *arg2 = (cmf::atmosphere::Meteorology *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"Cell_meteorology_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_meteorology_set" "', argument " "1"" of type '" "cmf::upslope::Cell *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_cmf__atmosphere__Meteorology, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Cell_meteorology_set" "', argument " "2"" of type '" "cmf::atmosphere::Meteorology *""'"); + } + arg2 = reinterpret_cast< cmf::atmosphere::Meteorology * >(argp2); + { + try { + cmf_upslope_Cell_meteorology_set(arg1,arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Cell_meteorology_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::atmosphere::Meteorology *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_meteorology_get" "', argument " "1"" of type '" "cmf::upslope::Cell *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); + { + try { + result = (cmf::atmosphere::Meteorology *)cmf_upslope_Cell_meteorology_get(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__atmosphere__Meteorology, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Cell_layers_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::upslope::layer_list *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_layers_get" "', argument " "1"" of type '" "cmf::upslope::Cell *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); + { + try { + result = (cmf::upslope::layer_list *)cmf_upslope_Cell_layers_get(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__layer_list, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Cell_project_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::project *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_project_get" "', argument " "1"" of type '" "cmf::upslope::Cell *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); + { + try { + result = (cmf::project *)cmf_upslope_Cell_project_get(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__project, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Cell_saturated_depth_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"Cell_saturated_depth_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_saturated_depth_set" "', argument " "1"" of type '" "cmf::upslope::Cell *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Cell_saturated_depth_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + { + try { + cmf_upslope_Cell_saturated_depth_set(arg1,arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Cell_saturated_depth_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_saturated_depth_get" "', argument " "1"" of type '" "cmf::upslope::Cell *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); + { + try { + result = (real)cmf_upslope_Cell_saturated_depth_get(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Cell_area_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_area_get" "', argument " "1"" of type '" "cmf::upslope::Cell *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); + { + try { + result = (real)cmf_upslope_Cell_area_get(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Cell_soildepth_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_soildepth_get" "', argument " "1"" of type '" "cmf::upslope::Cell *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); + { + try { + result = (real)cmf_upslope_Cell_soildepth_get(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *Cell_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__Cell, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *Cell_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_Topology_cell_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::Topology *arg1 = (cmf::upslope::Topology *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::upslope::Cell *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Topology, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Topology_cell_get" "', argument " "1"" of type '" "cmf::upslope::Topology *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Topology * >(argp1); + result = (cmf::upslope::Cell *)(cmf::upslope::Cell *) ((arg1)->cell); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Topology_x_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::Topology *arg1 = (cmf::upslope::Topology *) 0 ; + double *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"Topology_x_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Topology, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Topology_x_set" "', argument " "1"" of type '" "cmf::upslope::Topology *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Topology * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_double, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Topology_x_set" "', argument " "2"" of type '" "double &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Topology_x_set" "', argument " "2"" of type '" "double &""'"); + } + arg2 = reinterpret_cast< double * >(argp2); + if (arg1) (arg1)->x = *arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Topology_x_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::Topology *arg1 = (cmf::upslope::Topology *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Topology, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Topology_x_get" "', argument " "1"" of type '" "cmf::upslope::Topology *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Topology * >(argp1); + result = (double *) &(double &) ((arg1)->x); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Topology_y_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::Topology *arg1 = (cmf::upslope::Topology *) 0 ; + double *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"Topology_y_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Topology, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Topology_y_set" "', argument " "1"" of type '" "cmf::upslope::Topology *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Topology * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_double, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Topology_y_set" "', argument " "2"" of type '" "double &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Topology_y_set" "', argument " "2"" of type '" "double &""'"); + } + arg2 = reinterpret_cast< double * >(argp2); + if (arg1) (arg1)->y = *arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Topology_y_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::Topology *arg1 = (cmf::upslope::Topology *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Topology, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Topology_y_get" "', argument " "1"" of type '" "cmf::upslope::Topology *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Topology * >(argp1); + result = (double *) &(double &) ((arg1)->y); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Topology_z_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::Topology *arg1 = (cmf::upslope::Topology *) 0 ; + double *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"Topology_z_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Topology, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Topology_z_set" "', argument " "1"" of type '" "cmf::upslope::Topology *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Topology * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_double, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Topology_z_set" "', argument " "2"" of type '" "double &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Topology_z_set" "', argument " "2"" of type '" "double &""'"); + } + arg2 = reinterpret_cast< double * >(argp2); + if (arg1) (arg1)->z = *arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Topology_z_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::Topology *arg1 = (cmf::upslope::Topology *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Topology, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Topology_z_get" "', argument " "1"" of type '" "cmf::upslope::Topology *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Topology * >(argp1); + result = (double *) &(double &) ((arg1)->z); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Topology_get_position(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::Topology *arg1 = (cmf::upslope::Topology *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::geometry::point result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Topology, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Topology_get_position" "', argument " "1"" of type '" "cmf::upslope::Topology const *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Topology * >(argp1); + { + try { + result = ((cmf::upslope::Topology const *)arg1)->get_position(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj((new cmf::geometry::point(static_cast< const cmf::geometry::point& >(result))), SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Topology_flowwidth__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::upslope::Topology *arg1 = (cmf::upslope::Topology *) 0 ; + cmf::upslope::Cell *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + double result; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Topology, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Topology_flowwidth" "', argument " "1"" of type '" "cmf::upslope::Topology *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Topology * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_cmf__upslope__Cell, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Topology_flowwidth" "', argument " "2"" of type '" "cmf::upslope::Cell &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Topology_flowwidth" "', argument " "2"" of type '" "cmf::upslope::Cell &""'"); + } + arg2 = reinterpret_cast< cmf::upslope::Cell * >(argp2); + { + try { + result = (double)(arg1)->flowwidth(*arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Topology_flowwidth__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::upslope::Topology *arg1 = (cmf::upslope::Topology *) 0 ; + cmf::upslope::Topology *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + double result; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Topology, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Topology_flowwidth" "', argument " "1"" of type '" "cmf::upslope::Topology *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Topology * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_cmf__upslope__Topology, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Topology_flowwidth" "', argument " "2"" of type '" "cmf::upslope::Topology &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Topology_flowwidth" "', argument " "2"" of type '" "cmf::upslope::Topology &""'"); + } + arg2 = reinterpret_cast< cmf::upslope::Topology * >(argp2); + { + try { + result = (double)(arg1)->flowwidth(*arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Topology_flowwidth(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"Topology_flowwidth",0,2,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__upslope__Topology, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_cmf__upslope__Cell, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__upslope__Topology, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_cmf__upslope__Topology, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_Topology_flowwidth__SWIG_0(self, argc, argv); + case 2: + return _wrap_Topology_flowwidth__SWIG_1(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'Topology_flowwidth'.\n" + " Possible C/C++ prototypes are:\n" + " cmf::upslope::Topology::flowwidth(cmf::upslope::Cell &)\n" + " cmf::upslope::Topology::flowwidth(cmf::upslope::Topology &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_Topology_AddNeighbor__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::upslope::Topology *arg1 = (cmf::upslope::Topology *) 0 ; + cmf::upslope::Cell *arg2 = 0 ; + double arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + double val3 ; + int ecode3 = 0 ; + + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Topology, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Topology_AddNeighbor" "', argument " "1"" of type '" "cmf::upslope::Topology *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Topology * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_cmf__upslope__Cell, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Topology_AddNeighbor" "', argument " "2"" of type '" "cmf::upslope::Cell &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Topology_AddNeighbor" "', argument " "2"" of type '" "cmf::upslope::Cell &""'"); + } + arg2 = reinterpret_cast< cmf::upslope::Cell * >(argp2); + ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Topology_AddNeighbor" "', argument " "3"" of type '" "double""'"); + } + arg3 = static_cast< double >(val3); + { + try { + (arg1)->AddNeighbor(*arg2,arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Topology_AddNeighbor__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::upslope::Topology *arg1 = (cmf::upslope::Topology *) 0 ; + cmf::upslope::Topology *arg2 = 0 ; + double arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + double val3 ; + int ecode3 = 0 ; + + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Topology, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Topology_AddNeighbor" "', argument " "1"" of type '" "cmf::upslope::Topology *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Topology * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_cmf__upslope__Topology, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Topology_AddNeighbor" "', argument " "2"" of type '" "cmf::upslope::Topology &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Topology_AddNeighbor" "', argument " "2"" of type '" "cmf::upslope::Topology &""'"); + } + arg2 = reinterpret_cast< cmf::upslope::Topology * >(argp2); + ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Topology_AddNeighbor" "', argument " "3"" of type '" "double""'"); + } + arg3 = static_cast< double >(val3); + { + try { + (arg1)->AddNeighbor(*arg2,arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Topology_AddNeighbor(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[4] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"Topology_AddNeighbor",0,3,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__upslope__Topology, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_cmf__upslope__Cell, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_double(argv[2], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__upslope__Topology, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_cmf__upslope__Topology, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_double(argv[2], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_Topology_AddNeighbor__SWIG_0(self, argc, argv); + case 2: + return _wrap_Topology_AddNeighbor__SWIG_1(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'Topology_AddNeighbor'.\n" + " Possible C/C++ prototypes are:\n" + " cmf::upslope::Topology::AddNeighbor(cmf::upslope::Cell &,double)\n" + " cmf::upslope::Topology::AddNeighbor(cmf::upslope::Topology &,double)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_Topology_RemoveNeighbor(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::Topology *arg1 = (cmf::upslope::Topology *) 0 ; + cmf::upslope::Topology *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "target", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Topology_RemoveNeighbor",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__Topology, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Topology_RemoveNeighbor" "', argument " "1"" of type '" "cmf::upslope::Topology *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Topology * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_cmf__upslope__Topology, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Topology_RemoveNeighbor" "', argument " "2"" of type '" "cmf::upslope::Topology &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Topology_RemoveNeighbor" "', argument " "2"" of type '" "cmf::upslope::Topology &""'"); + } + arg2 = reinterpret_cast< cmf::upslope::Topology * >(argp2); + { + try { + (arg1)->RemoveNeighbor(*arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Topology_neighbor_count(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::Topology *arg1 = (cmf::upslope::Topology *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + size_t result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Topology, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Topology_neighbor_count" "', argument " "1"" of type '" "cmf::upslope::Topology const *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Topology * >(argp1); + { + try { + result = ((cmf::upslope::Topology const *)arg1)->neighbor_count(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Topology_MainOutlet(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::Topology *arg1 = (cmf::upslope::Topology *) 0 ; + bool arg2 = (bool) false ; + void *argp1 = 0 ; + int res1 = 0 ; + bool val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "forceRecalc", NULL + }; + cmf::upslope::Cell *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Topology_MainOutlet",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__Topology, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Topology_MainOutlet" "', argument " "1"" of type '" "cmf::upslope::Topology *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Topology * >(argp1); + if (obj1) { + ecode2 = SWIG_AsVal_bool(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Topology_MainOutlet" "', argument " "2"" of type '" "bool""'"); + } + arg2 = static_cast< bool >(val2); + } + { + try { + result = (cmf::upslope::Cell *)(arg1)->MainOutlet(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Topology_ContributingArea(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::Topology *arg1 = (cmf::upslope::Topology *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Topology, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Topology_ContributingArea" "', argument " "1"" of type '" "cmf::upslope::Topology const *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Topology * >(argp1); + { + try { + result = (double)((cmf::upslope::Topology const *)arg1)->ContributingArea(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Topology_calculate_contributing_area(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::cell_vector *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + char * kwnames[] = { + (char *) "arg1", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:Topology_calculate_contributing_area",kwnames,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_cmf__upslope__cell_vector, 0 | 0); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Topology_calculate_contributing_area" "', argument " "1"" of type '" "cmf::upslope::cell_vector const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Topology_calculate_contributing_area" "', argument " "1"" of type '" "cmf::upslope::cell_vector const &""'"); + } + arg1 = reinterpret_cast< cmf::upslope::cell_vector * >(argp1); + { + try { + cmf::upslope::Topology::calculate_contributing_area((cmf::upslope::cell_vector const &)*arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Topology___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::Topology *arg1 = (cmf::upslope::Topology *) 0 ; + cmf::upslope::Topology *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "cmp", NULL + }; + bool result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Topology___eq__",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__Topology, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Topology___eq__" "', argument " "1"" of type '" "cmf::upslope::Topology *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Topology * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_cmf__upslope__Topology, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Topology___eq__" "', argument " "2"" of type '" "cmf::upslope::Topology const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Topology___eq__" "', argument " "2"" of type '" "cmf::upslope::Topology const &""'"); + } + arg2 = reinterpret_cast< cmf::upslope::Topology * >(argp2); + { + try { + result = (bool)(arg1)->operator ==((cmf::upslope::Topology const &)*arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_Topology(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::Topology *arg1 = (cmf::upslope::Topology *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__Topology, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Topology" "', argument " "1"" of type '" "cmf::upslope::Topology *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Topology * >(argp1); + { + try { + delete arg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *Topology_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__Topology, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_neighbor_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::Cell *arg1 = (cmf::upslope::Cell *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + char * kwnames[] = { + (char *) "cell", NULL + }; + cmf::upslope::neighbor_iterator *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:new_neighbor_iterator",kwnames,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_neighbor_iterator" "', argument " "1"" of type '" "cmf::upslope::Cell *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); + { + try { + result = (cmf::upslope::neighbor_iterator *)new cmf::upslope::neighbor_iterator(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__neighbor_iterator, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_neighbor_iterator_cell(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::neighbor_iterator *arg1 = (cmf::upslope::neighbor_iterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::upslope::Cell *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__neighbor_iterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "neighbor_iterator_cell" "', argument " "1"" of type '" "cmf::upslope::neighbor_iterator *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::neighbor_iterator * >(argp1); + { + try { + result = (cmf::upslope::Cell *) &(arg1)->cell(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_neighbor_iterator_flowwidth(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::neighbor_iterator *arg1 = (cmf::upslope::neighbor_iterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__neighbor_iterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "neighbor_iterator_flowwidth" "', argument " "1"" of type '" "cmf::upslope::neighbor_iterator *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::neighbor_iterator * >(argp1); + { + try { + result = (double)(arg1)->flowwidth(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_neighbor_iterator_valid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::neighbor_iterator *arg1 = (cmf::upslope::neighbor_iterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + bool result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__neighbor_iterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "neighbor_iterator_valid" "', argument " "1"" of type '" "cmf::upslope::neighbor_iterator const *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::neighbor_iterator * >(argp1); + { + try { + result = (bool)((cmf::upslope::neighbor_iterator const *)arg1)->valid(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_neighbor_iterator_next(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::neighbor_iterator *arg1 = (cmf::upslope::neighbor_iterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::upslope::neighbor_iterator *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__neighbor_iterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "neighbor_iterator_next" "', argument " "1"" of type '" "cmf::upslope::neighbor_iterator *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::neighbor_iterator * >(argp1); + { + try { + result = (cmf::upslope::neighbor_iterator *) &(arg1)->next(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__neighbor_iterator, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_neighbor_iterator___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::neighbor_iterator *arg1 = (cmf::upslope::neighbor_iterator *) 0 ; + cmf::upslope::neighbor_iterator *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "cmp", NULL + }; + bool result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:neighbor_iterator___eq__",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__neighbor_iterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "neighbor_iterator___eq__" "', argument " "1"" of type '" "cmf::upslope::neighbor_iterator *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::neighbor_iterator * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_cmf__upslope__neighbor_iterator, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "neighbor_iterator___eq__" "', argument " "2"" of type '" "cmf::upslope::neighbor_iterator const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "neighbor_iterator___eq__" "', argument " "2"" of type '" "cmf::upslope::neighbor_iterator const &""'"); + } + arg2 = reinterpret_cast< cmf::upslope::neighbor_iterator * >(argp2); + { + try { + result = (bool)cmf_upslope_neighbor_iterator___eq__(arg1,(cmf::upslope::neighbor_iterator const &)*arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_neighbor_iterator___neq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::neighbor_iterator *arg1 = (cmf::upslope::neighbor_iterator *) 0 ; + cmf::upslope::neighbor_iterator *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "cmp", NULL + }; + bool result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:neighbor_iterator___neq__",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__neighbor_iterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "neighbor_iterator___neq__" "', argument " "1"" of type '" "cmf::upslope::neighbor_iterator *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::neighbor_iterator * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_cmf__upslope__neighbor_iterator, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "neighbor_iterator___neq__" "', argument " "2"" of type '" "cmf::upslope::neighbor_iterator const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "neighbor_iterator___neq__" "', argument " "2"" of type '" "cmf::upslope::neighbor_iterator const &""'"); + } + arg2 = reinterpret_cast< cmf::upslope::neighbor_iterator * >(argp2); + { + try { + result = (bool)cmf_upslope_neighbor_iterator___neq__(arg1,(cmf::upslope::neighbor_iterator const &)*arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_neighbor_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::neighbor_iterator *arg1 = (cmf::upslope::neighbor_iterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__neighbor_iterator, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_neighbor_iterator" "', argument " "1"" of type '" "cmf::upslope::neighbor_iterator *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::neighbor_iterator * >(argp1); + { + try { + delete arg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *neighbor_iterator_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__neighbor_iterator, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *neighbor_iterator_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_cell_vector___getitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::upslope::cell_vector *arg1 = (cmf::upslope::cell_vector *) 0 ; + ptrdiff_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + cmf::upslope::Cell *result = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__cell_vector, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cell_vector___getitem__" "', argument " "1"" of type '" "cmf::upslope::cell_vector const *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::cell_vector * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cell_vector___getitem__" "', argument " "2"" of type '" "ptrdiff_t""'"); + } + arg2 = static_cast< ptrdiff_t >(val2); + { + try { + result = (cmf::upslope::Cell *) &((cmf::upslope::cell_vector const *)arg1)->operator [](arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_cell_vector__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) { + PyObject *resultobj = 0; + cmf::upslope::cell_vector *result = 0 ; + + if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; + { + try { + result = (cmf::upslope::cell_vector *)new cmf::upslope::cell_vector(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__cell_vector, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_cell_vector__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::upslope::cell_vector *arg1 = 0 ; + cmf::upslope::cell_vector temp_list1 ; + cmf::upslope::cell_vector *result = 0 ; + + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + { + if (SWIG_ConvertPtr(swig_obj[0], (void **) &arg1, SWIGTYPE_p_cmf__upslope__cell_vector, SWIG_POINTER_EXCEPTION) == -1) { + int res = iterable_to_list(swig_obj[0],SWIGTYPE_p_cmf__upslope__Cell, temp_list1); + if (SWIG_IsOK(res)) { + arg1 = &temp_list1; + } else { + SWIG_exception_fail(SWIG_TypeError,"Only iterables can be converted to cmf::upslope::cell_vector"); + } + } + } + { + try { + result = (cmf::upslope::cell_vector *)new cmf::upslope::cell_vector((cmf::upslope::cell_vector const &)*arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__cell_vector, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_cell_vector(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[2] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"new_cell_vector",0,1,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 0) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + if (argc == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + { + _v = is_listtype_or_iterable(argv[0],SWIGTYPE_p_cmf__upslope__cell_vector); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_new_cell_vector__SWIG_0(self, argc, argv); + case 2: + return _wrap_new_cell_vector__SWIG_1(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_cell_vector'.\n" + " Possible C/C++ prototypes are:\n" + " cmf::upslope::cell_vector::cell_vector()\n" + " cmf::upslope::cell_vector::cell_vector(cmf::upslope::cell_vector const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_cell_vector___getitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::upslope::cell_vector *arg1 = (cmf::upslope::cell_vector *) 0 ; + ptrdiff_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + cmf::upslope::Cell *result = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__cell_vector, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cell_vector___getitem__" "', argument " "1"" of type '" "cmf::upslope::cell_vector *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::cell_vector * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cell_vector___getitem__" "', argument " "2"" of type '" "ptrdiff_t""'"); + } + arg2 = static_cast< ptrdiff_t >(val2); + { + try { + result = (cmf::upslope::Cell *) &(arg1)->operator [](arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cell_vector___getitem__(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"cell_vector___getitem__",0,2,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__upslope__cell_vector, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__upslope__cell_vector, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_cell_vector___getitem____SWIG_1(self, argc, argv); + case 2: + return _wrap_cell_vector___getitem____SWIG_0(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'cell_vector___getitem__'.\n" + " Possible C/C++ prototypes are:\n" + " cmf::upslope::cell_vector::operator [](ptrdiff_t) const\n" + " cmf::upslope::cell_vector::operator [](ptrdiff_t)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_cell_vector_append(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::cell_vector *arg1 = (cmf::upslope::cell_vector *) 0 ; + cmf::upslope::Cell *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "cell", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:cell_vector_append",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__cell_vector, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cell_vector_append" "', argument " "1"" of type '" "cmf::upslope::cell_vector *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::cell_vector * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_cmf__upslope__Cell, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cell_vector_append" "', argument " "2"" of type '" "cmf::upslope::Cell &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "cell_vector_append" "', argument " "2"" of type '" "cmf::upslope::Cell &""'"); + } + arg2 = reinterpret_cast< cmf::upslope::Cell * >(argp2); + { + try { + (arg1)->append(*arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cell_vector_remove__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::upslope::cell_vector *arg1 = (cmf::upslope::cell_vector *) 0 ; + ptrdiff_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__cell_vector, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cell_vector_remove" "', argument " "1"" of type '" "cmf::upslope::cell_vector *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::cell_vector * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cell_vector_remove" "', argument " "2"" of type '" "ptrdiff_t""'"); + } + arg2 = static_cast< ptrdiff_t >(val2); + { + try { + (arg1)->remove(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cell_vector_remove__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::upslope::cell_vector *arg1 = (cmf::upslope::cell_vector *) 0 ; + cmf::upslope::Cell *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__cell_vector, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cell_vector_remove" "', argument " "1"" of type '" "cmf::upslope::cell_vector *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::cell_vector * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_cmf__upslope__Cell, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cell_vector_remove" "', argument " "2"" of type '" "cmf::upslope::Cell const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "cell_vector_remove" "', argument " "2"" of type '" "cmf::upslope::Cell const &""'"); + } + arg2 = reinterpret_cast< cmf::upslope::Cell * >(argp2); + { + try { + (arg1)->remove((cmf::upslope::Cell const &)*arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cell_vector_remove(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"cell_vector_remove",0,2,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__upslope__cell_vector, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_cmf__upslope__Cell, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__upslope__cell_vector, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_cell_vector_remove__SWIG_1(self, argc, argv); + case 2: + return _wrap_cell_vector_remove__SWIG_0(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'cell_vector_remove'.\n" + " Possible C/C++ prototypes are:\n" + " cmf::upslope::cell_vector::remove(ptrdiff_t)\n" + " cmf::upslope::cell_vector::remove(cmf::upslope::Cell const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_cell_vector_pop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::cell_vector *arg1 = (cmf::upslope::cell_vector *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::upslope::Cell *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__cell_vector, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cell_vector_pop" "', argument " "1"" of type '" "cmf::upslope::cell_vector *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::cell_vector * >(argp1); + { + try { + result = (cmf::upslope::Cell *) &(arg1)->pop(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cell_vector___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::cell_vector *arg1 = (cmf::upslope::cell_vector *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + size_t result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__cell_vector, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cell_vector___len__" "', argument " "1"" of type '" "cmf::upslope::cell_vector const *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::cell_vector * >(argp1); + { + try { + result = ((cmf::upslope::cell_vector const *)arg1)->size(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cell_vector___getslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::cell_vector *arg1 = (cmf::upslope::cell_vector *) 0 ; + ptrdiff_t arg2 ; + ptrdiff_t arg3 ; + ptrdiff_t arg4 = (ptrdiff_t) 1 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + ptrdiff_t val3 ; + int ecode3 = 0 ; + ptrdiff_t val4 ; + int ecode4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "start",(char *) "end",(char *) "step", NULL + }; + cmf::upslope::cell_vector result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|O:cell_vector___getslice__",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__cell_vector, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cell_vector___getslice__" "', argument " "1"" of type '" "cmf::upslope::cell_vector *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::cell_vector * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cell_vector___getslice__" "', argument " "2"" of type '" "ptrdiff_t""'"); + } + arg2 = static_cast< ptrdiff_t >(val2); + ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cell_vector___getslice__" "', argument " "3"" of type '" "ptrdiff_t""'"); + } + arg3 = static_cast< ptrdiff_t >(val3); + if (obj3) { + ecode4 = SWIG_AsVal_ptrdiff_t(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "cell_vector___getslice__" "', argument " "4"" of type '" "ptrdiff_t""'"); + } + arg4 = static_cast< ptrdiff_t >(val4); + } + { + try { + result = (arg1)->get_slice(arg2,arg3,arg4); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj((new cmf::upslope::cell_vector(static_cast< const cmf::upslope::cell_vector& >(result))), SWIGTYPE_p_cmf__upslope__cell_vector, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cell_vector_get_area(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::cell_vector *arg1 = (cmf::upslope::cell_vector *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__cell_vector, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cell_vector_get_area" "', argument " "1"" of type '" "cmf::upslope::cell_vector const *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::cell_vector * >(argp1); + { + try { + result = (double)((cmf::upslope::cell_vector const *)arg1)->get_area(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cell_vector___contains__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::cell_vector *arg1 = (cmf::upslope::cell_vector *) 0 ; + cmf::upslope::Cell *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "cell", NULL + }; + bool result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:cell_vector___contains__",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__cell_vector, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cell_vector___contains__" "', argument " "1"" of type '" "cmf::upslope::cell_vector const *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::cell_vector * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_cmf__upslope__Cell, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cell_vector___contains__" "', argument " "2"" of type '" "cmf::upslope::Cell const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "cell_vector___contains__" "', argument " "2"" of type '" "cmf::upslope::Cell const &""'"); + } + arg2 = reinterpret_cast< cmf::upslope::Cell * >(argp2); + { + try { + result = (bool)((cmf::upslope::cell_vector const *)arg1)->contains((cmf::upslope::Cell const &)*arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_cell_vector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::cell_vector *arg1 = (cmf::upslope::cell_vector *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__cell_vector, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_cell_vector" "', argument " "1"" of type '" "cmf::upslope::cell_vector *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::cell_vector * >(argp1); + { + try { + delete arg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cell_vector_lowest_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::cell_vector *arg1 = (cmf::upslope::cell_vector *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::upslope::Cell *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__cell_vector, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cell_vector_lowest_get" "', argument " "1"" of type '" "cmf::upslope::cell_vector *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::cell_vector * >(argp1); + { + try { + result = (cmf::upslope::Cell *)cmf_upslope_cell_vector_lowest_get(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cell_vector_highest_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::cell_vector *arg1 = (cmf::upslope::cell_vector *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::upslope::Cell *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__cell_vector, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cell_vector_highest_get" "', argument " "1"" of type '" "cmf::upslope::cell_vector *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::cell_vector * >(argp1); + { + try { + result = (cmf::upslope::Cell *)cmf_upslope_cell_vector_highest_get(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *cell_vector_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__cell_vector, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *cell_vector_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_find_cell(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::cell_vector *arg1 = 0 ; + cmf::geometry::point arg2 ; + double arg3 = (double) 1e20 ; + cmf::upslope::cell_vector temp_list1 ; + double val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "arg1",(char *) "p",(char *) "max_dist", NULL + }; + cmf::upslope::Cell *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:find_cell",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + { + if (SWIG_ConvertPtr(obj0, (void **) &arg1, SWIGTYPE_p_cmf__upslope__cell_vector, SWIG_POINTER_EXCEPTION) == -1) { + int res = iterable_to_list(obj0,SWIGTYPE_p_cmf__upslope__Cell, temp_list1); + if (SWIG_IsOK(res)) { + arg1 = &temp_list1; + } else { + SWIG_exception_fail(SWIG_TypeError,"Only iterables can be converted to cmf::upslope::cell_vector"); + } + } + } + { + if (check_xy(obj1)) { + std::string res = convert_xyz_to_point(obj1,arg2); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + return NULL; + } + } + else if (PySequence_Check(obj1)) { + std::string res = convert_seq_to_point(obj1,arg2); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError, res.c_str()); + } + } else { + std::string res="<"; + res+=pyrepr(obj1); + res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + } + } + if (obj2) { + ecode3 = SWIG_AsVal_double(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "find_cell" "', argument " "3"" of type '" "double""'"); + } + arg3 = static_cast< double >(val3); + } + { + try { + result = (cmf::upslope::Cell *)cmf::upslope::find_cell(*arg1,arg2,arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_get_boundary_cells(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::cell_vector *arg1 = 0 ; + cmf::upslope::cell_vector temp_list1 ; + PyObject * obj0 = 0 ; + char * kwnames[] = { + (char *) "cells", NULL + }; + cmf::upslope::cell_vector result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:get_boundary_cells",kwnames,&obj0)) SWIG_fail; + { + if (SWIG_ConvertPtr(obj0, (void **) &arg1, SWIGTYPE_p_cmf__upslope__cell_vector, SWIG_POINTER_EXCEPTION) == -1) { + int res = iterable_to_list(obj0,SWIGTYPE_p_cmf__upslope__Cell, temp_list1); + if (SWIG_IsOK(res)) { + arg1 = &temp_list1; + } else { + SWIG_exception_fail(SWIG_TypeError,"Only iterables can be converted to cmf::upslope::cell_vector"); + } + } + } + { + try { + result = cmf::upslope::get_boundary_cells(*arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj((new cmf::upslope::cell_vector(static_cast< const cmf::upslope::cell_vector& >(result))), SWIGTYPE_p_cmf__upslope__cell_vector, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_get_connections(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::cell_vector *arg1 = 0 ; + cmf::upslope::cell_vector temp_list1 ; + PyObject * obj0 = 0 ; + char * kwnames[] = { + (char *) "cells", NULL + }; + cmf::water::connection_list result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:get_connections",kwnames,&obj0)) SWIG_fail; + { + if (SWIG_ConvertPtr(obj0, (void **) &arg1, SWIGTYPE_p_cmf__upslope__cell_vector, SWIG_POINTER_EXCEPTION) == -1) { + int res = iterable_to_list(obj0,SWIGTYPE_p_cmf__upslope__Cell, temp_list1); + if (SWIG_IsOK(res)) { + arg1 = &temp_list1; + } else { + SWIG_exception_fail(SWIG_TypeError,"Only iterables can be converted to cmf::upslope::cell_vector"); + } + } + } + { + try { + result = cmf::upslope::get_connections(*arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj((new cmf::water::connection_list(static_cast< const cmf::water::connection_list& >(result))), SWIGTYPE_p_cmf__water__connection_list, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_connect_cells_with_flux(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::cell_vector *arg1 = 0 ; + cmf::upslope::CellConnector *arg2 = 0 ; + int arg3 = (int) 0 ; + cmf::upslope::cell_vector temp_list1 ; + void *argp2 = 0 ; + int res2 = 0 ; + int val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "cells",(char *) "connect",(char *) "start_at_layer", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:connect_cells_with_flux",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + { + if (SWIG_ConvertPtr(obj0, (void **) &arg1, SWIGTYPE_p_cmf__upslope__cell_vector, SWIG_POINTER_EXCEPTION) == -1) { + int res = iterable_to_list(obj0,SWIGTYPE_p_cmf__upslope__Cell, temp_list1); + if (SWIG_IsOK(res)) { + arg1 = &temp_list1; + } else { + SWIG_exception_fail(SWIG_TypeError,"Only iterables can be converted to cmf::upslope::cell_vector"); + } + } + } + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_cmf__upslope__CellConnector, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "connect_cells_with_flux" "', argument " "2"" of type '" "cmf::upslope::CellConnector const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "connect_cells_with_flux" "', argument " "2"" of type '" "cmf::upslope::CellConnector const &""'"); + } + arg2 = reinterpret_cast< cmf::upslope::CellConnector * >(argp2); + if (obj2) { + ecode3 = SWIG_AsVal_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "connect_cells_with_flux" "', argument " "3"" of type '" "int""'"); + } + arg3 = static_cast< int >(val3); + } + { + try { + cmf::upslope::connect_cells_with_flux(*arg1,(cmf::upslope::CellConnector const &)*arg2,arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_fill_sinks(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::cell_vector *arg1 = 0 ; + double arg2 = (double) 0.001 ; + cmf::upslope::cell_vector temp_list1 ; + double val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "cells",(char *) "min_difference", NULL + }; + int result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:fill_sinks",kwnames,&obj0,&obj1)) SWIG_fail; + { + if (SWIG_ConvertPtr(obj0, (void **) &arg1, SWIGTYPE_p_cmf__upslope__cell_vector, SWIG_POINTER_EXCEPTION) == -1) { + int res = iterable_to_list(obj0,SWIGTYPE_p_cmf__upslope__Cell, temp_list1); + if (SWIG_IsOK(res)) { + arg1 = &temp_list1; + } else { + SWIG_exception_fail(SWIG_TypeError,"Only iterables can be converted to cmf::upslope::cell_vector"); + } + } + } + if (obj1) { + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fill_sinks" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + } + { + try { + result = (int)cmf::upslope::fill_sinks(*arg1,arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_get_area(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::cell_vector *arg1 = 0 ; + cmf::upslope::cell_vector temp_list1 ; + PyObject * obj0 = 0 ; + char * kwnames[] = { + (char *) "cells", NULL + }; + double result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:get_area",kwnames,&obj0)) SWIG_fail; + { + if (SWIG_ConvertPtr(obj0, (void **) &arg1, SWIGTYPE_p_cmf__upslope__cell_vector, SWIG_POINTER_EXCEPTION) == -1) { + int res = iterable_to_list(obj0,SWIGTYPE_p_cmf__upslope__Cell, temp_list1); + if (SWIG_IsOK(res)) { + arg1 = &temp_list1; + } else { + SWIG_exception_fail(SWIG_TypeError,"Only iterables can be converted to cmf::upslope::cell_vector"); + } + } + } + { + try { + result = (double)cmf::upslope::get_area(*arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_get_center(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::cell_vector *arg1 = 0 ; + cmf::upslope::cell_vector temp_list1 ; + PyObject * obj0 = 0 ; + char * kwnames[] = { + (char *) "cells", NULL + }; + cmf::geometry::point result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:get_center",kwnames,&obj0)) SWIG_fail; + { + if (SWIG_ConvertPtr(obj0, (void **) &arg1, SWIGTYPE_p_cmf__upslope__cell_vector, SWIG_POINTER_EXCEPTION) == -1) { + int res = iterable_to_list(obj0,SWIGTYPE_p_cmf__upslope__Cell, temp_list1); + if (SWIG_IsOK(res)) { + arg1 = &temp_list1; + } else { + SWIG_exception_fail(SWIG_TypeError,"Only iterables can be converted to cmf::upslope::cell_vector"); + } + } + } + { + try { + result = cmf::upslope::get_center(*arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj((new cmf::geometry::point(static_cast< const cmf::geometry::point& >(result))), SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cell_positions(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::cell_vector *arg1 = 0 ; + cmf::upslope::cell_vector temp_list1 ; + PyObject * obj0 = 0 ; + char * kwnames[] = { + (char *) "cells", NULL + }; + SwigValueWrapper< cmf::geometry::point_vector > result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:cell_positions",kwnames,&obj0)) SWIG_fail; + { + if (SWIG_ConvertPtr(obj0, (void **) &arg1, SWIGTYPE_p_cmf__upslope__cell_vector, SWIG_POINTER_EXCEPTION) == -1) { + int res = iterable_to_list(obj0,SWIGTYPE_p_cmf__upslope__Cell, temp_list1); + if (SWIG_IsOK(res)) { + arg1 = &temp_list1; + } else { + SWIG_exception_fail(SWIG_TypeError,"Only iterables can be converted to cmf::upslope::cell_vector"); + } + } + } + { + try { + result = cmf::upslope::cell_positions(*arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj((new cmf::geometry::point_vector(static_cast< const cmf::geometry::point_vector& >(result))), SWIGTYPE_p_cmf__geometry__point_vector, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cell_flux_directions(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::cell_vector *arg1 = 0 ; + cmf::math::Time arg2 ; + cmf::upslope::cell_vector temp_list1 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "cells",(char *) "arg2", NULL + }; + SwigValueWrapper< cmf::geometry::point_vector > result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:cell_flux_directions",kwnames,&obj0,&obj1)) SWIG_fail; + { + if (SWIG_ConvertPtr(obj0, (void **) &arg1, SWIGTYPE_p_cmf__upslope__cell_vector, SWIG_POINTER_EXCEPTION) == -1) { + int res = iterable_to_list(obj0,SWIGTYPE_p_cmf__upslope__Cell, temp_list1); + if (SWIG_IsOK(res)) { + arg1 = &temp_list1; + } else { + SWIG_exception_fail(SWIG_TypeError,"Only iterables can be converted to cmf::upslope::cell_vector"); + } + } + } + { + arg2 = convert_datetime_to_cmftime(obj1); + if (arg2 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } + } + { + try { + result = cmf::upslope::cell_flux_directions(*arg1,arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj((new cmf::geometry::point_vector(static_cast< const cmf::geometry::point_vector& >(result))), SWIGTYPE_p_cmf__geometry__point_vector, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cell2cellflux(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::Cell *arg1 = 0 ; + cmf::upslope::Cell *arg2 = 0 ; + cmf::math::Time arg3 ; + bool arg4 = (bool) false ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + bool val4 ; + int ecode4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + char * kwnames[] = { + (char *) "source",(char *) "target",(char *) "t",(char *) "subsurface_only", NULL + }; + cmf::math::num_array result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|O:cell2cellflux",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_cmf__upslope__Cell, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cell2cellflux" "', argument " "1"" of type '" "cmf::upslope::Cell &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "cell2cellflux" "', argument " "1"" of type '" "cmf::upslope::Cell &""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_cmf__upslope__Cell, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cell2cellflux" "', argument " "2"" of type '" "cmf::upslope::Cell &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "cell2cellflux" "', argument " "2"" of type '" "cmf::upslope::Cell &""'"); + } + arg2 = reinterpret_cast< cmf::upslope::Cell * >(argp2); + { + arg3 = convert_datetime_to_cmftime(obj2); + if (arg3 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } + } + if (obj3) { + ecode4 = SWIG_AsVal_bool(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "cell2cellflux" "', argument " "4"" of type '" "bool""'"); + } + arg4 = static_cast< bool >(val4); + } + { + try { + result = cmf::upslope::cell2cellflux(*arg1,*arg2,arg3,arg4); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + resultobj = as_npy_array(result); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cell_distance(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::Cell *arg1 = 0 ; + cmf::upslope::Cell *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "c1",(char *) "c2", NULL + }; + double result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:cell_distance",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_cmf__upslope__Cell, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cell_distance" "', argument " "1"" of type '" "cmf::upslope::Cell &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "cell_distance" "', argument " "1"" of type '" "cmf::upslope::Cell &""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_cmf__upslope__Cell, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cell_distance" "', argument " "2"" of type '" "cmf::upslope::Cell &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "cell_distance" "', argument " "2"" of type '" "cmf::upslope::Cell &""'"); + } + arg2 = reinterpret_cast< cmf::upslope::Cell * >(argp2); + { + try { + result = (double)cmf::upslope::cell_distance(*arg1,*arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_subcatchment_pourpoint_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::subcatchment *arg1 = (cmf::upslope::subcatchment *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::upslope::Cell *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__subcatchment, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "subcatchment_pourpoint_get" "', argument " "1"" of type '" "cmf::upslope::subcatchment *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::subcatchment * >(argp1); + result = (cmf::upslope::Cell *) &(cmf::upslope::Cell const &) ((arg1)->pourpoint); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_subcatchment_inflowcells_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::subcatchment *arg1 = (cmf::upslope::subcatchment *) 0 ; + cmf::upslope::cell_vector *arg2 = (cmf::upslope::cell_vector *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"subcatchment_inflowcells_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__subcatchment, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "subcatchment_inflowcells_set" "', argument " "1"" of type '" "cmf::upslope::subcatchment *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::subcatchment * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_cmf__upslope__cell_vector, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "subcatchment_inflowcells_set" "', argument " "2"" of type '" "cmf::upslope::cell_vector *""'"); + } + arg2 = reinterpret_cast< cmf::upslope::cell_vector * >(argp2); + if (arg1) (arg1)->inflowcells = *arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_subcatchment_inflowcells_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::subcatchment *arg1 = (cmf::upslope::subcatchment *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::upslope::cell_vector *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__subcatchment, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "subcatchment_inflowcells_get" "', argument " "1"" of type '" "cmf::upslope::subcatchment *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::subcatchment * >(argp1); + result = (cmf::upslope::cell_vector *)& ((arg1)->inflowcells); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__cell_vector, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_subcatchment_cells_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::subcatchment *arg1 = (cmf::upslope::subcatchment *) 0 ; + cmf::upslope::cell_vector *arg2 = (cmf::upslope::cell_vector *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"subcatchment_cells_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__subcatchment, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "subcatchment_cells_set" "', argument " "1"" of type '" "cmf::upslope::subcatchment *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::subcatchment * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_cmf__upslope__cell_vector, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "subcatchment_cells_set" "', argument " "2"" of type '" "cmf::upslope::cell_vector *""'"); + } + arg2 = reinterpret_cast< cmf::upslope::cell_vector * >(argp2); + if (arg1) (arg1)->cells = *arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_subcatchment_cells_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::subcatchment *arg1 = (cmf::upslope::subcatchment *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::upslope::cell_vector *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__subcatchment, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "subcatchment_cells_get" "', argument " "1"" of type '" "cmf::upslope::subcatchment *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::subcatchment * >(argp1); + result = (cmf::upslope::cell_vector *)& ((arg1)->cells); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__cell_vector, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_subcatchment(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::Cell *arg1 = 0 ; + double arg2 = (double) 1e308 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "pourpoint",(char *) "area_threshold", NULL + }; + cmf::upslope::subcatchment *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:new_subcatchment",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_cmf__upslope__Cell, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_subcatchment" "', argument " "1"" of type '" "cmf::upslope::Cell &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_subcatchment" "', argument " "1"" of type '" "cmf::upslope::Cell &""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); + if (obj1) { + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_subcatchment" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + } + { + try { + result = (cmf::upslope::subcatchment *)new cmf::upslope::subcatchment(*arg1,arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__subcatchment, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_subcatchment(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::subcatchment *arg1 = (cmf::upslope::subcatchment *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__subcatchment, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_subcatchment" "', argument " "1"" of type '" "cmf::upslope::subcatchment *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::subcatchment * >(argp1); + { + try { + delete arg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *subcatchment_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__subcatchment, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *subcatchment_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN int Swig_var_rho_wg_set(PyObject *) { + SWIG_Error(SWIG_AttributeError,"Variable rho_wg is read-only."); + return 1; +} + + +SWIGINTERN PyObject *Swig_var_rho_wg_get(void) { + PyObject *pyobj = 0; + + pyobj = SWIG_From_double(static_cast< double >(cmf::upslope::rho_wg)); + return pyobj; +} + + +SWIGINTERN PyObject *_wrap_pressure_to_waterhead(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + double arg1 ; + double val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + char * kwnames[] = { + (char *) "Pressure", NULL + }; + double result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:pressure_to_waterhead",kwnames,&obj0)) SWIG_fail; + ecode1 = SWIG_AsVal_double(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pressure_to_waterhead" "', argument " "1"" of type '" "double""'"); + } + arg1 = static_cast< double >(val1); + { + try { + result = (double)cmf::upslope::pressure_to_waterhead(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_waterhead_to_pressure(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + double arg1 ; + double val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + char * kwnames[] = { + (char *) "waterhead", NULL + }; + double result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:waterhead_to_pressure",kwnames,&obj0)) SWIG_fail; + ecode1 = SWIG_AsVal_double(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "waterhead_to_pressure" "', argument " "1"" of type '" "double""'"); + } + arg1 = static_cast< double >(val1); + { + try { + result = (double)cmf::upslope::waterhead_to_pressure(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_pF_to_waterhead(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + double arg1 ; + double val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + char * kwnames[] = { + (char *) "pF", NULL + }; + double result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:pF_to_waterhead",kwnames,&obj0)) SWIG_fail; + ecode1 = SWIG_AsVal_double(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pF_to_waterhead" "', argument " "1"" of type '" "double""'"); + } + arg1 = static_cast< double >(val1); + { + try { + result = (double)cmf::upslope::pF_to_waterhead(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_waterhead_to_pF(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + double arg1 ; + double val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + char * kwnames[] = { + (char *) "waterhead", NULL + }; + double result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:waterhead_to_pF",kwnames,&obj0)) SWIG_fail; + ecode1 = SWIG_AsVal_double(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "waterhead_to_pF" "', argument " "1"" of type '" "double""'"); + } + arg1 = static_cast< double >(val1); + { + try { + result = (double)cmf::upslope::waterhead_to_pF(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_RetentionCurve_K__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::upslope::RetentionCurve *arg1 = (cmf::upslope::RetentionCurve *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + real result; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__RetentionCurve, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RetentionCurve_K" "', argument " "1"" of type '" "cmf::upslope::RetentionCurve const *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::RetentionCurve * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RetentionCurve_K" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + { + try { + result = (real)((cmf::upslope::RetentionCurve const *)arg1)->K(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_RetentionCurve_K__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::upslope::RetentionCurve *arg1 = (cmf::upslope::RetentionCurve *) 0 ; + cmf::math::num_array *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + cmf::math::num_array result; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__RetentionCurve, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RetentionCurve_K" "', argument " "1"" of type '" "cmf::upslope::RetentionCurve const *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::RetentionCurve * >(argp1); + { + // Convert a array_wrapper from numpy array + double * data=0; + ptrdiff_t size = from_npy_array(swig_obj[1],&data); + if (!data) { + SWIG_exception_fail(SWIG_TypeError,"Input data is not 'array-like' (in the sense of numpy arrays)"); + return NULL; + } + arg2 = new cmf::math::num_array(size,data); + } + { + try { + result = ((cmf::upslope::RetentionCurve const *)arg1)->K((cmf::math::num_array const &)*arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + resultobj = as_npy_array(result); + } + { + delete arg2; + } + return resultobj; +fail: + { + delete arg2; + } + return NULL; +} + + +SWIGINTERN PyObject *_wrap_RetentionCurve_K(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"RetentionCurve_K",0,2,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__upslope__RetentionCurve, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + _v = test_npy_array(argv[1]); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__upslope__RetentionCurve, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_double(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_RetentionCurve_K__SWIG_1(self, argc, argv); + case 2: + return _wrap_RetentionCurve_K__SWIG_0(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'RetentionCurve_K'.\n" + " Possible C/C++ prototypes are:\n" + " cmf::upslope::RetentionCurve::K(real) const\n" + " cmf::upslope::RetentionCurve::K(cmf::math::num_array const &) const\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_RetentionCurve_Wetness_eff(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::RetentionCurve *arg1 = (cmf::upslope::RetentionCurve *) 0 ; + real arg2 ; + real arg3 = (real) 4.2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + double val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "wetness",(char *) "pF_r", NULL + }; + real result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:RetentionCurve_Wetness_eff",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__RetentionCurve, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RetentionCurve_Wetness_eff" "', argument " "1"" of type '" "cmf::upslope::RetentionCurve const *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::RetentionCurve * >(argp1); + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RetentionCurve_Wetness_eff" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (obj2) { + ecode3 = SWIG_AsVal_double(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RetentionCurve_Wetness_eff" "', argument " "3"" of type '" "real""'"); + } + arg3 = static_cast< real >(val3); + } + { + try { + result = (real)((cmf::upslope::RetentionCurve const *)arg1)->Wetness_eff(arg2,arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_RetentionCurve_Porosity(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::RetentionCurve *arg1 = (cmf::upslope::RetentionCurve *) 0 ; + real arg2 = (real) 0.0 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "depth", NULL + }; + real result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:RetentionCurve_Porosity",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__RetentionCurve, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RetentionCurve_Porosity" "', argument " "1"" of type '" "cmf::upslope::RetentionCurve const *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::RetentionCurve * >(argp1); + if (obj1) { + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RetentionCurve_Porosity" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + } + { + try { + result = (real)((cmf::upslope::RetentionCurve const *)arg1)->Porosity(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_RetentionCurve_VoidVolume(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::RetentionCurve *arg1 = (cmf::upslope::RetentionCurve *) 0 ; + real arg2 ; + real arg3 ; + real arg4 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + double val3 ; + int ecode3 = 0 ; + double val4 ; + int ecode4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "upperDepth",(char *) "lowerDepth",(char *) "Area", NULL + }; + real result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO:RetentionCurve_VoidVolume",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__RetentionCurve, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RetentionCurve_VoidVolume" "', argument " "1"" of type '" "cmf::upslope::RetentionCurve const *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::RetentionCurve * >(argp1); + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RetentionCurve_VoidVolume" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + ecode3 = SWIG_AsVal_double(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RetentionCurve_VoidVolume" "', argument " "3"" of type '" "real""'"); + } + arg3 = static_cast< real >(val3); + ecode4 = SWIG_AsVal_double(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "RetentionCurve_VoidVolume" "', argument " "4"" of type '" "real""'"); + } + arg4 = static_cast< real >(val4); + { + try { + result = (real)((cmf::upslope::RetentionCurve const *)arg1)->VoidVolume(arg2,arg3,arg4); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_RetentionCurve_FillHeight(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::RetentionCurve *arg1 = (cmf::upslope::RetentionCurve *) 0 ; + real arg2 ; + real arg3 ; + real arg4 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + double val3 ; + int ecode3 = 0 ; + double val4 ; + int ecode4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "lowerDepth",(char *) "Area",(char *) "Volume", NULL + }; + real result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO:RetentionCurve_FillHeight",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__RetentionCurve, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RetentionCurve_FillHeight" "', argument " "1"" of type '" "cmf::upslope::RetentionCurve const *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::RetentionCurve * >(argp1); + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RetentionCurve_FillHeight" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + ecode3 = SWIG_AsVal_double(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RetentionCurve_FillHeight" "', argument " "3"" of type '" "real""'"); + } + arg3 = static_cast< real >(val3); + ecode4 = SWIG_AsVal_double(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "RetentionCurve_FillHeight" "', argument " "4"" of type '" "real""'"); + } + arg4 = static_cast< real >(val4); + { + try { + result = (real)((cmf::upslope::RetentionCurve const *)arg1)->FillHeight(arg2,arg3,arg4); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_RetentionCurve_Wetness__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::upslope::RetentionCurve *arg1 = (cmf::upslope::RetentionCurve *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + real result; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__RetentionCurve, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RetentionCurve_Wetness" "', argument " "1"" of type '" "cmf::upslope::RetentionCurve const *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::RetentionCurve * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RetentionCurve_Wetness" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + { + try { + result = (real)((cmf::upslope::RetentionCurve const *)arg1)->Wetness(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_RetentionCurve_theta__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::upslope::RetentionCurve *arg1 = (cmf::upslope::RetentionCurve *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + real result; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__RetentionCurve, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RetentionCurve_theta" "', argument " "1"" of type '" "cmf::upslope::RetentionCurve const *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::RetentionCurve * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RetentionCurve_theta" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + { + try { + result = (real)((cmf::upslope::RetentionCurve const *)arg1)->theta(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_RetentionCurve_Diffusivity__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::upslope::RetentionCurve *arg1 = (cmf::upslope::RetentionCurve *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + real result; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__RetentionCurve, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RetentionCurve_Diffusivity" "', argument " "1"" of type '" "cmf::upslope::RetentionCurve const *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::RetentionCurve * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RetentionCurve_Diffusivity" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + { + try { + result = (real)((cmf::upslope::RetentionCurve const *)arg1)->Diffusivity(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_RetentionCurve_Diffusivity__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::upslope::RetentionCurve *arg1 = (cmf::upslope::RetentionCurve *) 0 ; + cmf::math::num_array *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + cmf::math::num_array result; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__RetentionCurve, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RetentionCurve_Diffusivity" "', argument " "1"" of type '" "cmf::upslope::RetentionCurve *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::RetentionCurve * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_cmf__math__num_array, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "RetentionCurve_Diffusivity" "', argument " "2"" of type '" "cmf::math::num_array &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "RetentionCurve_Diffusivity" "', argument " "2"" of type '" "cmf::math::num_array &""'"); + } + arg2 = reinterpret_cast< cmf::math::num_array * >(argp2); + { + try { + result = (arg1)->Diffusivity(*arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + resultobj = as_npy_array(result); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_RetentionCurve_Diffusivity(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"RetentionCurve_Diffusivity",0,2,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__upslope__RetentionCurve, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + _v = test_npy_array(argv[1]); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__upslope__RetentionCurve, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_double(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_RetentionCurve_Diffusivity__SWIG_1(self, argc, argv); + case 2: + return _wrap_RetentionCurve_Diffusivity__SWIG_0(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'RetentionCurve_Diffusivity'.\n" + " Possible C/C++ prototypes are:\n" + " cmf::upslope::RetentionCurve::Diffusivity(real) const\n" + " cmf::upslope::RetentionCurve::Diffusivity(cmf::math::num_array &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_RetentionCurve_Wetness__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::upslope::RetentionCurve *arg1 = (cmf::upslope::RetentionCurve *) 0 ; + cmf::math::num_array *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + cmf::math::num_array result; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__RetentionCurve, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RetentionCurve_Wetness" "', argument " "1"" of type '" "cmf::upslope::RetentionCurve const *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::RetentionCurve * >(argp1); + { + // Convert a array_wrapper from numpy array + double * data=0; + ptrdiff_t size = from_npy_array(swig_obj[1],&data); + if (!data) { + SWIG_exception_fail(SWIG_TypeError,"Input data is not 'array-like' (in the sense of numpy arrays)"); + return NULL; + } + arg2 = new cmf::math::num_array(size,data); + } + { + try { + result = ((cmf::upslope::RetentionCurve const *)arg1)->Wetness((cmf::math::num_array const &)*arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + resultobj = as_npy_array(result); + } + { + delete arg2; + } + return resultobj; +fail: + { + delete arg2; + } + return NULL; +} + + +SWIGINTERN PyObject *_wrap_RetentionCurve_Wetness(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"RetentionCurve_Wetness",0,2,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__upslope__RetentionCurve, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + _v = test_npy_array(argv[1]); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__upslope__RetentionCurve, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_double(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_RetentionCurve_Wetness__SWIG_1(self, argc, argv); + case 2: + return _wrap_RetentionCurve_Wetness__SWIG_0(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'RetentionCurve_Wetness'.\n" + " Possible C/C++ prototypes are:\n" + " cmf::upslope::RetentionCurve::Wetness(real) const\n" + " cmf::upslope::RetentionCurve::Wetness(cmf::math::num_array const &) const\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_RetentionCurve_theta__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::upslope::RetentionCurve *arg1 = (cmf::upslope::RetentionCurve *) 0 ; + cmf::math::num_array *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + cmf::math::num_array result; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__RetentionCurve, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RetentionCurve_theta" "', argument " "1"" of type '" "cmf::upslope::RetentionCurve const *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::RetentionCurve * >(argp1); + { + // Convert a array_wrapper from numpy array + double * data=0; + ptrdiff_t size = from_npy_array(swig_obj[1],&data); + if (!data) { + SWIG_exception_fail(SWIG_TypeError,"Input data is not 'array-like' (in the sense of numpy arrays)"); + return NULL; + } + arg2 = new cmf::math::num_array(size,data); + } + { + try { + result = ((cmf::upslope::RetentionCurve const *)arg1)->theta((cmf::math::num_array const &)*arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + resultobj = as_npy_array(result); + } + { + delete arg2; + } + return resultobj; +fail: + { + delete arg2; + } + return NULL; +} + + +SWIGINTERN PyObject *_wrap_RetentionCurve_theta(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"RetentionCurve_theta",0,2,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__upslope__RetentionCurve, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + _v = test_npy_array(argv[1]); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__upslope__RetentionCurve, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_double(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_RetentionCurve_theta__SWIG_1(self, argc, argv); + case 2: + return _wrap_RetentionCurve_theta__SWIG_0(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'RetentionCurve_theta'.\n" + " Possible C/C++ prototypes are:\n" + " cmf::upslope::RetentionCurve::theta(real) const\n" + " cmf::upslope::RetentionCurve::theta(cmf::math::num_array const &) const\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_RetentionCurve_dPsiM_dW__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::upslope::RetentionCurve *arg1 = (cmf::upslope::RetentionCurve *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + real result; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__RetentionCurve, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RetentionCurve_dPsiM_dW" "', argument " "1"" of type '" "cmf::upslope::RetentionCurve const *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::RetentionCurve * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RetentionCurve_dPsiM_dW" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + { + try { + result = (real)((cmf::upslope::RetentionCurve const *)arg1)->dPsiM_dW(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_RetentionCurve_dPsiM_dW__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::upslope::RetentionCurve *arg1 = (cmf::upslope::RetentionCurve *) 0 ; + cmf::math::num_array *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + cmf::math::num_array result; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__RetentionCurve, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RetentionCurve_dPsiM_dW" "', argument " "1"" of type '" "cmf::upslope::RetentionCurve const *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::RetentionCurve * >(argp1); + { + // Convert a array_wrapper from numpy array + double * data=0; + ptrdiff_t size = from_npy_array(swig_obj[1],&data); + if (!data) { + SWIG_exception_fail(SWIG_TypeError,"Input data is not 'array-like' (in the sense of numpy arrays)"); + return NULL; + } + arg2 = new cmf::math::num_array(size,data); + } + { + try { + result = ((cmf::upslope::RetentionCurve const *)arg1)->dPsiM_dW((cmf::math::num_array const &)*arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + resultobj = as_npy_array(result); + } + { + delete arg2; + } + return resultobj; +fail: + { + delete arg2; + } + return NULL; +} + + +SWIGINTERN PyObject *_wrap_RetentionCurve_dPsiM_dW(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"RetentionCurve_dPsiM_dW",0,2,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__upslope__RetentionCurve, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + _v = test_npy_array(argv[1]); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__upslope__RetentionCurve, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_double(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_RetentionCurve_dPsiM_dW__SWIG_1(self, argc, argv); + case 2: + return _wrap_RetentionCurve_dPsiM_dW__SWIG_0(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'RetentionCurve_dPsiM_dW'.\n" + " Possible C/C++ prototypes are:\n" + " cmf::upslope::RetentionCurve::dPsiM_dW(real) const\n" + " cmf::upslope::RetentionCurve::dPsiM_dW(cmf::math::num_array const &) const\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_RetentionCurve_Wetness_pF__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::upslope::RetentionCurve *arg1 = (cmf::upslope::RetentionCurve *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + real result; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__RetentionCurve, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RetentionCurve_Wetness_pF" "', argument " "1"" of type '" "cmf::upslope::RetentionCurve const *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::RetentionCurve * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RetentionCurve_Wetness_pF" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + { + try { + result = (real)((cmf::upslope::RetentionCurve const *)arg1)->Wetness_pF(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_RetentionCurve_Wetness_pF__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::upslope::RetentionCurve *arg1 = (cmf::upslope::RetentionCurve *) 0 ; + cmf::math::num_array *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + cmf::math::num_array result; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__RetentionCurve, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RetentionCurve_Wetness_pF" "', argument " "1"" of type '" "cmf::upslope::RetentionCurve const *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::RetentionCurve * >(argp1); + { + // Convert a array_wrapper from numpy array + double * data=0; + ptrdiff_t size = from_npy_array(swig_obj[1],&data); + if (!data) { + SWIG_exception_fail(SWIG_TypeError,"Input data is not 'array-like' (in the sense of numpy arrays)"); + return NULL; + } + arg2 = new cmf::math::num_array(size,data); + } + { + try { + result = ((cmf::upslope::RetentionCurve const *)arg1)->Wetness_pF((cmf::math::num_array const &)*arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + resultobj = as_npy_array(result); + } + { + delete arg2; + } + return resultobj; +fail: + { + delete arg2; + } + return NULL; +} + + +SWIGINTERN PyObject *_wrap_RetentionCurve_Wetness_pF(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"RetentionCurve_Wetness_pF",0,2,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__upslope__RetentionCurve, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + _v = test_npy_array(argv[1]); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__upslope__RetentionCurve, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_double(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_RetentionCurve_Wetness_pF__SWIG_1(self, argc, argv); + case 2: + return _wrap_RetentionCurve_Wetness_pF__SWIG_0(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'RetentionCurve_Wetness_pF'.\n" + " Possible C/C++ prototypes are:\n" + " cmf::upslope::RetentionCurve::Wetness_pF(real) const\n" + " cmf::upslope::RetentionCurve::Wetness_pF(cmf::math::num_array const &) const\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_RetentionCurve_MatricPotential__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::upslope::RetentionCurve *arg1 = (cmf::upslope::RetentionCurve *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + real result; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__RetentionCurve, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RetentionCurve_MatricPotential" "', argument " "1"" of type '" "cmf::upslope::RetentionCurve const *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::RetentionCurve * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RetentionCurve_MatricPotential" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + { + try { + result = (real)((cmf::upslope::RetentionCurve const *)arg1)->MatricPotential(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_RetentionCurve_MatricPotential__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::upslope::RetentionCurve *arg1 = (cmf::upslope::RetentionCurve *) 0 ; + cmf::math::num_array *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + cmf::math::num_array result; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__RetentionCurve, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RetentionCurve_MatricPotential" "', argument " "1"" of type '" "cmf::upslope::RetentionCurve const *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::RetentionCurve * >(argp1); + { + // Convert a array_wrapper from numpy array + double * data=0; + ptrdiff_t size = from_npy_array(swig_obj[1],&data); + if (!data) { + SWIG_exception_fail(SWIG_TypeError,"Input data is not 'array-like' (in the sense of numpy arrays)"); + return NULL; + } + arg2 = new cmf::math::num_array(size,data); + } + { + try { + result = ((cmf::upslope::RetentionCurve const *)arg1)->MatricPotential((cmf::math::num_array const &)*arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + resultobj = as_npy_array(result); + } + { + delete arg2; + } + return resultobj; +fail: + { + delete arg2; + } + return NULL; +} + + +SWIGINTERN PyObject *_wrap_RetentionCurve_MatricPotential(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"RetentionCurve_MatricPotential",0,2,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__upslope__RetentionCurve, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + _v = test_npy_array(argv[1]); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__upslope__RetentionCurve, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_double(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_RetentionCurve_MatricPotential__SWIG_1(self, argc, argv); + case 2: + return _wrap_RetentionCurve_MatricPotential__SWIG_0(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'RetentionCurve_MatricPotential'.\n" + " Possible C/C++ prototypes are:\n" + " cmf::upslope::RetentionCurve::MatricPotential(real) const\n" + " cmf::upslope::RetentionCurve::MatricPotential(cmf::math::num_array const &) const\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_RetentionCurve_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::RetentionCurve *arg1 = (cmf::upslope::RetentionCurve *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::upslope::RetentionCurve *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__RetentionCurve, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RetentionCurve_copy" "', argument " "1"" of type '" "cmf::upslope::RetentionCurve const *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::RetentionCurve * >(argp1); + { + try { + result = (cmf::upslope::RetentionCurve *)((cmf::upslope::RetentionCurve const *)arg1)->copy(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__RetentionCurve, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_RetentionCurve(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::RetentionCurve *arg1 = (cmf::upslope::RetentionCurve *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__RetentionCurve, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_RetentionCurve" "', argument " "1"" of type '" "cmf::upslope::RetentionCurve *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::RetentionCurve * >(argp1); + { + try { + delete arg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *RetentionCurve_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__RetentionCurve, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_BrooksCoreyRetentionCurve_Ksat_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::BrooksCoreyRetentionCurve *arg1 = (cmf::upslope::BrooksCoreyRetentionCurve *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"BrooksCoreyRetentionCurve_Ksat_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__BrooksCoreyRetentionCurve, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BrooksCoreyRetentionCurve_Ksat_set" "', argument " "1"" of type '" "cmf::upslope::BrooksCoreyRetentionCurve *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::BrooksCoreyRetentionCurve * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BrooksCoreyRetentionCurve_Ksat_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->Ksat = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_BrooksCoreyRetentionCurve_Ksat_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::BrooksCoreyRetentionCurve *arg1 = (cmf::upslope::BrooksCoreyRetentionCurve *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__BrooksCoreyRetentionCurve, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BrooksCoreyRetentionCurve_Ksat_get" "', argument " "1"" of type '" "cmf::upslope::BrooksCoreyRetentionCurve *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::BrooksCoreyRetentionCurve * >(argp1); + result = (real) ((arg1)->Ksat); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_BrooksCoreyRetentionCurve_SetPorosity(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::BrooksCoreyRetentionCurve *arg1 = (cmf::upslope::BrooksCoreyRetentionCurve *) 0 ; + real arg2 ; + real arg3 = (real) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + double val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "porosity",(char *) "porosity_decay", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:BrooksCoreyRetentionCurve_SetPorosity",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__BrooksCoreyRetentionCurve, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BrooksCoreyRetentionCurve_SetPorosity" "', argument " "1"" of type '" "cmf::upslope::BrooksCoreyRetentionCurve *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::BrooksCoreyRetentionCurve * >(argp1); + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BrooksCoreyRetentionCurve_SetPorosity" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (obj2) { + ecode3 = SWIG_AsVal_double(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "BrooksCoreyRetentionCurve_SetPorosity" "', argument " "3"" of type '" "real""'"); + } + arg3 = static_cast< real >(val3); + } + { + try { + (arg1)->SetPorosity(arg2,arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_BrooksCoreyRetentionCurve_Transmissivity(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::BrooksCoreyRetentionCurve *arg1 = (cmf::upslope::BrooksCoreyRetentionCurve *) 0 ; + real arg2 ; + real arg3 ; + real arg4 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + double val3 ; + int ecode3 = 0 ; + double val4 ; + int ecode4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "upperDepth",(char *) "lowerDepth",(char *) "theta", NULL + }; + real result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO:BrooksCoreyRetentionCurve_Transmissivity",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__BrooksCoreyRetentionCurve, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BrooksCoreyRetentionCurve_Transmissivity" "', argument " "1"" of type '" "cmf::upslope::BrooksCoreyRetentionCurve const *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::BrooksCoreyRetentionCurve * >(argp1); + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BrooksCoreyRetentionCurve_Transmissivity" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + ecode3 = SWIG_AsVal_double(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "BrooksCoreyRetentionCurve_Transmissivity" "', argument " "3"" of type '" "real""'"); + } + arg3 = static_cast< real >(val3); + ecode4 = SWIG_AsVal_double(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "BrooksCoreyRetentionCurve_Transmissivity" "', argument " "4"" of type '" "real""'"); + } + arg4 = static_cast< real >(val4); + { + try { + result = (real)((cmf::upslope::BrooksCoreyRetentionCurve const *)arg1)->Transmissivity(arg2,arg3,arg4); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_BrooksCoreyRetentionCurve_wetness_X_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::BrooksCoreyRetentionCurve *arg1 = (cmf::upslope::BrooksCoreyRetentionCurve *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"BrooksCoreyRetentionCurve_wetness_X_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__BrooksCoreyRetentionCurve, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BrooksCoreyRetentionCurve_wetness_X_set" "', argument " "1"" of type '" "cmf::upslope::BrooksCoreyRetentionCurve *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::BrooksCoreyRetentionCurve * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BrooksCoreyRetentionCurve_wetness_X_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->wetness_X = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_BrooksCoreyRetentionCurve_wetness_X_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::BrooksCoreyRetentionCurve *arg1 = (cmf::upslope::BrooksCoreyRetentionCurve *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__BrooksCoreyRetentionCurve, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BrooksCoreyRetentionCurve_wetness_X_get" "', argument " "1"" of type '" "cmf::upslope::BrooksCoreyRetentionCurve *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::BrooksCoreyRetentionCurve * >(argp1); + result = (real) ((arg1)->wetness_X); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_BrooksCoreyRetentionCurve_Psi_X_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::BrooksCoreyRetentionCurve *arg1 = (cmf::upslope::BrooksCoreyRetentionCurve *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"BrooksCoreyRetentionCurve_Psi_X_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__BrooksCoreyRetentionCurve, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BrooksCoreyRetentionCurve_Psi_X_set" "', argument " "1"" of type '" "cmf::upslope::BrooksCoreyRetentionCurve *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::BrooksCoreyRetentionCurve * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BrooksCoreyRetentionCurve_Psi_X_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->Psi_X = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_BrooksCoreyRetentionCurve_Psi_X_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::BrooksCoreyRetentionCurve *arg1 = (cmf::upslope::BrooksCoreyRetentionCurve *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__BrooksCoreyRetentionCurve, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BrooksCoreyRetentionCurve_Psi_X_get" "', argument " "1"" of type '" "cmf::upslope::BrooksCoreyRetentionCurve *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::BrooksCoreyRetentionCurve * >(argp1); + result = (real) ((arg1)->Psi_X); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_BrooksCoreyRetentionCurve_residual_theta_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::BrooksCoreyRetentionCurve *arg1 = (cmf::upslope::BrooksCoreyRetentionCurve *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"BrooksCoreyRetentionCurve_residual_theta_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__BrooksCoreyRetentionCurve, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BrooksCoreyRetentionCurve_residual_theta_set" "', argument " "1"" of type '" "cmf::upslope::BrooksCoreyRetentionCurve *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::BrooksCoreyRetentionCurve * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BrooksCoreyRetentionCurve_residual_theta_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->residual_theta = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_BrooksCoreyRetentionCurve_residual_theta_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::BrooksCoreyRetentionCurve *arg1 = (cmf::upslope::BrooksCoreyRetentionCurve *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__BrooksCoreyRetentionCurve, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BrooksCoreyRetentionCurve_residual_theta_get" "', argument " "1"" of type '" "cmf::upslope::BrooksCoreyRetentionCurve *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::BrooksCoreyRetentionCurve * >(argp1); + result = (real) ((arg1)->residual_theta); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_BrooksCoreyRetentionCurve(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + real arg1 = (real) 15 ; + real arg2 = (real) 0.5 ; + real arg3 = (real) 5 ; + real arg4 = (real) 0.2 ; + real arg5 = (real) cmf::upslope::pF_to_waterhead(2.5) ; + real arg6 = (real) 0 ; + double val1 ; + int ecode1 = 0 ; + double val2 ; + int ecode2 = 0 ; + double val3 ; + int ecode3 = 0 ; + double val4 ; + int ecode4 = 0 ; + double val5 ; + int ecode5 = 0 ; + double val6 ; + int ecode6 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + PyObject * obj5 = 0 ; + char * kwnames[] = { + (char *) "ksat",(char *) "porosity",(char *) "_b",(char *) "theta_x",(char *) "psi_x",(char *) "porosity_decay", NULL + }; + cmf::upslope::BrooksCoreyRetentionCurve *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|OOOOOO:new_BrooksCoreyRetentionCurve",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail; + if (obj0) { + ecode1 = SWIG_AsVal_double(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_BrooksCoreyRetentionCurve" "', argument " "1"" of type '" "real""'"); + } + arg1 = static_cast< real >(val1); + } + if (obj1) { + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_BrooksCoreyRetentionCurve" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + } + if (obj2) { + ecode3 = SWIG_AsVal_double(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_BrooksCoreyRetentionCurve" "', argument " "3"" of type '" "real""'"); + } + arg3 = static_cast< real >(val3); + } + if (obj3) { + ecode4 = SWIG_AsVal_double(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_BrooksCoreyRetentionCurve" "', argument " "4"" of type '" "real""'"); + } + arg4 = static_cast< real >(val4); + } + if (obj4) { + ecode5 = SWIG_AsVal_double(obj4, &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_BrooksCoreyRetentionCurve" "', argument " "5"" of type '" "real""'"); + } + arg5 = static_cast< real >(val5); + } + if (obj5) { + ecode6 = SWIG_AsVal_double(obj5, &val6); + if (!SWIG_IsOK(ecode6)) { + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_BrooksCoreyRetentionCurve" "', argument " "6"" of type '" "real""'"); + } + arg6 = static_cast< real >(val6); + } + { + try { + result = (cmf::upslope::BrooksCoreyRetentionCurve *)new cmf::upslope::BrooksCoreyRetentionCurve(arg1,arg2,arg3,arg4,arg5,arg6); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__BrooksCoreyRetentionCurve, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_BrooksCoreyRetentionCurve_CreateFrom2Points(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + real arg1 ; + real arg2 ; + real arg3 ; + real arg4 ; + real arg5 = (real) cmf::upslope::pF_to_waterhead(2.5) ; + real arg6 = (real) cmf::upslope::pF_to_waterhead(4.2) ; + double val1 ; + int ecode1 = 0 ; + double val2 ; + int ecode2 = 0 ; + double val3 ; + int ecode3 = 0 ; + double val4 ; + int ecode4 = 0 ; + double val5 ; + int ecode5 = 0 ; + double val6 ; + int ecode6 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + PyObject * obj5 = 0 ; + char * kwnames[] = { + (char *) "ksat",(char *) "porosity",(char *) "theta1",(char *) "theta2",(char *) "psi_1",(char *) "psi_2", NULL + }; + cmf::upslope::BrooksCoreyRetentionCurve result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO|OO:BrooksCoreyRetentionCurve_CreateFrom2Points",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail; + ecode1 = SWIG_AsVal_double(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "BrooksCoreyRetentionCurve_CreateFrom2Points" "', argument " "1"" of type '" "real""'"); + } + arg1 = static_cast< real >(val1); + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BrooksCoreyRetentionCurve_CreateFrom2Points" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + ecode3 = SWIG_AsVal_double(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "BrooksCoreyRetentionCurve_CreateFrom2Points" "', argument " "3"" of type '" "real""'"); + } + arg3 = static_cast< real >(val3); + ecode4 = SWIG_AsVal_double(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "BrooksCoreyRetentionCurve_CreateFrom2Points" "', argument " "4"" of type '" "real""'"); + } + arg4 = static_cast< real >(val4); + if (obj4) { + ecode5 = SWIG_AsVal_double(obj4, &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "BrooksCoreyRetentionCurve_CreateFrom2Points" "', argument " "5"" of type '" "real""'"); + } + arg5 = static_cast< real >(val5); + } + if (obj5) { + ecode6 = SWIG_AsVal_double(obj5, &val6); + if (!SWIG_IsOK(ecode6)) { + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "BrooksCoreyRetentionCurve_CreateFrom2Points" "', argument " "6"" of type '" "real""'"); + } + arg6 = static_cast< real >(val6); + } + { + try { + result = cmf::upslope::BrooksCoreyRetentionCurve::CreateFrom2Points(arg1,arg2,arg3,arg4,arg5,arg6); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj((new cmf::upslope::BrooksCoreyRetentionCurve(static_cast< const cmf::upslope::BrooksCoreyRetentionCurve& >(result))), SWIGTYPE_p_cmf__upslope__BrooksCoreyRetentionCurve, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_BrooksCoreyRetentionCurve_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::BrooksCoreyRetentionCurve *arg1 = (cmf::upslope::BrooksCoreyRetentionCurve *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::upslope::BrooksCoreyRetentionCurve *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__BrooksCoreyRetentionCurve, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BrooksCoreyRetentionCurve_copy" "', argument " "1"" of type '" "cmf::upslope::BrooksCoreyRetentionCurve const *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::BrooksCoreyRetentionCurve * >(argp1); + { + try { + result = (cmf::upslope::BrooksCoreyRetentionCurve *)((cmf::upslope::BrooksCoreyRetentionCurve const *)arg1)->copy(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__BrooksCoreyRetentionCurve, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_BrooksCoreyRetentionCurve(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::BrooksCoreyRetentionCurve *arg1 = (cmf::upslope::BrooksCoreyRetentionCurve *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__BrooksCoreyRetentionCurve, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_BrooksCoreyRetentionCurve" "', argument " "1"" of type '" "cmf::upslope::BrooksCoreyRetentionCurve *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::BrooksCoreyRetentionCurve * >(argp1); + { + try { + delete arg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_BrooksCoreyRetentionCurve_b_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::BrooksCoreyRetentionCurve *arg1 = (cmf::upslope::BrooksCoreyRetentionCurve *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"BrooksCoreyRetentionCurve_b_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__BrooksCoreyRetentionCurve, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BrooksCoreyRetentionCurve_b_set" "', argument " "1"" of type '" "cmf::upslope::BrooksCoreyRetentionCurve *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::BrooksCoreyRetentionCurve * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BrooksCoreyRetentionCurve_b_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + { + try { + cmf_upslope_BrooksCoreyRetentionCurve_b_set(arg1,arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_BrooksCoreyRetentionCurve_b_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::BrooksCoreyRetentionCurve *arg1 = (cmf::upslope::BrooksCoreyRetentionCurve *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__BrooksCoreyRetentionCurve, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BrooksCoreyRetentionCurve_b_get" "', argument " "1"" of type '" "cmf::upslope::BrooksCoreyRetentionCurve *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::BrooksCoreyRetentionCurve * >(argp1); + { + try { + result = (real)cmf_upslope_BrooksCoreyRetentionCurve_b_get(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *BrooksCoreyRetentionCurve_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__BrooksCoreyRetentionCurve, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *BrooksCoreyRetentionCurve_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_VanGenuchtenMualem_alpha_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::VanGenuchtenMualem *arg1 = (cmf::upslope::VanGenuchtenMualem *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"VanGenuchtenMualem_alpha_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__VanGenuchtenMualem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VanGenuchtenMualem_alpha_set" "', argument " "1"" of type '" "cmf::upslope::VanGenuchtenMualem *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::VanGenuchtenMualem * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VanGenuchtenMualem_alpha_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->alpha = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VanGenuchtenMualem_alpha_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::VanGenuchtenMualem *arg1 = (cmf::upslope::VanGenuchtenMualem *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__VanGenuchtenMualem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VanGenuchtenMualem_alpha_get" "', argument " "1"" of type '" "cmf::upslope::VanGenuchtenMualem *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::VanGenuchtenMualem * >(argp1); + result = (real) ((arg1)->alpha); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VanGenuchtenMualem_n_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::VanGenuchtenMualem *arg1 = (cmf::upslope::VanGenuchtenMualem *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"VanGenuchtenMualem_n_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__VanGenuchtenMualem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VanGenuchtenMualem_n_set" "', argument " "1"" of type '" "cmf::upslope::VanGenuchtenMualem *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::VanGenuchtenMualem * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VanGenuchtenMualem_n_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->n = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VanGenuchtenMualem_n_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::VanGenuchtenMualem *arg1 = (cmf::upslope::VanGenuchtenMualem *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__VanGenuchtenMualem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VanGenuchtenMualem_n_get" "', argument " "1"" of type '" "cmf::upslope::VanGenuchtenMualem *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::VanGenuchtenMualem * >(argp1); + result = (real) ((arg1)->n); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VanGenuchtenMualem_Ksat_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::VanGenuchtenMualem *arg1 = (cmf::upslope::VanGenuchtenMualem *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"VanGenuchtenMualem_Ksat_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__VanGenuchtenMualem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VanGenuchtenMualem_Ksat_set" "', argument " "1"" of type '" "cmf::upslope::VanGenuchtenMualem *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::VanGenuchtenMualem * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VanGenuchtenMualem_Ksat_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->Ksat = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VanGenuchtenMualem_Ksat_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::VanGenuchtenMualem *arg1 = (cmf::upslope::VanGenuchtenMualem *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__VanGenuchtenMualem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VanGenuchtenMualem_Ksat_get" "', argument " "1"" of type '" "cmf::upslope::VanGenuchtenMualem *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::VanGenuchtenMualem * >(argp1); + result = (real) ((arg1)->Ksat); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VanGenuchtenMualem_Phi_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::VanGenuchtenMualem *arg1 = (cmf::upslope::VanGenuchtenMualem *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"VanGenuchtenMualem_Phi_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__VanGenuchtenMualem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VanGenuchtenMualem_Phi_set" "', argument " "1"" of type '" "cmf::upslope::VanGenuchtenMualem *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::VanGenuchtenMualem * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VanGenuchtenMualem_Phi_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->Phi = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VanGenuchtenMualem_Phi_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::VanGenuchtenMualem *arg1 = (cmf::upslope::VanGenuchtenMualem *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__VanGenuchtenMualem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VanGenuchtenMualem_Phi_get" "', argument " "1"" of type '" "cmf::upslope::VanGenuchtenMualem *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::VanGenuchtenMualem * >(argp1); + result = (real) ((arg1)->Phi); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VanGenuchtenMualem_m_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::VanGenuchtenMualem *arg1 = (cmf::upslope::VanGenuchtenMualem *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"VanGenuchtenMualem_m_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__VanGenuchtenMualem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VanGenuchtenMualem_m_set" "', argument " "1"" of type '" "cmf::upslope::VanGenuchtenMualem *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::VanGenuchtenMualem * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VanGenuchtenMualem_m_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->m = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VanGenuchtenMualem_m_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::VanGenuchtenMualem *arg1 = (cmf::upslope::VanGenuchtenMualem *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__VanGenuchtenMualem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VanGenuchtenMualem_m_get" "', argument " "1"" of type '" "cmf::upslope::VanGenuchtenMualem *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::VanGenuchtenMualem * >(argp1); + result = (real) ((arg1)->m); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VanGenuchtenMualem_l_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::VanGenuchtenMualem *arg1 = (cmf::upslope::VanGenuchtenMualem *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"VanGenuchtenMualem_l_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__VanGenuchtenMualem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VanGenuchtenMualem_l_set" "', argument " "1"" of type '" "cmf::upslope::VanGenuchtenMualem *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::VanGenuchtenMualem * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VanGenuchtenMualem_l_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->l = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VanGenuchtenMualem_l_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::VanGenuchtenMualem *arg1 = (cmf::upslope::VanGenuchtenMualem *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__VanGenuchtenMualem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VanGenuchtenMualem_l_get" "', argument " "1"" of type '" "cmf::upslope::VanGenuchtenMualem *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::VanGenuchtenMualem * >(argp1); + result = (real) ((arg1)->l); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VanGenuchtenMualem_theta_r_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::VanGenuchtenMualem *arg1 = (cmf::upslope::VanGenuchtenMualem *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"VanGenuchtenMualem_theta_r_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__VanGenuchtenMualem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VanGenuchtenMualem_theta_r_set" "', argument " "1"" of type '" "cmf::upslope::VanGenuchtenMualem *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::VanGenuchtenMualem * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VanGenuchtenMualem_theta_r_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->theta_r = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VanGenuchtenMualem_theta_r_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::VanGenuchtenMualem *arg1 = (cmf::upslope::VanGenuchtenMualem *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__VanGenuchtenMualem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VanGenuchtenMualem_theta_r_get" "', argument " "1"" of type '" "cmf::upslope::VanGenuchtenMualem *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::VanGenuchtenMualem * >(argp1); + result = (real) ((arg1)->theta_r); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VanGenuchtenMualem_w0_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::VanGenuchtenMualem *arg1 = (cmf::upslope::VanGenuchtenMualem *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"VanGenuchtenMualem_w0_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__VanGenuchtenMualem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VanGenuchtenMualem_w0_set" "', argument " "1"" of type '" "cmf::upslope::VanGenuchtenMualem *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::VanGenuchtenMualem * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VanGenuchtenMualem_w0_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->w0 = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VanGenuchtenMualem_w0_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::VanGenuchtenMualem *arg1 = (cmf::upslope::VanGenuchtenMualem *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__VanGenuchtenMualem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VanGenuchtenMualem_w0_get" "', argument " "1"" of type '" "cmf::upslope::VanGenuchtenMualem *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::VanGenuchtenMualem * >(argp1); + result = (real) ((arg1)->w0); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VanGenuchtenMualem_Transmissivity(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::VanGenuchtenMualem *arg1 = (cmf::upslope::VanGenuchtenMualem *) 0 ; + real arg2 ; + real arg3 ; + real arg4 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + double val3 ; + int ecode3 = 0 ; + double val4 ; + int ecode4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "upperDepth",(char *) "lowerDepth",(char *) "wetness", NULL + }; + real result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO:VanGenuchtenMualem_Transmissivity",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__VanGenuchtenMualem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VanGenuchtenMualem_Transmissivity" "', argument " "1"" of type '" "cmf::upslope::VanGenuchtenMualem const *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::VanGenuchtenMualem * >(argp1); + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VanGenuchtenMualem_Transmissivity" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + ecode3 = SWIG_AsVal_double(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VanGenuchtenMualem_Transmissivity" "', argument " "3"" of type '" "real""'"); + } + arg3 = static_cast< real >(val3); + ecode4 = SWIG_AsVal_double(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VanGenuchtenMualem_Transmissivity" "', argument " "4"" of type '" "real""'"); + } + arg4 = static_cast< real >(val4); + { + try { + result = (real)((cmf::upslope::VanGenuchtenMualem const *)arg1)->Transmissivity(arg2,arg3,arg4); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VanGenuchtenMualem_fit_w0(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::VanGenuchtenMualem *arg1 = (cmf::upslope::VanGenuchtenMualem *) 0 ; + real arg2 = (real) 1.01 ; + real arg3 = (real) 1.0 ; + real arg4 = (real) 0.05 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + double val3 ; + int ecode3 = 0 ; + double val4 ; + int ecode4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "w1",(char *) "Psi_p",(char *) "tolerance", NULL + }; + real result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOO:VanGenuchtenMualem_fit_w0",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__VanGenuchtenMualem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VanGenuchtenMualem_fit_w0" "', argument " "1"" of type '" "cmf::upslope::VanGenuchtenMualem *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::VanGenuchtenMualem * >(argp1); + if (obj1) { + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VanGenuchtenMualem_fit_w0" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + } + if (obj2) { + ecode3 = SWIG_AsVal_double(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VanGenuchtenMualem_fit_w0" "', argument " "3"" of type '" "real""'"); + } + arg3 = static_cast< real >(val3); + } + if (obj3) { + ecode4 = SWIG_AsVal_double(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VanGenuchtenMualem_fit_w0" "', argument " "4"" of type '" "real""'"); + } + arg4 = static_cast< real >(val4); + } + { + try { + result = (real)(arg1)->fit_w0(arg2,arg3,arg4); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VanGenuchtenMualem_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::VanGenuchtenMualem *arg1 = (cmf::upslope::VanGenuchtenMualem *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::upslope::VanGenuchtenMualem *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__VanGenuchtenMualem, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VanGenuchtenMualem_copy" "', argument " "1"" of type '" "cmf::upslope::VanGenuchtenMualem const *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::VanGenuchtenMualem * >(argp1); + { + try { + result = (cmf::upslope::VanGenuchtenMualem *)((cmf::upslope::VanGenuchtenMualem const *)arg1)->copy(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__VanGenuchtenMualem, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_VanGenuchtenMualem(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + real arg1 = (real) 15 ; + real arg2 = (real) 0.5 ; + real arg3 = (real) 0.2178 ; + real arg4 = (real) 1.211 ; + real arg5 = (real) -1 ; + double val1 ; + int ecode1 = 0 ; + double val2 ; + int ecode2 = 0 ; + double val3 ; + int ecode3 = 0 ; + double val4 ; + int ecode4 = 0 ; + double val5 ; + int ecode5 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + char * kwnames[] = { + (char *) "Ksat",(char *) "phi",(char *) "alpha",(char *) "n",(char *) "m", NULL + }; + cmf::upslope::VanGenuchtenMualem *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|OOOOO:new_VanGenuchtenMualem",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; + if (obj0) { + ecode1 = SWIG_AsVal_double(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_VanGenuchtenMualem" "', argument " "1"" of type '" "real""'"); + } + arg1 = static_cast< real >(val1); + } + if (obj1) { + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_VanGenuchtenMualem" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + } + if (obj2) { + ecode3 = SWIG_AsVal_double(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_VanGenuchtenMualem" "', argument " "3"" of type '" "real""'"); + } + arg3 = static_cast< real >(val3); + } + if (obj3) { + ecode4 = SWIG_AsVal_double(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_VanGenuchtenMualem" "', argument " "4"" of type '" "real""'"); + } + arg4 = static_cast< real >(val4); + } + if (obj4) { + ecode5 = SWIG_AsVal_double(obj4, &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_VanGenuchtenMualem" "', argument " "5"" of type '" "real""'"); + } + arg5 = static_cast< real >(val5); + } + { + try { + result = (cmf::upslope::VanGenuchtenMualem *)new cmf::upslope::VanGenuchtenMualem(arg1,arg2,arg3,arg4,arg5); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__VanGenuchtenMualem, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_VanGenuchtenMualem(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::VanGenuchtenMualem *arg1 = (cmf::upslope::VanGenuchtenMualem *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__VanGenuchtenMualem, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_VanGenuchtenMualem" "', argument " "1"" of type '" "cmf::upslope::VanGenuchtenMualem *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::VanGenuchtenMualem * >(argp1); + { + try { + delete arg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *VanGenuchtenMualem_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__VanGenuchtenMualem, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *VanGenuchtenMualem_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_LinearRetention_Ksat_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::LinearRetention *arg1 = (cmf::upslope::LinearRetention *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"LinearRetention_Ksat_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__LinearRetention, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LinearRetention_Ksat_set" "', argument " "1"" of type '" "cmf::upslope::LinearRetention *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::LinearRetention * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LinearRetention_Ksat_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->Ksat = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_LinearRetention_Ksat_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::LinearRetention *arg1 = (cmf::upslope::LinearRetention *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__LinearRetention, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LinearRetention_Ksat_get" "', argument " "1"" of type '" "cmf::upslope::LinearRetention *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::LinearRetention * >(argp1); + result = (real) ((arg1)->Ksat); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_LinearRetention_porosity_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::LinearRetention *arg1 = (cmf::upslope::LinearRetention *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"LinearRetention_porosity_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__LinearRetention, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LinearRetention_porosity_set" "', argument " "1"" of type '" "cmf::upslope::LinearRetention *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::LinearRetention * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LinearRetention_porosity_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->porosity = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_LinearRetention_porosity_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::LinearRetention *arg1 = (cmf::upslope::LinearRetention *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__LinearRetention, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LinearRetention_porosity_get" "', argument " "1"" of type '" "cmf::upslope::LinearRetention *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::LinearRetention * >(argp1); + result = (real) ((arg1)->porosity); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_LinearRetention_thickness_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::LinearRetention *arg1 = (cmf::upslope::LinearRetention *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"LinearRetention_thickness_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__LinearRetention, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LinearRetention_thickness_set" "', argument " "1"" of type '" "cmf::upslope::LinearRetention *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::LinearRetention * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LinearRetention_thickness_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->thickness = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_LinearRetention_thickness_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::LinearRetention *arg1 = (cmf::upslope::LinearRetention *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__LinearRetention, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LinearRetention_thickness_get" "', argument " "1"" of type '" "cmf::upslope::LinearRetention *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::LinearRetention * >(argp1); + result = (real) ((arg1)->thickness); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_LinearRetention_residual_wetness_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::LinearRetention *arg1 = (cmf::upslope::LinearRetention *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"LinearRetention_residual_wetness_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__LinearRetention, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LinearRetention_residual_wetness_set" "', argument " "1"" of type '" "cmf::upslope::LinearRetention *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::LinearRetention * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LinearRetention_residual_wetness_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->residual_wetness = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_LinearRetention_residual_wetness_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::LinearRetention *arg1 = (cmf::upslope::LinearRetention *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__LinearRetention, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LinearRetention_residual_wetness_get" "', argument " "1"" of type '" "cmf::upslope::LinearRetention *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::LinearRetention * >(argp1); + result = (real) ((arg1)->residual_wetness); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_LinearRetention_porosity_decay_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::LinearRetention *arg1 = (cmf::upslope::LinearRetention *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"LinearRetention_porosity_decay_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__LinearRetention, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LinearRetention_porosity_decay_set" "', argument " "1"" of type '" "cmf::upslope::LinearRetention *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::LinearRetention * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LinearRetention_porosity_decay_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->porosity_decay = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_LinearRetention_porosity_decay_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::LinearRetention *arg1 = (cmf::upslope::LinearRetention *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__LinearRetention, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LinearRetention_porosity_decay_get" "', argument " "1"" of type '" "cmf::upslope::LinearRetention *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::LinearRetention * >(argp1); + result = (real) ((arg1)->porosity_decay); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_LinearRetention_beta_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::LinearRetention *arg1 = (cmf::upslope::LinearRetention *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"LinearRetention_beta_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__LinearRetention, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LinearRetention_beta_set" "', argument " "1"" of type '" "cmf::upslope::LinearRetention *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::LinearRetention * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LinearRetention_beta_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->beta = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_LinearRetention_beta_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::LinearRetention *arg1 = (cmf::upslope::LinearRetention *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__LinearRetention, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LinearRetention_beta_get" "', argument " "1"" of type '" "cmf::upslope::LinearRetention *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::LinearRetention * >(argp1); + result = (real) ((arg1)->beta); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_LinearRetention_Transmissivity(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::LinearRetention *arg1 = (cmf::upslope::LinearRetention *) 0 ; + real arg2 ; + real arg3 ; + real arg4 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + double val3 ; + int ecode3 = 0 ; + double val4 ; + int ecode4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "upperDepth",(char *) "lowerDepth",(char *) "wetness", NULL + }; + real result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO:LinearRetention_Transmissivity",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__LinearRetention, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LinearRetention_Transmissivity" "', argument " "1"" of type '" "cmf::upslope::LinearRetention const *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::LinearRetention * >(argp1); + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LinearRetention_Transmissivity" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + ecode3 = SWIG_AsVal_double(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "LinearRetention_Transmissivity" "', argument " "3"" of type '" "real""'"); + } + arg3 = static_cast< real >(val3); + ecode4 = SWIG_AsVal_double(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "LinearRetention_Transmissivity" "', argument " "4"" of type '" "real""'"); + } + arg4 = static_cast< real >(val4); + { + try { + result = (real)((cmf::upslope::LinearRetention const *)arg1)->Transmissivity(arg2,arg3,arg4); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_LinearRetention_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::LinearRetention *arg1 = (cmf::upslope::LinearRetention *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::upslope::LinearRetention *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__LinearRetention, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LinearRetention_copy" "', argument " "1"" of type '" "cmf::upslope::LinearRetention const *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::LinearRetention * >(argp1); + { + try { + result = (cmf::upslope::LinearRetention *)((cmf::upslope::LinearRetention const *)arg1)->copy(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__LinearRetention, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_LinearRetention(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + real arg1 ; + real arg2 ; + real arg3 ; + real arg4 = (real) 0.1 ; + double val1 ; + int ecode1 = 0 ; + double val2 ; + int ecode2 = 0 ; + double val3 ; + int ecode3 = 0 ; + double val4 ; + int ecode4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + char * kwnames[] = { + (char *) "ksat",(char *) "phi",(char *) "thickness",(char *) "residual_wetness", NULL + }; + cmf::upslope::LinearRetention *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|O:new_LinearRetention",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + ecode1 = SWIG_AsVal_double(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_LinearRetention" "', argument " "1"" of type '" "real""'"); + } + arg1 = static_cast< real >(val1); + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_LinearRetention" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + ecode3 = SWIG_AsVal_double(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_LinearRetention" "', argument " "3"" of type '" "real""'"); + } + arg3 = static_cast< real >(val3); + if (obj3) { + ecode4 = SWIG_AsVal_double(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_LinearRetention" "', argument " "4"" of type '" "real""'"); + } + arg4 = static_cast< real >(val4); + } + { + try { + result = (cmf::upslope::LinearRetention *)new cmf::upslope::LinearRetention(arg1,arg2,arg3,arg4); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__LinearRetention, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_LinearRetention(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::LinearRetention *arg1 = (cmf::upslope::LinearRetention *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__LinearRetention, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_LinearRetention" "', argument " "1"" of type '" "cmf::upslope::LinearRetention *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::LinearRetention * >(argp1); + { + try { + delete arg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *LinearRetention_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__LinearRetention, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *LinearRetention_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_SoilLayer_Position_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::SoilLayer *arg1 = (cmf::upslope::SoilLayer *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::upslope::SoilLayer > tempshared1 ; + std::shared_ptr< cmf::upslope::SoilLayer > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + ptrdiff_t result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SoilLayer_Position_get" "', argument " "1"" of type '" "cmf::upslope::SoilLayer *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); + arg1 = const_cast< cmf::upslope::SoilLayer * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); + arg1 = const_cast< cmf::upslope::SoilLayer * >((smartarg1 ? smartarg1->get() : 0)); + } + } + result = (ptrdiff_t) ((arg1)->Position); + resultobj = SWIG_From_ptrdiff_t(static_cast< ptrdiff_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SoilLayer_cell_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::SoilLayer *arg1 = (cmf::upslope::SoilLayer *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::upslope::SoilLayer > tempshared1 ; + std::shared_ptr< cmf::upslope::SoilLayer > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + cmf::upslope::Cell *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SoilLayer_cell_get" "', argument " "1"" of type '" "cmf::upslope::SoilLayer *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); + arg1 = const_cast< cmf::upslope::SoilLayer * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); + arg1 = const_cast< cmf::upslope::SoilLayer * >((smartarg1 ? smartarg1->get() : 0)); + } + } + result = (cmf::upslope::Cell *) &(cmf::upslope::Cell &) ((arg1)->cell); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SoilLayer___get_upper(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::SoilLayer *arg1 = (cmf::upslope::SoilLayer *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::upslope::SoilLayer const > tempshared1 ; + std::shared_ptr< cmf::upslope::SoilLayer const > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + cmf::upslope::SoilLayer::ptr result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SoilLayer___get_upper" "', argument " "1"" of type '" "cmf::upslope::SoilLayer const *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::upslope::SoilLayer > * >(argp1); + delete reinterpret_cast< std::shared_ptr< const cmf::upslope::SoilLayer > * >(argp1); + arg1 = const_cast< cmf::upslope::SoilLayer * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::upslope::SoilLayer > * >(argp1); + arg1 = const_cast< cmf::upslope::SoilLayer * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + try { + result = ((cmf::upslope::SoilLayer const *)arg1)->get_upper(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + std::shared_ptr< cmf::upslope::SoilLayer > *smartresult = result ? new std::shared_ptr< cmf::upslope::SoilLayer >(result) : 0; + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, SWIG_POINTER_OWN); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SoilLayer___get_lower(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::SoilLayer *arg1 = (cmf::upslope::SoilLayer *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::upslope::SoilLayer const > tempshared1 ; + std::shared_ptr< cmf::upslope::SoilLayer const > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + cmf::upslope::SoilLayer::ptr result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SoilLayer___get_lower" "', argument " "1"" of type '" "cmf::upslope::SoilLayer const *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::upslope::SoilLayer > * >(argp1); + delete reinterpret_cast< std::shared_ptr< const cmf::upslope::SoilLayer > * >(argp1); + arg1 = const_cast< cmf::upslope::SoilLayer * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::upslope::SoilLayer > * >(argp1); + arg1 = const_cast< cmf::upslope::SoilLayer * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + try { + result = ((cmf::upslope::SoilLayer const *)arg1)->get_lower(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + std::shared_ptr< cmf::upslope::SoilLayer > *smartresult = result ? new std::shared_ptr< cmf::upslope::SoilLayer >(result) : 0; + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, SWIG_POINTER_OWN); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SoilLayer_get_soil(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::SoilLayer *arg1 = (cmf::upslope::SoilLayer *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::upslope::SoilLayer const > tempshared1 ; + std::shared_ptr< cmf::upslope::SoilLayer const > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + cmf::upslope::RetentionCurve *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SoilLayer_get_soil" "', argument " "1"" of type '" "cmf::upslope::SoilLayer const *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::upslope::SoilLayer > * >(argp1); + delete reinterpret_cast< std::shared_ptr< const cmf::upslope::SoilLayer > * >(argp1); + arg1 = const_cast< cmf::upslope::SoilLayer * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::upslope::SoilLayer > * >(argp1); + arg1 = const_cast< cmf::upslope::SoilLayer * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + try { + result = (cmf::upslope::RetentionCurve *) &((cmf::upslope::SoilLayer const *)arg1)->get_soil(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + int dcast = 0; + /*@SWIG:/usr/share/swig/3.0.12/typemaps/swigmacros.swg,200,%formacro@*//*@SWIG:/usr/share/swig/3.0.12/typemaps/swigmacros.swg,192,%_formacro_1@*//*@SWIG:/usr/share/swig/3.0.12/typemaps/factory.swg,72,%_factory_dispatch@*/ + if (!dcast) { + cmf::upslope::BrooksCoreyRetentionCurve *dobj = dynamic_cast(result); + if (dobj) { + dcast = 1; + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(dobj),SWIGTYPE_p_cmf__upslope__BrooksCoreyRetentionCurve, 0 | 0 ); + } + }/*@SWIG@*/ + + /*@SWIG:/usr/share/swig/3.0.12/typemaps/swigmacros.swg,192,%_formacro_1@*//*@SWIG:/usr/share/swig/3.0.12/typemaps/factory.swg,72,%_factory_dispatch@*/ + if (!dcast) { + cmf::upslope::VanGenuchtenMualem *dobj = dynamic_cast(result); + if (dobj) { + dcast = 1; + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(dobj),SWIGTYPE_p_cmf__upslope__VanGenuchtenMualem, 0 | 0 ); + } + }/*@SWIG@*/ + + /*@SWIG:/usr/share/swig/3.0.12/typemaps/swigmacros.swg,192,%_formacro_1@*//*@SWIG:/usr/share/swig/3.0.12/typemaps/factory.swg,72,%_factory_dispatch@*/ + if (!dcast) { + cmf::upslope::LinearRetention *dobj = dynamic_cast(result); + if (dobj) { + dcast = 1; + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(dobj),SWIGTYPE_p_cmf__upslope__LinearRetention, 0 | 0 ); + } + }/*@SWIG@*/ + + + + /*@SWIG@*/ + + /*@SWIG@*/ + + /*@SWIG@*//*@SWIG@*/ + if (!dcast) { + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result),SWIGTYPE_p_cmf__upslope__RetentionCurve, 0 | 0 ); + } + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SoilLayer_set_soil(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::SoilLayer *arg1 = (cmf::upslope::SoilLayer *) 0 ; + cmf::upslope::RetentionCurve *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::upslope::SoilLayer > tempshared1 ; + std::shared_ptr< cmf::upslope::SoilLayer > *smartarg1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "r_curve", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:SoilLayer_set_soil",kwnames,&obj0,&obj1)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SoilLayer_set_soil" "', argument " "1"" of type '" "cmf::upslope::SoilLayer *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); + arg1 = const_cast< cmf::upslope::SoilLayer * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); + arg1 = const_cast< cmf::upslope::SoilLayer * >((smartarg1 ? smartarg1->get() : 0)); + } + } + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_cmf__upslope__RetentionCurve, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SoilLayer_set_soil" "', argument " "2"" of type '" "cmf::upslope::RetentionCurve const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SoilLayer_set_soil" "', argument " "2"" of type '" "cmf::upslope::RetentionCurve const &""'"); + } + arg2 = reinterpret_cast< cmf::upslope::RetentionCurve * >(argp2); + { + try { + (arg1)->set_soil((cmf::upslope::RetentionCurve const &)*arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SoilLayer_get_K(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::SoilLayer *arg1 = (cmf::upslope::SoilLayer *) 0 ; + cmf::geometry::point arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::upslope::SoilLayer const > tempshared1 ; + std::shared_ptr< cmf::upslope::SoilLayer const > *smartarg1 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "direction", NULL + }; + real result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:SoilLayer_get_K",kwnames,&obj0,&obj1)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SoilLayer_get_K" "', argument " "1"" of type '" "cmf::upslope::SoilLayer const *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::upslope::SoilLayer > * >(argp1); + delete reinterpret_cast< std::shared_ptr< const cmf::upslope::SoilLayer > * >(argp1); + arg1 = const_cast< cmf::upslope::SoilLayer * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::upslope::SoilLayer > * >(argp1); + arg1 = const_cast< cmf::upslope::SoilLayer * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + if (check_xy(obj1)) { + std::string res = convert_xyz_to_point(obj1,arg2); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + return NULL; + } + } + else if (PySequence_Check(obj1)) { + std::string res = convert_seq_to_point(obj1,arg2); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError, res.c_str()); + } + } else { + std::string res="<"; + res+=pyrepr(obj1); + res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + } + } + { + try { + result = (real)((cmf::upslope::SoilLayer const *)arg1)->get_K(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SoilLayer_anisotropic_kf_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::SoilLayer *arg1 = (cmf::upslope::SoilLayer *) 0 ; + cmf::geometry::point *arg2 = (cmf::geometry::point *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::upslope::SoilLayer > tempshared1 ; + std::shared_ptr< cmf::upslope::SoilLayer > *smartarg1 = 0 ; + cmf::geometry::point p2 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"SoilLayer_anisotropic_kf_set",2,2,swig_obj)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SoilLayer_anisotropic_kf_set" "', argument " "1"" of type '" "cmf::upslope::SoilLayer *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); + arg1 = const_cast< cmf::upslope::SoilLayer * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); + arg1 = const_cast< cmf::upslope::SoilLayer * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + if (SWIG_ConvertPtr(swig_obj[1], (void **) &arg2, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { + if (check_xy(swig_obj[1])) { + std::string res = convert_xyz_to_point(swig_obj[1],p2); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + return NULL; + } + } + else if (PySequence_Check(swig_obj[1])) { + std::string res = convert_seq_to_point(swig_obj[1],p2); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError, res.c_str()); + } + } else { + std::string res="<"; + res+=pyrepr(swig_obj[1]); + res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + } + arg2 = &p2; + } + } + if (arg1) (arg1)->anisotropic_kf = *arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SoilLayer_anisotropic_kf_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::SoilLayer *arg1 = (cmf::upslope::SoilLayer *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::upslope::SoilLayer > tempshared1 ; + std::shared_ptr< cmf::upslope::SoilLayer > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + cmf::geometry::point *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SoilLayer_anisotropic_kf_get" "', argument " "1"" of type '" "cmf::upslope::SoilLayer *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); + arg1 = const_cast< cmf::upslope::SoilLayer * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); + arg1 = const_cast< cmf::upslope::SoilLayer * >((smartarg1 ? smartarg1->get() : 0)); + } + } + result = (cmf::geometry::point *)& ((arg1)->anisotropic_kf); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__geometry__point, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SoilLayer_get_capacity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::SoilLayer *arg1 = (cmf::upslope::SoilLayer *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::upslope::SoilLayer const > tempshared1 ; + std::shared_ptr< cmf::upslope::SoilLayer const > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SoilLayer_get_capacity" "', argument " "1"" of type '" "cmf::upslope::SoilLayer const *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::upslope::SoilLayer > * >(argp1); + delete reinterpret_cast< std::shared_ptr< const cmf::upslope::SoilLayer > * >(argp1); + arg1 = const_cast< cmf::upslope::SoilLayer * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::upslope::SoilLayer > * >(argp1); + arg1 = const_cast< cmf::upslope::SoilLayer * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + try { + result = (real)((cmf::upslope::SoilLayer const *)arg1)->get_capacity(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SoilLayer_get_saturated_depth(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::SoilLayer *arg1 = (cmf::upslope::SoilLayer *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::upslope::SoilLayer const > tempshared1 ; + std::shared_ptr< cmf::upslope::SoilLayer const > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SoilLayer_get_saturated_depth" "', argument " "1"" of type '" "cmf::upslope::SoilLayer const *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::upslope::SoilLayer > * >(argp1); + delete reinterpret_cast< std::shared_ptr< const cmf::upslope::SoilLayer > * >(argp1); + arg1 = const_cast< cmf::upslope::SoilLayer * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::upslope::SoilLayer > * >(argp1); + arg1 = const_cast< cmf::upslope::SoilLayer * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + try { + result = (real)((cmf::upslope::SoilLayer const *)arg1)->get_saturated_depth(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SoilLayer_get_flow_crosssection(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::SoilLayer *arg1 = (cmf::upslope::SoilLayer *) 0 ; + cmf::upslope::SoilLayer *arg2 = 0 ; + bool arg3 = (bool) false ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::upslope::SoilLayer const > tempshared1 ; + std::shared_ptr< cmf::upslope::SoilLayer const > *smartarg1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + std::shared_ptr< cmf::upslope::SoilLayer const > tempshared2 ; + bool val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "target",(char *) "HorizontalLayers", NULL + }; + real result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:SoilLayer_get_flow_crosssection",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SoilLayer_get_flow_crosssection" "', argument " "1"" of type '" "cmf::upslope::SoilLayer const *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::upslope::SoilLayer > * >(argp1); + delete reinterpret_cast< std::shared_ptr< const cmf::upslope::SoilLayer > * >(argp1); + arg1 = const_cast< cmf::upslope::SoilLayer * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::upslope::SoilLayer > * >(argp1); + arg1 = const_cast< cmf::upslope::SoilLayer * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + int newmem = 0; + res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 , &newmem); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SoilLayer_get_flow_crosssection" "', argument " "2"" of type '" "cmf::upslope::SoilLayer const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SoilLayer_get_flow_crosssection" "', argument " "2"" of type '" "cmf::upslope::SoilLayer const &""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared2 = *reinterpret_cast< std::shared_ptr< const cmf::upslope::SoilLayer > * >(argp2); + delete reinterpret_cast< std::shared_ptr< const cmf::upslope::SoilLayer > * >(argp2); + arg2 = const_cast< cmf::upslope::SoilLayer * >(tempshared2.get()); + } else { + arg2 = const_cast< cmf::upslope::SoilLayer * >(reinterpret_cast< std::shared_ptr< const cmf::upslope::SoilLayer > * >(argp2)->get()); + } + } + if (obj2) { + ecode3 = SWIG_AsVal_bool(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SoilLayer_get_flow_crosssection" "', argument " "3"" of type '" "bool""'"); + } + arg3 = static_cast< bool >(val3); + } + { + try { + result = (real)((cmf::upslope::SoilLayer const *)arg1)->get_flow_crosssection((cmf::upslope::SoilLayer const &)*arg2,arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SoilLayer_cast(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::flux_node::ptr arg1 ; + void *argp1 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + char * kwnames[] = { + (char *) "node", NULL + }; + cmf::upslope::SoilLayer::ptr result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:SoilLayer_cast",kwnames,&obj0)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SoilLayer_cast" "', argument " "1"" of type '" "cmf::water::flux_node::ptr""'"); + } + if (argp1) arg1 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp1)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp1); + } + { + try { + result = cmf::upslope::SoilLayer::cast(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + std::shared_ptr< cmf::upslope::SoilLayer > *smartresult = result ? new std::shared_ptr< cmf::upslope::SoilLayer >(result) : 0; + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, SWIG_POINTER_OWN); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SoilLayer_gravitational_potential_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::SoilLayer *arg1 = (cmf::upslope::SoilLayer *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::upslope::SoilLayer > tempshared1 ; + std::shared_ptr< cmf::upslope::SoilLayer > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SoilLayer_gravitational_potential_get" "', argument " "1"" of type '" "cmf::upslope::SoilLayer *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); + arg1 = const_cast< cmf::upslope::SoilLayer * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); + arg1 = const_cast< cmf::upslope::SoilLayer * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + try { + result = (real)cmf_upslope_SoilLayer_gravitational_potential_get(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SoilLayer_matrix_potential_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::SoilLayer *arg1 = (cmf::upslope::SoilLayer *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::upslope::SoilLayer > tempshared1 ; + std::shared_ptr< cmf::upslope::SoilLayer > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SoilLayer_matrix_potential_get" "', argument " "1"" of type '" "cmf::upslope::SoilLayer *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); + arg1 = const_cast< cmf::upslope::SoilLayer * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); + arg1 = const_cast< cmf::upslope::SoilLayer * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + try { + result = (real)cmf_upslope_SoilLayer_matrix_potential_get(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SoilLayer_wetness_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::SoilLayer *arg1 = (cmf::upslope::SoilLayer *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::upslope::SoilLayer > tempshared1 ; + std::shared_ptr< cmf::upslope::SoilLayer > *smartarg1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"SoilLayer_wetness_set",2,2,swig_obj)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SoilLayer_wetness_set" "', argument " "1"" of type '" "cmf::upslope::SoilLayer *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); + arg1 = const_cast< cmf::upslope::SoilLayer * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); + arg1 = const_cast< cmf::upslope::SoilLayer * >((smartarg1 ? smartarg1->get() : 0)); + } + } + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SoilLayer_wetness_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + { + try { + cmf_upslope_SoilLayer_wetness_set(arg1,arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SoilLayer_wetness_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::SoilLayer *arg1 = (cmf::upslope::SoilLayer *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::upslope::SoilLayer > tempshared1 ; + std::shared_ptr< cmf::upslope::SoilLayer > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SoilLayer_wetness_get" "', argument " "1"" of type '" "cmf::upslope::SoilLayer *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); + arg1 = const_cast< cmf::upslope::SoilLayer * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); + arg1 = const_cast< cmf::upslope::SoilLayer * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + try { + result = (real)cmf_upslope_SoilLayer_wetness_get(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SoilLayer_theta_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::SoilLayer *arg1 = (cmf::upslope::SoilLayer *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::upslope::SoilLayer > tempshared1 ; + std::shared_ptr< cmf::upslope::SoilLayer > *smartarg1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"SoilLayer_theta_set",2,2,swig_obj)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SoilLayer_theta_set" "', argument " "1"" of type '" "cmf::upslope::SoilLayer *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); + arg1 = const_cast< cmf::upslope::SoilLayer * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); + arg1 = const_cast< cmf::upslope::SoilLayer * >((smartarg1 ? smartarg1->get() : 0)); + } + } + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SoilLayer_theta_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + { + try { + cmf_upslope_SoilLayer_theta_set(arg1,arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SoilLayer_theta_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::SoilLayer *arg1 = (cmf::upslope::SoilLayer *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::upslope::SoilLayer > tempshared1 ; + std::shared_ptr< cmf::upslope::SoilLayer > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SoilLayer_theta_get" "', argument " "1"" of type '" "cmf::upslope::SoilLayer *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); + arg1 = const_cast< cmf::upslope::SoilLayer * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); + arg1 = const_cast< cmf::upslope::SoilLayer * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + try { + result = (real)cmf_upslope_SoilLayer_theta_get(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SoilLayer_K_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::SoilLayer *arg1 = (cmf::upslope::SoilLayer *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::upslope::SoilLayer > tempshared1 ; + std::shared_ptr< cmf::upslope::SoilLayer > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SoilLayer_K_get" "', argument " "1"" of type '" "cmf::upslope::SoilLayer *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); + arg1 = const_cast< cmf::upslope::SoilLayer * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); + arg1 = const_cast< cmf::upslope::SoilLayer * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + try { + result = (real)cmf_upslope_SoilLayer_K_get(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SoilLayer_Ksat_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::SoilLayer *arg1 = (cmf::upslope::SoilLayer *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::upslope::SoilLayer > tempshared1 ; + std::shared_ptr< cmf::upslope::SoilLayer > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SoilLayer_Ksat_get" "', argument " "1"" of type '" "cmf::upslope::SoilLayer *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); + arg1 = const_cast< cmf::upslope::SoilLayer * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); + arg1 = const_cast< cmf::upslope::SoilLayer * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + try { + result = (real)cmf_upslope_SoilLayer_Ksat_get(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SoilLayer_thickness_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::SoilLayer *arg1 = (cmf::upslope::SoilLayer *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::upslope::SoilLayer > tempshared1 ; + std::shared_ptr< cmf::upslope::SoilLayer > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SoilLayer_thickness_get" "', argument " "1"" of type '" "cmf::upslope::SoilLayer *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); + arg1 = const_cast< cmf::upslope::SoilLayer * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); + arg1 = const_cast< cmf::upslope::SoilLayer * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + try { + result = (real)cmf_upslope_SoilLayer_thickness_get(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SoilLayer_lower_boundary_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::SoilLayer *arg1 = (cmf::upslope::SoilLayer *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::upslope::SoilLayer > tempshared1 ; + std::shared_ptr< cmf::upslope::SoilLayer > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SoilLayer_lower_boundary_get" "', argument " "1"" of type '" "cmf::upslope::SoilLayer *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); + arg1 = const_cast< cmf::upslope::SoilLayer * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); + arg1 = const_cast< cmf::upslope::SoilLayer * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + try { + result = (real)cmf_upslope_SoilLayer_lower_boundary_get(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SoilLayer_upper_boundary_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::SoilLayer *arg1 = (cmf::upslope::SoilLayer *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::upslope::SoilLayer > tempshared1 ; + std::shared_ptr< cmf::upslope::SoilLayer > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SoilLayer_upper_boundary_get" "', argument " "1"" of type '" "cmf::upslope::SoilLayer *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); + arg1 = const_cast< cmf::upslope::SoilLayer * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); + arg1 = const_cast< cmf::upslope::SoilLayer * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + try { + result = (real)cmf_upslope_SoilLayer_upper_boundary_get(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SoilLayer_porosity_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::SoilLayer *arg1 = (cmf::upslope::SoilLayer *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::upslope::SoilLayer > tempshared1 ; + std::shared_ptr< cmf::upslope::SoilLayer > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SoilLayer_porosity_get" "', argument " "1"" of type '" "cmf::upslope::SoilLayer *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); + arg1 = const_cast< cmf::upslope::SoilLayer * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); + arg1 = const_cast< cmf::upslope::SoilLayer * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + try { + result = (real)cmf_upslope_SoilLayer_porosity_get(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SoilLayer_ice_fraction_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::SoilLayer *arg1 = (cmf::upslope::SoilLayer *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::upslope::SoilLayer > tempshared1 ; + std::shared_ptr< cmf::upslope::SoilLayer > *smartarg1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"SoilLayer_ice_fraction_set",2,2,swig_obj)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SoilLayer_ice_fraction_set" "', argument " "1"" of type '" "cmf::upslope::SoilLayer *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); + arg1 = const_cast< cmf::upslope::SoilLayer * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); + arg1 = const_cast< cmf::upslope::SoilLayer * >((smartarg1 ? smartarg1->get() : 0)); + } + } + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SoilLayer_ice_fraction_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + { + try { + cmf_upslope_SoilLayer_ice_fraction_set(arg1,arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SoilLayer_ice_fraction_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::SoilLayer *arg1 = (cmf::upslope::SoilLayer *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::upslope::SoilLayer > tempshared1 ; + std::shared_ptr< cmf::upslope::SoilLayer > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SoilLayer_ice_fraction_get" "', argument " "1"" of type '" "cmf::upslope::SoilLayer *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); + arg1 = const_cast< cmf::upslope::SoilLayer * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); + arg1 = const_cast< cmf::upslope::SoilLayer * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + try { + result = (real)cmf_upslope_SoilLayer_ice_fraction_get(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SoilLayer_rootfraction_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::SoilLayer *arg1 = (cmf::upslope::SoilLayer *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::upslope::SoilLayer > tempshared1 ; + std::shared_ptr< cmf::upslope::SoilLayer > *smartarg1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"SoilLayer_rootfraction_set",2,2,swig_obj)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SoilLayer_rootfraction_set" "', argument " "1"" of type '" "cmf::upslope::SoilLayer *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); + arg1 = const_cast< cmf::upslope::SoilLayer * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); + arg1 = const_cast< cmf::upslope::SoilLayer * >((smartarg1 ? smartarg1->get() : 0)); + } + } + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SoilLayer_rootfraction_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + { + try { + cmf_upslope_SoilLayer_rootfraction_set(arg1,arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SoilLayer_rootfraction_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::SoilLayer *arg1 = (cmf::upslope::SoilLayer *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::upslope::SoilLayer > tempshared1 ; + std::shared_ptr< cmf::upslope::SoilLayer > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SoilLayer_rootfraction_get" "', argument " "1"" of type '" "cmf::upslope::SoilLayer *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); + arg1 = const_cast< cmf::upslope::SoilLayer * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); + arg1 = const_cast< cmf::upslope::SoilLayer * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + try { + result = (real)cmf_upslope_SoilLayer_rootfraction_get(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_SoilLayer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::SoilLayer *arg1 = (cmf::upslope::SoilLayer *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::upslope::SoilLayer > tempshared1 ; + std::shared_ptr< cmf::upslope::SoilLayer > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SoilLayer" "', argument " "1"" of type '" "cmf::upslope::SoilLayer *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); + arg1 = const_cast< cmf::upslope::SoilLayer * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::SoilLayer > * >(argp1); + arg1 = const_cast< cmf::upslope::SoilLayer * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + try { + (void)arg1; delete smartarg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *SoilLayer_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_layer_list__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::upslope::layer_list *arg1 = 0 ; + cmf::upslope::layer_list temp_list1 ; + cmf::upslope::layer_list *result = 0 ; + + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + { + if (SWIG_ConvertPtr(swig_obj[0], (void **) &arg1, SWIGTYPE_p_cmf__upslope__layer_list, SWIG_POINTER_EXCEPTION) == -1) { + int res = iterable_to_list(swig_obj[0],SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, temp_list1); + if (SWIG_IsOK(res)) { + arg1 = &temp_list1; + } else { + SWIG_exception_fail(SWIG_TypeError,"Only iterables can be converted to cmf::upslope::layer_list"); + } + } + } + { + try { + result = (cmf::upslope::layer_list *)new cmf::upslope::layer_list((cmf::upslope::layer_list const &)*arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__layer_list, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_layer_list__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) { + PyObject *resultobj = 0; + cmf::upslope::layer_list *result = 0 ; + + if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; + { + try { + result = (cmf::upslope::layer_list *)new cmf::upslope::layer_list(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__layer_list, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_layer_list__SWIG_2(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::water::node_list *arg1 = 0 ; + cmf::water::node_list temp_list1 ; + cmf::upslope::layer_list *result = 0 ; + + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + { + if (SWIG_ConvertPtr(swig_obj[0], (void **) &arg1, SWIGTYPE_p_cmf__water__node_list, SWIG_POINTER_EXCEPTION) == -1) { + int res = iterable_to_list(swig_obj[0],SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, temp_list1); + if (SWIG_IsOK(res)) { + arg1 = &temp_list1; + } else { + SWIG_exception_fail(SWIG_TypeError,"Only iterables can be converted to cmf::water::node_list"); + } + } + } + { + try { + result = (cmf::upslope::layer_list *)new cmf::upslope::layer_list((cmf::water::node_list const &)*arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__layer_list, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_layer_list(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[2] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"new_layer_list",0,1,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 0) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + if (argc == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + { + _v = is_listtype_or_iterable(argv[0],SWIGTYPE_p_cmf__upslope__layer_list); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + if (argc == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + { + _v = is_listtype_or_iterable(argv[0],SWIGTYPE_p_cmf__water__node_list); + } + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 3; + if (_rank == _rankm) goto dispatch; + } + } + check_3: + + dispatch: + switch(_index) { + case 1: + return _wrap_new_layer_list__SWIG_1(self, argc, argv); + case 2: + return _wrap_new_layer_list__SWIG_0(self, argc, argv); + case 3: + return _wrap_new_layer_list__SWIG_2(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_layer_list'.\n" + " Possible C/C++ prototypes are:\n" + " cmf::upslope::layer_list::layer_list(cmf::upslope::layer_list const &)\n" + " cmf::upslope::layer_list::layer_list()\n" + " cmf::upslope::layer_list::layer_list(cmf::water::node_list const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_layer_list_pop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::layer_list *arg1 = (cmf::upslope::layer_list *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::upslope::SoilLayer::ptr result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__layer_list, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "layer_list_pop" "', argument " "1"" of type '" "cmf::upslope::layer_list *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::layer_list * >(argp1); + { + try { + result = (arg1)->pop(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + std::shared_ptr< cmf::upslope::SoilLayer > *smartresult = result ? new std::shared_ptr< cmf::upslope::SoilLayer >(result) : 0; + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, SWIG_POINTER_OWN); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_layer_list_append(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::layer_list *arg1 = (cmf::upslope::layer_list *) 0 ; + cmf::upslope::SoilLayer::ptr arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "l", NULL + }; + cmf::upslope::layer_list *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:layer_list_append",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__layer_list, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "layer_list_append" "', argument " "1"" of type '" "cmf::upslope::layer_list *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::layer_list * >(argp1); + { + int newmem = 0; + res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 , &newmem); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "layer_list_append" "', argument " "2"" of type '" "cmf::upslope::SoilLayer::ptr""'"); + } + if (argp2) arg2 = *(reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp2)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp2); + } + { + try { + result = (cmf::upslope::layer_list *) &(arg1)->append(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__layer_list, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_layer_list_extend__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::upslope::layer_list *arg1 = (cmf::upslope::layer_list *) 0 ; + cmf::upslope::layer_list *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + cmf::upslope::layer_list temp_list2 ; + cmf::upslope::layer_list *result = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__layer_list, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "layer_list_extend" "', argument " "1"" of type '" "cmf::upslope::layer_list *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::layer_list * >(argp1); + { + if (SWIG_ConvertPtr(swig_obj[1], (void **) &arg2, SWIGTYPE_p_cmf__upslope__layer_list, SWIG_POINTER_EXCEPTION) == -1) { + int res = iterable_to_list(swig_obj[1],SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, temp_list2); + if (SWIG_IsOK(res)) { + arg2 = &temp_list2; + } else { + SWIG_exception_fail(SWIG_TypeError,"Only iterables can be converted to cmf::upslope::layer_list"); + } + } + } + { + try { + result = (cmf::upslope::layer_list *) &(arg1)->extend((cmf::upslope::layer_list const &)*arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__layer_list, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_layer_list_extend__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::upslope::layer_list *arg1 = (cmf::upslope::layer_list *) 0 ; + cmf::water::node_list *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + cmf::water::node_list temp_list2 ; + cmf::upslope::layer_list *result = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__layer_list, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "layer_list_extend" "', argument " "1"" of type '" "cmf::upslope::layer_list *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::layer_list * >(argp1); + { + if (SWIG_ConvertPtr(swig_obj[1], (void **) &arg2, SWIGTYPE_p_cmf__water__node_list, SWIG_POINTER_EXCEPTION) == -1) { + int res = iterable_to_list(swig_obj[1],SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, temp_list2); + if (SWIG_IsOK(res)) { + arg2 = &temp_list2; + } else { + SWIG_exception_fail(SWIG_TypeError,"Only iterables can be converted to cmf::water::node_list"); + } + } + } + { + try { + result = (cmf::upslope::layer_list *) &(arg1)->extend((cmf::water::node_list const &)*arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__layer_list, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_layer_list_extend(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"layer_list_extend",0,2,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__upslope__layer_list, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + _v = is_listtype_or_iterable(argv[1],SWIGTYPE_p_cmf__upslope__layer_list); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__upslope__layer_list, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + _v = is_listtype_or_iterable(argv[1],SWIGTYPE_p_cmf__water__node_list); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_layer_list_extend__SWIG_0(self, argc, argv); + case 2: + return _wrap_layer_list_extend__SWIG_1(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'layer_list_extend'.\n" + " Possible C/C++ prototypes are:\n" + " cmf::upslope::layer_list::extend(cmf::upslope::layer_list const &)\n" + " cmf::upslope::layer_list::extend(cmf::water::node_list const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_layer_list_get_slice(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::layer_list *arg1 = (cmf::upslope::layer_list *) 0 ; + size_t arg2 = (size_t) 0 ; + size_t arg3 = (size_t) 1000000 ; + size_t arg4 = (size_t) 1 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + size_t val3 ; + int ecode3 = 0 ; + size_t val4 ; + int ecode4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "first",(char *) "last",(char *) "step", NULL + }; + cmf::upslope::layer_list result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOO:layer_list_get_slice",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__layer_list, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "layer_list_get_slice" "', argument " "1"" of type '" "cmf::upslope::layer_list *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::layer_list * >(argp1); + if (obj1) { + ecode2 = SWIG_AsVal_size_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "layer_list_get_slice" "', argument " "2"" of type '" "size_t""'"); + } + arg2 = static_cast< size_t >(val2); + } + if (obj2) { + ecode3 = SWIG_AsVal_size_t(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "layer_list_get_slice" "', argument " "3"" of type '" "size_t""'"); + } + arg3 = static_cast< size_t >(val3); + } + if (obj3) { + ecode4 = SWIG_AsVal_size_t(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "layer_list_get_slice" "', argument " "4"" of type '" "size_t""'"); + } + arg4 = static_cast< size_t >(val4); + } + { + try { + result = (arg1)->get_slice(arg2,arg3,arg4); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj((new cmf::upslope::layer_list(static_cast< const cmf::upslope::layer_list& >(result))), SWIGTYPE_p_cmf__upslope__layer_list, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_layer_list_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::layer_list *arg1 = (cmf::upslope::layer_list *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__layer_list, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "layer_list_clear" "', argument " "1"" of type '" "cmf::upslope::layer_list *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::layer_list * >(argp1); + { + try { + (arg1)->clear(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_layer_list_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::layer_list *arg1 = (cmf::upslope::layer_list *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + size_t result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__layer_list, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "layer_list_size" "', argument " "1"" of type '" "cmf::upslope::layer_list const *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::layer_list * >(argp1); + { + try { + result = ((cmf::upslope::layer_list const *)arg1)->size(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_layer_list_set_wetness(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::layer_list *arg1 = (cmf::upslope::layer_list *) 0 ; + cmf::math::num_array *arg2 = 0 ; + size_t arg3 = (size_t) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "Value",(char *) "offset", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:layer_list_set_wetness",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__layer_list, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "layer_list_set_wetness" "', argument " "1"" of type '" "cmf::upslope::layer_list *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::layer_list * >(argp1); + { + // Convert a array_wrapper from numpy array + double * data=0; + ptrdiff_t size = from_npy_array(obj1,&data); + if (!data) { + SWIG_exception_fail(SWIG_TypeError,"Input data is not 'array-like' (in the sense of numpy arrays)"); + return NULL; + } + arg2 = new cmf::math::num_array(size,data); + } + if (obj2) { + ecode3 = SWIG_AsVal_size_t(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "layer_list_set_wetness" "', argument " "3"" of type '" "size_t""'"); + } + arg3 = static_cast< size_t >(val3); + } + { + try { + (arg1)->set_wetness((cmf::math::num_array const &)*arg2,arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + { + delete arg2; + } + return resultobj; +fail: + { + delete arg2; + } + return NULL; +} + + +SWIGINTERN PyObject *_wrap_layer_list_set_potential(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::layer_list *arg1 = (cmf::upslope::layer_list *) 0 ; + cmf::math::num_array *arg2 = 0 ; + size_t arg3 = (size_t) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "Value",(char *) "offset", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:layer_list_set_potential",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__layer_list, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "layer_list_set_potential" "', argument " "1"" of type '" "cmf::upslope::layer_list *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::layer_list * >(argp1); + { + // Convert a array_wrapper from numpy array + double * data=0; + ptrdiff_t size = from_npy_array(obj1,&data); + if (!data) { + SWIG_exception_fail(SWIG_TypeError,"Input data is not 'array-like' (in the sense of numpy arrays)"); + return NULL; + } + arg2 = new cmf::math::num_array(size,data); + } + if (obj2) { + ecode3 = SWIG_AsVal_size_t(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "layer_list_set_potential" "', argument " "3"" of type '" "size_t""'"); + } + arg3 = static_cast< size_t >(val3); + } + { + try { + (arg1)->set_potential((cmf::math::num_array const &)*arg2,arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + { + delete arg2; + } + return resultobj; +fail: + { + delete arg2; + } + return NULL; +} + + +SWIGINTERN PyObject *_wrap_layer_list_set_volume(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::layer_list *arg1 = (cmf::upslope::layer_list *) 0 ; + cmf::math::num_array *arg2 = 0 ; + size_t arg3 = (size_t) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "Value",(char *) "offset", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:layer_list_set_volume",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__layer_list, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "layer_list_set_volume" "', argument " "1"" of type '" "cmf::upslope::layer_list *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::layer_list * >(argp1); + { + // Convert a array_wrapper from numpy array + double * data=0; + ptrdiff_t size = from_npy_array(obj1,&data); + if (!data) { + SWIG_exception_fail(SWIG_TypeError,"Input data is not 'array-like' (in the sense of numpy arrays)"); + return NULL; + } + arg2 = new cmf::math::num_array(size,data); + } + if (obj2) { + ecode3 = SWIG_AsVal_size_t(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "layer_list_set_volume" "', argument " "3"" of type '" "size_t""'"); + } + arg3 = static_cast< size_t >(val3); + } + { + try { + (arg1)->set_volume((cmf::math::num_array const &)*arg2,arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + { + delete arg2; + } + return resultobj; +fail: + { + delete arg2; + } + return NULL; +} + + +SWIGINTERN PyObject *_wrap_layer_list_get_percolation(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::layer_list *arg1 = (cmf::upslope::layer_list *) 0 ; + cmf::math::Time arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "t", NULL + }; + cmf::math::num_array result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:layer_list_get_percolation",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__layer_list, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "layer_list_get_percolation" "', argument " "1"" of type '" "cmf::upslope::layer_list const *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::layer_list * >(argp1); + { + arg2 = convert_datetime_to_cmftime(obj1); + if (arg2 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } + } + { + try { + result = ((cmf::upslope::layer_list const *)arg1)->get_percolation(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + resultobj = as_npy_array(result); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_layer_list_set_theta(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::layer_list *arg1 = (cmf::upslope::layer_list *) 0 ; + cmf::math::num_array *arg2 = 0 ; + size_t arg3 = (size_t) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "Value",(char *) "offset", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:layer_list_set_theta",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__layer_list, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "layer_list_set_theta" "', argument " "1"" of type '" "cmf::upslope::layer_list *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::layer_list * >(argp1); + { + // Convert a array_wrapper from numpy array + double * data=0; + ptrdiff_t size = from_npy_array(obj1,&data); + if (!data) { + SWIG_exception_fail(SWIG_TypeError,"Input data is not 'array-like' (in the sense of numpy arrays)"); + return NULL; + } + arg2 = new cmf::math::num_array(size,data); + } + if (obj2) { + ecode3 = SWIG_AsVal_size_t(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "layer_list_set_theta" "', argument " "3"" of type '" "size_t""'"); + } + arg3 = static_cast< size_t >(val3); + } + { + try { + (arg1)->set_theta((cmf::math::num_array const &)*arg2,arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + { + delete arg2; + } + return resultobj; +fail: + { + delete arg2; + } + return NULL; +} + + +SWIGINTERN PyObject *_wrap_layer_list_set_ice_fraction(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::layer_list *arg1 = (cmf::upslope::layer_list *) 0 ; + cmf::math::num_array *arg2 = 0 ; + size_t arg3 = (size_t) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "Value",(char *) "offset", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:layer_list_set_ice_fraction",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__layer_list, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "layer_list_set_ice_fraction" "', argument " "1"" of type '" "cmf::upslope::layer_list *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::layer_list * >(argp1); + { + // Convert a array_wrapper from numpy array + double * data=0; + ptrdiff_t size = from_npy_array(obj1,&data); + if (!data) { + SWIG_exception_fail(SWIG_TypeError,"Input data is not 'array-like' (in the sense of numpy arrays)"); + return NULL; + } + arg2 = new cmf::math::num_array(size,data); + } + if (obj2) { + ecode3 = SWIG_AsVal_size_t(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "layer_list_set_ice_fraction" "', argument " "3"" of type '" "size_t""'"); + } + arg3 = static_cast< size_t >(val3); + } + { + try { + (arg1)->set_ice_fraction((cmf::math::num_array const &)*arg2,arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + { + delete arg2; + } + return resultobj; +fail: + { + delete arg2; + } + return NULL; +} + + +SWIGINTERN PyObject *_wrap_layer_list_set_rootfraction(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::layer_list *arg1 = (cmf::upslope::layer_list *) 0 ; + cmf::math::num_array *arg2 = 0 ; + size_t arg3 = (size_t) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "Value",(char *) "offset", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:layer_list_set_rootfraction",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__layer_list, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "layer_list_set_rootfraction" "', argument " "1"" of type '" "cmf::upslope::layer_list *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::layer_list * >(argp1); + { + // Convert a array_wrapper from numpy array + double * data=0; + ptrdiff_t size = from_npy_array(obj1,&data); + if (!data) { + SWIG_exception_fail(SWIG_TypeError,"Input data is not 'array-like' (in the sense of numpy arrays)"); + return NULL; + } + arg2 = new cmf::math::num_array(size,data); + } + if (obj2) { + ecode3 = SWIG_AsVal_size_t(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "layer_list_set_rootfraction" "', argument " "3"" of type '" "size_t""'"); + } + arg3 = static_cast< size_t >(val3); + } + { + try { + (arg1)->set_rootfraction((cmf::math::num_array const &)*arg2,arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + { + delete arg2; + } + return resultobj; +fail: + { + delete arg2; + } + return NULL; +} + + +SWIGINTERN PyObject *_wrap_layer_list_gravitational_potential_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::layer_list *arg1 = (cmf::upslope::layer_list *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::math::num_array result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__layer_list, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "layer_list_gravitational_potential_get" "', argument " "1"" of type '" "cmf::upslope::layer_list *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::layer_list * >(argp1); + { + try { + result = cmf_upslope_layer_list_gravitational_potential_get(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + resultobj = as_npy_array(result); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_layer_list_matrix_potential_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::layer_list *arg1 = (cmf::upslope::layer_list *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::math::num_array result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__layer_list, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "layer_list_matrix_potential_get" "', argument " "1"" of type '" "cmf::upslope::layer_list *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::layer_list * >(argp1); + { + try { + result = cmf_upslope_layer_list_matrix_potential_get(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + resultobj = as_npy_array(result); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_layer_list_wetness_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::layer_list *arg1 = (cmf::upslope::layer_list *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::math::num_array result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__layer_list, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "layer_list_wetness_get" "', argument " "1"" of type '" "cmf::upslope::layer_list *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::layer_list * >(argp1); + { + try { + result = cmf_upslope_layer_list_wetness_get(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + resultobj = as_npy_array(result); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_layer_list_volume_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::layer_list *arg1 = (cmf::upslope::layer_list *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::math::num_array result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__layer_list, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "layer_list_volume_get" "', argument " "1"" of type '" "cmf::upslope::layer_list *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::layer_list * >(argp1); + { + try { + result = cmf_upslope_layer_list_volume_get(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + resultobj = as_npy_array(result); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_layer_list_potential_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::layer_list *arg1 = (cmf::upslope::layer_list *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::math::num_array result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__layer_list, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "layer_list_potential_get" "', argument " "1"" of type '" "cmf::upslope::layer_list *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::layer_list * >(argp1); + { + try { + result = cmf_upslope_layer_list_potential_get(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + resultobj = as_npy_array(result); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_layer_list_K_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::layer_list *arg1 = (cmf::upslope::layer_list *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::math::num_array result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__layer_list, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "layer_list_K_get" "', argument " "1"" of type '" "cmf::upslope::layer_list *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::layer_list * >(argp1); + { + try { + result = cmf_upslope_layer_list_K_get(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + resultobj = as_npy_array(result); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_layer_list_Ksat_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::layer_list *arg1 = (cmf::upslope::layer_list *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::math::num_array result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__layer_list, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "layer_list_Ksat_get" "', argument " "1"" of type '" "cmf::upslope::layer_list *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::layer_list * >(argp1); + { + try { + result = cmf_upslope_layer_list_Ksat_get(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + resultobj = as_npy_array(result); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_layer_list_thickness_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::layer_list *arg1 = (cmf::upslope::layer_list *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::math::num_array result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__layer_list, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "layer_list_thickness_get" "', argument " "1"" of type '" "cmf::upslope::layer_list *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::layer_list * >(argp1); + { + try { + result = cmf_upslope_layer_list_thickness_get(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + resultobj = as_npy_array(result); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_layer_list_lower_boundary_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::layer_list *arg1 = (cmf::upslope::layer_list *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::math::num_array result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__layer_list, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "layer_list_lower_boundary_get" "', argument " "1"" of type '" "cmf::upslope::layer_list *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::layer_list * >(argp1); + { + try { + result = cmf_upslope_layer_list_lower_boundary_get(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + resultobj = as_npy_array(result); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_layer_list_upper_boundary_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::layer_list *arg1 = (cmf::upslope::layer_list *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::math::num_array result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__layer_list, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "layer_list_upper_boundary_get" "', argument " "1"" of type '" "cmf::upslope::layer_list *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::layer_list * >(argp1); + { + try { + result = cmf_upslope_layer_list_upper_boundary_get(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + resultobj = as_npy_array(result); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_layer_list_porosity_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::layer_list *arg1 = (cmf::upslope::layer_list *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::math::num_array result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__layer_list, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "layer_list_porosity_get" "', argument " "1"" of type '" "cmf::upslope::layer_list *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::layer_list * >(argp1); + { + try { + result = cmf_upslope_layer_list_porosity_get(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + resultobj = as_npy_array(result); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_layer_list_ice_fraction_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::layer_list *arg1 = (cmf::upslope::layer_list *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::math::num_array result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__layer_list, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "layer_list_ice_fraction_get" "', argument " "1"" of type '" "cmf::upslope::layer_list *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::layer_list * >(argp1); + { + try { + result = cmf_upslope_layer_list_ice_fraction_get(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + resultobj = as_npy_array(result); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_layer_list_theta_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::layer_list *arg1 = (cmf::upslope::layer_list *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::math::num_array result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__layer_list, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "layer_list_theta_get" "', argument " "1"" of type '" "cmf::upslope::layer_list *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::layer_list * >(argp1); + { + try { + result = cmf_upslope_layer_list_theta_get(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + resultobj = as_npy_array(result); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_layer_list_root_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::layer_list *arg1 = (cmf::upslope::layer_list *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::math::num_array result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__layer_list, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "layer_list_root_get" "', argument " "1"" of type '" "cmf::upslope::layer_list *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::layer_list * >(argp1); + { + try { + result = cmf_upslope_layer_list_root_get(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + resultobj = as_npy_array(result); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_layer_list___get(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::layer_list *arg1 = (cmf::upslope::layer_list *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "index", NULL + }; + cmf::upslope::SoilLayer::ptr result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:layer_list___get",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__layer_list, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "layer_list___get" "', argument " "1"" of type '" "cmf::upslope::layer_list *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::layer_list * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "layer_list___get" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + { + try { + result = cmf_upslope_layer_list___get(arg1,arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + std::shared_ptr< cmf::upslope::SoilLayer > *smartresult = result ? new std::shared_ptr< cmf::upslope::SoilLayer >(result) : 0; + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, SWIG_POINTER_OWN); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_layer_list(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::layer_list *arg1 = (cmf::upslope::layer_list *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__layer_list, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_layer_list" "', argument " "1"" of type '" "cmf::upslope::layer_list *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::layer_list * >(argp1); + { + try { + delete arg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *layer_list_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__layer_list, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *layer_list_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_MacroPore_porefraction_min_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::MacroPore *arg1 = (cmf::upslope::MacroPore *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::upslope::MacroPore > tempshared1 ; + std::shared_ptr< cmf::upslope::MacroPore > *smartarg1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"MacroPore_porefraction_min_set",2,2,swig_obj)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__MacroPore_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MacroPore_porefraction_min_set" "', argument " "1"" of type '" "cmf::upslope::MacroPore *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); + arg1 = const_cast< cmf::upslope::MacroPore * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); + arg1 = const_cast< cmf::upslope::MacroPore * >((smartarg1 ? smartarg1->get() : 0)); + } + } + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MacroPore_porefraction_min_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->porefraction_min = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_MacroPore_porefraction_min_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::MacroPore *arg1 = (cmf::upslope::MacroPore *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::upslope::MacroPore > tempshared1 ; + std::shared_ptr< cmf::upslope::MacroPore > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__MacroPore_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MacroPore_porefraction_min_get" "', argument " "1"" of type '" "cmf::upslope::MacroPore *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); + arg1 = const_cast< cmf::upslope::MacroPore * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); + arg1 = const_cast< cmf::upslope::MacroPore * >((smartarg1 ? smartarg1->get() : 0)); + } + } + result = (real) ((arg1)->porefraction_min); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_MacroPore_porefraction_max_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::MacroPore *arg1 = (cmf::upslope::MacroPore *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::upslope::MacroPore > tempshared1 ; + std::shared_ptr< cmf::upslope::MacroPore > *smartarg1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"MacroPore_porefraction_max_set",2,2,swig_obj)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__MacroPore_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MacroPore_porefraction_max_set" "', argument " "1"" of type '" "cmf::upslope::MacroPore *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); + arg1 = const_cast< cmf::upslope::MacroPore * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); + arg1 = const_cast< cmf::upslope::MacroPore * >((smartarg1 ? smartarg1->get() : 0)); + } + } + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MacroPore_porefraction_max_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->porefraction_max = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_MacroPore_porefraction_max_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::MacroPore *arg1 = (cmf::upslope::MacroPore *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::upslope::MacroPore > tempshared1 ; + std::shared_ptr< cmf::upslope::MacroPore > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__MacroPore_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MacroPore_porefraction_max_get" "', argument " "1"" of type '" "cmf::upslope::MacroPore *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); + arg1 = const_cast< cmf::upslope::MacroPore * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); + arg1 = const_cast< cmf::upslope::MacroPore * >((smartarg1 ? smartarg1->get() : 0)); + } + } + result = (real) ((arg1)->porefraction_max); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_MacroPore___get_layer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::MacroPore *arg1 = (cmf::upslope::MacroPore *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::upslope::MacroPore const > tempshared1 ; + std::shared_ptr< cmf::upslope::MacroPore const > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + cmf::upslope::SoilLayer::ptr result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__MacroPore_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MacroPore___get_layer" "', argument " "1"" of type '" "cmf::upslope::MacroPore const *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::upslope::MacroPore > * >(argp1); + delete reinterpret_cast< std::shared_ptr< const cmf::upslope::MacroPore > * >(argp1); + arg1 = const_cast< cmf::upslope::MacroPore * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::upslope::MacroPore > * >(argp1); + arg1 = const_cast< cmf::upslope::MacroPore * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + try { + result = ((cmf::upslope::MacroPore const *)arg1)->get_layer(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + std::shared_ptr< cmf::upslope::SoilLayer > *smartresult = result ? new std::shared_ptr< cmf::upslope::SoilLayer >(result) : 0; + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, SWIG_POINTER_OWN); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_MacroPore_get_porefraction(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::MacroPore *arg1 = (cmf::upslope::MacroPore *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::upslope::MacroPore const > tempshared1 ; + std::shared_ptr< cmf::upslope::MacroPore const > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__MacroPore_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MacroPore_get_porefraction" "', argument " "1"" of type '" "cmf::upslope::MacroPore const *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::upslope::MacroPore > * >(argp1); + delete reinterpret_cast< std::shared_ptr< const cmf::upslope::MacroPore > * >(argp1); + arg1 = const_cast< cmf::upslope::MacroPore * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::upslope::MacroPore > * >(argp1); + arg1 = const_cast< cmf::upslope::MacroPore * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + try { + result = (real)((cmf::upslope::MacroPore const *)arg1)->get_porefraction(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_MacroPore_density_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::MacroPore *arg1 = (cmf::upslope::MacroPore *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::upslope::MacroPore > tempshared1 ; + std::shared_ptr< cmf::upslope::MacroPore > *smartarg1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"MacroPore_density_set",2,2,swig_obj)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__MacroPore_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MacroPore_density_set" "', argument " "1"" of type '" "cmf::upslope::MacroPore *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); + arg1 = const_cast< cmf::upslope::MacroPore * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); + arg1 = const_cast< cmf::upslope::MacroPore * >((smartarg1 ? smartarg1->get() : 0)); + } + } + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MacroPore_density_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->density = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_MacroPore_density_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::MacroPore *arg1 = (cmf::upslope::MacroPore *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::upslope::MacroPore > tempshared1 ; + std::shared_ptr< cmf::upslope::MacroPore > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__MacroPore_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MacroPore_density_get" "', argument " "1"" of type '" "cmf::upslope::MacroPore *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); + arg1 = const_cast< cmf::upslope::MacroPore * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); + arg1 = const_cast< cmf::upslope::MacroPore * >((smartarg1 ? smartarg1->get() : 0)); + } + } + result = (real) ((arg1)->density); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_MacroPore_Ksat_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::MacroPore *arg1 = (cmf::upslope::MacroPore *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::upslope::MacroPore > tempshared1 ; + std::shared_ptr< cmf::upslope::MacroPore > *smartarg1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"MacroPore_Ksat_set",2,2,swig_obj)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__MacroPore_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MacroPore_Ksat_set" "', argument " "1"" of type '" "cmf::upslope::MacroPore *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); + arg1 = const_cast< cmf::upslope::MacroPore * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); + arg1 = const_cast< cmf::upslope::MacroPore * >((smartarg1 ? smartarg1->get() : 0)); + } + } + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MacroPore_Ksat_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->Ksat = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_MacroPore_Ksat_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::MacroPore *arg1 = (cmf::upslope::MacroPore *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::upslope::MacroPore > tempshared1 ; + std::shared_ptr< cmf::upslope::MacroPore > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__MacroPore_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MacroPore_Ksat_get" "', argument " "1"" of type '" "cmf::upslope::MacroPore *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); + arg1 = const_cast< cmf::upslope::MacroPore * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); + arg1 = const_cast< cmf::upslope::MacroPore * >((smartarg1 ? smartarg1->get() : 0)); + } + } + result = (real) ((arg1)->Ksat); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_MacroPore_crack_wetness_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::MacroPore *arg1 = (cmf::upslope::MacroPore *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::upslope::MacroPore > tempshared1 ; + std::shared_ptr< cmf::upslope::MacroPore > *smartarg1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"MacroPore_crack_wetness_set",2,2,swig_obj)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__MacroPore_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MacroPore_crack_wetness_set" "', argument " "1"" of type '" "cmf::upslope::MacroPore *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); + arg1 = const_cast< cmf::upslope::MacroPore * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); + arg1 = const_cast< cmf::upslope::MacroPore * >((smartarg1 ? smartarg1->get() : 0)); + } + } + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MacroPore_crack_wetness_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->crack_wetness = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_MacroPore_crack_wetness_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::MacroPore *arg1 = (cmf::upslope::MacroPore *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::upslope::MacroPore > tempshared1 ; + std::shared_ptr< cmf::upslope::MacroPore > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__MacroPore_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MacroPore_crack_wetness_get" "', argument " "1"" of type '" "cmf::upslope::MacroPore *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); + arg1 = const_cast< cmf::upslope::MacroPore * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); + arg1 = const_cast< cmf::upslope::MacroPore * >((smartarg1 ? smartarg1->get() : 0)); + } + } + result = (real) ((arg1)->crack_wetness); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_MacroPore_get_K(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::MacroPore *arg1 = (cmf::upslope::MacroPore *) 0 ; + cmf::geometry::point arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::upslope::MacroPore const > tempshared1 ; + std::shared_ptr< cmf::upslope::MacroPore const > *smartarg1 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "direction", NULL + }; + real result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:MacroPore_get_K",kwnames,&obj0,&obj1)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__MacroPore_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MacroPore_get_K" "', argument " "1"" of type '" "cmf::upslope::MacroPore const *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::upslope::MacroPore > * >(argp1); + delete reinterpret_cast< std::shared_ptr< const cmf::upslope::MacroPore > * >(argp1); + arg1 = const_cast< cmf::upslope::MacroPore * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::upslope::MacroPore > * >(argp1); + arg1 = const_cast< cmf::upslope::MacroPore * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + if (check_xy(obj1)) { + std::string res = convert_xyz_to_point(obj1,arg2); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + return NULL; + } + } + else if (PySequence_Check(obj1)) { + std::string res = convert_seq_to_point(obj1,arg2); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError, res.c_str()); + } + } else { + std::string res="<"; + res+=pyrepr(obj1); + res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + } + } + { + try { + result = (real)((cmf::upslope::MacroPore const *)arg1)->get_K(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_MacroPore_get_crackwidth(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::MacroPore *arg1 = (cmf::upslope::MacroPore *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::upslope::MacroPore const > tempshared1 ; + std::shared_ptr< cmf::upslope::MacroPore const > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__MacroPore_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MacroPore_get_crackwidth" "', argument " "1"" of type '" "cmf::upslope::MacroPore const *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::upslope::MacroPore > * >(argp1); + delete reinterpret_cast< std::shared_ptr< const cmf::upslope::MacroPore > * >(argp1); + arg1 = const_cast< cmf::upslope::MacroPore * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::upslope::MacroPore > * >(argp1); + arg1 = const_cast< cmf::upslope::MacroPore * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + try { + result = (real)((cmf::upslope::MacroPore const *)arg1)->get_crackwidth(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_MacroPore_get_flowwidth(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::MacroPore *arg1 = (cmf::upslope::MacroPore *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::upslope::MacroPore const > tempshared1 ; + std::shared_ptr< cmf::upslope::MacroPore const > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__MacroPore_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MacroPore_get_flowwidth" "', argument " "1"" of type '" "cmf::upslope::MacroPore const *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::upslope::MacroPore > * >(argp1); + delete reinterpret_cast< std::shared_ptr< const cmf::upslope::MacroPore > * >(argp1); + arg1 = const_cast< cmf::upslope::MacroPore * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::upslope::MacroPore > * >(argp1); + arg1 = const_cast< cmf::upslope::MacroPore * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + try { + result = (real)((cmf::upslope::MacroPore const *)arg1)->get_flowwidth(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_MacroPore_K_shape_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::MacroPore *arg1 = (cmf::upslope::MacroPore *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::upslope::MacroPore > tempshared1 ; + std::shared_ptr< cmf::upslope::MacroPore > *smartarg1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"MacroPore_K_shape_set",2,2,swig_obj)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__MacroPore_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MacroPore_K_shape_set" "', argument " "1"" of type '" "cmf::upslope::MacroPore *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); + arg1 = const_cast< cmf::upslope::MacroPore * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); + arg1 = const_cast< cmf::upslope::MacroPore * >((smartarg1 ? smartarg1->get() : 0)); + } + } + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MacroPore_K_shape_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->K_shape = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_MacroPore_K_shape_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::MacroPore *arg1 = (cmf::upslope::MacroPore *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::upslope::MacroPore > tempshared1 ; + std::shared_ptr< cmf::upslope::MacroPore > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__MacroPore_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MacroPore_K_shape_get" "', argument " "1"" of type '" "cmf::upslope::MacroPore *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); + arg1 = const_cast< cmf::upslope::MacroPore * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); + arg1 = const_cast< cmf::upslope::MacroPore * >((smartarg1 ? smartarg1->get() : 0)); + } + } + result = (real) ((arg1)->K_shape); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_MacroPore_create(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::SoilLayer::ptr arg1 ; + real arg2 = (real) 0.05 ; + real arg3 = (real) 10 ; + real arg4 = (real) 0.05 ; + real arg5 = (real) -1. ; + real arg6 = (real) 0.0 ; + void *argp1 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + double val3 ; + int ecode3 = 0 ; + double val4 ; + int ecode4 = 0 ; + double val5 ; + int ecode5 = 0 ; + double val6 ; + int ecode6 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + PyObject * obj5 = 0 ; + char * kwnames[] = { + (char *) "layer",(char *) "porefraction",(char *) "Ksat",(char *) "density",(char *) "porefraction_wilt",(char *) "K_shape", NULL + }; + cmf::upslope::MacroPore::ptr result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOOOO:MacroPore_create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MacroPore_create" "', argument " "1"" of type '" "cmf::upslope::SoilLayer::ptr""'"); + } + if (argp1) arg1 = *(reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp1)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp1); + } + if (obj1) { + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MacroPore_create" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + } + if (obj2) { + ecode3 = SWIG_AsVal_double(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MacroPore_create" "', argument " "3"" of type '" "real""'"); + } + arg3 = static_cast< real >(val3); + } + if (obj3) { + ecode4 = SWIG_AsVal_double(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "MacroPore_create" "', argument " "4"" of type '" "real""'"); + } + arg4 = static_cast< real >(val4); + } + if (obj4) { + ecode5 = SWIG_AsVal_double(obj4, &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "MacroPore_create" "', argument " "5"" of type '" "real""'"); + } + arg5 = static_cast< real >(val5); + } + if (obj5) { + ecode6 = SWIG_AsVal_double(obj5, &val6); + if (!SWIG_IsOK(ecode6)) { + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "MacroPore_create" "', argument " "6"" of type '" "real""'"); + } + arg6 = static_cast< real >(val6); + } + { + try { + result = cmf::upslope::MacroPore::create(arg1,arg2,arg3,arg4,arg5,arg6); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + std::shared_ptr< cmf::upslope::MacroPore > *smartresult = result ? new std::shared_ptr< cmf::upslope::MacroPore >(result) : 0; + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__upslope__MacroPore_t, SWIG_POINTER_OWN); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_MacroPore_cast(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::flux_node::ptr arg1 ; + void *argp1 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + char * kwnames[] = { + (char *) "node", NULL + }; + cmf::upslope::MacroPore::ptr result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:MacroPore_cast",kwnames,&obj0)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MacroPore_cast" "', argument " "1"" of type '" "cmf::water::flux_node::ptr""'"); + } + if (argp1) arg1 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp1)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp1); + } + { + try { + result = cmf::upslope::MacroPore::cast(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + std::shared_ptr< cmf::upslope::MacroPore > *smartresult = result ? new std::shared_ptr< cmf::upslope::MacroPore >(result) : 0; + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__upslope__MacroPore_t, SWIG_POINTER_OWN); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_MacroPore_filled_fraction_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::MacroPore *arg1 = (cmf::upslope::MacroPore *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::upslope::MacroPore > tempshared1 ; + std::shared_ptr< cmf::upslope::MacroPore > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__MacroPore_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MacroPore_filled_fraction_get" "', argument " "1"" of type '" "cmf::upslope::MacroPore *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); + arg1 = const_cast< cmf::upslope::MacroPore * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); + arg1 = const_cast< cmf::upslope::MacroPore * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + try { + result = (real)cmf_upslope_MacroPore_filled_fraction_get(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_MacroPore_K_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::MacroPore *arg1 = (cmf::upslope::MacroPore *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::upslope::MacroPore > tempshared1 ; + std::shared_ptr< cmf::upslope::MacroPore > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__MacroPore_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MacroPore_K_get" "', argument " "1"" of type '" "cmf::upslope::MacroPore *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); + arg1 = const_cast< cmf::upslope::MacroPore * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); + arg1 = const_cast< cmf::upslope::MacroPore * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + try { + result = (real)cmf_upslope_MacroPore_K_get(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_MacroPore_capacity_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::MacroPore *arg1 = (cmf::upslope::MacroPore *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::upslope::MacroPore > tempshared1 ; + std::shared_ptr< cmf::upslope::MacroPore > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__MacroPore_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MacroPore_capacity_get" "', argument " "1"" of type '" "cmf::upslope::MacroPore *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); + arg1 = const_cast< cmf::upslope::MacroPore * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); + arg1 = const_cast< cmf::upslope::MacroPore * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + try { + result = (real)cmf_upslope_MacroPore_capacity_get(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_MacroPore_cell_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::MacroPore *arg1 = (cmf::upslope::MacroPore *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::upslope::MacroPore > tempshared1 ; + std::shared_ptr< cmf::upslope::MacroPore > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + cmf::upslope::Cell *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__MacroPore_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MacroPore_cell_get" "', argument " "1"" of type '" "cmf::upslope::MacroPore *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); + arg1 = const_cast< cmf::upslope::MacroPore * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); + arg1 = const_cast< cmf::upslope::MacroPore * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + try { + result = (cmf::upslope::Cell *) &cmf_upslope_MacroPore_cell_get(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_MacroPore(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::MacroPore *arg1 = (cmf::upslope::MacroPore *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::upslope::MacroPore > tempshared1 ; + std::shared_ptr< cmf::upslope::MacroPore > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__MacroPore_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MacroPore" "', argument " "1"" of type '" "cmf::upslope::MacroPore *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); + arg1 = const_cast< cmf::upslope::MacroPore * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::MacroPore > * >(argp1); + arg1 = const_cast< cmf::upslope::MacroPore * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + try { + (void)arg1; delete smartarg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *MacroPore_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_cmf__upslope__MacroPore_t, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_delete_BaseMacroFlow(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::connections::BaseMacroFlow *arg1 = (cmf::upslope::connections::BaseMacroFlow *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__BaseMacroFlow, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_BaseMacroFlow" "', argument " "1"" of type '" "cmf::upslope::connections::BaseMacroFlow *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::connections::BaseMacroFlow * >(argp1); + { + try { + + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *BaseMacroFlow_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__connections__BaseMacroFlow, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_GradientMacroFlow(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::MacroPore::ptr arg1 ; + cmf::water::flux_node::ptr arg2 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "left",(char *) "right", NULL + }; + cmf::upslope::connections::GradientMacroFlow *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:new_GradientMacroFlow",kwnames,&obj0,&obj1)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__MacroPore_t, 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_GradientMacroFlow" "', argument " "1"" of type '" "cmf::upslope::MacroPore::ptr""'"); + } + if (argp1) arg1 = *(reinterpret_cast< cmf::upslope::MacroPore::ptr * >(argp1)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::upslope::MacroPore::ptr * >(argp1); + } + { + int newmem = 0; + res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_GradientMacroFlow" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); + } + if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); + } + { + try { + result = (cmf::upslope::connections::GradientMacroFlow *)new cmf::upslope::connections::GradientMacroFlow(arg1,arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__connections__GradientMacroFlow, SWIG_POINTER_NEW | 0 ); + + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_GradientMacroFlow(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::connections::GradientMacroFlow *arg1 = (cmf::upslope::connections::GradientMacroFlow *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__GradientMacroFlow, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GradientMacroFlow" "', argument " "1"" of type '" "cmf::upslope::connections::GradientMacroFlow *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::connections::GradientMacroFlow * >(argp1); + { + try { + + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *GradientMacroFlow_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__connections__GradientMacroFlow, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *GradientMacroFlow_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_new_KinematicMacroFlow(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::WaterStorage::ptr arg1 ; + cmf::water::flux_node::ptr arg2 ; + real arg3 = (real) 1. ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + double val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "left",(char *) "right",(char *) "beta", NULL + }; + cmf::upslope::connections::KinematicMacroFlow *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:new_KinematicMacroFlow",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_KinematicMacroFlow" "', argument " "1"" of type '" "cmf::water::WaterStorage::ptr""'"); + } + if (argp1) arg1 = *(reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp1)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp1); + } + { + int newmem = 0; + res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_KinematicMacroFlow" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); + } + if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); + } + if (obj2) { + ecode3 = SWIG_AsVal_double(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_KinematicMacroFlow" "', argument " "3"" of type '" "real""'"); + } + arg3 = static_cast< real >(val3); + } + { + try { + result = (cmf::upslope::connections::KinematicMacroFlow *)new cmf::upslope::connections::KinematicMacroFlow(arg1,arg2,arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__connections__KinematicMacroFlow, SWIG_POINTER_NEW | 0 ); + + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_KinematicMacroFlow(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::connections::KinematicMacroFlow *arg1 = (cmf::upslope::connections::KinematicMacroFlow *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__KinematicMacroFlow, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_KinematicMacroFlow" "', argument " "1"" of type '" "cmf::upslope::connections::KinematicMacroFlow *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::connections::KinematicMacroFlow * >(argp1); + { + try { + + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *KinematicMacroFlow_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__connections__KinematicMacroFlow, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *KinematicMacroFlow_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_JarvisMacroFlow_beta_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::connections::JarvisMacroFlow *arg1 = (cmf::upslope::connections::JarvisMacroFlow *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"JarvisMacroFlow_beta_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__JarvisMacroFlow, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "JarvisMacroFlow_beta_set" "', argument " "1"" of type '" "cmf::upslope::connections::JarvisMacroFlow *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::connections::JarvisMacroFlow * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "JarvisMacroFlow_beta_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->beta = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_JarvisMacroFlow_beta_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::connections::JarvisMacroFlow *arg1 = (cmf::upslope::connections::JarvisMacroFlow *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__JarvisMacroFlow, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "JarvisMacroFlow_beta_get" "', argument " "1"" of type '" "cmf::upslope::connections::JarvisMacroFlow *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::connections::JarvisMacroFlow * >(argp1); + result = (real) ((arg1)->beta); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_JarvisMacroFlow_porefraction_r_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::connections::JarvisMacroFlow *arg1 = (cmf::upslope::connections::JarvisMacroFlow *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"JarvisMacroFlow_porefraction_r_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__JarvisMacroFlow, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "JarvisMacroFlow_porefraction_r_set" "', argument " "1"" of type '" "cmf::upslope::connections::JarvisMacroFlow *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::connections::JarvisMacroFlow * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "JarvisMacroFlow_porefraction_r_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->porefraction_r = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_JarvisMacroFlow_porefraction_r_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::connections::JarvisMacroFlow *arg1 = (cmf::upslope::connections::JarvisMacroFlow *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__JarvisMacroFlow, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "JarvisMacroFlow_porefraction_r_get" "', argument " "1"" of type '" "cmf::upslope::connections::JarvisMacroFlow *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::connections::JarvisMacroFlow * >(argp1); + result = (real) ((arg1)->porefraction_r); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_JarvisMacroFlow(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::WaterStorage::ptr arg1 ; + cmf::water::flux_node::ptr arg2 ; + real arg3 = (real) 1. ; + real arg4 = (real) 0.0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + double val3 ; + int ecode3 = 0 ; + double val4 ; + int ecode4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + char * kwnames[] = { + (char *) "left",(char *) "right",(char *) "beta",(char *) "porefraction_r", NULL + }; + cmf::upslope::connections::JarvisMacroFlow *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OO:new_JarvisMacroFlow",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_JarvisMacroFlow" "', argument " "1"" of type '" "cmf::water::WaterStorage::ptr""'"); + } + if (argp1) arg1 = *(reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp1)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp1); + } + { + int newmem = 0; + res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_JarvisMacroFlow" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); + } + if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); + } + if (obj2) { + ecode3 = SWIG_AsVal_double(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_JarvisMacroFlow" "', argument " "3"" of type '" "real""'"); + } + arg3 = static_cast< real >(val3); + } + if (obj3) { + ecode4 = SWIG_AsVal_double(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_JarvisMacroFlow" "', argument " "4"" of type '" "real""'"); + } + arg4 = static_cast< real >(val4); + } + { + try { + result = (cmf::upslope::connections::JarvisMacroFlow *)new cmf::upslope::connections::JarvisMacroFlow(arg1,arg2,arg3,arg4); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__connections__JarvisMacroFlow, SWIG_POINTER_NEW | 0 ); + + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_JarvisMacroFlow(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::connections::JarvisMacroFlow *arg1 = (cmf::upslope::connections::JarvisMacroFlow *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__JarvisMacroFlow, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_JarvisMacroFlow" "', argument " "1"" of type '" "cmf::upslope::connections::JarvisMacroFlow *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::connections::JarvisMacroFlow * >(argp1); + { + try { + + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *JarvisMacroFlow_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__connections__JarvisMacroFlow, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *JarvisMacroFlow_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_new_GradientMacroMicroExchange(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::SoilLayer::ptr arg1 ; + cmf::upslope::MacroPore::ptr arg2 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "left",(char *) "right", NULL + }; + cmf::upslope::connections::GradientMacroMicroExchange *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:new_GradientMacroMicroExchange",kwnames,&obj0,&obj1)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_GradientMacroMicroExchange" "', argument " "1"" of type '" "cmf::upslope::SoilLayer::ptr""'"); + } + if (argp1) arg1 = *(reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp1)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp1); + } + { + int newmem = 0; + res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__MacroPore_t, 0 , &newmem); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_GradientMacroMicroExchange" "', argument " "2"" of type '" "cmf::upslope::MacroPore::ptr""'"); + } + if (argp2) arg2 = *(reinterpret_cast< cmf::upslope::MacroPore::ptr * >(argp2)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::upslope::MacroPore::ptr * >(argp2); + } + { + try { + result = (cmf::upslope::connections::GradientMacroMicroExchange *)new cmf::upslope::connections::GradientMacroMicroExchange(arg1,arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__connections__GradientMacroMicroExchange, SWIG_POINTER_NEW | 0 ); + + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_GradientMacroMicroExchange(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::connections::GradientMacroMicroExchange *arg1 = (cmf::upslope::connections::GradientMacroMicroExchange *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__GradientMacroMicroExchange, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GradientMacroMicroExchange" "', argument " "1"" of type '" "cmf::upslope::connections::GradientMacroMicroExchange *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::connections::GradientMacroMicroExchange * >(argp1); + { + try { + + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *GradientMacroMicroExchange_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__connections__GradientMacroMicroExchange, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *GradientMacroMicroExchange_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_DiffusiveMacroMicroExchange_omega_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::connections::DiffusiveMacroMicroExchange *arg1 = (cmf::upslope::connections::DiffusiveMacroMicroExchange *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"DiffusiveMacroMicroExchange_omega_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__DiffusiveMacroMicroExchange, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DiffusiveMacroMicroExchange_omega_set" "', argument " "1"" of type '" "cmf::upslope::connections::DiffusiveMacroMicroExchange *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::connections::DiffusiveMacroMicroExchange * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DiffusiveMacroMicroExchange_omega_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->omega = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_DiffusiveMacroMicroExchange_omega_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::connections::DiffusiveMacroMicroExchange *arg1 = (cmf::upslope::connections::DiffusiveMacroMicroExchange *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__DiffusiveMacroMicroExchange, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DiffusiveMacroMicroExchange_omega_get" "', argument " "1"" of type '" "cmf::upslope::connections::DiffusiveMacroMicroExchange *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::connections::DiffusiveMacroMicroExchange * >(argp1); + result = (real) ((arg1)->omega); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_DiffusiveMacroMicroExchange_pFrmi_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::connections::DiffusiveMacroMicroExchange *arg1 = (cmf::upslope::connections::DiffusiveMacroMicroExchange *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"DiffusiveMacroMicroExchange_pFrmi_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__DiffusiveMacroMicroExchange, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DiffusiveMacroMicroExchange_pFrmi_set" "', argument " "1"" of type '" "cmf::upslope::connections::DiffusiveMacroMicroExchange *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::connections::DiffusiveMacroMicroExchange * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DiffusiveMacroMicroExchange_pFrmi_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->pFrmi = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_DiffusiveMacroMicroExchange_pFrmi_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::connections::DiffusiveMacroMicroExchange *arg1 = (cmf::upslope::connections::DiffusiveMacroMicroExchange *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__DiffusiveMacroMicroExchange, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DiffusiveMacroMicroExchange_pFrmi_get" "', argument " "1"" of type '" "cmf::upslope::connections::DiffusiveMacroMicroExchange *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::connections::DiffusiveMacroMicroExchange * >(argp1); + result = (real) ((arg1)->pFrmi); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_DiffusiveMacroMicroExchange(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::MacroPore::ptr arg1 ; + cmf::upslope::SoilLayer::ptr arg2 ; + real arg3 ; + real arg4 = (real) 4.2 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + double val3 ; + int ecode3 = 0 ; + double val4 ; + int ecode4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + char * kwnames[] = { + (char *) "left",(char *) "right",(char *) "omega",(char *) "pFrmi", NULL + }; + cmf::upslope::connections::DiffusiveMacroMicroExchange *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|O:new_DiffusiveMacroMicroExchange",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__MacroPore_t, 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DiffusiveMacroMicroExchange" "', argument " "1"" of type '" "cmf::upslope::MacroPore::ptr""'"); + } + if (argp1) arg1 = *(reinterpret_cast< cmf::upslope::MacroPore::ptr * >(argp1)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::upslope::MacroPore::ptr * >(argp1); + } + { + int newmem = 0; + res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 , &newmem); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_DiffusiveMacroMicroExchange" "', argument " "2"" of type '" "cmf::upslope::SoilLayer::ptr""'"); + } + if (argp2) arg2 = *(reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp2)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp2); + } + ecode3 = SWIG_AsVal_double(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_DiffusiveMacroMicroExchange" "', argument " "3"" of type '" "real""'"); + } + arg3 = static_cast< real >(val3); + if (obj3) { + ecode4 = SWIG_AsVal_double(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_DiffusiveMacroMicroExchange" "', argument " "4"" of type '" "real""'"); + } + arg4 = static_cast< real >(val4); + } + { + try { + result = (cmf::upslope::connections::DiffusiveMacroMicroExchange *)new cmf::upslope::connections::DiffusiveMacroMicroExchange(arg1,arg2,arg3,arg4); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__connections__DiffusiveMacroMicroExchange, SWIG_POINTER_NEW | 0 ); + + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_DiffusiveMacroMicroExchange(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::connections::DiffusiveMacroMicroExchange *arg1 = (cmf::upslope::connections::DiffusiveMacroMicroExchange *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__DiffusiveMacroMicroExchange, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DiffusiveMacroMicroExchange" "', argument " "1"" of type '" "cmf::upslope::connections::DiffusiveMacroMicroExchange *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::connections::DiffusiveMacroMicroExchange * >(argp1); + { + try { + + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *DiffusiveMacroMicroExchange_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__connections__DiffusiveMacroMicroExchange, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *DiffusiveMacroMicroExchange_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_MACROlikeMacroMicroExchange_Gf_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::connections::MACROlikeMacroMicroExchange *arg1 = (cmf::upslope::connections::MACROlikeMacroMicroExchange *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"MACROlikeMacroMicroExchange_Gf_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__MACROlikeMacroMicroExchange, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MACROlikeMacroMicroExchange_Gf_set" "', argument " "1"" of type '" "cmf::upslope::connections::MACROlikeMacroMicroExchange *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::connections::MACROlikeMacroMicroExchange * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MACROlikeMacroMicroExchange_Gf_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->Gf = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_MACROlikeMacroMicroExchange_Gf_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::connections::MACROlikeMacroMicroExchange *arg1 = (cmf::upslope::connections::MACROlikeMacroMicroExchange *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__MACROlikeMacroMicroExchange, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MACROlikeMacroMicroExchange_Gf_get" "', argument " "1"" of type '" "cmf::upslope::connections::MACROlikeMacroMicroExchange *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::connections::MACROlikeMacroMicroExchange * >(argp1); + result = (real) ((arg1)->Gf); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_MACROlikeMacroMicroExchange_gamma_w_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::connections::MACROlikeMacroMicroExchange *arg1 = (cmf::upslope::connections::MACROlikeMacroMicroExchange *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"MACROlikeMacroMicroExchange_gamma_w_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__MACROlikeMacroMicroExchange, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MACROlikeMacroMicroExchange_gamma_w_set" "', argument " "1"" of type '" "cmf::upslope::connections::MACROlikeMacroMicroExchange *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::connections::MACROlikeMacroMicroExchange * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MACROlikeMacroMicroExchange_gamma_w_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->gamma_w = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_MACROlikeMacroMicroExchange_gamma_w_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::connections::MACROlikeMacroMicroExchange *arg1 = (cmf::upslope::connections::MACROlikeMacroMicroExchange *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__MACROlikeMacroMicroExchange, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MACROlikeMacroMicroExchange_gamma_w_get" "', argument " "1"" of type '" "cmf::upslope::connections::MACROlikeMacroMicroExchange *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::connections::MACROlikeMacroMicroExchange * >(argp1); + result = (real) ((arg1)->gamma_w); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_MACROlikeMacroMicroExchange(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::SoilLayer::ptr arg1 ; + cmf::upslope::MacroPore::ptr arg2 ; + real arg3 = (real) 0.4 ; + real arg4 = (real) 3 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + double val3 ; + int ecode3 = 0 ; + double val4 ; + int ecode4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + char * kwnames[] = { + (char *) "left",(char *) "right",(char *) "_gamma_w",(char *) "_Gf", NULL + }; + cmf::upslope::connections::MACROlikeMacroMicroExchange *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OO:new_MACROlikeMacroMicroExchange",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MACROlikeMacroMicroExchange" "', argument " "1"" of type '" "cmf::upslope::SoilLayer::ptr""'"); + } + if (argp1) arg1 = *(reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp1)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp1); + } + { + int newmem = 0; + res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__MacroPore_t, 0 , &newmem); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MACROlikeMacroMicroExchange" "', argument " "2"" of type '" "cmf::upslope::MacroPore::ptr""'"); + } + if (argp2) arg2 = *(reinterpret_cast< cmf::upslope::MacroPore::ptr * >(argp2)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::upslope::MacroPore::ptr * >(argp2); + } + if (obj2) { + ecode3 = SWIG_AsVal_double(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_MACROlikeMacroMicroExchange" "', argument " "3"" of type '" "real""'"); + } + arg3 = static_cast< real >(val3); + } + if (obj3) { + ecode4 = SWIG_AsVal_double(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_MACROlikeMacroMicroExchange" "', argument " "4"" of type '" "real""'"); + } + arg4 = static_cast< real >(val4); + } + { + try { + result = (cmf::upslope::connections::MACROlikeMacroMicroExchange *)new cmf::upslope::connections::MACROlikeMacroMicroExchange(arg1,arg2,arg3,arg4); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__connections__MACROlikeMacroMicroExchange, SWIG_POINTER_NEW | 0 ); + + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_MACROlikeMacroMicroExchange(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::connections::MACROlikeMacroMicroExchange *arg1 = (cmf::upslope::connections::MACROlikeMacroMicroExchange *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__MACROlikeMacroMicroExchange, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MACROlikeMacroMicroExchange" "', argument " "1"" of type '" "cmf::upslope::connections::MACROlikeMacroMicroExchange *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::connections::MACROlikeMacroMicroExchange * >(argp1); + { + try { + + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *MACROlikeMacroMicroExchange_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__connections__MACROlikeMacroMicroExchange, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *MACROlikeMacroMicroExchange_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_IVolumeHeightFunction_h(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::river::IVolumeHeightFunction *arg1 = (cmf::river::IVolumeHeightFunction *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "V", NULL + }; + double result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:IVolumeHeightFunction_h",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__river__IVolumeHeightFunction, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IVolumeHeightFunction_h" "', argument " "1"" of type '" "cmf::river::IVolumeHeightFunction const *""'"); + } + arg1 = reinterpret_cast< cmf::river::IVolumeHeightFunction * >(argp1); + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IVolumeHeightFunction_h" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + { + try { + result = (double)((cmf::river::IVolumeHeightFunction const *)arg1)->h(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_IVolumeHeightFunction_A(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::river::IVolumeHeightFunction *arg1 = (cmf::river::IVolumeHeightFunction *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "V", NULL + }; + double result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:IVolumeHeightFunction_A",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__river__IVolumeHeightFunction, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IVolumeHeightFunction_A" "', argument " "1"" of type '" "cmf::river::IVolumeHeightFunction const *""'"); + } + arg1 = reinterpret_cast< cmf::river::IVolumeHeightFunction * >(argp1); + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IVolumeHeightFunction_A" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + { + try { + result = (double)((cmf::river::IVolumeHeightFunction const *)arg1)->A(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_IVolumeHeightFunction_V(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::river::IVolumeHeightFunction *arg1 = (cmf::river::IVolumeHeightFunction *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "h", NULL + }; + double result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:IVolumeHeightFunction_V",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__river__IVolumeHeightFunction, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IVolumeHeightFunction_V" "', argument " "1"" of type '" "cmf::river::IVolumeHeightFunction const *""'"); + } + arg1 = reinterpret_cast< cmf::river::IVolumeHeightFunction * >(argp1); + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IVolumeHeightFunction_V" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + { + try { + result = (double)((cmf::river::IVolumeHeightFunction const *)arg1)->V(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_IVolumeHeightFunction_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::river::IVolumeHeightFunction *arg1 = (cmf::river::IVolumeHeightFunction *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::river::IVolumeHeightFunction *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__IVolumeHeightFunction, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IVolumeHeightFunction_copy" "', argument " "1"" of type '" "cmf::river::IVolumeHeightFunction const *""'"); + } + arg1 = reinterpret_cast< cmf::river::IVolumeHeightFunction * >(argp1); + { + try { + result = (cmf::river::IVolumeHeightFunction *)((cmf::river::IVolumeHeightFunction const *)arg1)->copy(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__river__IVolumeHeightFunction, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_IVolumeHeightFunction_q(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::river::IVolumeHeightFunction *arg1 = (cmf::river::IVolumeHeightFunction *) 0 ; + double arg2 ; + double arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + double val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "h",(char *) "slope", NULL + }; + double result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:IVolumeHeightFunction_q",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__river__IVolumeHeightFunction, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IVolumeHeightFunction_q" "', argument " "1"" of type '" "cmf::river::IVolumeHeightFunction const *""'"); + } + arg1 = reinterpret_cast< cmf::river::IVolumeHeightFunction * >(argp1); + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IVolumeHeightFunction_q" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + ecode3 = SWIG_AsVal_double(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IVolumeHeightFunction_q" "', argument " "3"" of type '" "double""'"); + } + arg3 = static_cast< double >(val3); + { + try { + result = (double)((cmf::river::IVolumeHeightFunction const *)arg1)->q(arg2,arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_IVolumeHeightFunction(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::river::IVolumeHeightFunction *arg1 = (cmf::river::IVolumeHeightFunction *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__IVolumeHeightFunction, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IVolumeHeightFunction" "', argument " "1"" of type '" "cmf::river::IVolumeHeightFunction *""'"); + } + arg1 = reinterpret_cast< cmf::river::IVolumeHeightFunction * >(argp1); + { + try { + delete arg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *IVolumeHeightFunction_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__river__IVolumeHeightFunction, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_Prism_Area_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::river::Prism *arg1 = (cmf::river::Prism *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"Prism_Area_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__Prism, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Prism_Area_set" "', argument " "1"" of type '" "cmf::river::Prism *""'"); + } + arg1 = reinterpret_cast< cmf::river::Prism * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Prism_Area_set" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + if (arg1) (arg1)->Area = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Prism_Area_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::river::Prism *arg1 = (cmf::river::Prism *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__Prism, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Prism_Area_get" "', argument " "1"" of type '" "cmf::river::Prism *""'"); + } + arg1 = reinterpret_cast< cmf::river::Prism * >(argp1); + result = (double) ((arg1)->Area); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Prism_RoughThickness_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::river::Prism *arg1 = (cmf::river::Prism *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"Prism_RoughThickness_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__Prism, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Prism_RoughThickness_set" "', argument " "1"" of type '" "cmf::river::Prism *""'"); + } + arg1 = reinterpret_cast< cmf::river::Prism * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Prism_RoughThickness_set" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + if (arg1) (arg1)->RoughThickness = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Prism_RoughThickness_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::river::Prism *arg1 = (cmf::river::Prism *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__Prism, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Prism_RoughThickness_get" "', argument " "1"" of type '" "cmf::river::Prism *""'"); + } + arg1 = reinterpret_cast< cmf::river::Prism * >(argp1); + result = (double) ((arg1)->RoughThickness); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_Prism(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + double arg1 ; + double arg2 = (double) 0.01 ; + double val1 ; + int ecode1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "base_area",(char *) "thickness_of_rough_ground", NULL + }; + cmf::river::Prism *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:new_Prism",kwnames,&obj0,&obj1)) SWIG_fail; + ecode1 = SWIG_AsVal_double(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Prism" "', argument " "1"" of type '" "double""'"); + } + arg1 = static_cast< double >(val1); + if (obj1) { + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Prism" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + } + { + try { + result = (cmf::river::Prism *)new cmf::river::Prism(arg1,arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__river__Prism, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Prism_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::river::Prism *arg1 = (cmf::river::Prism *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::river::Prism *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__Prism, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Prism_copy" "', argument " "1"" of type '" "cmf::river::Prism const *""'"); + } + arg1 = reinterpret_cast< cmf::river::Prism * >(argp1); + { + try { + result = (cmf::river::Prism *)((cmf::river::Prism const *)arg1)->copy(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__river__Prism, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_Prism(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::river::Prism *arg1 = (cmf::river::Prism *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__Prism, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Prism" "', argument " "1"" of type '" "cmf::river::Prism *""'"); + } + arg1 = reinterpret_cast< cmf::river::Prism * >(argp1); + { + try { + delete arg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *Prism_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__river__Prism, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *Prism_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_new_volume_height_function__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::river::volume_height_function *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + cmf::river::volume_height_function *result = 0 ; + + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_cmf__river__volume_height_function, 0 | 0); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_volume_height_function" "', argument " "1"" of type '" "cmf::river::volume_height_function const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_volume_height_function" "', argument " "1"" of type '" "cmf::river::volume_height_function const &""'"); + } + arg1 = reinterpret_cast< cmf::river::volume_height_function * >(argp1); + { + try { + result = (cmf::river::volume_height_function *)new cmf::river::volume_height_function((cmf::river::volume_height_function const &)*arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__river__volume_height_function, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_volume_height_function__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::river::IVolumeHeightFunction *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + cmf::river::volume_height_function *result = 0 ; + + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_cmf__river__IVolumeHeightFunction, 0 | 0); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_volume_height_function" "', argument " "1"" of type '" "cmf::river::IVolumeHeightFunction const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_volume_height_function" "', argument " "1"" of type '" "cmf::river::IVolumeHeightFunction const &""'"); + } + arg1 = reinterpret_cast< cmf::river::IVolumeHeightFunction * >(argp1); + { + try { + result = (cmf::river::volume_height_function *)new cmf::river::volume_height_function((cmf::river::IVolumeHeightFunction const &)*arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__river__volume_height_function, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_volume_height_function(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[2] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"new_volume_height_function",0,1,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_cmf__river__volume_height_function, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_cmf__river__IVolumeHeightFunction, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_new_volume_height_function__SWIG_0(self, argc, argv); + case 2: + return _wrap_new_volume_height_function__SWIG_1(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_volume_height_function'.\n" + " Possible C/C++ prototypes are:\n" + " cmf::river::volume_height_function::volume_height_function(cmf::river::volume_height_function const &)\n" + " cmf::river::volume_height_function::volume_height_function(cmf::river::IVolumeHeightFunction const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_volume_height_function_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::river::volume_height_function *arg1 = (cmf::river::volume_height_function *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::river::volume_height_function *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__volume_height_function, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "volume_height_function_copy" "', argument " "1"" of type '" "cmf::river::volume_height_function const *""'"); + } + arg1 = reinterpret_cast< cmf::river::volume_height_function * >(argp1); + { + try { + result = (cmf::river::volume_height_function *)((cmf::river::volume_height_function const *)arg1)->copy(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__river__volume_height_function, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_volume_height_function(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::river::volume_height_function *arg1 = (cmf::river::volume_height_function *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__volume_height_function, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_volume_height_function" "', argument " "1"" of type '" "cmf::river::volume_height_function *""'"); + } + arg1 = reinterpret_cast< cmf::river::volume_height_function * >(argp1); + { + try { + delete arg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *volume_height_function_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__river__volume_height_function, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *volume_height_function_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_IChannel_get_nManning(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::river::IChannel *arg1 = (cmf::river::IChannel *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__IChannel, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IChannel_get_nManning" "', argument " "1"" of type '" "cmf::river::IChannel const *""'"); + } + arg1 = reinterpret_cast< cmf::river::IChannel * >(argp1); + { + try { + result = (double)((cmf::river::IChannel const *)arg1)->get_nManning(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_IChannel_set_nManning(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::river::IChannel *arg1 = (cmf::river::IChannel *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "val", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:IChannel_set_nManning",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__river__IChannel, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IChannel_set_nManning" "', argument " "1"" of type '" "cmf::river::IChannel *""'"); + } + arg1 = reinterpret_cast< cmf::river::IChannel * >(argp1); + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IChannel_set_nManning" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + { + try { + (arg1)->set_nManning(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_IChannel_get_length(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::river::IChannel *arg1 = (cmf::river::IChannel *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__IChannel, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IChannel_get_length" "', argument " "1"" of type '" "cmf::river::IChannel const *""'"); + } + arg1 = reinterpret_cast< cmf::river::IChannel * >(argp1); + { + try { + result = (double)((cmf::river::IChannel const *)arg1)->get_length(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_IChannel_typecode(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::river::IChannel *arg1 = (cmf::river::IChannel *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + char result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__IChannel, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IChannel_typecode" "', argument " "1"" of type '" "cmf::river::IChannel const *""'"); + } + arg1 = reinterpret_cast< cmf::river::IChannel * >(argp1); + { + try { + result = (char)((cmf::river::IChannel const *)arg1)->typecode(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_char(static_cast< char >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_IChannel_get_channel_width(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::river::IChannel *arg1 = (cmf::river::IChannel *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "depth", NULL + }; + double result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:IChannel_get_channel_width",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__river__IChannel, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IChannel_get_channel_width" "', argument " "1"" of type '" "cmf::river::IChannel const *""'"); + } + arg1 = reinterpret_cast< cmf::river::IChannel * >(argp1); + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IChannel_get_channel_width" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + { + try { + result = (double)((cmf::river::IChannel const *)arg1)->get_channel_width(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_IChannel_get_wetted_perimeter(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::river::IChannel *arg1 = (cmf::river::IChannel *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "depth", NULL + }; + double result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:IChannel_get_wetted_perimeter",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__river__IChannel, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IChannel_get_wetted_perimeter" "', argument " "1"" of type '" "cmf::river::IChannel const *""'"); + } + arg1 = reinterpret_cast< cmf::river::IChannel * >(argp1); + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IChannel_get_wetted_perimeter" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + { + try { + result = (double)((cmf::river::IChannel const *)arg1)->get_wetted_perimeter(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_IChannel_get_depth(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::river::IChannel *arg1 = (cmf::river::IChannel *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "area", NULL + }; + double result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:IChannel_get_depth",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__river__IChannel, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IChannel_get_depth" "', argument " "1"" of type '" "cmf::river::IChannel const *""'"); + } + arg1 = reinterpret_cast< cmf::river::IChannel * >(argp1); + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IChannel_get_depth" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + { + try { + result = (double)((cmf::river::IChannel const *)arg1)->get_depth(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_IChannel_get_flux_crossection(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::river::IChannel *arg1 = (cmf::river::IChannel *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "depth", NULL + }; + double result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:IChannel_get_flux_crossection",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__river__IChannel, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IChannel_get_flux_crossection" "', argument " "1"" of type '" "cmf::river::IChannel const *""'"); + } + arg1 = reinterpret_cast< cmf::river::IChannel * >(argp1); + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IChannel_get_flux_crossection" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + { + try { + result = (double)((cmf::river::IChannel const *)arg1)->get_flux_crossection(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_IChannel_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::river::IChannel *arg1 = (cmf::river::IChannel *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::river::IChannel *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__IChannel, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IChannel_copy" "', argument " "1"" of type '" "cmf::river::IChannel const *""'"); + } + arg1 = reinterpret_cast< cmf::river::IChannel * >(argp1); + { + try { + result = (cmf::river::IChannel *)((cmf::river::IChannel const *)arg1)->copy(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__river__IChannel, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_IChannel_qManning(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::river::IChannel *arg1 = (cmf::river::IChannel *) 0 ; + double arg2 ; + double arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + double val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "A",(char *) "slope", NULL + }; + double result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:IChannel_qManning",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__river__IChannel, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IChannel_qManning" "', argument " "1"" of type '" "cmf::river::IChannel const *""'"); + } + arg1 = reinterpret_cast< cmf::river::IChannel * >(argp1); + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IChannel_qManning" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + ecode3 = SWIG_AsVal_double(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IChannel_qManning" "', argument " "3"" of type '" "double""'"); + } + arg3 = static_cast< double >(val3); + { + try { + result = (double)((cmf::river::IChannel const *)arg1)->qManning(arg2,arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_IChannel(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::river::IChannel *arg1 = (cmf::river::IChannel *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__IChannel, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IChannel" "', argument " "1"" of type '" "cmf::river::IChannel *""'"); + } + arg1 = reinterpret_cast< cmf::river::IChannel * >(argp1); + { + try { + delete arg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *IChannel_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__river__IChannel, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_SWATReachType_BottomWidth_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::river::SWATReachType *arg1 = (cmf::river::SWATReachType *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"SWATReachType_BottomWidth_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__SWATReachType, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SWATReachType_BottomWidth_set" "', argument " "1"" of type '" "cmf::river::SWATReachType *""'"); + } + arg1 = reinterpret_cast< cmf::river::SWATReachType * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SWATReachType_BottomWidth_set" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + if (arg1) (arg1)->BottomWidth = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SWATReachType_BottomWidth_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::river::SWATReachType *arg1 = (cmf::river::SWATReachType *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__SWATReachType, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SWATReachType_BottomWidth_get" "', argument " "1"" of type '" "cmf::river::SWATReachType *""'"); + } + arg1 = reinterpret_cast< cmf::river::SWATReachType * >(argp1); + result = (double) ((arg1)->BottomWidth); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SWATReachType_ChannelDepth_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::river::SWATReachType *arg1 = (cmf::river::SWATReachType *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"SWATReachType_ChannelDepth_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__SWATReachType, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SWATReachType_ChannelDepth_set" "', argument " "1"" of type '" "cmf::river::SWATReachType *""'"); + } + arg1 = reinterpret_cast< cmf::river::SWATReachType * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SWATReachType_ChannelDepth_set" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + if (arg1) (arg1)->ChannelDepth = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SWATReachType_ChannelDepth_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::river::SWATReachType *arg1 = (cmf::river::SWATReachType *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__SWATReachType, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SWATReachType_ChannelDepth_get" "', argument " "1"" of type '" "cmf::river::SWATReachType *""'"); + } + arg1 = reinterpret_cast< cmf::river::SWATReachType * >(argp1); + result = (double) ((arg1)->ChannelDepth); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SWATReachType_BankSlope_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::river::SWATReachType *arg1 = (cmf::river::SWATReachType *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"SWATReachType_BankSlope_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__SWATReachType, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SWATReachType_BankSlope_set" "', argument " "1"" of type '" "cmf::river::SWATReachType *""'"); + } + arg1 = reinterpret_cast< cmf::river::SWATReachType * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SWATReachType_BankSlope_set" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + if (arg1) (arg1)->BankSlope = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SWATReachType_BankSlope_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::river::SWATReachType *arg1 = (cmf::river::SWATReachType *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__SWATReachType, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SWATReachType_BankSlope_get" "', argument " "1"" of type '" "cmf::river::SWATReachType *""'"); + } + arg1 = reinterpret_cast< cmf::river::SWATReachType * >(argp1); + result = (double) ((arg1)->BankSlope); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SWATReachType_FloodPlainSlope_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::river::SWATReachType *arg1 = (cmf::river::SWATReachType *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"SWATReachType_FloodPlainSlope_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__SWATReachType, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SWATReachType_FloodPlainSlope_set" "', argument " "1"" of type '" "cmf::river::SWATReachType *""'"); + } + arg1 = reinterpret_cast< cmf::river::SWATReachType * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SWATReachType_FloodPlainSlope_set" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + if (arg1) (arg1)->FloodPlainSlope = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SWATReachType_FloodPlainSlope_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::river::SWATReachType *arg1 = (cmf::river::SWATReachType *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__SWATReachType, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SWATReachType_FloodPlainSlope_get" "', argument " "1"" of type '" "cmf::river::SWATReachType *""'"); + } + arg1 = reinterpret_cast< cmf::river::SWATReachType * >(argp1); + result = (double) ((arg1)->FloodPlainSlope); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_SWATReachType__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::river::SWATReachType *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + cmf::river::SWATReachType *result = 0 ; + + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_cmf__river__SWATReachType, 0 | 0); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SWATReachType" "', argument " "1"" of type '" "cmf::river::SWATReachType const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SWATReachType" "', argument " "1"" of type '" "cmf::river::SWATReachType const &""'"); + } + arg1 = reinterpret_cast< cmf::river::SWATReachType * >(argp1); + { + try { + result = (cmf::river::SWATReachType *)new cmf::river::SWATReachType((cmf::river::SWATReachType const &)*arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__river__SWATReachType, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_SWATReachType__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + double arg1 ; + double val1 ; + int ecode1 = 0 ; + cmf::river::SWATReachType *result = 0 ; + + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + ecode1 = SWIG_AsVal_double(swig_obj[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_SWATReachType" "', argument " "1"" of type '" "double""'"); + } + arg1 = static_cast< double >(val1); + { + try { + result = (cmf::river::SWATReachType *)new cmf::river::SWATReachType(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__river__SWATReachType, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_SWATReachType__SWIG_2(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + double arg1 ; + double arg2 ; + double arg3 ; + double val1 ; + int ecode1 = 0 ; + double val2 ; + int ecode2 = 0 ; + double val3 ; + int ecode3 = 0 ; + cmf::river::SWATReachType *result = 0 ; + + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + ecode1 = SWIG_AsVal_double(swig_obj[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_SWATReachType" "', argument " "1"" of type '" "double""'"); + } + arg1 = static_cast< double >(val1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_SWATReachType" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_SWATReachType" "', argument " "3"" of type '" "double""'"); + } + arg3 = static_cast< double >(val3); + { + try { + result = (cmf::river::SWATReachType *)new cmf::river::SWATReachType(arg1,arg2,arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__river__SWATReachType, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_SWATReachType(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[4] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"new_SWATReachType",0,3,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_cmf__river__SWATReachType, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + { + int res = SWIG_AsVal_double(argv[0], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + if (argc == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + { + int res = SWIG_AsVal_double(argv[0], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_double(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_double(argv[2], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 3; + if (_rank == _rankm) goto dispatch; + } + } + check_3: + + dispatch: + switch(_index) { + case 1: + return _wrap_new_SWATReachType__SWIG_0(self, argc, argv); + case 2: + return _wrap_new_SWATReachType__SWIG_1(self, argc, argv); + case 3: + return _wrap_new_SWATReachType__SWIG_2(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_SWATReachType'.\n" + " Possible C/C++ prototypes are:\n" + " cmf::river::SWATReachType::SWATReachType(cmf::river::SWATReachType const &)\n" + " cmf::river::SWATReachType::SWATReachType(double)\n" + " cmf::river::SWATReachType::SWATReachType(double,double,double)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_SWATReachType_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::river::SWATReachType *arg1 = (cmf::river::SWATReachType *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::river::SWATReachType *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__SWATReachType, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SWATReachType_copy" "', argument " "1"" of type '" "cmf::river::SWATReachType const *""'"); + } + arg1 = reinterpret_cast< cmf::river::SWATReachType * >(argp1); + { + try { + result = (cmf::river::SWATReachType *)((cmf::river::SWATReachType const *)arg1)->copy(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__river__SWATReachType, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_SWATReachType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::river::SWATReachType *arg1 = (cmf::river::SWATReachType *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__SWATReachType, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SWATReachType" "', argument " "1"" of type '" "cmf::river::SWATReachType *""'"); + } + arg1 = reinterpret_cast< cmf::river::SWATReachType * >(argp1); + { + try { + delete arg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *SWATReachType_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__river__SWATReachType, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *SWATReachType_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_TriangularReach_BankSlope_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::river::TriangularReach *arg1 = (cmf::river::TriangularReach *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"TriangularReach_BankSlope_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__TriangularReach, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TriangularReach_BankSlope_set" "', argument " "1"" of type '" "cmf::river::TriangularReach *""'"); + } + arg1 = reinterpret_cast< cmf::river::TriangularReach * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "TriangularReach_BankSlope_set" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + if (arg1) (arg1)->BankSlope = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TriangularReach_BankSlope_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::river::TriangularReach *arg1 = (cmf::river::TriangularReach *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__TriangularReach, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TriangularReach_BankSlope_get" "', argument " "1"" of type '" "cmf::river::TriangularReach *""'"); + } + arg1 = reinterpret_cast< cmf::river::TriangularReach * >(argp1); + result = (double) ((arg1)->BankSlope); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_TriangularReach__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + double arg1 ; + double arg2 = (double) 2 ; + double val1 ; + int ecode1 = 0 ; + double val2 ; + int ecode2 = 0 ; + cmf::river::TriangularReach *result = 0 ; + + if ((nobjs < 1) || (nobjs > 2)) SWIG_fail; + ecode1 = SWIG_AsVal_double(swig_obj[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_TriangularReach" "', argument " "1"" of type '" "double""'"); + } + arg1 = static_cast< double >(val1); + if (swig_obj[1]) { + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_TriangularReach" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + } + { + try { + result = (cmf::river::TriangularReach *)new cmf::river::TriangularReach(arg1,arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__river__TriangularReach, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_TriangularReach__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::river::TriangularReach *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + cmf::river::TriangularReach *result = 0 ; + + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_cmf__river__TriangularReach, 0 | 0); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_TriangularReach" "', argument " "1"" of type '" "cmf::river::TriangularReach const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_TriangularReach" "', argument " "1"" of type '" "cmf::river::TriangularReach const &""'"); + } + arg1 = reinterpret_cast< cmf::river::TriangularReach * >(argp1); + { + try { + result = (cmf::river::TriangularReach *)new cmf::river::TriangularReach((cmf::river::TriangularReach const &)*arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__river__TriangularReach, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_TriangularReach(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"new_TriangularReach",0,2,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_cmf__river__TriangularReach, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if ((argc >= 1) && (argc <= 2)) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + { + int res = SWIG_AsVal_double(argv[0], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (argc > 1) { + { + { + int res = SWIG_AsVal_double(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + } + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_new_TriangularReach__SWIG_1(self, argc, argv); + case 2: + return _wrap_new_TriangularReach__SWIG_0(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_TriangularReach'.\n" + " Possible C/C++ prototypes are:\n" + " cmf::river::TriangularReach::TriangularReach(double,double)\n" + " cmf::river::TriangularReach::TriangularReach(cmf::river::TriangularReach const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_TriangularReach_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::river::TriangularReach *arg1 = (cmf::river::TriangularReach *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::river::TriangularReach *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__TriangularReach, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TriangularReach_copy" "', argument " "1"" of type '" "cmf::river::TriangularReach const *""'"); + } + arg1 = reinterpret_cast< cmf::river::TriangularReach * >(argp1); + { + try { + result = (cmf::river::TriangularReach *)((cmf::river::TriangularReach const *)arg1)->copy(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__river__TriangularReach, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_TriangularReach(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::river::TriangularReach *arg1 = (cmf::river::TriangularReach *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__TriangularReach, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_TriangularReach" "', argument " "1"" of type '" "cmf::river::TriangularReach *""'"); + } + arg1 = reinterpret_cast< cmf::river::TriangularReach * >(argp1); + { + try { + delete arg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *TriangularReach_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__river__TriangularReach, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *TriangularReach_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_new_RectangularReach__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + double arg1 ; + double arg2 ; + double val1 ; + int ecode1 = 0 ; + double val2 ; + int ecode2 = 0 ; + cmf::river::RectangularReach *result = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + ecode1 = SWIG_AsVal_double(swig_obj[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_RectangularReach" "', argument " "1"" of type '" "double""'"); + } + arg1 = static_cast< double >(val1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_RectangularReach" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + { + try { + result = (cmf::river::RectangularReach *)new cmf::river::RectangularReach(arg1,arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__river__RectangularReach, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_RectangularReach__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::river::RectangularReach *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + cmf::river::RectangularReach *result = 0 ; + + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_cmf__river__RectangularReach, 0 | 0); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_RectangularReach" "', argument " "1"" of type '" "cmf::river::RectangularReach const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_RectangularReach" "', argument " "1"" of type '" "cmf::river::RectangularReach const &""'"); + } + arg1 = reinterpret_cast< cmf::river::RectangularReach * >(argp1); + { + try { + result = (cmf::river::RectangularReach *)new cmf::river::RectangularReach((cmf::river::RectangularReach const &)*arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__river__RectangularReach, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_RectangularReach(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"new_RectangularReach",0,2,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_cmf__river__RectangularReach, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + { + int res = SWIG_AsVal_double(argv[0], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_double(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_new_RectangularReach__SWIG_1(self, argc, argv); + case 2: + return _wrap_new_RectangularReach__SWIG_0(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_RectangularReach'.\n" + " Possible C/C++ prototypes are:\n" + " cmf::river::RectangularReach::RectangularReach(double,double)\n" + " cmf::river::RectangularReach::RectangularReach(cmf::river::RectangularReach const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_RectangularReach_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::river::RectangularReach *arg1 = (cmf::river::RectangularReach *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::river::RectangularReach *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__RectangularReach, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RectangularReach_copy" "', argument " "1"" of type '" "cmf::river::RectangularReach const *""'"); + } + arg1 = reinterpret_cast< cmf::river::RectangularReach * >(argp1); + { + try { + result = (cmf::river::RectangularReach *)((cmf::river::RectangularReach const *)arg1)->copy(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__river__RectangularReach, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_RectangularReach(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::river::RectangularReach *arg1 = (cmf::river::RectangularReach *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__RectangularReach, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_RectangularReach" "', argument " "1"" of type '" "cmf::river::RectangularReach *""'"); + } + arg1 = reinterpret_cast< cmf::river::RectangularReach * >(argp1); + { + try { + delete arg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *RectangularReach_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__river__RectangularReach, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *RectangularReach_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_PipeReach_radius_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::river::PipeReach *arg1 = (cmf::river::PipeReach *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"PipeReach_radius_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__PipeReach, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PipeReach_radius_set" "', argument " "1"" of type '" "cmf::river::PipeReach *""'"); + } + arg1 = reinterpret_cast< cmf::river::PipeReach * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "PipeReach_radius_set" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + if (arg1) (arg1)->radius = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_PipeReach_radius_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::river::PipeReach *arg1 = (cmf::river::PipeReach *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__PipeReach, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PipeReach_radius_get" "', argument " "1"" of type '" "cmf::river::PipeReach *""'"); + } + arg1 = reinterpret_cast< cmf::river::PipeReach * >(argp1); + result = (double) ((arg1)->radius); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_PipeReach__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + double arg1 ; + double arg2 ; + double val1 ; + int ecode1 = 0 ; + double val2 ; + int ecode2 = 0 ; + cmf::river::PipeReach *result = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + ecode1 = SWIG_AsVal_double(swig_obj[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_PipeReach" "', argument " "1"" of type '" "double""'"); + } + arg1 = static_cast< double >(val1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_PipeReach" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + { + try { + result = (cmf::river::PipeReach *)new cmf::river::PipeReach(arg1,arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__river__PipeReach, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_PipeReach__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::river::PipeReach *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + cmf::river::PipeReach *result = 0 ; + + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_cmf__river__PipeReach, 0 | 0); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_PipeReach" "', argument " "1"" of type '" "cmf::river::PipeReach const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PipeReach" "', argument " "1"" of type '" "cmf::river::PipeReach const &""'"); + } + arg1 = reinterpret_cast< cmf::river::PipeReach * >(argp1); + { + try { + result = (cmf::river::PipeReach *)new cmf::river::PipeReach((cmf::river::PipeReach const &)*arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__river__PipeReach, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_PipeReach(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"new_PipeReach",0,2,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_cmf__river__PipeReach, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + { + int res = SWIG_AsVal_double(argv[0], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_double(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_new_PipeReach__SWIG_1(self, argc, argv); + case 2: + return _wrap_new_PipeReach__SWIG_0(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_PipeReach'.\n" + " Possible C/C++ prototypes are:\n" + " cmf::river::PipeReach::PipeReach(double,double)\n" + " cmf::river::PipeReach::PipeReach(cmf::river::PipeReach const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_PipeReach_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::river::PipeReach *arg1 = (cmf::river::PipeReach *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::river::PipeReach *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__PipeReach, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PipeReach_copy" "', argument " "1"" of type '" "cmf::river::PipeReach const *""'"); + } + arg1 = reinterpret_cast< cmf::river::PipeReach * >(argp1); + { + try { + result = (cmf::river::PipeReach *)((cmf::river::PipeReach const *)arg1)->copy(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__river__PipeReach, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_PipeReach(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::river::PipeReach *arg1 = (cmf::river::PipeReach *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__PipeReach, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_PipeReach" "', argument " "1"" of type '" "cmf::river::PipeReach *""'"); + } + arg1 = reinterpret_cast< cmf::river::PipeReach * >(argp1); + { + try { + delete arg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *PipeReach_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__river__PipeReach, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *PipeReach_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_new_Channel__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) { + PyObject *resultobj = 0; + cmf::river::Channel *result = 0 ; + + if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; + { + try { + result = (cmf::river::Channel *)new cmf::river::Channel(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__river__Channel, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_Channel__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + double arg1 ; + double val1 ; + int ecode1 = 0 ; + cmf::river::Channel *result = 0 ; + + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + ecode1 = SWIG_AsVal_double(swig_obj[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Channel" "', argument " "1"" of type '" "double""'"); + } + arg1 = static_cast< double >(val1); + { + try { + result = (cmf::river::Channel *)new cmf::river::Channel(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__river__Channel, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_Channel__SWIG_2(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::river::IChannel *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + cmf::river::Channel *result = 0 ; + + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_cmf__river__IChannel, 0 | 0); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Channel" "', argument " "1"" of type '" "cmf::river::IChannel const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Channel" "', argument " "1"" of type '" "cmf::river::IChannel const &""'"); + } + arg1 = reinterpret_cast< cmf::river::IChannel * >(argp1); + { + try { + result = (cmf::river::Channel *)new cmf::river::Channel((cmf::river::IChannel const &)*arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__river__Channel, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_Channel__SWIG_3(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::river::IVolumeHeightFunction *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + cmf::river::Channel *result = 0 ; + + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_cmf__river__IVolumeHeightFunction, 0 | 0); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Channel" "', argument " "1"" of type '" "cmf::river::IVolumeHeightFunction const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Channel" "', argument " "1"" of type '" "cmf::river::IVolumeHeightFunction const &""'"); + } + arg1 = reinterpret_cast< cmf::river::IVolumeHeightFunction * >(argp1); + { + try { + result = (cmf::river::Channel *)new cmf::river::Channel((cmf::river::IVolumeHeightFunction const &)*arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__river__Channel, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_Channel__SWIG_4(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::river::Channel *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + cmf::river::Channel *result = 0 ; + + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_cmf__river__Channel, 0 | 0); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Channel" "', argument " "1"" of type '" "cmf::river::Channel const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Channel" "', argument " "1"" of type '" "cmf::river::Channel const &""'"); + } + arg1 = reinterpret_cast< cmf::river::Channel * >(argp1); + { + try { + result = (cmf::river::Channel *)new cmf::river::Channel((cmf::river::Channel const &)*arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__river__Channel, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_Channel__SWIG_5(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + char arg1 ; + double arg2 ; + double arg3 = (double) 1. ; + double arg4 = (double) 0.25 ; + char val1 ; + int ecode1 = 0 ; + double val2 ; + int ecode2 = 0 ; + double val3 ; + int ecode3 = 0 ; + double val4 ; + int ecode4 = 0 ; + cmf::river::Channel *result = 0 ; + + if ((nobjs < 2) || (nobjs > 4)) SWIG_fail; + ecode1 = SWIG_AsVal_char(swig_obj[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Channel" "', argument " "1"" of type '" "char""'"); + } + arg1 = static_cast< char >(val1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Channel" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + if (swig_obj[2]) { + ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Channel" "', argument " "3"" of type '" "double""'"); + } + arg3 = static_cast< double >(val3); + } + if (swig_obj[3]) { + ecode4 = SWIG_AsVal_double(swig_obj[3], &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_Channel" "', argument " "4"" of type '" "double""'"); + } + arg4 = static_cast< double >(val4); + } + { + try { + result = (cmf::river::Channel *)new cmf::river::Channel(arg1,arg2,arg3,arg4); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__river__Channel, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_Channel(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[5] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"new_Channel",0,4,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 0) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + if (argc == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_cmf__river__Channel, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + if (argc == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_cmf__river__IChannel, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 3; + if (_rank == _rankm) goto dispatch; + } + } + check_3: + + if (argc == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_cmf__river__IVolumeHeightFunction, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_4; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 4; + if (_rank == _rankm) goto dispatch; + } + } + check_4: + + if (argc == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + { + int res = SWIG_AsVal_double(argv[0], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_5; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 5; + if (_rank == _rankm) goto dispatch; + } + } + check_5: + + if ((argc >= 2) && (argc <= 4)) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + { + int res = SWIG_AsVal_char(argv[0], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_6; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_double(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_6; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (argc > 2) { + { + { + int res = SWIG_AsVal_double(argv[2], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_6; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (argc > 3) { + { + { + int res = SWIG_AsVal_double(argv[3], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_6; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + } + } + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 6; + if (_rank == _rankm) goto dispatch; + } + } + check_6: + + dispatch: + switch(_index) { + case 1: + return _wrap_new_Channel__SWIG_0(self, argc, argv); + case 2: + return _wrap_new_Channel__SWIG_4(self, argc, argv); + case 3: + return _wrap_new_Channel__SWIG_2(self, argc, argv); + case 4: + return _wrap_new_Channel__SWIG_3(self, argc, argv); + case 5: + return _wrap_new_Channel__SWIG_1(self, argc, argv); + case 6: + return _wrap_new_Channel__SWIG_5(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_Channel'.\n" + " Possible C/C++ prototypes are:\n" + " cmf::river::Channel::Channel()\n" + " cmf::river::Channel::Channel(double)\n" + " cmf::river::Channel::Channel(cmf::river::IChannel const &)\n" + " cmf::river::Channel::Channel(cmf::river::IVolumeHeightFunction const &)\n" + " cmf::river::Channel::Channel(cmf::river::Channel const &)\n" + " cmf::river::Channel::Channel(char,double,double,double)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_Channel_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::river::Channel *arg1 = (cmf::river::Channel *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::river::Channel *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__Channel, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Channel_copy" "', argument " "1"" of type '" "cmf::river::Channel const *""'"); + } + arg1 = reinterpret_cast< cmf::river::Channel * >(argp1); + { + try { + result = (cmf::river::Channel *)((cmf::river::Channel const *)arg1)->copy(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__river__Channel, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_Channel(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::river::Channel *arg1 = (cmf::river::Channel *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__Channel, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Channel" "', argument " "1"" of type '" "cmf::river::Channel *""'"); + } + arg1 = reinterpret_cast< cmf::river::Channel * >(argp1); + { + try { + delete arg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *Channel_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__river__Channel, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *Channel_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_new_MeanChannel__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::river::IChannel *arg1 = 0 ; + cmf::river::IChannel *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + cmf::river::MeanChannel *result = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_cmf__river__IChannel, 0 | 0); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MeanChannel" "', argument " "1"" of type '" "cmf::river::IChannel const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MeanChannel" "', argument " "1"" of type '" "cmf::river::IChannel const &""'"); + } + arg1 = reinterpret_cast< cmf::river::IChannel * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_cmf__river__IChannel, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MeanChannel" "', argument " "2"" of type '" "cmf::river::IChannel const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MeanChannel" "', argument " "2"" of type '" "cmf::river::IChannel const &""'"); + } + arg2 = reinterpret_cast< cmf::river::IChannel * >(argp2); + { + try { + result = (cmf::river::MeanChannel *)new cmf::river::MeanChannel((cmf::river::IChannel const &)*arg1,(cmf::river::IChannel const &)*arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__river__MeanChannel, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_MeanChannel__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::river::MeanChannel *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + cmf::river::MeanChannel *result = 0 ; + + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_cmf__river__MeanChannel, 0 | 0); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MeanChannel" "', argument " "1"" of type '" "cmf::river::MeanChannel const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MeanChannel" "', argument " "1"" of type '" "cmf::river::MeanChannel const &""'"); + } + arg1 = reinterpret_cast< cmf::river::MeanChannel * >(argp1); + { + try { + result = (cmf::river::MeanChannel *)new cmf::river::MeanChannel((cmf::river::MeanChannel const &)*arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__river__MeanChannel, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_MeanChannel(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"new_MeanChannel",0,2,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_cmf__river__MeanChannel, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_cmf__river__IChannel, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_cmf__river__IChannel, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_new_MeanChannel__SWIG_1(self, argc, argv); + case 2: + return _wrap_new_MeanChannel__SWIG_0(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_MeanChannel'.\n" + " Possible C/C++ prototypes are:\n" + " cmf::river::MeanChannel::MeanChannel(cmf::river::IChannel const &,cmf::river::IChannel const &)\n" + " cmf::river::MeanChannel::MeanChannel(cmf::river::MeanChannel const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_MeanChannel_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::river::MeanChannel *arg1 = (cmf::river::MeanChannel *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::river::MeanChannel *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__MeanChannel, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MeanChannel_copy" "', argument " "1"" of type '" "cmf::river::MeanChannel const *""'"); + } + arg1 = reinterpret_cast< cmf::river::MeanChannel * >(argp1); + { + try { + result = (cmf::river::MeanChannel *)((cmf::river::MeanChannel const *)arg1)->copy(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__river__MeanChannel, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_MeanChannel(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::river::MeanChannel *arg1 = (cmf::river::MeanChannel *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__MeanChannel, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MeanChannel" "', argument " "1"" of type '" "cmf::river::MeanChannel *""'"); + } + arg1 = reinterpret_cast< cmf::river::MeanChannel * >(argp1); + { + try { + delete arg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *MeanChannel_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__river__MeanChannel, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *MeanChannel_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_OpenWaterStorage_get_height_function(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::river::OpenWaterStorage *arg1 = (cmf::river::OpenWaterStorage *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::river::OpenWaterStorage const > tempshared1 ; + std::shared_ptr< cmf::river::OpenWaterStorage const > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + cmf::river::IVolumeHeightFunction *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__river__OpenWaterStorage_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OpenWaterStorage_get_height_function" "', argument " "1"" of type '" "cmf::river::OpenWaterStorage const *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::river::OpenWaterStorage > * >(argp1); + delete reinterpret_cast< std::shared_ptr< const cmf::river::OpenWaterStorage > * >(argp1); + arg1 = const_cast< cmf::river::OpenWaterStorage * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::river::OpenWaterStorage > * >(argp1); + arg1 = const_cast< cmf::river::OpenWaterStorage * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + try { + result = (cmf::river::IVolumeHeightFunction *) &((cmf::river::OpenWaterStorage const *)arg1)->get_height_function(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__river__IVolumeHeightFunction, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_OpenWaterStorage_set_height_function(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::river::OpenWaterStorage *arg1 = (cmf::river::OpenWaterStorage *) 0 ; + cmf::river::IVolumeHeightFunction *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::river::OpenWaterStorage > tempshared1 ; + std::shared_ptr< cmf::river::OpenWaterStorage > *smartarg1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "val", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:OpenWaterStorage_set_height_function",kwnames,&obj0,&obj1)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__river__OpenWaterStorage_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OpenWaterStorage_set_height_function" "', argument " "1"" of type '" "cmf::river::OpenWaterStorage *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::river::OpenWaterStorage > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::river::OpenWaterStorage > * >(argp1); + arg1 = const_cast< cmf::river::OpenWaterStorage * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::river::OpenWaterStorage > * >(argp1); + arg1 = const_cast< cmf::river::OpenWaterStorage * >((smartarg1 ? smartarg1->get() : 0)); + } + } + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_cmf__river__IVolumeHeightFunction, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "OpenWaterStorage_set_height_function" "', argument " "2"" of type '" "cmf::river::IVolumeHeightFunction const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "OpenWaterStorage_set_height_function" "', argument " "2"" of type '" "cmf::river::IVolumeHeightFunction const &""'"); + } + arg2 = reinterpret_cast< cmf::river::IVolumeHeightFunction * >(argp2); + { + try { + (arg1)->set_height_function((cmf::river::IVolumeHeightFunction const &)*arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_OpenWaterStorage_wet_area(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::river::OpenWaterStorage *arg1 = (cmf::river::OpenWaterStorage *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::river::OpenWaterStorage const > tempshared1 ; + std::shared_ptr< cmf::river::OpenWaterStorage const > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__river__OpenWaterStorage_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OpenWaterStorage_wet_area" "', argument " "1"" of type '" "cmf::river::OpenWaterStorage const *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::river::OpenWaterStorage > * >(argp1); + delete reinterpret_cast< std::shared_ptr< const cmf::river::OpenWaterStorage > * >(argp1); + arg1 = const_cast< cmf::river::OpenWaterStorage * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::river::OpenWaterStorage > * >(argp1); + arg1 = const_cast< cmf::river::OpenWaterStorage * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + try { + result = (real)((cmf::river::OpenWaterStorage const *)arg1)->wet_area(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_OpenWaterStorage_create__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::project *arg1 = 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + cmf::river::OpenWaterStorage::ptr result; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_cmf__project, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OpenWaterStorage_create" "', argument " "1"" of type '" "cmf::project &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "OpenWaterStorage_create" "', argument " "1"" of type '" "cmf::project &""'"); + } + arg1 = reinterpret_cast< cmf::project * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OpenWaterStorage_create" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + { + try { + result = cmf::river::OpenWaterStorage::create(*arg1,arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + std::shared_ptr< cmf::river::OpenWaterStorage > *smartresult = result ? new std::shared_ptr< cmf::river::OpenWaterStorage >(result) : 0; + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__river__OpenWaterStorage_t, SWIG_POINTER_OWN); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_OpenWaterStorage_create__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::project *arg1 = 0 ; + cmf::river::IVolumeHeightFunction *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + cmf::river::OpenWaterStorage::ptr result; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_cmf__project, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OpenWaterStorage_create" "', argument " "1"" of type '" "cmf::project &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "OpenWaterStorage_create" "', argument " "1"" of type '" "cmf::project &""'"); + } + arg1 = reinterpret_cast< cmf::project * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_cmf__river__IVolumeHeightFunction, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "OpenWaterStorage_create" "', argument " "2"" of type '" "cmf::river::IVolumeHeightFunction const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "OpenWaterStorage_create" "', argument " "2"" of type '" "cmf::river::IVolumeHeightFunction const &""'"); + } + arg2 = reinterpret_cast< cmf::river::IVolumeHeightFunction * >(argp2); + { + try { + result = cmf::river::OpenWaterStorage::create(*arg1,(cmf::river::IVolumeHeightFunction const &)*arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + std::shared_ptr< cmf::river::OpenWaterStorage > *smartresult = result ? new std::shared_ptr< cmf::river::OpenWaterStorage >(result) : 0; + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__river__OpenWaterStorage_t, SWIG_POINTER_OWN); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_OpenWaterStorage_create(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"OpenWaterStorage_create",0,2,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__project, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_cmf__river__IVolumeHeightFunction, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__project, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_double(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_OpenWaterStorage_create__SWIG_1(self, argc, argv); + case 2: + return _wrap_OpenWaterStorage_create__SWIG_0(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'OpenWaterStorage_create'.\n" + " Possible C/C++ prototypes are:\n" + " cmf::river::OpenWaterStorage::create(cmf::project &,real)\n" + " cmf::river::OpenWaterStorage::create(cmf::project &,cmf::river::IVolumeHeightFunction const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_OpenWaterStorage_cast(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::flux_node::ptr arg1 ; + void *argp1 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + char * kwnames[] = { + (char *) "node", NULL + }; + cmf::river::OpenWaterStorage::ptr result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:OpenWaterStorage_cast",kwnames,&obj0)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OpenWaterStorage_cast" "', argument " "1"" of type '" "cmf::water::flux_node::ptr""'"); + } + if (argp1) arg1 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp1)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp1); + } + { + try { + result = cmf::river::OpenWaterStorage::cast(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + std::shared_ptr< cmf::river::OpenWaterStorage > *smartresult = result ? new std::shared_ptr< cmf::river::OpenWaterStorage >(result) : 0; + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__river__OpenWaterStorage_t, SWIG_POINTER_OWN); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_OpenWaterStorage_depth_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::river::OpenWaterStorage *arg1 = (cmf::river::OpenWaterStorage *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::river::OpenWaterStorage > tempshared1 ; + std::shared_ptr< cmf::river::OpenWaterStorage > *smartarg1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"OpenWaterStorage_depth_set",2,2,swig_obj)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__river__OpenWaterStorage_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OpenWaterStorage_depth_set" "', argument " "1"" of type '" "cmf::river::OpenWaterStorage *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::river::OpenWaterStorage > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::river::OpenWaterStorage > * >(argp1); + arg1 = const_cast< cmf::river::OpenWaterStorage * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::river::OpenWaterStorage > * >(argp1); + arg1 = const_cast< cmf::river::OpenWaterStorage * >((smartarg1 ? smartarg1->get() : 0)); + } + } + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OpenWaterStorage_depth_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + { + try { + cmf_river_OpenWaterStorage_depth_set(arg1,arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_OpenWaterStorage_depth_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::river::OpenWaterStorage *arg1 = (cmf::river::OpenWaterStorage *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::river::OpenWaterStorage > tempshared1 ; + std::shared_ptr< cmf::river::OpenWaterStorage > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__river__OpenWaterStorage_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OpenWaterStorage_depth_get" "', argument " "1"" of type '" "cmf::river::OpenWaterStorage *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::river::OpenWaterStorage > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::river::OpenWaterStorage > * >(argp1); + arg1 = const_cast< cmf::river::OpenWaterStorage * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::river::OpenWaterStorage > * >(argp1); + arg1 = const_cast< cmf::river::OpenWaterStorage * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + try { + result = (real)cmf_river_OpenWaterStorage_depth_get(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_OpenWaterStorage(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::river::OpenWaterStorage *arg1 = (cmf::river::OpenWaterStorage *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::river::OpenWaterStorage > tempshared1 ; + std::shared_ptr< cmf::river::OpenWaterStorage > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__river__OpenWaterStorage_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_OpenWaterStorage" "', argument " "1"" of type '" "cmf::river::OpenWaterStorage *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::river::OpenWaterStorage > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::river::OpenWaterStorage > * >(argp1); + arg1 = const_cast< cmf::river::OpenWaterStorage * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::river::OpenWaterStorage > * >(argp1); + arg1 = const_cast< cmf::river::OpenWaterStorage * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + try { + (void)arg1; delete smartarg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *OpenWaterStorage_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_cmf__river__OpenWaterStorage_t, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_Reach_get_reachtype(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::river::Reach *arg1 = (cmf::river::Reach *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::river::Reach const > tempshared1 ; + std::shared_ptr< cmf::river::Reach const > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + cmf::river::Channel result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__river__Reach_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Reach_get_reachtype" "', argument " "1"" of type '" "cmf::river::Reach const *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::river::Reach > * >(argp1); + delete reinterpret_cast< std::shared_ptr< const cmf::river::Reach > * >(argp1); + arg1 = const_cast< cmf::river::Reach * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::river::Reach > * >(argp1); + arg1 = const_cast< cmf::river::Reach * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + try { + result = ((cmf::river::Reach const *)arg1)->get_reachtype(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj((new cmf::river::Channel(static_cast< const cmf::river::Channel& >(result))), SWIGTYPE_p_cmf__river__Channel, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Reach_set_height_function(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::river::Reach *arg1 = (cmf::river::Reach *) 0 ; + cmf::river::IChannel *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::river::Reach > tempshared1 ; + std::shared_ptr< cmf::river::Reach > *smartarg1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "val", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Reach_set_height_function",kwnames,&obj0,&obj1)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__river__Reach_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Reach_set_height_function" "', argument " "1"" of type '" "cmf::river::Reach *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::river::Reach > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::river::Reach > * >(argp1); + arg1 = const_cast< cmf::river::Reach * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::river::Reach > * >(argp1); + arg1 = const_cast< cmf::river::Reach * >((smartarg1 ? smartarg1->get() : 0)); + } + } + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_cmf__river__IChannel, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Reach_set_height_function" "', argument " "2"" of type '" "cmf::river::IChannel const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Reach_set_height_function" "', argument " "2"" of type '" "cmf::river::IChannel const &""'"); + } + arg2 = reinterpret_cast< cmf::river::IChannel * >(argp2); + { + try { + (arg1)->set_height_function((cmf::river::IChannel const &)*arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Reach_set_outlet(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::river::Reach *arg1 = (cmf::river::Reach *) 0 ; + cmf::water::flux_node::ptr arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::river::Reach > tempshared1 ; + std::shared_ptr< cmf::river::Reach > *smartarg1 = 0 ; + void *argp2 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "outlet", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Reach_set_outlet",kwnames,&obj0,&obj1)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__river__Reach_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Reach_set_outlet" "', argument " "1"" of type '" "cmf::river::Reach *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::river::Reach > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::river::Reach > * >(argp1); + arg1 = const_cast< cmf::river::Reach * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::river::Reach > * >(argp1); + arg1 = const_cast< cmf::river::Reach * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + int newmem = 0; + res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Reach_set_outlet" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); + } + if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); + } + { + try { + (arg1)->set_outlet(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Reach_set_dead_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::river::Reach *arg1 = (cmf::river::Reach *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::river::Reach > tempshared1 ; + std::shared_ptr< cmf::river::Reach > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__river__Reach_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Reach_set_dead_end" "', argument " "1"" of type '" "cmf::river::Reach *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::river::Reach > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::river::Reach > * >(argp1); + arg1 = const_cast< cmf::river::Reach * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::river::Reach > * >(argp1); + arg1 = const_cast< cmf::river::Reach * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + try { + (arg1)->set_dead_end(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Reach_set_downstream(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::river::Reach *arg1 = (cmf::river::Reach *) 0 ; + cmf::river::Reach::ptr arg2 ; + bool arg3 = (bool) false ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::river::Reach > tempshared1 ; + std::shared_ptr< cmf::river::Reach > *smartarg1 = 0 ; + void *argp2 ; + int res2 = 0 ; + bool val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "new_downstream",(char *) "use_meanchannel", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:Reach_set_downstream",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__river__Reach_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Reach_set_downstream" "', argument " "1"" of type '" "cmf::river::Reach *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::river::Reach > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::river::Reach > * >(argp1); + arg1 = const_cast< cmf::river::Reach * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::river::Reach > * >(argp1); + arg1 = const_cast< cmf::river::Reach * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + int newmem = 0; + res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__river__Reach_t, 0 , &newmem); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Reach_set_downstream" "', argument " "2"" of type '" "cmf::river::Reach::ptr""'"); + } + if (argp2) arg2 = *(reinterpret_cast< cmf::river::Reach::ptr * >(argp2)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::river::Reach::ptr * >(argp2); + } + if (obj2) { + ecode3 = SWIG_AsVal_bool(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Reach_set_downstream" "', argument " "3"" of type '" "bool""'"); + } + arg3 = static_cast< bool >(val3); + } + { + try { + (arg1)->set_downstream(arg2,arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Reach___get_downstream(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::river::Reach *arg1 = (cmf::river::Reach *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::river::Reach const > tempshared1 ; + std::shared_ptr< cmf::river::Reach const > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + cmf::water::flux_node::ptr result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__river__Reach_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Reach___get_downstream" "', argument " "1"" of type '" "cmf::river::Reach const *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::river::Reach > * >(argp1); + delete reinterpret_cast< std::shared_ptr< const cmf::river::Reach > * >(argp1); + arg1 = const_cast< cmf::river::Reach * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::river::Reach > * >(argp1); + arg1 = const_cast< cmf::river::Reach * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + try { + result = ((cmf::river::Reach const *)arg1)->get_downstream(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + std::shared_ptr< cmf::water::flux_node > *smartresult = result ? new std::shared_ptr< cmf::water::flux_node >(result) : 0; + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, SWIG_POINTER_OWN); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Reach_get_upstream(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::river::Reach *arg1 = (cmf::river::Reach *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::river::Reach const > tempshared1 ; + std::shared_ptr< cmf::river::Reach const > *smartarg1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "index", NULL + }; + cmf::river::Reach::ptr result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Reach_get_upstream",kwnames,&obj0,&obj1)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__river__Reach_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Reach_get_upstream" "', argument " "1"" of type '" "cmf::river::Reach const *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::river::Reach > * >(argp1); + delete reinterpret_cast< std::shared_ptr< const cmf::river::Reach > * >(argp1); + arg1 = const_cast< cmf::river::Reach * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::river::Reach > * >(argp1); + arg1 = const_cast< cmf::river::Reach * >((smartarg1 ? smartarg1->get() : 0)); + } + } + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Reach_get_upstream" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + { + try { + result = ((cmf::river::Reach const *)arg1)->get_upstream(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + std::shared_ptr< cmf::river::Reach > *smartresult = result ? new std::shared_ptr< cmf::river::Reach >(result) : 0; + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__river__Reach_t, SWIG_POINTER_OWN); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Reach_connect_to_surfacewater(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::river::Reach *arg1 = (cmf::river::Reach *) 0 ; + cmf::upslope::Cell *arg2 = (cmf::upslope::Cell *) 0 ; + real arg3 ; + bool arg4 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::river::Reach > tempshared1 ; + std::shared_ptr< cmf::river::Reach > *smartarg1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + double val3 ; + int ecode3 = 0 ; + bool val4 ; + int ecode4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "cell",(char *) "width",(char *) "diffusive", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO:Reach_connect_to_surfacewater",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__river__Reach_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Reach_connect_to_surfacewater" "', argument " "1"" of type '" "cmf::river::Reach *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::river::Reach > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::river::Reach > * >(argp1); + arg1 = const_cast< cmf::river::Reach * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::river::Reach > * >(argp1); + arg1 = const_cast< cmf::river::Reach * >((smartarg1 ? smartarg1->get() : 0)); + } + } + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Reach_connect_to_surfacewater" "', argument " "2"" of type '" "cmf::upslope::Cell *""'"); + } + arg2 = reinterpret_cast< cmf::upslope::Cell * >(argp2); + ecode3 = SWIG_AsVal_double(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Reach_connect_to_surfacewater" "', argument " "3"" of type '" "real""'"); + } + arg3 = static_cast< real >(val3); + ecode4 = SWIG_AsVal_bool(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Reach_connect_to_surfacewater" "', argument " "4"" of type '" "bool""'"); + } + arg4 = static_cast< bool >(val4); + { + try { + (arg1)->connect_to_surfacewater(arg2,arg3,arg4); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Reach_distance_to_cell(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::river::Reach *arg1 = (cmf::river::Reach *) 0 ; + cmf::upslope::Cell *arg2 = (cmf::upslope::Cell *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::river::Reach const > tempshared1 ; + std::shared_ptr< cmf::river::Reach const > *smartarg1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "cell", NULL + }; + double result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Reach_distance_to_cell",kwnames,&obj0,&obj1)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__river__Reach_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Reach_distance_to_cell" "', argument " "1"" of type '" "cmf::river::Reach const *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::river::Reach > * >(argp1); + delete reinterpret_cast< std::shared_ptr< const cmf::river::Reach > * >(argp1); + arg1 = const_cast< cmf::river::Reach * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::river::Reach > * >(argp1); + arg1 = const_cast< cmf::river::Reach * >((smartarg1 ? smartarg1->get() : 0)); + } + } + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Reach_distance_to_cell" "', argument " "2"" of type '" "cmf::upslope::Cell *""'"); + } + arg2 = reinterpret_cast< cmf::upslope::Cell * >(argp2); + { + try { + result = (double)((cmf::river::Reach const *)arg1)->distance_to_cell(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Reach___get_root(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::river::Reach *arg1 = (cmf::river::Reach *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::river::Reach > tempshared1 ; + std::shared_ptr< cmf::river::Reach > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + cmf::river::Reach::ptr result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__river__Reach_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Reach___get_root" "', argument " "1"" of type '" "cmf::river::Reach *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::river::Reach > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::river::Reach > * >(argp1); + arg1 = const_cast< cmf::river::Reach * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::river::Reach > * >(argp1); + arg1 = const_cast< cmf::river::Reach * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + try { + result = (arg1)->get_root(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + std::shared_ptr< cmf::river::Reach > *smartresult = result ? new std::shared_ptr< cmf::river::Reach >(result) : 0; + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__river__Reach_t, SWIG_POINTER_OWN); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_Reach(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::river::Reach *arg1 = (cmf::river::Reach *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::river::Reach > tempshared1 ; + std::shared_ptr< cmf::river::Reach > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__river__Reach_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Reach" "', argument " "1"" of type '" "cmf::river::Reach *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::river::Reach > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::river::Reach > * >(argp1); + arg1 = const_cast< cmf::river::Reach * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::river::Reach > * >(argp1); + arg1 = const_cast< cmf::river::Reach * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + try { + (void)arg1; delete smartarg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Reach_create(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::project *arg1 = 0 ; + cmf::river::IChannel *arg2 = 0 ; + bool arg3 = (bool) false ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + bool val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "project",(char *) "shape",(char *) "diffusive", NULL + }; + cmf::river::Reach::ptr result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:Reach_create",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_cmf__project, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Reach_create" "', argument " "1"" of type '" "cmf::project &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Reach_create" "', argument " "1"" of type '" "cmf::project &""'"); + } + arg1 = reinterpret_cast< cmf::project * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_cmf__river__IChannel, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Reach_create" "', argument " "2"" of type '" "cmf::river::IChannel const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Reach_create" "', argument " "2"" of type '" "cmf::river::IChannel const &""'"); + } + arg2 = reinterpret_cast< cmf::river::IChannel * >(argp2); + if (obj2) { + ecode3 = SWIG_AsVal_bool(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Reach_create" "', argument " "3"" of type '" "bool""'"); + } + arg3 = static_cast< bool >(val3); + } + { + try { + result = cmf::river::Reach::create(*arg1,(cmf::river::IChannel const &)*arg2,arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + std::shared_ptr< cmf::river::Reach > *smartresult = result ? new std::shared_ptr< cmf::river::Reach >(result) : 0; + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__river__Reach_t, SWIG_POINTER_OWN); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Reach_length_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::river::Reach *arg1 = (cmf::river::Reach *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::river::Reach > tempshared1 ; + std::shared_ptr< cmf::river::Reach > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__river__Reach_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Reach_length_get" "', argument " "1"" of type '" "cmf::river::Reach *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::river::Reach > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::river::Reach > * >(argp1); + arg1 = const_cast< cmf::river::Reach * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::river::Reach > * >(argp1); + arg1 = const_cast< cmf::river::Reach * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + try { + result = (real)cmf_river_Reach_length_get(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Reach_width_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::river::Reach *arg1 = (cmf::river::Reach *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::river::Reach > tempshared1 ; + std::shared_ptr< cmf::river::Reach > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__river__Reach_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Reach_width_get" "', argument " "1"" of type '" "cmf::river::Reach *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::river::Reach > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::river::Reach > * >(argp1); + arg1 = const_cast< cmf::river::Reach * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::river::Reach > * >(argp1); + arg1 = const_cast< cmf::river::Reach * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + try { + result = (real)cmf_river_Reach_width_get(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Reach_channel_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::river::Reach *arg1 = (cmf::river::Reach *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::river::Reach > tempshared1 ; + std::shared_ptr< cmf::river::Reach > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + cmf::river::IChannel *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__river__Reach_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Reach_channel_get" "', argument " "1"" of type '" "cmf::river::Reach *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::river::Reach > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::river::Reach > * >(argp1); + arg1 = const_cast< cmf::river::Reach * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::river::Reach > * >(argp1); + arg1 = const_cast< cmf::river::Reach * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + try { + result = (cmf::river::IChannel *)cmf_river_Reach_channel_get(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__river__IChannel, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Reach_upstream_count_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::river::Reach *arg1 = (cmf::river::Reach *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::river::Reach > tempshared1 ; + std::shared_ptr< cmf::river::Reach > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__river__Reach_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Reach_upstream_count_get" "', argument " "1"" of type '" "cmf::river::Reach *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::river::Reach > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::river::Reach > * >(argp1); + arg1 = const_cast< cmf::river::Reach * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::river::Reach > * >(argp1); + arg1 = const_cast< cmf::river::Reach * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + try { + result = (int)cmf_river_Reach_upstream_count_get(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Reach_diffusive_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::river::Reach *arg1 = (cmf::river::Reach *) 0 ; + bool arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::river::Reach > tempshared1 ; + std::shared_ptr< cmf::river::Reach > *smartarg1 = 0 ; + bool val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"Reach_diffusive_set",2,2,swig_obj)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__river__Reach_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Reach_diffusive_set" "', argument " "1"" of type '" "cmf::river::Reach *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::river::Reach > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::river::Reach > * >(argp1); + arg1 = const_cast< cmf::river::Reach * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::river::Reach > * >(argp1); + arg1 = const_cast< cmf::river::Reach * >((smartarg1 ? smartarg1->get() : 0)); + } + } + ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Reach_diffusive_set" "', argument " "2"" of type '" "bool""'"); + } + arg2 = static_cast< bool >(val2); + { + try { + cmf_river_Reach_diffusive_set(arg1,arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Reach_diffusive_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::river::Reach *arg1 = (cmf::river::Reach *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::river::Reach > tempshared1 ; + std::shared_ptr< cmf::river::Reach > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + bool result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__river__Reach_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Reach_diffusive_get" "', argument " "1"" of type '" "cmf::river::Reach *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::river::Reach > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::river::Reach > * >(argp1); + arg1 = const_cast< cmf::river::Reach * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::river::Reach > * >(argp1); + arg1 = const_cast< cmf::river::Reach * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + try { + result = (bool)cmf_river_Reach_diffusive_get(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *Reach_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_cmf__river__Reach_t, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_ReachIterator_next(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::river::ReachIterator *arg1 = (cmf::river::ReachIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::river::Reach::ptr result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__ReachIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReachIterator_next" "', argument " "1"" of type '" "cmf::river::ReachIterator *""'"); + } + arg1 = reinterpret_cast< cmf::river::ReachIterator * >(argp1); + { + try { + result = (arg1)->next(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + std::shared_ptr< cmf::river::Reach > *smartresult = result ? new std::shared_ptr< cmf::river::Reach >(result) : 0; + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__river__Reach_t, SWIG_POINTER_OWN); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ReachIterator_valid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::river::ReachIterator *arg1 = (cmf::river::ReachIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + bool result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__ReachIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReachIterator_valid" "', argument " "1"" of type '" "cmf::river::ReachIterator const *""'"); + } + arg1 = reinterpret_cast< cmf::river::ReachIterator * >(argp1); + { + try { + result = (bool)((cmf::river::ReachIterator const *)arg1)->valid(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ReachIterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::river::Reach::ptr arg1 ; + void *argp1 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + char * kwnames[] = { + (char *) "first", NULL + }; + cmf::river::ReachIterator *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:new_ReachIterator",kwnames,&obj0)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__river__Reach_t, 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ReachIterator" "', argument " "1"" of type '" "cmf::river::Reach::ptr""'"); + } + if (argp1) arg1 = *(reinterpret_cast< cmf::river::Reach::ptr * >(argp1)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::river::Reach::ptr * >(argp1); + } + { + try { + result = (cmf::river::ReachIterator *)new cmf::river::ReachIterator(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__river__ReachIterator, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ReachIterator___reach(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::river::ReachIterator *arg1 = (cmf::river::ReachIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::river::Reach::ptr result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__ReachIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReachIterator___reach" "', argument " "1"" of type '" "cmf::river::ReachIterator const *""'"); + } + arg1 = reinterpret_cast< cmf::river::ReachIterator * >(argp1); + { + try { + result = ((cmf::river::ReachIterator const *)arg1)->reach(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + std::shared_ptr< cmf::river::Reach > *smartresult = result ? new std::shared_ptr< cmf::river::Reach >(result) : 0; + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__river__Reach_t, SWIG_POINTER_OWN); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ReachIterator_position_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::river::ReachIterator *arg1 = (cmf::river::ReachIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__ReachIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReachIterator_position_get" "', argument " "1"" of type '" "cmf::river::ReachIterator *""'"); + } + arg1 = reinterpret_cast< cmf::river::ReachIterator * >(argp1); + { + try { + result = (double)cmf_river_ReachIterator_position_get(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_ReachIterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::river::ReachIterator *arg1 = (cmf::river::ReachIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__ReachIterator, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ReachIterator" "', argument " "1"" of type '" "cmf::river::ReachIterator *""'"); + } + arg1 = reinterpret_cast< cmf::river::ReachIterator * >(argp1); + { + try { + delete arg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *ReachIterator_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__river__ReachIterator, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *ReachIterator_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_make_river_gap(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::river::Reach::ptr arg1 ; + void *argp1 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + char * kwnames[] = { + (char *) "root_reach", NULL + }; + double result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:make_river_gap",kwnames,&obj0)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__river__Reach_t, 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "make_river_gap" "', argument " "1"" of type '" "cmf::river::Reach::ptr""'"); + } + if (argp1) arg1 = *(reinterpret_cast< cmf::river::Reach::ptr * >(argp1)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::river::Reach::ptr * >(argp1); + } + { + try { + result = (double)cmf::river::make_river_gap(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SurfaceWater_get_height_function(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::SurfaceWater *arg1 = (cmf::upslope::SurfaceWater *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::upslope::SurfaceWater const > tempshared1 ; + std::shared_ptr< cmf::upslope::SurfaceWater const > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + cmf::river::Prism *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SurfaceWater_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SurfaceWater_get_height_function" "', argument " "1"" of type '" "cmf::upslope::SurfaceWater const *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::upslope::SurfaceWater > * >(argp1); + delete reinterpret_cast< std::shared_ptr< const cmf::upslope::SurfaceWater > * >(argp1); + arg1 = const_cast< cmf::upslope::SurfaceWater * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::upslope::SurfaceWater > * >(argp1); + arg1 = const_cast< cmf::upslope::SurfaceWater * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + try { + result = (cmf::river::Prism *) &((cmf::upslope::SurfaceWater const *)arg1)->get_height_function(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__river__Prism, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SurfaceWater_get_cell(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::SurfaceWater *arg1 = (cmf::upslope::SurfaceWater *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::upslope::SurfaceWater const > tempshared1 ; + std::shared_ptr< cmf::upslope::SurfaceWater const > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + cmf::upslope::Cell *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SurfaceWater_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SurfaceWater_get_cell" "', argument " "1"" of type '" "cmf::upslope::SurfaceWater const *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::upslope::SurfaceWater > * >(argp1); + delete reinterpret_cast< std::shared_ptr< const cmf::upslope::SurfaceWater > * >(argp1); + arg1 = const_cast< cmf::upslope::SurfaceWater * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::upslope::SurfaceWater > * >(argp1); + arg1 = const_cast< cmf::upslope::SurfaceWater * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + try { + result = (cmf::upslope::Cell *) &((cmf::upslope::SurfaceWater const *)arg1)->get_cell(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SurfaceWater_cast(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::flux_node::ptr arg1 ; + void *argp1 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + char * kwnames[] = { + (char *) "node", NULL + }; + cmf::upslope::SurfaceWater::ptr result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:SurfaceWater_cast",kwnames,&obj0)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SurfaceWater_cast" "', argument " "1"" of type '" "cmf::water::flux_node::ptr""'"); + } + if (argp1) arg1 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp1)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp1); + } + { + try { + result = cmf::upslope::SurfaceWater::cast(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + std::shared_ptr< cmf::upslope::SurfaceWater > *smartresult = result ? new std::shared_ptr< cmf::upslope::SurfaceWater >(result) : 0; + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SurfaceWater_t, SWIG_POINTER_OWN); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SurfaceWater_puddledepth_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::SurfaceWater *arg1 = (cmf::upslope::SurfaceWater *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::upslope::SurfaceWater > tempshared1 ; + std::shared_ptr< cmf::upslope::SurfaceWater > *smartarg1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"SurfaceWater_puddledepth_set",2,2,swig_obj)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SurfaceWater_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SurfaceWater_puddledepth_set" "', argument " "1"" of type '" "cmf::upslope::SurfaceWater *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::SurfaceWater > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::upslope::SurfaceWater > * >(argp1); + arg1 = const_cast< cmf::upslope::SurfaceWater * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::SurfaceWater > * >(argp1); + arg1 = const_cast< cmf::upslope::SurfaceWater * >((smartarg1 ? smartarg1->get() : 0)); + } + } + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SurfaceWater_puddledepth_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + { + try { + cmf_upslope_SurfaceWater_puddledepth_set(arg1,arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SurfaceWater_puddledepth_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::SurfaceWater *arg1 = (cmf::upslope::SurfaceWater *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::upslope::SurfaceWater > tempshared1 ; + std::shared_ptr< cmf::upslope::SurfaceWater > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SurfaceWater_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SurfaceWater_puddledepth_get" "', argument " "1"" of type '" "cmf::upslope::SurfaceWater *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::SurfaceWater > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::upslope::SurfaceWater > * >(argp1); + arg1 = const_cast< cmf::upslope::SurfaceWater * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::SurfaceWater > * >(argp1); + arg1 = const_cast< cmf::upslope::SurfaceWater * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + try { + result = (real)cmf_upslope_SurfaceWater_puddledepth_get(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SurfaceWater_nManning_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::SurfaceWater *arg1 = (cmf::upslope::SurfaceWater *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::upslope::SurfaceWater > tempshared1 ; + std::shared_ptr< cmf::upslope::SurfaceWater > *smartarg1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"SurfaceWater_nManning_set",2,2,swig_obj)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SurfaceWater_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SurfaceWater_nManning_set" "', argument " "1"" of type '" "cmf::upslope::SurfaceWater *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::SurfaceWater > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::upslope::SurfaceWater > * >(argp1); + arg1 = const_cast< cmf::upslope::SurfaceWater * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::SurfaceWater > * >(argp1); + arg1 = const_cast< cmf::upslope::SurfaceWater * >((smartarg1 ? smartarg1->get() : 0)); + } + } + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SurfaceWater_nManning_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + { + try { + cmf_upslope_SurfaceWater_nManning_set(arg1,arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SurfaceWater_nManning_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::SurfaceWater *arg1 = (cmf::upslope::SurfaceWater *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::upslope::SurfaceWater > tempshared1 ; + std::shared_ptr< cmf::upslope::SurfaceWater > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SurfaceWater_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SurfaceWater_nManning_get" "', argument " "1"" of type '" "cmf::upslope::SurfaceWater *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::SurfaceWater > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::upslope::SurfaceWater > * >(argp1); + arg1 = const_cast< cmf::upslope::SurfaceWater * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::SurfaceWater > * >(argp1); + arg1 = const_cast< cmf::upslope::SurfaceWater * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + try { + result = (real)cmf_upslope_SurfaceWater_nManning_get(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_SurfaceWater(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::SurfaceWater *arg1 = (cmf::upslope::SurfaceWater *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::upslope::SurfaceWater > tempshared1 ; + std::shared_ptr< cmf::upslope::SurfaceWater > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SurfaceWater_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SurfaceWater" "', argument " "1"" of type '" "cmf::upslope::SurfaceWater *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::SurfaceWater > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::upslope::SurfaceWater > * >(argp1); + arg1 = const_cast< cmf::upslope::SurfaceWater * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::SurfaceWater > * >(argp1); + arg1 = const_cast< cmf::upslope::SurfaceWater * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + try { + (void)arg1; delete smartarg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *SurfaceWater_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SurfaceWater_t, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_KinematicSurfaceRunoff(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::SurfaceWater::ptr arg1 ; + cmf::water::flux_node::ptr arg2 ; + real arg3 ; + real arg4 = (real) -1 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + double val3 ; + int ecode3 = 0 ; + double val4 ; + int ecode4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + char * kwnames[] = { + (char *) "left",(char *) "right",(char *) "flowwidth",(char *) "distance", NULL + }; + cmf::upslope::connections::KinematicSurfaceRunoff *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|O:new_KinematicSurfaceRunoff",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SurfaceWater_t, 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_KinematicSurfaceRunoff" "', argument " "1"" of type '" "cmf::upslope::SurfaceWater::ptr""'"); + } + if (argp1) arg1 = *(reinterpret_cast< cmf::upslope::SurfaceWater::ptr * >(argp1)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::upslope::SurfaceWater::ptr * >(argp1); + } + { + int newmem = 0; + res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_KinematicSurfaceRunoff" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); + } + if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); + } + ecode3 = SWIG_AsVal_double(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_KinematicSurfaceRunoff" "', argument " "3"" of type '" "real""'"); + } + arg3 = static_cast< real >(val3); + if (obj3) { + ecode4 = SWIG_AsVal_double(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_KinematicSurfaceRunoff" "', argument " "4"" of type '" "real""'"); + } + arg4 = static_cast< real >(val4); + } + { + try { + result = (cmf::upslope::connections::KinematicSurfaceRunoff *)new cmf::upslope::connections::KinematicSurfaceRunoff(arg1,arg2,arg3,arg4); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__connections__KinematicSurfaceRunoff, SWIG_POINTER_NEW | 0 ); + + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN int Swig_var_KinematicSurfaceRunoff_cell_connector_set(PyObject *) { + SWIG_Error(SWIG_AttributeError,"Variable KinematicSurfaceRunoff_cell_connector is read-only."); + return 1; +} + + +SWIGINTERN PyObject *Swig_var_KinematicSurfaceRunoff_cell_connector_get(void) { + PyObject *pyobj = 0; + + pyobj = SWIG_NewPointerObj(SWIG_as_voidptr(&cmf::upslope::connections::KinematicSurfaceRunoff::cell_connector), SWIGTYPE_p_cmf__upslope__CellConnector, 0 ); + return pyobj; +} + + +SWIGINTERN PyObject *_wrap_delete_KinematicSurfaceRunoff(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::connections::KinematicSurfaceRunoff *arg1 = (cmf::upslope::connections::KinematicSurfaceRunoff *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__KinematicSurfaceRunoff, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_KinematicSurfaceRunoff" "', argument " "1"" of type '" "cmf::upslope::connections::KinematicSurfaceRunoff *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::connections::KinematicSurfaceRunoff * >(argp1); + { + try { + + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *KinematicSurfaceRunoff_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__connections__KinematicSurfaceRunoff, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *KinematicSurfaceRunoff_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_DiffusiveSurfaceRunoff_set_linear_slope(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + real arg1 ; + double val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + char * kwnames[] = { + (char *) "width", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:DiffusiveSurfaceRunoff_set_linear_slope",kwnames,&obj0)) SWIG_fail; + ecode1 = SWIG_AsVal_double(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "DiffusiveSurfaceRunoff_set_linear_slope" "', argument " "1"" of type '" "real""'"); + } + arg1 = static_cast< real >(val1); + { + try { + cmf::upslope::connections::DiffusiveSurfaceRunoff::set_linear_slope(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_DiffusiveSurfaceRunoff_get_linear_slope(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + real result; + + if (!SWIG_Python_UnpackTuple(args,"DiffusiveSurfaceRunoff_get_linear_slope",0,0,0)) SWIG_fail; + { + try { + result = (real)cmf::upslope::connections::DiffusiveSurfaceRunoff::get_linear_slope(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_DiffusiveSurfaceRunoff(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::SurfaceWater::ptr arg1 ; + cmf::water::flux_node::ptr arg2 ; + real arg3 ; + real arg4 = (real) -1 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + double val3 ; + int ecode3 = 0 ; + double val4 ; + int ecode4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + char * kwnames[] = { + (char *) "left",(char *) "right",(char *) "flowwidth",(char *) "distance", NULL + }; + cmf::upslope::connections::DiffusiveSurfaceRunoff *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|O:new_DiffusiveSurfaceRunoff",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SurfaceWater_t, 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DiffusiveSurfaceRunoff" "', argument " "1"" of type '" "cmf::upslope::SurfaceWater::ptr""'"); + } + if (argp1) arg1 = *(reinterpret_cast< cmf::upslope::SurfaceWater::ptr * >(argp1)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::upslope::SurfaceWater::ptr * >(argp1); + } + { + int newmem = 0; + res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_DiffusiveSurfaceRunoff" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); + } + if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); + } + ecode3 = SWIG_AsVal_double(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_DiffusiveSurfaceRunoff" "', argument " "3"" of type '" "real""'"); + } + arg3 = static_cast< real >(val3); + if (obj3) { + ecode4 = SWIG_AsVal_double(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_DiffusiveSurfaceRunoff" "', argument " "4"" of type '" "real""'"); + } + arg4 = static_cast< real >(val4); + } + { + try { + result = (cmf::upslope::connections::DiffusiveSurfaceRunoff *)new cmf::upslope::connections::DiffusiveSurfaceRunoff(arg1,arg2,arg3,arg4); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__connections__DiffusiveSurfaceRunoff, SWIG_POINTER_NEW | 0 ); + + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN int Swig_var_DiffusiveSurfaceRunoff_cell_connector_set(PyObject *) { + SWIG_Error(SWIG_AttributeError,"Variable DiffusiveSurfaceRunoff_cell_connector is read-only."); + return 1; +} + + +SWIGINTERN PyObject *Swig_var_DiffusiveSurfaceRunoff_cell_connector_get(void) { + PyObject *pyobj = 0; + + pyobj = SWIG_NewPointerObj(SWIG_as_voidptr(&cmf::upslope::connections::DiffusiveSurfaceRunoff::cell_connector), SWIGTYPE_p_cmf__upslope__CellConnector, 0 ); + return pyobj; +} + + +SWIGINTERN PyObject *_wrap_delete_DiffusiveSurfaceRunoff(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::connections::DiffusiveSurfaceRunoff *arg1 = (cmf::upslope::connections::DiffusiveSurfaceRunoff *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__DiffusiveSurfaceRunoff, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DiffusiveSurfaceRunoff" "', argument " "1"" of type '" "cmf::upslope::connections::DiffusiveSurfaceRunoff *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::connections::DiffusiveSurfaceRunoff * >(argp1); + { + try { + + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *DiffusiveSurfaceRunoff_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__connections__DiffusiveSurfaceRunoff, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *DiffusiveSurfaceRunoff_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_aquifer_area_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::aquifer *arg1 = (cmf::upslope::aquifer *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::upslope::aquifer > tempshared1 ; + std::shared_ptr< cmf::upslope::aquifer > *smartarg1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"aquifer_area_set",2,2,swig_obj)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__aquifer_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "aquifer_area_set" "', argument " "1"" of type '" "cmf::upslope::aquifer *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::aquifer > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::upslope::aquifer > * >(argp1); + arg1 = const_cast< cmf::upslope::aquifer * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::aquifer > * >(argp1); + arg1 = const_cast< cmf::upslope::aquifer * >((smartarg1 ? smartarg1->get() : 0)); + } + } + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "aquifer_area_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->area = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_aquifer_area_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::aquifer *arg1 = (cmf::upslope::aquifer *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::upslope::aquifer > tempshared1 ; + std::shared_ptr< cmf::upslope::aquifer > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__aquifer_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "aquifer_area_get" "', argument " "1"" of type '" "cmf::upslope::aquifer *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::aquifer > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::upslope::aquifer > * >(argp1); + arg1 = const_cast< cmf::upslope::aquifer * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::aquifer > * >(argp1); + arg1 = const_cast< cmf::upslope::aquifer * >((smartarg1 ? smartarg1->get() : 0)); + } + } + result = (real) ((arg1)->area); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_aquifer_thickness_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::aquifer *arg1 = (cmf::upslope::aquifer *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::upslope::aquifer > tempshared1 ; + std::shared_ptr< cmf::upslope::aquifer > *smartarg1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"aquifer_thickness_set",2,2,swig_obj)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__aquifer_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "aquifer_thickness_set" "', argument " "1"" of type '" "cmf::upslope::aquifer *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::aquifer > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::upslope::aquifer > * >(argp1); + arg1 = const_cast< cmf::upslope::aquifer * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::aquifer > * >(argp1); + arg1 = const_cast< cmf::upslope::aquifer * >((smartarg1 ? smartarg1->get() : 0)); + } + } + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "aquifer_thickness_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->thickness = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_aquifer_thickness_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::aquifer *arg1 = (cmf::upslope::aquifer *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::upslope::aquifer > tempshared1 ; + std::shared_ptr< cmf::upslope::aquifer > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__aquifer_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "aquifer_thickness_get" "', argument " "1"" of type '" "cmf::upslope::aquifer *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::aquifer > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::upslope::aquifer > * >(argp1); + arg1 = const_cast< cmf::upslope::aquifer * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::aquifer > * >(argp1); + arg1 = const_cast< cmf::upslope::aquifer * >((smartarg1 ? smartarg1->get() : 0)); + } + } + result = (real) ((arg1)->thickness); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_aquifer_porosity_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::aquifer *arg1 = (cmf::upslope::aquifer *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::upslope::aquifer > tempshared1 ; + std::shared_ptr< cmf::upslope::aquifer > *smartarg1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"aquifer_porosity_set",2,2,swig_obj)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__aquifer_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "aquifer_porosity_set" "', argument " "1"" of type '" "cmf::upslope::aquifer *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::aquifer > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::upslope::aquifer > * >(argp1); + arg1 = const_cast< cmf::upslope::aquifer * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::aquifer > * >(argp1); + arg1 = const_cast< cmf::upslope::aquifer * >((smartarg1 ? smartarg1->get() : 0)); + } + } + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "aquifer_porosity_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->porosity = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_aquifer_porosity_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::aquifer *arg1 = (cmf::upslope::aquifer *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::upslope::aquifer > tempshared1 ; + std::shared_ptr< cmf::upslope::aquifer > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__aquifer_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "aquifer_porosity_get" "', argument " "1"" of type '" "cmf::upslope::aquifer *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::aquifer > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::upslope::aquifer > * >(argp1); + arg1 = const_cast< cmf::upslope::aquifer * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::aquifer > * >(argp1); + arg1 = const_cast< cmf::upslope::aquifer * >((smartarg1 ? smartarg1->get() : 0)); + } + } + result = (real) ((arg1)->porosity); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_aquifer_K_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::aquifer *arg1 = (cmf::upslope::aquifer *) 0 ; + cmf::geometry::point *arg2 = (cmf::geometry::point *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::upslope::aquifer > tempshared1 ; + std::shared_ptr< cmf::upslope::aquifer > *smartarg1 = 0 ; + cmf::geometry::point p2 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"aquifer_K_set",2,2,swig_obj)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__aquifer_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "aquifer_K_set" "', argument " "1"" of type '" "cmf::upslope::aquifer *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::aquifer > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::upslope::aquifer > * >(argp1); + arg1 = const_cast< cmf::upslope::aquifer * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::aquifer > * >(argp1); + arg1 = const_cast< cmf::upslope::aquifer * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + if (SWIG_ConvertPtr(swig_obj[1], (void **) &arg2, SWIGTYPE_p_cmf__geometry__point, SWIG_POINTER_EXCEPTION) == -1) { + if (check_xy(swig_obj[1])) { + std::string res = convert_xyz_to_point(swig_obj[1],p2); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + return NULL; + } + } + else if (PySequence_Check(swig_obj[1])) { + std::string res = convert_seq_to_point(swig_obj[1],p2); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError, res.c_str()); + } + } else { + std::string res="<"; + res+=pyrepr(swig_obj[1]); + res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + } + arg2 = &p2; + } + } + if (arg1) (arg1)->K = *arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_aquifer_K_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::aquifer *arg1 = (cmf::upslope::aquifer *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::upslope::aquifer > tempshared1 ; + std::shared_ptr< cmf::upslope::aquifer > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + cmf::geometry::point *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__aquifer_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "aquifer_K_get" "', argument " "1"" of type '" "cmf::upslope::aquifer *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::aquifer > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::upslope::aquifer > * >(argp1); + arg1 = const_cast< cmf::upslope::aquifer * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::aquifer > * >(argp1); + arg1 = const_cast< cmf::upslope::aquifer * >((smartarg1 ? smartarg1->get() : 0)); + } + } + result = (cmf::geometry::point *)& ((arg1)->K); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__geometry__point, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_aquifer_get_K(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::aquifer *arg1 = (cmf::upslope::aquifer *) 0 ; + cmf::geometry::point arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::upslope::aquifer const > tempshared1 ; + std::shared_ptr< cmf::upslope::aquifer const > *smartarg1 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "direction", NULL + }; + real result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:aquifer_get_K",kwnames,&obj0,&obj1)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__aquifer_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "aquifer_get_K" "', argument " "1"" of type '" "cmf::upslope::aquifer const *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< const cmf::upslope::aquifer > * >(argp1); + delete reinterpret_cast< std::shared_ptr< const cmf::upslope::aquifer > * >(argp1); + arg1 = const_cast< cmf::upslope::aquifer * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< const cmf::upslope::aquifer > * >(argp1); + arg1 = const_cast< cmf::upslope::aquifer * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + if (check_xy(obj1)) { + std::string res = convert_xyz_to_point(obj1,arg2); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + return NULL; + } + } + else if (PySequence_Check(obj1)) { + std::string res = convert_seq_to_point(obj1,arg2); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError, res.c_str()); + } + } else { + std::string res="<"; + res+=pyrepr(obj1); + res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + } + } + { + try { + result = (real)((cmf::upslope::aquifer const *)arg1)->get_K(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_aquifer_get_abs_errtol(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::aquifer *arg1 = (cmf::upslope::aquifer *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::upslope::aquifer > tempshared1 ; + std::shared_ptr< cmf::upslope::aquifer > *smartarg1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "rel_errtol", NULL + }; + real result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:aquifer_get_abs_errtol",kwnames,&obj0,&obj1)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__aquifer_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "aquifer_get_abs_errtol" "', argument " "1"" of type '" "cmf::upslope::aquifer *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::aquifer > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::upslope::aquifer > * >(argp1); + arg1 = const_cast< cmf::upslope::aquifer * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::aquifer > * >(argp1); + arg1 = const_cast< cmf::upslope::aquifer * >((smartarg1 ? smartarg1->get() : 0)); + } + } + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "aquifer_get_abs_errtol" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + { + try { + result = (real)(arg1)->get_abs_errtol(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_aquifer__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::project *arg1 = 0 ; + cmf::geometry::point arg2 ; + real arg3 ; + real arg4 ; + real arg5 ; + real arg6 = (real) 1e-4 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val3 ; + int ecode3 = 0 ; + double val4 ; + int ecode4 = 0 ; + double val5 ; + int ecode5 = 0 ; + double val6 ; + int ecode6 = 0 ; + cmf::upslope::aquifer *result = 0 ; + + if ((nobjs < 5) || (nobjs > 6)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_cmf__project, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_aquifer" "', argument " "1"" of type '" "cmf::project &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_aquifer" "', argument " "1"" of type '" "cmf::project &""'"); + } + arg1 = reinterpret_cast< cmf::project * >(argp1); + { + if (check_xy(swig_obj[1])) { + std::string res = convert_xyz_to_point(swig_obj[1],arg2); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + return NULL; + } + } + else if (PySequence_Check(swig_obj[1])) { + std::string res = convert_seq_to_point(swig_obj[1],arg2); + if (res.size()) { + SWIG_exception_fail(SWIG_ValueError, res.c_str()); + } + } else { + std::string res="<"; + res+=pyrepr(swig_obj[1]); + res+="> has to be a cmf.point, a sequence, or any object with x and y (optional z) attributes"; + SWIG_exception_fail(SWIG_ValueError,res.c_str()); + } + } + ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_aquifer" "', argument " "3"" of type '" "real""'"); + } + arg3 = static_cast< real >(val3); + ecode4 = SWIG_AsVal_double(swig_obj[3], &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_aquifer" "', argument " "4"" of type '" "real""'"); + } + arg4 = static_cast< real >(val4); + ecode5 = SWIG_AsVal_double(swig_obj[4], &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_aquifer" "', argument " "5"" of type '" "real""'"); + } + arg5 = static_cast< real >(val5); + if (swig_obj[5]) { + ecode6 = SWIG_AsVal_double(swig_obj[5], &val6); + if (!SWIG_IsOK(ecode6)) { + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_aquifer" "', argument " "6"" of type '" "real""'"); + } + arg6 = static_cast< real >(val6); + } + { + try { + result = (cmf::upslope::aquifer *)new cmf::upslope::aquifer(*arg1,arg2,arg3,arg4,arg5,arg6); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + std::shared_ptr< cmf::upslope::aquifer > *smartresult = result ? new std::shared_ptr< cmf::upslope::aquifer >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0; + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__upslope__aquifer_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_aquifer__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::upslope::cell_vector *arg1 = 0 ; + real arg2 ; + real arg3 ; + real arg4 = (real) 1e-4 ; + cmf::upslope::cell_vector temp_list1 ; + double val2 ; + int ecode2 = 0 ; + double val3 ; + int ecode3 = 0 ; + double val4 ; + int ecode4 = 0 ; + cmf::upslope::aquifer *result = 0 ; + + if ((nobjs < 3) || (nobjs > 4)) SWIG_fail; + { + if (SWIG_ConvertPtr(swig_obj[0], (void **) &arg1, SWIGTYPE_p_cmf__upslope__cell_vector, SWIG_POINTER_EXCEPTION) == -1) { + int res = iterable_to_list(swig_obj[0],SWIGTYPE_p_cmf__upslope__Cell, temp_list1); + if (SWIG_IsOK(res)) { + arg1 = &temp_list1; + } else { + SWIG_exception_fail(SWIG_TypeError,"Only iterables can be converted to cmf::upslope::cell_vector"); + } + } + } + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_aquifer" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_aquifer" "', argument " "3"" of type '" "real""'"); + } + arg3 = static_cast< real >(val3); + if (swig_obj[3]) { + ecode4 = SWIG_AsVal_double(swig_obj[3], &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_aquifer" "', argument " "4"" of type '" "real""'"); + } + arg4 = static_cast< real >(val4); + } + { + try { + result = (cmf::upslope::aquifer *)new cmf::upslope::aquifer(*arg1,arg2,arg3,arg4); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + std::shared_ptr< cmf::upslope::aquifer > *smartresult = result ? new std::shared_ptr< cmf::upslope::aquifer >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0; + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__upslope__aquifer_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_aquifer(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[7] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"new_aquifer",0,6,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if ((argc >= 3) && (argc <= 4)) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + { + _v = is_listtype_or_iterable(argv[0],SWIGTYPE_p_cmf__upslope__cell_vector); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_double(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_double(argv[2], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (argc > 3) { + { + { + int res = SWIG_AsVal_double(argv[3], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + } + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if ((argc >= 5) && (argc <= 6)) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__project, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + cmf::geometry::point p; + _v=check_xy(argv[1]) || check_seq_point(argv[1]); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_double(argv[2], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_double(argv[3], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_double(argv[4], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (argc > 5) { + { + { + int res = SWIG_AsVal_double(argv[5], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + } + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_new_aquifer__SWIG_1(self, argc, argv); + case 2: + return _wrap_new_aquifer__SWIG_0(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_aquifer'.\n" + " Possible C/C++ prototypes are:\n" + " cmf::upslope::aquifer::aquifer(cmf::project &,cmf::geometry::point,real,real,real,real)\n" + " cmf::upslope::aquifer::aquifer(cmf::upslope::cell_vector &,real,real,real)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_aquifer_cast(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::flux_node::ptr arg1 ; + void *argp1 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + char * kwnames[] = { + (char *) "for_cast", NULL + }; + cmf::upslope::aquifer::ptr result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:aquifer_cast",kwnames,&obj0)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "aquifer_cast" "', argument " "1"" of type '" "cmf::water::flux_node::ptr""'"); + } + if (argp1) arg1 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp1)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp1); + } + { + try { + result = cmf::upslope::aquifer::cast(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + std::shared_ptr< cmf::upslope::aquifer > *smartresult = result ? new std::shared_ptr< cmf::upslope::aquifer >(result) : 0; + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__upslope__aquifer_t, SWIG_POINTER_OWN); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_aquifer_base_height_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::aquifer *arg1 = (cmf::upslope::aquifer *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::upslope::aquifer > tempshared1 ; + std::shared_ptr< cmf::upslope::aquifer > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__aquifer_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "aquifer_base_height_get" "', argument " "1"" of type '" "cmf::upslope::aquifer *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::aquifer > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::upslope::aquifer > * >(argp1); + arg1 = const_cast< cmf::upslope::aquifer * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::aquifer > * >(argp1); + arg1 = const_cast< cmf::upslope::aquifer * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + try { + result = (double)cmf_upslope_aquifer_base_height_get(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_aquifer_top_height_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::aquifer *arg1 = (cmf::upslope::aquifer *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::upslope::aquifer > tempshared1 ; + std::shared_ptr< cmf::upslope::aquifer > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__aquifer_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "aquifer_top_height_get" "', argument " "1"" of type '" "cmf::upslope::aquifer *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::aquifer > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::upslope::aquifer > * >(argp1); + arg1 = const_cast< cmf::upslope::aquifer * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::aquifer > * >(argp1); + arg1 = const_cast< cmf::upslope::aquifer * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + try { + result = (double)cmf_upslope_aquifer_top_height_get(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_aquifer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::aquifer *arg1 = (cmf::upslope::aquifer *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::shared_ptr< cmf::upslope::aquifer > tempshared1 ; + std::shared_ptr< cmf::upslope::aquifer > *smartarg1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(swig_obj[0], &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__aquifer_t, 0 | 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_aquifer" "', argument " "1"" of type '" "cmf::upslope::aquifer *""'"); + } + if (newmem & SWIG_CAST_NEW_MEMORY) { + tempshared1 = *reinterpret_cast< std::shared_ptr< cmf::upslope::aquifer > * >(argp1); + delete reinterpret_cast< std::shared_ptr< cmf::upslope::aquifer > * >(argp1); + arg1 = const_cast< cmf::upslope::aquifer * >(tempshared1.get()); + } else { + smartarg1 = reinterpret_cast< std::shared_ptr< cmf::upslope::aquifer > * >(argp1); + arg1 = const_cast< cmf::upslope::aquifer * >((smartarg1 ? smartarg1->get() : 0)); + } + } + { + try { + (void)arg1; delete smartarg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *aquifer_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_cmf__upslope__aquifer_t, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *aquifer_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_aquifer_Darcy_flux_width_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::aquifer_Darcy *arg1 = (cmf::upslope::aquifer_Darcy *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"aquifer_Darcy_flux_width_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__aquifer_Darcy, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "aquifer_Darcy_flux_width_set" "', argument " "1"" of type '" "cmf::upslope::aquifer_Darcy *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::aquifer_Darcy * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "aquifer_Darcy_flux_width_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->flux_width = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_aquifer_Darcy_flux_width_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::aquifer_Darcy *arg1 = (cmf::upslope::aquifer_Darcy *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__aquifer_Darcy, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "aquifer_Darcy_flux_width_get" "', argument " "1"" of type '" "cmf::upslope::aquifer_Darcy *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::aquifer_Darcy * >(argp1); + result = (real) ((arg1)->flux_width); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_aquifer_Darcy(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::aquifer::ptr arg1 ; + cmf::water::flux_node::ptr arg2 ; + real arg3 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + double val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "left",(char *) "right",(char *) "width", NULL + }; + cmf::upslope::aquifer_Darcy *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:new_aquifer_Darcy",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__aquifer_t, 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_aquifer_Darcy" "', argument " "1"" of type '" "cmf::upslope::aquifer::ptr""'"); + } + if (argp1) arg1 = *(reinterpret_cast< cmf::upslope::aquifer::ptr * >(argp1)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::upslope::aquifer::ptr * >(argp1); + } + { + int newmem = 0; + res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_aquifer_Darcy" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); + } + if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); + } + ecode3 = SWIG_AsVal_double(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_aquifer_Darcy" "', argument " "3"" of type '" "real""'"); + } + arg3 = static_cast< real >(val3); + { + try { + result = (cmf::upslope::aquifer_Darcy *)new cmf::upslope::aquifer_Darcy(arg1,arg2,arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__aquifer_Darcy, SWIG_POINTER_NEW | 0 ); + + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_aquifer_Darcy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::aquifer_Darcy *arg1 = (cmf::upslope::aquifer_Darcy *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__aquifer_Darcy, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_aquifer_Darcy" "', argument " "1"" of type '" "cmf::upslope::aquifer_Darcy *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::aquifer_Darcy * >(argp1); + { + try { + + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *aquifer_Darcy_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__aquifer_Darcy, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *aquifer_Darcy_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_delete_lateral_sub_surface_flux(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::connections::lateral_sub_surface_flux *arg1 = (cmf::upslope::connections::lateral_sub_surface_flux *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__lateral_sub_surface_flux, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_lateral_sub_surface_flux" "', argument " "1"" of type '" "cmf::upslope::connections::lateral_sub_surface_flux *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::connections::lateral_sub_surface_flux * >(argp1); + { + try { + + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *lateral_sub_surface_flux_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__connections__lateral_sub_surface_flux, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN int Swig_var_Darcy_cell_connector_set(PyObject *) { + SWIG_Error(SWIG_AttributeError,"Variable Darcy_cell_connector is read-only."); + return 1; +} + + +SWIGINTERN PyObject *Swig_var_Darcy_cell_connector_get(void) { + PyObject *pyobj = 0; + + pyobj = SWIG_NewPointerObj(SWIG_as_voidptr(&cmf::upslope::connections::Darcy::cell_connector), SWIGTYPE_p_cmf__upslope__CellConnector, 0 ); + return pyobj; +} + + +SWIGINTERN PyObject *_wrap_new_Darcy(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::SoilLayer::ptr arg1 ; + cmf::water::flux_node::ptr arg2 ; + real arg3 ; + real arg4 = (real) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + double val3 ; + int ecode3 = 0 ; + double val4 ; + int ecode4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + char * kwnames[] = { + (char *) "left",(char *) "right",(char *) "FlowWidth",(char *) "Distance", NULL + }; + cmf::upslope::connections::Darcy *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|O:new_Darcy",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Darcy" "', argument " "1"" of type '" "cmf::upslope::SoilLayer::ptr""'"); + } + if (argp1) arg1 = *(reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp1)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp1); + } + { + int newmem = 0; + res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Darcy" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); + } + if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); + } + ecode3 = SWIG_AsVal_double(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Darcy" "', argument " "3"" of type '" "real""'"); + } + arg3 = static_cast< real >(val3); + if (obj3) { + ecode4 = SWIG_AsVal_double(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_Darcy" "', argument " "4"" of type '" "real""'"); + } + arg4 = static_cast< real >(val4); + } + { + try { + result = (cmf::upslope::connections::Darcy *)new cmf::upslope::connections::Darcy(arg1,arg2,arg3,arg4); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__connections__Darcy, SWIG_POINTER_NEW | 0 ); + + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_Darcy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::connections::Darcy *arg1 = (cmf::upslope::connections::Darcy *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__Darcy, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Darcy" "', argument " "1"" of type '" "cmf::upslope::connections::Darcy *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::connections::Darcy * >(argp1); + { + try { + + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *Darcy_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__connections__Darcy, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *Darcy_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN int Swig_var_TopographicGradientDarcy_cell_connector_set(PyObject *) { + SWIG_Error(SWIG_AttributeError,"Variable TopographicGradientDarcy_cell_connector is read-only."); + return 1; +} + + +SWIGINTERN PyObject *Swig_var_TopographicGradientDarcy_cell_connector_get(void) { + PyObject *pyobj = 0; + + pyobj = SWIG_NewPointerObj(SWIG_as_voidptr(&cmf::upslope::connections::TopographicGradientDarcy::cell_connector), SWIGTYPE_p_cmf__upslope__CellConnector, 0 ); + return pyobj; +} + + +SWIGINTERN PyObject *_wrap_new_TopographicGradientDarcy(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::SoilLayer::ptr arg1 ; + cmf::water::flux_node::ptr arg2 ; + real arg3 ; + real arg4 = (real) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + double val3 ; + int ecode3 = 0 ; + double val4 ; + int ecode4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + char * kwnames[] = { + (char *) "left",(char *) "right",(char *) "FlowWidth",(char *) "Distance", NULL + }; + cmf::upslope::connections::TopographicGradientDarcy *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|O:new_TopographicGradientDarcy",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_TopographicGradientDarcy" "', argument " "1"" of type '" "cmf::upslope::SoilLayer::ptr""'"); + } + if (argp1) arg1 = *(reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp1)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp1); + } + { + int newmem = 0; + res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_TopographicGradientDarcy" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); + } + if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); + } + ecode3 = SWIG_AsVal_double(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_TopographicGradientDarcy" "', argument " "3"" of type '" "real""'"); + } + arg3 = static_cast< real >(val3); + if (obj3) { + ecode4 = SWIG_AsVal_double(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_TopographicGradientDarcy" "', argument " "4"" of type '" "real""'"); + } + arg4 = static_cast< real >(val4); + } + { + try { + result = (cmf::upslope::connections::TopographicGradientDarcy *)new cmf::upslope::connections::TopographicGradientDarcy(arg1,arg2,arg3,arg4); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__connections__TopographicGradientDarcy, SWIG_POINTER_NEW | 0 ); + + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_TopographicGradientDarcy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::connections::TopographicGradientDarcy *arg1 = (cmf::upslope::connections::TopographicGradientDarcy *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__TopographicGradientDarcy, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_TopographicGradientDarcy" "', argument " "1"" of type '" "cmf::upslope::connections::TopographicGradientDarcy *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::connections::TopographicGradientDarcy * >(argp1); + { + try { + + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *TopographicGradientDarcy_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__connections__TopographicGradientDarcy, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *TopographicGradientDarcy_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_new_DarcyKinematic(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::SoilLayer::ptr arg1 ; + cmf::water::flux_node::ptr arg2 ; + real arg3 ; + real arg4 = (real) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + double val3 ; + int ecode3 = 0 ; + double val4 ; + int ecode4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + char * kwnames[] = { + (char *) "left",(char *) "right",(char *) "FlowWidth",(char *) "Distance", NULL + }; + cmf::upslope::connections::DarcyKinematic *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|O:new_DarcyKinematic",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DarcyKinematic" "', argument " "1"" of type '" "cmf::upslope::SoilLayer::ptr""'"); + } + if (argp1) arg1 = *(reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp1)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp1); + } + { + int newmem = 0; + res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_DarcyKinematic" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); + } + if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); + } + ecode3 = SWIG_AsVal_double(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_DarcyKinematic" "', argument " "3"" of type '" "real""'"); + } + arg3 = static_cast< real >(val3); + if (obj3) { + ecode4 = SWIG_AsVal_double(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_DarcyKinematic" "', argument " "4"" of type '" "real""'"); + } + arg4 = static_cast< real >(val4); + } + { + try { + result = (cmf::upslope::connections::DarcyKinematic *)new cmf::upslope::connections::DarcyKinematic(arg1,arg2,arg3,arg4); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__connections__DarcyKinematic, SWIG_POINTER_NEW | 0 ); + + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN int Swig_var_DarcyKinematic_cell_connector_set(PyObject *) { + SWIG_Error(SWIG_AttributeError,"Variable DarcyKinematic_cell_connector is read-only."); + return 1; +} + + +SWIGINTERN PyObject *Swig_var_DarcyKinematic_cell_connector_get(void) { + PyObject *pyobj = 0; + + pyobj = SWIG_NewPointerObj(SWIG_as_voidptr(&cmf::upslope::connections::DarcyKinematic::cell_connector), SWIGTYPE_p_cmf__upslope__CellConnector, 0 ); + return pyobj; +} + + +SWIGINTERN PyObject *_wrap_delete_DarcyKinematic(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::connections::DarcyKinematic *arg1 = (cmf::upslope::connections::DarcyKinematic *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__DarcyKinematic, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DarcyKinematic" "', argument " "1"" of type '" "cmf::upslope::connections::DarcyKinematic *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::connections::DarcyKinematic * >(argp1); + { + try { + + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *DarcyKinematic_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__connections__DarcyKinematic, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *DarcyKinematic_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_Richards_lateral_flow_thickness_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::connections::Richards_lateral *arg1 = (cmf::upslope::connections::Richards_lateral *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"Richards_lateral_flow_thickness_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__Richards_lateral, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Richards_lateral_flow_thickness_set" "', argument " "1"" of type '" "cmf::upslope::connections::Richards_lateral *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::connections::Richards_lateral * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Richards_lateral_flow_thickness_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->flow_thickness = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Richards_lateral_flow_thickness_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::connections::Richards_lateral *arg1 = (cmf::upslope::connections::Richards_lateral *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__Richards_lateral, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Richards_lateral_flow_thickness_get" "', argument " "1"" of type '" "cmf::upslope::connections::Richards_lateral *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::connections::Richards_lateral * >(argp1); + result = (real) ((arg1)->flow_thickness); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Richards_lateral_wet_right_node_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::connections::Richards_lateral *arg1 = (cmf::upslope::connections::Richards_lateral *) 0 ; + bool arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"Richards_lateral_wet_right_node_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__Richards_lateral, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Richards_lateral_wet_right_node_set" "', argument " "1"" of type '" "cmf::upslope::connections::Richards_lateral *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::connections::Richards_lateral * >(argp1); + ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Richards_lateral_wet_right_node_set" "', argument " "2"" of type '" "bool""'"); + } + arg2 = static_cast< bool >(val2); + if (arg1) (arg1)->wet_right_node = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Richards_lateral_wet_right_node_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::connections::Richards_lateral *arg1 = (cmf::upslope::connections::Richards_lateral *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + bool result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__Richards_lateral, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Richards_lateral_wet_right_node_get" "', argument " "1"" of type '" "cmf::upslope::connections::Richards_lateral *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::connections::Richards_lateral * >(argp1); + result = (bool) ((arg1)->wet_right_node); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_Richards_lateral(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::SoilLayer::ptr arg1 ; + cmf::water::flux_node::ptr arg2 ; + real arg3 = (real) 0 ; + real arg4 = (real) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + double val3 ; + int ecode3 = 0 ; + double val4 ; + int ecode4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + char * kwnames[] = { + (char *) "left",(char *) "right",(char *) "FlowWidth",(char *) "Distance", NULL + }; + cmf::upslope::connections::Richards_lateral *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OO:new_Richards_lateral",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Richards_lateral" "', argument " "1"" of type '" "cmf::upslope::SoilLayer::ptr""'"); + } + if (argp1) arg1 = *(reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp1)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp1); + } + { + int newmem = 0; + res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Richards_lateral" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); + } + if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); + } + if (obj2) { + ecode3 = SWIG_AsVal_double(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Richards_lateral" "', argument " "3"" of type '" "real""'"); + } + arg3 = static_cast< real >(val3); + } + if (obj3) { + ecode4 = SWIG_AsVal_double(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_Richards_lateral" "', argument " "4"" of type '" "real""'"); + } + arg4 = static_cast< real >(val4); + } + { + try { + result = (cmf::upslope::connections::Richards_lateral *)new cmf::upslope::connections::Richards_lateral(arg1,arg2,arg3,arg4); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__connections__Richards_lateral, SWIG_POINTER_NEW | 0 ); + + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Richards_lateral_usebaseflow(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + bool arg1 ; + bool val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + char * kwnames[] = { + (char *) "use", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:Richards_lateral_usebaseflow",kwnames,&obj0)) SWIG_fail; + ecode1 = SWIG_AsVal_bool(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "Richards_lateral_usebaseflow" "', argument " "1"" of type '" "bool""'"); + } + arg1 = static_cast< bool >(val1); + { + try { + cmf::upslope::connections::Richards_lateral::usebaseflow(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN int Swig_var_Richards_lateral_cell_connector_set(PyObject *) { + SWIG_Error(SWIG_AttributeError,"Variable Richards_lateral_cell_connector is read-only."); + return 1; +} + + +SWIGINTERN PyObject *Swig_var_Richards_lateral_cell_connector_get(void) { + PyObject *pyobj = 0; + + pyobj = SWIG_NewPointerObj(SWIG_as_voidptr(&cmf::upslope::connections::Richards_lateral::cell_connector), SWIGTYPE_p_cmf__upslope__CellConnector, 0 ); + return pyobj; +} + + +SWIGINTERN PyObject *_wrap_delete_Richards_lateral(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::connections::Richards_lateral *arg1 = (cmf::upslope::connections::Richards_lateral *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__Richards_lateral, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Richards_lateral" "', argument " "1"" of type '" "cmf::upslope::connections::Richards_lateral *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::connections::Richards_lateral * >(argp1); + { + try { + + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *Richards_lateral_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__connections__Richards_lateral, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *Richards_lateral_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_TOPModelFlow_flow_width_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::connections::TOPModelFlow *arg1 = (cmf::upslope::connections::TOPModelFlow *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"TOPModelFlow_flow_width_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__TOPModelFlow, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TOPModelFlow_flow_width_set" "', argument " "1"" of type '" "cmf::upslope::connections::TOPModelFlow *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::connections::TOPModelFlow * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "TOPModelFlow_flow_width_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->flow_width = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TOPModelFlow_flow_width_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::connections::TOPModelFlow *arg1 = (cmf::upslope::connections::TOPModelFlow *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__TOPModelFlow, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TOPModelFlow_flow_width_get" "', argument " "1"" of type '" "cmf::upslope::connections::TOPModelFlow *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::connections::TOPModelFlow * >(argp1); + result = (real) ((arg1)->flow_width); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TOPModelFlow_distance_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::connections::TOPModelFlow *arg1 = (cmf::upslope::connections::TOPModelFlow *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"TOPModelFlow_distance_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__TOPModelFlow, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TOPModelFlow_distance_set" "', argument " "1"" of type '" "cmf::upslope::connections::TOPModelFlow *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::connections::TOPModelFlow * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "TOPModelFlow_distance_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->distance = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TOPModelFlow_distance_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::connections::TOPModelFlow *arg1 = (cmf::upslope::connections::TOPModelFlow *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__TOPModelFlow, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TOPModelFlow_distance_get" "', argument " "1"" of type '" "cmf::upslope::connections::TOPModelFlow *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::connections::TOPModelFlow * >(argp1); + result = (real) ((arg1)->distance); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TOPModelFlow_T0_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::connections::TOPModelFlow *arg1 = (cmf::upslope::connections::TOPModelFlow *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"TOPModelFlow_T0_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__TOPModelFlow, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TOPModelFlow_T0_set" "', argument " "1"" of type '" "cmf::upslope::connections::TOPModelFlow *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::connections::TOPModelFlow * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "TOPModelFlow_T0_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->T0 = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TOPModelFlow_T0_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::connections::TOPModelFlow *arg1 = (cmf::upslope::connections::TOPModelFlow *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__TOPModelFlow, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TOPModelFlow_T0_get" "', argument " "1"" of type '" "cmf::upslope::connections::TOPModelFlow *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::connections::TOPModelFlow * >(argp1); + result = (real) ((arg1)->T0); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TOPModelFlow_m_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::connections::TOPModelFlow *arg1 = (cmf::upslope::connections::TOPModelFlow *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"TOPModelFlow_m_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__TOPModelFlow, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TOPModelFlow_m_set" "', argument " "1"" of type '" "cmf::upslope::connections::TOPModelFlow *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::connections::TOPModelFlow * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "TOPModelFlow_m_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->m = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TOPModelFlow_m_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::connections::TOPModelFlow *arg1 = (cmf::upslope::connections::TOPModelFlow *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__TOPModelFlow, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TOPModelFlow_m_get" "', argument " "1"" of type '" "cmf::upslope::connections::TOPModelFlow *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::connections::TOPModelFlow * >(argp1); + result = (real) ((arg1)->m); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_TOPModelFlow(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::SoilLayer::ptr arg1 ; + cmf::water::flux_node::ptr arg2 ; + real arg3 ; + real arg4 ; + real arg5 ; + real arg6 = (real) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + double val3 ; + int ecode3 = 0 ; + double val4 ; + int ecode4 = 0 ; + double val5 ; + int ecode5 = 0 ; + double val6 ; + int ecode6 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + PyObject * obj5 = 0 ; + char * kwnames[] = { + (char *) "left",(char *) "right",(char *) "T0",(char *) "m",(char *) "flowwidth",(char *) "distance", NULL + }; + cmf::upslope::connections::TOPModelFlow *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOO|O:new_TOPModelFlow",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_TOPModelFlow" "', argument " "1"" of type '" "cmf::upslope::SoilLayer::ptr""'"); + } + if (argp1) arg1 = *(reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp1)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp1); + } + { + int newmem = 0; + res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_TOPModelFlow" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); + } + if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); + } + ecode3 = SWIG_AsVal_double(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_TOPModelFlow" "', argument " "3"" of type '" "real""'"); + } + arg3 = static_cast< real >(val3); + ecode4 = SWIG_AsVal_double(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_TOPModelFlow" "', argument " "4"" of type '" "real""'"); + } + arg4 = static_cast< real >(val4); + ecode5 = SWIG_AsVal_double(obj4, &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_TOPModelFlow" "', argument " "5"" of type '" "real""'"); + } + arg5 = static_cast< real >(val5); + if (obj5) { + ecode6 = SWIG_AsVal_double(obj5, &val6); + if (!SWIG_IsOK(ecode6)) { + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_TOPModelFlow" "', argument " "6"" of type '" "real""'"); + } + arg6 = static_cast< real >(val6); + } + { + try { + result = (cmf::upslope::connections::TOPModelFlow *)new cmf::upslope::connections::TOPModelFlow(arg1,arg2,arg3,arg4,arg5,arg6); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__connections__TOPModelFlow, SWIG_POINTER_NEW | 0 ); + + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_TOPModelFlow(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::connections::TOPModelFlow *arg1 = (cmf::upslope::connections::TOPModelFlow *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__TOPModelFlow, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_TOPModelFlow" "', argument " "1"" of type '" "cmf::upslope::connections::TOPModelFlow *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::connections::TOPModelFlow * >(argp1); + { + try { + + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *TOPModelFlow_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__connections__TOPModelFlow, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *TOPModelFlow_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_Manning_is_diffusive_wave_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::river::Manning *arg1 = (cmf::river::Manning *) 0 ; + bool arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"Manning_is_diffusive_wave_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__Manning, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Manning_is_diffusive_wave_set" "', argument " "1"" of type '" "cmf::river::Manning *""'"); + } + arg1 = reinterpret_cast< cmf::river::Manning * >(argp1); + ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Manning_is_diffusive_wave_set" "', argument " "2"" of type '" "bool""'"); + } + arg2 = static_cast< bool >(val2); + if (arg1) (arg1)->is_diffusive_wave = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Manning_is_diffusive_wave_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::river::Manning *arg1 = (cmf::river::Manning *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + bool result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__Manning, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Manning_is_diffusive_wave_get" "', argument " "1"" of type '" "cmf::river::Manning *""'"); + } + arg1 = reinterpret_cast< cmf::river::Manning * >(argp1); + result = (bool) ((arg1)->is_diffusive_wave); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Manning_flux_geometry_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::river::Manning *arg1 = (cmf::river::Manning *) 0 ; + cmf::river::volume_height_function *arg2 = (cmf::river::volume_height_function *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"Manning_flux_geometry_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__Manning, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Manning_flux_geometry_set" "', argument " "1"" of type '" "cmf::river::Manning *""'"); + } + arg1 = reinterpret_cast< cmf::river::Manning * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_cmf__river__volume_height_function, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Manning_flux_geometry_set" "', argument " "2"" of type '" "cmf::river::volume_height_function *""'"); + } + arg2 = reinterpret_cast< cmf::river::volume_height_function * >(argp2); + if (arg1) (arg1)->flux_geometry = *arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Manning_flux_geometry_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::river::Manning *arg1 = (cmf::river::Manning *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::river::volume_height_function *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__Manning, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Manning_flux_geometry_get" "', argument " "1"" of type '" "cmf::river::Manning *""'"); + } + arg1 = reinterpret_cast< cmf::river::Manning * >(argp1); + result = (cmf::river::volume_height_function *)& ((arg1)->flux_geometry); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__river__volume_height_function, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_Manning(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::river::Manning *arg1 = (cmf::river::Manning *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__Manning, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Manning" "', argument " "1"" of type '" "cmf::river::Manning *""'"); + } + arg1 = reinterpret_cast< cmf::river::Manning * >(argp1); + { + try { + + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *Manning_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__river__Manning, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN int Swig_var_Manning_Diffusive_cell_connector_set(PyObject *) { + SWIG_Error(SWIG_AttributeError,"Variable Manning_Diffusive_cell_connector is read-only."); + return 1; +} + + +SWIGINTERN PyObject *Swig_var_Manning_Diffusive_cell_connector_get(void) { + PyObject *pyobj = 0; + + pyobj = SWIG_NewPointerObj(SWIG_as_voidptr(&cmf::river::Manning_Diffusive::cell_connector), SWIGTYPE_p_cmf__upslope__CellConnector, 0 ); + return pyobj; +} + + +SWIGINTERN PyObject *_wrap_Manning_Diffusive_linear_slope_width_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::river::Manning_Diffusive *arg1 = (cmf::river::Manning_Diffusive *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"Manning_Diffusive_linear_slope_width_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__Manning_Diffusive, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Manning_Diffusive_linear_slope_width_set" "', argument " "1"" of type '" "cmf::river::Manning_Diffusive *""'"); + } + arg1 = reinterpret_cast< cmf::river::Manning_Diffusive * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Manning_Diffusive_linear_slope_width_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->linear_slope_width = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Manning_Diffusive_linear_slope_width_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::river::Manning_Diffusive *arg1 = (cmf::river::Manning_Diffusive *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__Manning_Diffusive, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Manning_Diffusive_linear_slope_width_get" "', argument " "1"" of type '" "cmf::river::Manning_Diffusive *""'"); + } + arg1 = reinterpret_cast< cmf::river::Manning_Diffusive * >(argp1); + result = (real) ((arg1)->linear_slope_width); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_Manning_Diffusive(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::river::OpenWaterStorage::ptr arg1 ; + cmf::water::flux_node::ptr arg2 ; + cmf::river::IChannel *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "left",(char *) "right",(char *) "reachtype", NULL + }; + cmf::river::Manning_Diffusive *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:new_Manning_Diffusive",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__river__OpenWaterStorage_t, 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Manning_Diffusive" "', argument " "1"" of type '" "cmf::river::OpenWaterStorage::ptr""'"); + } + if (argp1) arg1 = *(reinterpret_cast< cmf::river::OpenWaterStorage::ptr * >(argp1)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::river::OpenWaterStorage::ptr * >(argp1); + } + { + int newmem = 0; + res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Manning_Diffusive" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); + } + if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); + } + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_cmf__river__IChannel, 0 | 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_Manning_Diffusive" "', argument " "3"" of type '" "cmf::river::IChannel const &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Manning_Diffusive" "', argument " "3"" of type '" "cmf::river::IChannel const &""'"); + } + arg3 = reinterpret_cast< cmf::river::IChannel * >(argp3); + { + try { + result = (cmf::river::Manning_Diffusive *)new cmf::river::Manning_Diffusive(arg1,arg2,(cmf::river::IChannel const &)*arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__river__Manning_Diffusive, SWIG_POINTER_NEW | 0 ); + + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_Manning_Diffusive(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::river::Manning_Diffusive *arg1 = (cmf::river::Manning_Diffusive *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__Manning_Diffusive, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Manning_Diffusive" "', argument " "1"" of type '" "cmf::river::Manning_Diffusive *""'"); + } + arg1 = reinterpret_cast< cmf::river::Manning_Diffusive * >(argp1); + { + try { + + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *Manning_Diffusive_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__river__Manning_Diffusive, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *Manning_Diffusive_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN int Swig_var_Manning_Kinematic_cell_connector_set(PyObject *) { + SWIG_Error(SWIG_AttributeError,"Variable Manning_Kinematic_cell_connector is read-only."); + return 1; +} + + +SWIGINTERN PyObject *Swig_var_Manning_Kinematic_cell_connector_get(void) { + PyObject *pyobj = 0; + + pyobj = SWIG_NewPointerObj(SWIG_as_voidptr(&cmf::river::Manning_Kinematic::cell_connector), SWIGTYPE_p_cmf__upslope__CellConnector, 0 ); + return pyobj; +} + + +SWIGINTERN PyObject *_wrap_new_Manning_Kinematic(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::river::OpenWaterStorage::ptr arg1 ; + cmf::water::flux_node::ptr arg2 ; + cmf::river::IChannel *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "left",(char *) "right",(char *) "reachtype", NULL + }; + cmf::river::Manning_Kinematic *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:new_Manning_Kinematic",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__river__OpenWaterStorage_t, 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Manning_Kinematic" "', argument " "1"" of type '" "cmf::river::OpenWaterStorage::ptr""'"); + } + if (argp1) arg1 = *(reinterpret_cast< cmf::river::OpenWaterStorage::ptr * >(argp1)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::river::OpenWaterStorage::ptr * >(argp1); + } + { + int newmem = 0; + res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Manning_Kinematic" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); + } + if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); + } + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_cmf__river__IChannel, 0 | 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_Manning_Kinematic" "', argument " "3"" of type '" "cmf::river::IChannel const &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Manning_Kinematic" "', argument " "3"" of type '" "cmf::river::IChannel const &""'"); + } + arg3 = reinterpret_cast< cmf::river::IChannel * >(argp3); + { + try { + result = (cmf::river::Manning_Kinematic *)new cmf::river::Manning_Kinematic(arg1,arg2,(cmf::river::IChannel const &)*arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__river__Manning_Kinematic, SWIG_POINTER_NEW | 0 ); + + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_Manning_Kinematic(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::river::Manning_Kinematic *arg1 = (cmf::river::Manning_Kinematic *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__river__Manning_Kinematic, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Manning_Kinematic" "', argument " "1"" of type '" "cmf::river::Manning_Kinematic *""'"); + } + arg1 = reinterpret_cast< cmf::river::Manning_Kinematic * >(argp1); + { + try { + + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *Manning_Kinematic_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__river__Manning_Kinematic, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *Manning_Kinematic_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_new_CanopyOverflow(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::WaterStorage::ptr arg1 ; + cmf::water::flux_node::ptr arg2 ; + cmf::upslope::Cell *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "Canopy",(char *) "target",(char *) "cell", NULL + }; + cmf::upslope::connections::CanopyOverflow *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:new_CanopyOverflow",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CanopyOverflow" "', argument " "1"" of type '" "cmf::water::WaterStorage::ptr""'"); + } + if (argp1) arg1 = *(reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp1)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp1); + } + { + int newmem = 0; + res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_CanopyOverflow" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); + } + if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); + } + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_cmf__upslope__Cell, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_CanopyOverflow" "', argument " "3"" of type '" "cmf::upslope::Cell &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CanopyOverflow" "', argument " "3"" of type '" "cmf::upslope::Cell &""'"); + } + arg3 = reinterpret_cast< cmf::upslope::Cell * >(argp3); + { + try { + result = (cmf::upslope::connections::CanopyOverflow *)new cmf::upslope::connections::CanopyOverflow(arg1,arg2,*arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__connections__CanopyOverflow, SWIG_POINTER_NEW | 0 ); + + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CanopyOverflow_use_for_cell(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::Cell *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + char * kwnames[] = { + (char *) "cell", NULL + }; + cmf::upslope::connections::CanopyOverflow *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:CanopyOverflow_use_for_cell",kwnames,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_cmf__upslope__Cell, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CanopyOverflow_use_for_cell" "', argument " "1"" of type '" "cmf::upslope::Cell &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CanopyOverflow_use_for_cell" "', argument " "1"" of type '" "cmf::upslope::Cell &""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); + { + try { + result = (cmf::upslope::connections::CanopyOverflow *)cmf::upslope::connections::CanopyOverflow::use_for_cell(*arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__connections__CanopyOverflow, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_CanopyOverflow(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::connections::CanopyOverflow *arg1 = (cmf::upslope::connections::CanopyOverflow *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__CanopyOverflow, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CanopyOverflow" "', argument " "1"" of type '" "cmf::upslope::connections::CanopyOverflow *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::connections::CanopyOverflow * >(argp1); + { + try { + + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *CanopyOverflow_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__connections__CanopyOverflow, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *CanopyOverflow_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_new_RutterInterception(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::WaterStorage::ptr arg1 ; + cmf::water::flux_node::ptr arg2 ; + cmf::upslope::Cell *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "Canopy",(char *) "target",(char *) "cell", NULL + }; + cmf::upslope::connections::RutterInterception *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:new_RutterInterception",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_RutterInterception" "', argument " "1"" of type '" "cmf::water::WaterStorage::ptr""'"); + } + if (argp1) arg1 = *(reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp1)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp1); + } + { + int newmem = 0; + res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_RutterInterception" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); + } + if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); + } + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_cmf__upslope__Cell, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_RutterInterception" "', argument " "3"" of type '" "cmf::upslope::Cell &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_RutterInterception" "', argument " "3"" of type '" "cmf::upslope::Cell &""'"); + } + arg3 = reinterpret_cast< cmf::upslope::Cell * >(argp3); + { + try { + result = (cmf::upslope::connections::RutterInterception *)new cmf::upslope::connections::RutterInterception(arg1,arg2,*arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__connections__RutterInterception, SWIG_POINTER_NEW | 0 ); + + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_RutterInterception_use_for_cell(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::Cell *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + char * kwnames[] = { + (char *) "cell", NULL + }; + cmf::upslope::connections::RutterInterception *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:RutterInterception_use_for_cell",kwnames,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_cmf__upslope__Cell, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RutterInterception_use_for_cell" "', argument " "1"" of type '" "cmf::upslope::Cell &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "RutterInterception_use_for_cell" "', argument " "1"" of type '" "cmf::upslope::Cell &""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); + { + try { + result = (cmf::upslope::connections::RutterInterception *)cmf::upslope::connections::RutterInterception::use_for_cell(*arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__connections__RutterInterception, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_RutterInterception(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::connections::RutterInterception *arg1 = (cmf::upslope::connections::RutterInterception *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__RutterInterception, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_RutterInterception" "', argument " "1"" of type '" "cmf::upslope::connections::RutterInterception *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::connections::RutterInterception * >(argp1); + { + try { + + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *RutterInterception_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__connections__RutterInterception, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *RutterInterception_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_SimpleTindexSnowMelt_SnowMeltRate_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::connections::SimpleTindexSnowMelt *arg1 = (cmf::upslope::connections::SimpleTindexSnowMelt *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"SimpleTindexSnowMelt_SnowMeltRate_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__SimpleTindexSnowMelt, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimpleTindexSnowMelt_SnowMeltRate_set" "', argument " "1"" of type '" "cmf::upslope::connections::SimpleTindexSnowMelt *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::connections::SimpleTindexSnowMelt * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SimpleTindexSnowMelt_SnowMeltRate_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->SnowMeltRate = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SimpleTindexSnowMelt_SnowMeltRate_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::connections::SimpleTindexSnowMelt *arg1 = (cmf::upslope::connections::SimpleTindexSnowMelt *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__SimpleTindexSnowMelt, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimpleTindexSnowMelt_SnowMeltRate_get" "', argument " "1"" of type '" "cmf::upslope::connections::SimpleTindexSnowMelt *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::connections::SimpleTindexSnowMelt * >(argp1); + result = (real) ((arg1)->SnowMeltRate); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_SimpleTindexSnowMelt(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::WaterStorage::ptr arg1 ; + cmf::water::flux_node::ptr arg2 ; + cmf::upslope::Cell *arg3 = 0 ; + real arg4 = (real) 7.0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + double val4 ; + int ecode4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + char * kwnames[] = { + (char *) "snow",(char *) "surface_water",(char *) "cell",(char *) "rate", NULL + }; + cmf::upslope::connections::SimpleTindexSnowMelt *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|O:new_SimpleTindexSnowMelt",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SimpleTindexSnowMelt" "', argument " "1"" of type '" "cmf::water::WaterStorage::ptr""'"); + } + if (argp1) arg1 = *(reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp1)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp1); + } + { + int newmem = 0; + res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SimpleTindexSnowMelt" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); + } + if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); + } + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_cmf__upslope__Cell, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_SimpleTindexSnowMelt" "', argument " "3"" of type '" "cmf::upslope::Cell &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SimpleTindexSnowMelt" "', argument " "3"" of type '" "cmf::upslope::Cell &""'"); + } + arg3 = reinterpret_cast< cmf::upslope::Cell * >(argp3); + if (obj3) { + ecode4 = SWIG_AsVal_double(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_SimpleTindexSnowMelt" "', argument " "4"" of type '" "real""'"); + } + arg4 = static_cast< real >(val4); + } + { + try { + result = (cmf::upslope::connections::SimpleTindexSnowMelt *)new cmf::upslope::connections::SimpleTindexSnowMelt(arg1,arg2,*arg3,arg4); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__connections__SimpleTindexSnowMelt, SWIG_POINTER_NEW | 0 ); + + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SimpleTindexSnowMelt_use_for_cell(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::Cell *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + char * kwnames[] = { + (char *) "cell", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:SimpleTindexSnowMelt_use_for_cell",kwnames,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_cmf__upslope__Cell, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimpleTindexSnowMelt_use_for_cell" "', argument " "1"" of type '" "cmf::upslope::Cell &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SimpleTindexSnowMelt_use_for_cell" "', argument " "1"" of type '" "cmf::upslope::Cell &""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); + { + try { + cmf::upslope::connections::SimpleTindexSnowMelt::use_for_cell(*arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_SimpleTindexSnowMelt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::connections::SimpleTindexSnowMelt *arg1 = (cmf::upslope::connections::SimpleTindexSnowMelt *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__SimpleTindexSnowMelt, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SimpleTindexSnowMelt" "', argument " "1"" of type '" "cmf::upslope::connections::SimpleTindexSnowMelt *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::connections::SimpleTindexSnowMelt * >(argp1); + { + try { + + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *SimpleTindexSnowMelt_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__connections__SimpleTindexSnowMelt, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *SimpleTindexSnowMelt_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_new_EnergyBudgetSnowMelt(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::WaterStorage::ptr arg1 ; + cmf::water::flux_node::ptr arg2 ; + cmf::upslope::Cell *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "snow",(char *) "surface_water",(char *) "cell", NULL + }; + cmf::upslope::connections::EnergyBudgetSnowMelt *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:new_EnergyBudgetSnowMelt",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_EnergyBudgetSnowMelt" "', argument " "1"" of type '" "cmf::water::WaterStorage::ptr""'"); + } + if (argp1) arg1 = *(reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp1)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp1); + } + { + int newmem = 0; + res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_EnergyBudgetSnowMelt" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); + } + if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); + } + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_cmf__upslope__Cell, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_EnergyBudgetSnowMelt" "', argument " "3"" of type '" "cmf::upslope::Cell &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EnergyBudgetSnowMelt" "', argument " "3"" of type '" "cmf::upslope::Cell &""'"); + } + arg3 = reinterpret_cast< cmf::upslope::Cell * >(argp3); + { + try { + result = (cmf::upslope::connections::EnergyBudgetSnowMelt *)new cmf::upslope::connections::EnergyBudgetSnowMelt(arg1,arg2,*arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__connections__EnergyBudgetSnowMelt, SWIG_POINTER_NEW | 0 ); + + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_EnergyBudgetSnowMelt_use_for_cell(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::Cell *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + char * kwnames[] = { + (char *) "cell", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:EnergyBudgetSnowMelt_use_for_cell",kwnames,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_cmf__upslope__Cell, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EnergyBudgetSnowMelt_use_for_cell" "', argument " "1"" of type '" "cmf::upslope::Cell &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "EnergyBudgetSnowMelt_use_for_cell" "', argument " "1"" of type '" "cmf::upslope::Cell &""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); + { + try { + cmf::upslope::connections::EnergyBudgetSnowMelt::use_for_cell(*arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_EnergyBudgetSnowMelt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::connections::EnergyBudgetSnowMelt *arg1 = (cmf::upslope::connections::EnergyBudgetSnowMelt *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__EnergyBudgetSnowMelt, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_EnergyBudgetSnowMelt" "', argument " "1"" of type '" "cmf::upslope::connections::EnergyBudgetSnowMelt *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::connections::EnergyBudgetSnowMelt * >(argp1); + { + try { + + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *EnergyBudgetSnowMelt_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__connections__EnergyBudgetSnowMelt, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *EnergyBudgetSnowMelt_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_snowfraction(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + real arg1 ; + double val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + char * kwnames[] = { + (char *) "T", NULL + }; + real result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:snowfraction",kwnames,&obj0)) SWIG_fail; + ecode1 = SWIG_AsVal_double(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "snowfraction" "', argument " "1"" of type '" "real""'"); + } + arg1 = static_cast< real >(val1); + { + try { + result = (real)cmf::upslope::connections::snowfraction(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Rainfall_Throughfall_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::connections::Rainfall *arg1 = (cmf::upslope::connections::Rainfall *) 0 ; + bool arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"Rainfall_Throughfall_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__Rainfall, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Rainfall_Throughfall_set" "', argument " "1"" of type '" "cmf::upslope::connections::Rainfall *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::connections::Rainfall * >(argp1); + ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Rainfall_Throughfall_set" "', argument " "2"" of type '" "bool""'"); + } + arg2 = static_cast< bool >(val2); + if (arg1) (arg1)->Throughfall = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Rainfall_Throughfall_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::connections::Rainfall *arg1 = (cmf::upslope::connections::Rainfall *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + bool result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__Rainfall, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Rainfall_Throughfall_get" "', argument " "1"" of type '" "cmf::upslope::connections::Rainfall *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::connections::Rainfall * >(argp1); + result = (bool) ((arg1)->Throughfall); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Rainfall_InterceptedRainfall_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::connections::Rainfall *arg1 = (cmf::upslope::connections::Rainfall *) 0 ; + bool arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"Rainfall_InterceptedRainfall_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__Rainfall, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Rainfall_InterceptedRainfall_set" "', argument " "1"" of type '" "cmf::upslope::connections::Rainfall *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::connections::Rainfall * >(argp1); + ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Rainfall_InterceptedRainfall_set" "', argument " "2"" of type '" "bool""'"); + } + arg2 = static_cast< bool >(val2); + if (arg1) (arg1)->InterceptedRainfall = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Rainfall_InterceptedRainfall_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::connections::Rainfall *arg1 = (cmf::upslope::connections::Rainfall *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + bool result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__Rainfall, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Rainfall_InterceptedRainfall_get" "', argument " "1"" of type '" "cmf::upslope::connections::Rainfall *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::connections::Rainfall * >(argp1); + result = (bool) ((arg1)->InterceptedRainfall); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_Rainfall(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::flux_node::ptr arg1 ; + cmf::upslope::Cell *arg2 = 0 ; + bool arg3 = (bool) true ; + bool arg4 = (bool) true ; + void *argp1 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + bool val3 ; + int ecode3 = 0 ; + bool val4 ; + int ecode4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + char * kwnames[] = { + (char *) "target",(char *) "cell",(char *) "getthroughfall",(char *) "getintercepted", NULL + }; + cmf::upslope::connections::Rainfall *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OO:new_Rainfall",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Rainfall" "', argument " "1"" of type '" "cmf::water::flux_node::ptr""'"); + } + if (argp1) arg1 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp1)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp1); + } + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_cmf__upslope__Cell, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Rainfall" "', argument " "2"" of type '" "cmf::upslope::Cell &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Rainfall" "', argument " "2"" of type '" "cmf::upslope::Cell &""'"); + } + arg2 = reinterpret_cast< cmf::upslope::Cell * >(argp2); + if (obj2) { + ecode3 = SWIG_AsVal_bool(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Rainfall" "', argument " "3"" of type '" "bool""'"); + } + arg3 = static_cast< bool >(val3); + } + if (obj3) { + ecode4 = SWIG_AsVal_bool(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_Rainfall" "', argument " "4"" of type '" "bool""'"); + } + arg4 = static_cast< bool >(val4); + } + { + try { + result = (cmf::upslope::connections::Rainfall *)new cmf::upslope::connections::Rainfall(arg1,*arg2,arg3,arg4); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__connections__Rainfall, SWIG_POINTER_NEW | 0 ); + + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_Rainfall(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::connections::Rainfall *arg1 = (cmf::upslope::connections::Rainfall *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__Rainfall, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Rainfall" "', argument " "1"" of type '" "cmf::upslope::connections::Rainfall *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::connections::Rainfall * >(argp1); + { + try { + + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *Rainfall_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__connections__Rainfall, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *Rainfall_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_new_Snowfall(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::flux_node::ptr arg1 ; + cmf::upslope::Cell *arg2 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "target",(char *) "cell", NULL + }; + cmf::upslope::connections::Snowfall *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:new_Snowfall",kwnames,&obj0,&obj1)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Snowfall" "', argument " "1"" of type '" "cmf::water::flux_node::ptr""'"); + } + if (argp1) arg1 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp1)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp1); + } + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_cmf__upslope__Cell, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Snowfall" "', argument " "2"" of type '" "cmf::upslope::Cell &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Snowfall" "', argument " "2"" of type '" "cmf::upslope::Cell &""'"); + } + arg2 = reinterpret_cast< cmf::upslope::Cell * >(argp2); + { + try { + result = (cmf::upslope::connections::Snowfall *)new cmf::upslope::connections::Snowfall(arg1,*arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__connections__Snowfall, SWIG_POINTER_NEW | 0 ); + + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_Snowfall(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::connections::Snowfall *arg1 = (cmf::upslope::connections::Snowfall *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__Snowfall, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Snowfall" "', argument " "1"" of type '" "cmf::upslope::connections::Snowfall *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::connections::Snowfall * >(argp1); + { + try { + + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *Snowfall_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__connections__Snowfall, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *Snowfall_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_new_MatrixInfiltration(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::SoilLayer::ptr arg1 ; + cmf::water::flux_node::ptr arg2 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "soilwater",(char *) "surfacewater", NULL + }; + cmf::upslope::connections::MatrixInfiltration *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:new_MatrixInfiltration",kwnames,&obj0,&obj1)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MatrixInfiltration" "', argument " "1"" of type '" "cmf::upslope::SoilLayer::ptr""'"); + } + if (argp1) arg1 = *(reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp1)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp1); + } + { + int newmem = 0; + res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MatrixInfiltration" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); + } + if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); + } + { + try { + result = (cmf::upslope::connections::MatrixInfiltration *)new cmf::upslope::connections::MatrixInfiltration(arg1,arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__connections__MatrixInfiltration, SWIG_POINTER_NEW | 0 ); + + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_MatrixInfiltration_use_for_cell(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::Cell *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + char * kwnames[] = { + (char *) "c", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:MatrixInfiltration_use_for_cell",kwnames,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_cmf__upslope__Cell, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MatrixInfiltration_use_for_cell" "', argument " "1"" of type '" "cmf::upslope::Cell &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MatrixInfiltration_use_for_cell" "', argument " "1"" of type '" "cmf::upslope::Cell &""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); + { + try { + cmf::upslope::connections::MatrixInfiltration::use_for_cell(*arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_MatrixInfiltration(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::connections::MatrixInfiltration *arg1 = (cmf::upslope::connections::MatrixInfiltration *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__MatrixInfiltration, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MatrixInfiltration" "', argument " "1"" of type '" "cmf::upslope::connections::MatrixInfiltration *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::connections::MatrixInfiltration * >(argp1); + { + try { + + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *MatrixInfiltration_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__connections__MatrixInfiltration, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *MatrixInfiltration_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_new_GreenAmptInfiltration(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::SoilLayer::ptr arg1 ; + cmf::water::flux_node::ptr arg2 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "soilwater",(char *) "surfacewater", NULL + }; + cmf::upslope::connections::GreenAmptInfiltration *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:new_GreenAmptInfiltration",kwnames,&obj0,&obj1)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_GreenAmptInfiltration" "', argument " "1"" of type '" "cmf::upslope::SoilLayer::ptr""'"); + } + if (argp1) arg1 = *(reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp1)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp1); + } + { + int newmem = 0; + res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_GreenAmptInfiltration" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); + } + if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); + } + { + try { + result = (cmf::upslope::connections::GreenAmptInfiltration *)new cmf::upslope::connections::GreenAmptInfiltration(arg1,arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__connections__GreenAmptInfiltration, SWIG_POINTER_NEW | 0 ); + + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_GreenAmptInfiltration_use_for_cell(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::Cell *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + char * kwnames[] = { + (char *) "c", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:GreenAmptInfiltration_use_for_cell",kwnames,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_cmf__upslope__Cell, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GreenAmptInfiltration_use_for_cell" "', argument " "1"" of type '" "cmf::upslope::Cell &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "GreenAmptInfiltration_use_for_cell" "', argument " "1"" of type '" "cmf::upslope::Cell &""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); + { + try { + cmf::upslope::connections::GreenAmptInfiltration::use_for_cell(*arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_GreenAmptInfiltration(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::connections::GreenAmptInfiltration *arg1 = (cmf::upslope::connections::GreenAmptInfiltration *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__GreenAmptInfiltration, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GreenAmptInfiltration" "', argument " "1"" of type '" "cmf::upslope::connections::GreenAmptInfiltration *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::connections::GreenAmptInfiltration * >(argp1); + { + try { + + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *GreenAmptInfiltration_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__connections__GreenAmptInfiltration, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *GreenAmptInfiltration_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_SimpleInfiltration_W0_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::connections::SimpleInfiltration *arg1 = (cmf::upslope::connections::SimpleInfiltration *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"SimpleInfiltration_W0_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__SimpleInfiltration, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimpleInfiltration_W0_set" "', argument " "1"" of type '" "cmf::upslope::connections::SimpleInfiltration *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::connections::SimpleInfiltration * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SimpleInfiltration_W0_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->W0 = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SimpleInfiltration_W0_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::connections::SimpleInfiltration *arg1 = (cmf::upslope::connections::SimpleInfiltration *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__SimpleInfiltration, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimpleInfiltration_W0_get" "', argument " "1"" of type '" "cmf::upslope::connections::SimpleInfiltration *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::connections::SimpleInfiltration * >(argp1); + result = (real) ((arg1)->W0); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_SimpleInfiltration(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::SoilLayer::ptr arg1 ; + cmf::water::flux_node::ptr arg2 ; + real arg3 = (real) 0.9 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + double val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "soilwater",(char *) "surfacewater",(char *) "W0", NULL + }; + cmf::upslope::connections::SimpleInfiltration *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:new_SimpleInfiltration",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SimpleInfiltration" "', argument " "1"" of type '" "cmf::upslope::SoilLayer::ptr""'"); + } + if (argp1) arg1 = *(reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp1)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp1); + } + { + int newmem = 0; + res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SimpleInfiltration" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); + } + if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); + } + if (obj2) { + ecode3 = SWIG_AsVal_double(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_SimpleInfiltration" "', argument " "3"" of type '" "real""'"); + } + arg3 = static_cast< real >(val3); + } + { + try { + result = (cmf::upslope::connections::SimpleInfiltration *)new cmf::upslope::connections::SimpleInfiltration(arg1,arg2,arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__connections__SimpleInfiltration, SWIG_POINTER_NEW | 0 ); + + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SimpleInfiltration_use_for_cell(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::Cell *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + char * kwnames[] = { + (char *) "c", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:SimpleInfiltration_use_for_cell",kwnames,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_cmf__upslope__Cell, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimpleInfiltration_use_for_cell" "', argument " "1"" of type '" "cmf::upslope::Cell &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SimpleInfiltration_use_for_cell" "', argument " "1"" of type '" "cmf::upslope::Cell &""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); + { + try { + cmf::upslope::connections::SimpleInfiltration::use_for_cell(*arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_SimpleInfiltration(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::connections::SimpleInfiltration *arg1 = (cmf::upslope::connections::SimpleInfiltration *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__SimpleInfiltration, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SimpleInfiltration" "', argument " "1"" of type '" "cmf::upslope::connections::SimpleInfiltration *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::connections::SimpleInfiltration * >(argp1); + { + try { + + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *SimpleInfiltration_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__connections__SimpleInfiltration, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *SimpleInfiltration_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_SWATPercolation_use_for_cell(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::Cell *arg1 = 0 ; + bool arg2 = (bool) true ; + void *argp1 = 0 ; + int res1 = 0 ; + bool val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "cell",(char *) "no_override", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:SWATPercolation_use_for_cell",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_cmf__upslope__Cell, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SWATPercolation_use_for_cell" "', argument " "1"" of type '" "cmf::upslope::Cell &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SWATPercolation_use_for_cell" "', argument " "1"" of type '" "cmf::upslope::Cell &""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); + if (obj1) { + ecode2 = SWIG_AsVal_bool(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SWATPercolation_use_for_cell" "', argument " "2"" of type '" "bool""'"); + } + arg2 = static_cast< bool >(val2); + } + { + try { + cmf::upslope::connections::SWATPercolation::use_for_cell(*arg1,arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_SWATPercolation(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::SoilLayer::ptr arg1 ; + cmf::upslope::SoilLayer::ptr arg2 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "upperLayer",(char *) "lowerLayer", NULL + }; + cmf::upslope::connections::SWATPercolation *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:new_SWATPercolation",kwnames,&obj0,&obj1)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SWATPercolation" "', argument " "1"" of type '" "cmf::upslope::SoilLayer::ptr""'"); + } + if (argp1) arg1 = *(reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp1)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp1); + } + { + int newmem = 0; + res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 , &newmem); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SWATPercolation" "', argument " "2"" of type '" "cmf::upslope::SoilLayer::ptr""'"); + } + if (argp2) arg2 = *(reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp2)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp2); + } + { + try { + result = (cmf::upslope::connections::SWATPercolation *)new cmf::upslope::connections::SWATPercolation(arg1,arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__connections__SWATPercolation, SWIG_POINTER_NEW | 0 ); + + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_SWATPercolation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::connections::SWATPercolation *arg1 = (cmf::upslope::connections::SWATPercolation *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__SWATPercolation, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SWATPercolation" "', argument " "1"" of type '" "cmf::upslope::connections::SWATPercolation *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::connections::SWATPercolation * >(argp1); + { + try { + + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *SWATPercolation_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__connections__SWATPercolation, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *SWATPercolation_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_new_Richards(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::SoilLayer::ptr arg1 ; + cmf::water::flux_node::ptr arg2 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "left",(char *) "right", NULL + }; + cmf::upslope::connections::Richards *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:new_Richards",kwnames,&obj0,&obj1)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Richards" "', argument " "1"" of type '" "cmf::upslope::SoilLayer::ptr""'"); + } + if (argp1) arg1 = *(reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp1)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp1); + } + { + int newmem = 0; + res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Richards" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); + } + if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); + } + { + try { + result = (cmf::upslope::connections::Richards *)new cmf::upslope::connections::Richards(arg1,arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__connections__Richards, SWIG_POINTER_NEW | 0 ); + + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Richards_use_for_cell(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::Cell *arg1 = 0 ; + bool arg2 = (bool) true ; + void *argp1 = 0 ; + int res1 = 0 ; + bool val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "cell",(char *) "no_override", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Richards_use_for_cell",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_cmf__upslope__Cell, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Richards_use_for_cell" "', argument " "1"" of type '" "cmf::upslope::Cell &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Richards_use_for_cell" "', argument " "1"" of type '" "cmf::upslope::Cell &""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); + if (obj1) { + ecode2 = SWIG_AsVal_bool(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Richards_use_for_cell" "', argument " "2"" of type '" "bool""'"); + } + arg2 = static_cast< bool >(val2); + } + { + try { + cmf::upslope::connections::Richards::use_for_cell(*arg1,arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_Richards(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::connections::Richards *arg1 = (cmf::upslope::connections::Richards *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__Richards, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Richards" "', argument " "1"" of type '" "cmf::upslope::connections::Richards *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::connections::Richards * >(argp1); + { + try { + + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *Richards_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__connections__Richards, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *Richards_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_new_SimplRichards(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::SoilLayer::ptr arg1 ; + cmf::water::flux_node::ptr arg2 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "left",(char *) "right", NULL + }; + cmf::upslope::connections::SimplRichards *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:new_SimplRichards",kwnames,&obj0,&obj1)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SimplRichards" "', argument " "1"" of type '" "cmf::upslope::SoilLayer::ptr""'"); + } + if (argp1) arg1 = *(reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp1)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp1); + } + { + int newmem = 0; + res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SimplRichards" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); + } + if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); + } + { + try { + result = (cmf::upslope::connections::SimplRichards *)new cmf::upslope::connections::SimplRichards(arg1,arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__connections__SimplRichards, SWIG_POINTER_NEW | 0 ); + + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SimplRichards_use_for_cell(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::Cell *arg1 = 0 ; + bool arg2 = (bool) true ; + void *argp1 = 0 ; + int res1 = 0 ; + bool val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "cell",(char *) "no_override", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:SimplRichards_use_for_cell",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_cmf__upslope__Cell, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimplRichards_use_for_cell" "', argument " "1"" of type '" "cmf::upslope::Cell &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SimplRichards_use_for_cell" "', argument " "1"" of type '" "cmf::upslope::Cell &""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); + if (obj1) { + ecode2 = SWIG_AsVal_bool(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SimplRichards_use_for_cell" "', argument " "2"" of type '" "bool""'"); + } + arg2 = static_cast< bool >(val2); + } + { + try { + cmf::upslope::connections::SimplRichards::use_for_cell(*arg1,arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_SimplRichards(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::connections::SimplRichards *arg1 = (cmf::upslope::connections::SimplRichards *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__SimplRichards, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SimplRichards" "', argument " "1"" of type '" "cmf::upslope::connections::SimplRichards *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::connections::SimplRichards * >(argp1); + { + try { + + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *SimplRichards_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__connections__SimplRichards, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *SimplRichards_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_new_FreeDrainagePercolation(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::SoilLayer::ptr arg1 ; + cmf::water::flux_node::ptr arg2 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "left",(char *) "right", NULL + }; + cmf::upslope::connections::FreeDrainagePercolation *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:new_FreeDrainagePercolation",kwnames,&obj0,&obj1)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FreeDrainagePercolation" "', argument " "1"" of type '" "cmf::upslope::SoilLayer::ptr""'"); + } + if (argp1) arg1 = *(reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp1)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp1); + } + { + int newmem = 0; + res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FreeDrainagePercolation" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); + } + if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); + } + { + try { + result = (cmf::upslope::connections::FreeDrainagePercolation *)new cmf::upslope::connections::FreeDrainagePercolation(arg1,arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__connections__FreeDrainagePercolation, SWIG_POINTER_NEW | 0 ); + + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_FreeDrainagePercolation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::connections::FreeDrainagePercolation *arg1 = (cmf::upslope::connections::FreeDrainagePercolation *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__FreeDrainagePercolation, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FreeDrainagePercolation" "', argument " "1"" of type '" "cmf::upslope::connections::FreeDrainagePercolation *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::connections::FreeDrainagePercolation * >(argp1); + { + try { + + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *FreeDrainagePercolation_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__connections__FreeDrainagePercolation, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *FreeDrainagePercolation_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_LayerBypass_Kmax_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::connections::LayerBypass *arg1 = (cmf::upslope::connections::LayerBypass *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"LayerBypass_Kmax_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__LayerBypass, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LayerBypass_Kmax_set" "', argument " "1"" of type '" "cmf::upslope::connections::LayerBypass *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::connections::LayerBypass * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LayerBypass_Kmax_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->Kmax = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_LayerBypass_Kmax_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::connections::LayerBypass *arg1 = (cmf::upslope::connections::LayerBypass *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__LayerBypass, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LayerBypass_Kmax_get" "', argument " "1"" of type '" "cmf::upslope::connections::LayerBypass *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::connections::LayerBypass * >(argp1); + result = (real) ((arg1)->Kmax); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_LayerBypass_w0_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::connections::LayerBypass *arg1 = (cmf::upslope::connections::LayerBypass *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"LayerBypass_w0_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__LayerBypass, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LayerBypass_w0_set" "', argument " "1"" of type '" "cmf::upslope::connections::LayerBypass *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::connections::LayerBypass * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LayerBypass_w0_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->w0 = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_LayerBypass_w0_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::connections::LayerBypass *arg1 = (cmf::upslope::connections::LayerBypass *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__LayerBypass, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LayerBypass_w0_get" "', argument " "1"" of type '" "cmf::upslope::connections::LayerBypass *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::connections::LayerBypass * >(argp1); + result = (real) ((arg1)->w0); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_LayerBypass_beta_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::connections::LayerBypass *arg1 = (cmf::upslope::connections::LayerBypass *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"LayerBypass_beta_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__LayerBypass, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LayerBypass_beta_set" "', argument " "1"" of type '" "cmf::upslope::connections::LayerBypass *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::connections::LayerBypass * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LayerBypass_beta_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->beta = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_LayerBypass_beta_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::connections::LayerBypass *arg1 = (cmf::upslope::connections::LayerBypass *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__LayerBypass, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LayerBypass_beta_get" "', argument " "1"" of type '" "cmf::upslope::connections::LayerBypass *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::connections::LayerBypass * >(argp1); + result = (real) ((arg1)->beta); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_LayerBypass_K(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::connections::LayerBypass *arg1 = (cmf::upslope::connections::LayerBypass *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "w", NULL + }; + real result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:LayerBypass_K",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__connections__LayerBypass, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LayerBypass_K" "', argument " "1"" of type '" "cmf::upslope::connections::LayerBypass *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::connections::LayerBypass * >(argp1); + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LayerBypass_K" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + { + try { + result = (real)(arg1)->K(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_LayerBypass(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::flux_node::ptr arg1 ; + cmf::upslope::SoilLayer::ptr arg2 ; + real arg3 = (real) 100. ; + real arg4 = (real) 0.0 ; + real arg5 = (real) 1.0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + double val3 ; + int ecode3 = 0 ; + double val4 ; + int ecode4 = 0 ; + double val5 ; + int ecode5 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + char * kwnames[] = { + (char *) "left",(char *) "right",(char *) "Kmax",(char *) "w0",(char *) "beta", NULL + }; + cmf::upslope::connections::LayerBypass *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOO:new_LayerBypass",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_LayerBypass" "', argument " "1"" of type '" "cmf::water::flux_node::ptr""'"); + } + if (argp1) arg1 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp1)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp1); + } + { + int newmem = 0; + res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 , &newmem); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_LayerBypass" "', argument " "2"" of type '" "cmf::upslope::SoilLayer::ptr""'"); + } + if (argp2) arg2 = *(reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp2)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp2); + } + if (obj2) { + ecode3 = SWIG_AsVal_double(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_LayerBypass" "', argument " "3"" of type '" "real""'"); + } + arg3 = static_cast< real >(val3); + } + if (obj3) { + ecode4 = SWIG_AsVal_double(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_LayerBypass" "', argument " "4"" of type '" "real""'"); + } + arg4 = static_cast< real >(val4); + } + if (obj4) { + ecode5 = SWIG_AsVal_double(obj4, &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_LayerBypass" "', argument " "5"" of type '" "real""'"); + } + arg5 = static_cast< real >(val5); + } + { + try { + result = (cmf::upslope::connections::LayerBypass *)new cmf::upslope::connections::LayerBypass(arg1,arg2,arg3,arg4,arg5); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__connections__LayerBypass, SWIG_POINTER_NEW | 0 ); + + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_LayerBypass(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::connections::LayerBypass *arg1 = (cmf::upslope::connections::LayerBypass *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__connections__LayerBypass, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_LayerBypass" "', argument " "1"" of type '" "cmf::upslope::connections::LayerBypass *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::connections::LayerBypass * >(argp1); + { + try { + + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *LayerBypass_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__connections__LayerBypass, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *LayerBypass_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_RootUptakeStessFunction_Tact(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::ET::RootUptakeStessFunction *arg1 = (cmf::upslope::ET::RootUptakeStessFunction *) 0 ; + cmf::upslope::ET::stressedET *arg2 = (cmf::upslope::ET::stressedET *) 0 ; + real arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + double val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "connection",(char *) "Tpot", NULL + }; + real result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:RootUptakeStessFunction_Tact",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__ET__RootUptakeStessFunction, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RootUptakeStessFunction_Tact" "', argument " "1"" of type '" "cmf::upslope::ET::RootUptakeStessFunction const *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::RootUptakeStessFunction * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_cmf__upslope__ET__stressedET, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "RootUptakeStessFunction_Tact" "', argument " "2"" of type '" "cmf::upslope::ET::stressedET const *""'"); + } + arg2 = reinterpret_cast< cmf::upslope::ET::stressedET * >(argp2); + ecode3 = SWIG_AsVal_double(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RootUptakeStessFunction_Tact" "', argument " "3"" of type '" "real""'"); + } + arg3 = static_cast< real >(val3); + { + try { + result = (real)((cmf::upslope::ET::RootUptakeStessFunction const *)arg1)->Tact((cmf::upslope::ET::stressedET const *)arg2,arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_RootUptakeStessFunction_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::ET::RootUptakeStessFunction *arg1 = (cmf::upslope::ET::RootUptakeStessFunction *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::upslope::ET::RootUptakeStessFunction *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__RootUptakeStessFunction, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RootUptakeStessFunction_copy" "', argument " "1"" of type '" "cmf::upslope::ET::RootUptakeStessFunction const *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::RootUptakeStessFunction * >(argp1); + { + try { + result = (cmf::upslope::ET::RootUptakeStessFunction *)((cmf::upslope::ET::RootUptakeStessFunction const *)arg1)->copy(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__ET__RootUptakeStessFunction, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_RootUptakeStessFunction_to_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::ET::RootUptakeStessFunction *arg1 = (cmf::upslope::ET::RootUptakeStessFunction *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::string result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__RootUptakeStessFunction, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RootUptakeStessFunction_to_string" "', argument " "1"" of type '" "cmf::upslope::ET::RootUptakeStessFunction const *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::RootUptakeStessFunction * >(argp1); + { + try { + result = ((cmf::upslope::ET::RootUptakeStessFunction const *)arg1)->to_string(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_RootUptakeStessFunction(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::ET::RootUptakeStessFunction *arg1 = (cmf::upslope::ET::RootUptakeStessFunction *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__RootUptakeStessFunction, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_RootUptakeStessFunction" "', argument " "1"" of type '" "cmf::upslope::ET::RootUptakeStessFunction *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::RootUptakeStessFunction * >(argp1); + { + try { + delete arg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *RootUptakeStessFunction_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__ET__RootUptakeStessFunction, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_SuctionStress_P0_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::ET::SuctionStress *arg1 = (cmf::upslope::ET::SuctionStress *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"SuctionStress_P0_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__SuctionStress, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SuctionStress_P0_set" "', argument " "1"" of type '" "cmf::upslope::ET::SuctionStress *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::SuctionStress * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SuctionStress_P0_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->P0 = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SuctionStress_P0_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::ET::SuctionStress *arg1 = (cmf::upslope::ET::SuctionStress *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__SuctionStress, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SuctionStress_P0_get" "', argument " "1"" of type '" "cmf::upslope::ET::SuctionStress *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::SuctionStress * >(argp1); + result = (real) ((arg1)->P0); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SuctionStress_P1_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::ET::SuctionStress *arg1 = (cmf::upslope::ET::SuctionStress *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"SuctionStress_P1_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__SuctionStress, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SuctionStress_P1_set" "', argument " "1"" of type '" "cmf::upslope::ET::SuctionStress *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::SuctionStress * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SuctionStress_P1_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->P1 = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SuctionStress_P1_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::ET::SuctionStress *arg1 = (cmf::upslope::ET::SuctionStress *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__SuctionStress, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SuctionStress_P1_get" "', argument " "1"" of type '" "cmf::upslope::ET::SuctionStress *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::SuctionStress * >(argp1); + result = (real) ((arg1)->P1); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SuctionStress_P2_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::ET::SuctionStress *arg1 = (cmf::upslope::ET::SuctionStress *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"SuctionStress_P2_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__SuctionStress, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SuctionStress_P2_set" "', argument " "1"" of type '" "cmf::upslope::ET::SuctionStress *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::SuctionStress * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SuctionStress_P2_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->P2 = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SuctionStress_P2_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::ET::SuctionStress *arg1 = (cmf::upslope::ET::SuctionStress *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__SuctionStress, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SuctionStress_P2_get" "', argument " "1"" of type '" "cmf::upslope::ET::SuctionStress *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::SuctionStress * >(argp1); + result = (real) ((arg1)->P2); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SuctionStress_P3_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::ET::SuctionStress *arg1 = (cmf::upslope::ET::SuctionStress *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"SuctionStress_P3_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__SuctionStress, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SuctionStress_P3_set" "', argument " "1"" of type '" "cmf::upslope::ET::SuctionStress *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::SuctionStress * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SuctionStress_P3_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->P3 = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SuctionStress_P3_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::ET::SuctionStress *arg1 = (cmf::upslope::ET::SuctionStress *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__SuctionStress, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SuctionStress_P3_get" "', argument " "1"" of type '" "cmf::upslope::ET::SuctionStress *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::SuctionStress * >(argp1); + result = (real) ((arg1)->P3); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_SuctionStress__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + real arg1 = (real) 1e308 ; + real arg2 = (real) 1e307 ; + real arg3 = (real) -5 ; + real arg4 = (real) -160 ; + double val1 ; + int ecode1 = 0 ; + double val2 ; + int ecode2 = 0 ; + double val3 ; + int ecode3 = 0 ; + double val4 ; + int ecode4 = 0 ; + cmf::upslope::ET::SuctionStress *result = 0 ; + + if ((nobjs < 0) || (nobjs > 4)) SWIG_fail; + if (swig_obj[0]) { + ecode1 = SWIG_AsVal_double(swig_obj[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_SuctionStress" "', argument " "1"" of type '" "real""'"); + } + arg1 = static_cast< real >(val1); + } + if (swig_obj[1]) { + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_SuctionStress" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + } + if (swig_obj[2]) { + ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_SuctionStress" "', argument " "3"" of type '" "real""'"); + } + arg3 = static_cast< real >(val3); + } + if (swig_obj[3]) { + ecode4 = SWIG_AsVal_double(swig_obj[3], &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_SuctionStress" "', argument " "4"" of type '" "real""'"); + } + arg4 = static_cast< real >(val4); + } + { + try { + result = (cmf::upslope::ET::SuctionStress *)new cmf::upslope::ET::SuctionStress(arg1,arg2,arg3,arg4); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__ET__SuctionStress, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_SuctionStress__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::upslope::ET::SuctionStress *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + cmf::upslope::ET::SuctionStress *result = 0 ; + + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_cmf__upslope__ET__SuctionStress, 0 | 0); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SuctionStress" "', argument " "1"" of type '" "cmf::upslope::ET::SuctionStress const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SuctionStress" "', argument " "1"" of type '" "cmf::upslope::ET::SuctionStress const &""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::SuctionStress * >(argp1); + { + try { + result = (cmf::upslope::ET::SuctionStress *)new cmf::upslope::ET::SuctionStress((cmf::upslope::ET::SuctionStress const &)*arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__ET__SuctionStress, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_SuctionStress(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[5] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"new_SuctionStress",0,4,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if ((argc >= 0) && (argc <= 4)) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + if (argc > 0) { + { + { + int res = SWIG_AsVal_double(argv[0], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (argc > 1) { + { + { + int res = SWIG_AsVal_double(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (argc > 2) { + { + { + int res = SWIG_AsVal_double(argv[2], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (argc > 3) { + { + { + int res = SWIG_AsVal_double(argv[3], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + } + } + } + } + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_cmf__upslope__ET__SuctionStress, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_new_SuctionStress__SWIG_0(self, argc, argv); + case 2: + return _wrap_new_SuctionStress__SWIG_1(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_SuctionStress'.\n" + " Possible C/C++ prototypes are:\n" + " cmf::upslope::ET::SuctionStress::SuctionStress(real,real,real,real)\n" + " cmf::upslope::ET::SuctionStress::SuctionStress(cmf::upslope::ET::SuctionStress const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_SuctionStress_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::ET::SuctionStress *arg1 = (cmf::upslope::ET::SuctionStress *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::upslope::ET::SuctionStress *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__SuctionStress, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SuctionStress_copy" "', argument " "1"" of type '" "cmf::upslope::ET::SuctionStress const *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::SuctionStress * >(argp1); + { + try { + result = (cmf::upslope::ET::SuctionStress *)((cmf::upslope::ET::SuctionStress const *)arg1)->copy(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__ET__SuctionStress, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_SuctionStress(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::ET::SuctionStress *arg1 = (cmf::upslope::ET::SuctionStress *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__SuctionStress, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SuctionStress" "', argument " "1"" of type '" "cmf::upslope::ET::SuctionStress *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::SuctionStress * >(argp1); + { + try { + delete arg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *SuctionStress_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__ET__SuctionStress, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *SuctionStress_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_ContentStress_theta_d_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::ET::ContentStress *arg1 = (cmf::upslope::ET::ContentStress *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"ContentStress_theta_d_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__ContentStress, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContentStress_theta_d_set" "', argument " "1"" of type '" "cmf::upslope::ET::ContentStress *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::ContentStress * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ContentStress_theta_d_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->theta_d = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ContentStress_theta_d_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::ET::ContentStress *arg1 = (cmf::upslope::ET::ContentStress *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__ContentStress, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContentStress_theta_d_get" "', argument " "1"" of type '" "cmf::upslope::ET::ContentStress *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::ContentStress * >(argp1); + result = (real) ((arg1)->theta_d); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ContentStress_theta_w_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::ET::ContentStress *arg1 = (cmf::upslope::ET::ContentStress *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"ContentStress_theta_w_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__ContentStress, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContentStress_theta_w_set" "', argument " "1"" of type '" "cmf::upslope::ET::ContentStress *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::ContentStress * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ContentStress_theta_w_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->theta_w = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ContentStress_theta_w_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::ET::ContentStress *arg1 = (cmf::upslope::ET::ContentStress *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__ContentStress, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContentStress_theta_w_get" "', argument " "1"" of type '" "cmf::upslope::ET::ContentStress *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::ContentStress * >(argp1); + result = (real) ((arg1)->theta_w); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ContentStress_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::ET::ContentStress *arg1 = (cmf::upslope::ET::ContentStress *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::upslope::ET::ContentStress *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__ContentStress, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContentStress_copy" "', argument " "1"" of type '" "cmf::upslope::ET::ContentStress const *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::ContentStress * >(argp1); + { + try { + result = (cmf::upslope::ET::ContentStress *)((cmf::upslope::ET::ContentStress const *)arg1)->copy(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__ET__ContentStress, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ContentStress(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + real arg1 = (real) -1 ; + real arg2 = (real) -1 ; + double val1 ; + int ecode1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "theta_d",(char *) "theta_w", NULL + }; + cmf::upslope::ET::ContentStress *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|OO:new_ContentStress",kwnames,&obj0,&obj1)) SWIG_fail; + if (obj0) { + ecode1 = SWIG_AsVal_double(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ContentStress" "', argument " "1"" of type '" "real""'"); + } + arg1 = static_cast< real >(val1); + } + if (obj1) { + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_ContentStress" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + } + { + try { + result = (cmf::upslope::ET::ContentStress *)new cmf::upslope::ET::ContentStress(arg1,arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__ET__ContentStress, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_ContentStress(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::ET::ContentStress *arg1 = (cmf::upslope::ET::ContentStress *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__ContentStress, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ContentStress" "', argument " "1"" of type '" "cmf::upslope::ET::ContentStress *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::ContentStress * >(argp1); + { + try { + delete arg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *ContentStress_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__ET__ContentStress, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *ContentStress_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_VolumeStress_V1_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::ET::VolumeStress *arg1 = (cmf::upslope::ET::VolumeStress *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"VolumeStress_V1_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__VolumeStress, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VolumeStress_V1_set" "', argument " "1"" of type '" "cmf::upslope::ET::VolumeStress *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::VolumeStress * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VolumeStress_V1_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->V1 = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VolumeStress_V1_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::ET::VolumeStress *arg1 = (cmf::upslope::ET::VolumeStress *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__VolumeStress, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VolumeStress_V1_get" "', argument " "1"" of type '" "cmf::upslope::ET::VolumeStress *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::VolumeStress * >(argp1); + result = (real) ((arg1)->V1); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VolumeStress_V0_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::ET::VolumeStress *arg1 = (cmf::upslope::ET::VolumeStress *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"VolumeStress_V0_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__VolumeStress, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VolumeStress_V0_set" "', argument " "1"" of type '" "cmf::upslope::ET::VolumeStress *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::VolumeStress * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VolumeStress_V0_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->V0 = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VolumeStress_V0_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::ET::VolumeStress *arg1 = (cmf::upslope::ET::VolumeStress *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__VolumeStress, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VolumeStress_V0_get" "', argument " "1"" of type '" "cmf::upslope::ET::VolumeStress *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::VolumeStress * >(argp1); + result = (real) ((arg1)->V0); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_VolumeStress__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + real arg1 ; + real arg2 ; + double val1 ; + int ecode1 = 0 ; + double val2 ; + int ecode2 = 0 ; + cmf::upslope::ET::VolumeStress *result = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + ecode1 = SWIG_AsVal_double(swig_obj[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_VolumeStress" "', argument " "1"" of type '" "real""'"); + } + arg1 = static_cast< real >(val1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_VolumeStress" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + { + try { + result = (cmf::upslope::ET::VolumeStress *)new cmf::upslope::ET::VolumeStress(arg1,arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__ET__VolumeStress, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_VolumeStress__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::upslope::ET::VolumeStress *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + cmf::upslope::ET::VolumeStress *result = 0 ; + + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_cmf__upslope__ET__VolumeStress, 0 | 0); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_VolumeStress" "', argument " "1"" of type '" "cmf::upslope::ET::VolumeStress const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_VolumeStress" "', argument " "1"" of type '" "cmf::upslope::ET::VolumeStress const &""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::VolumeStress * >(argp1); + { + try { + result = (cmf::upslope::ET::VolumeStress *)new cmf::upslope::ET::VolumeStress((cmf::upslope::ET::VolumeStress const &)*arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__ET__VolumeStress, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_VolumeStress(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"new_VolumeStress",0,2,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_cmf__upslope__ET__VolumeStress, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + { + int res = SWIG_AsVal_double(argv[0], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_double(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_new_VolumeStress__SWIG_1(self, argc, argv); + case 2: + return _wrap_new_VolumeStress__SWIG_0(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_VolumeStress'.\n" + " Possible C/C++ prototypes are:\n" + " cmf::upslope::ET::VolumeStress::VolumeStress(real,real)\n" + " cmf::upslope::ET::VolumeStress::VolumeStress(cmf::upslope::ET::VolumeStress const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_VolumeStress_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::ET::VolumeStress *arg1 = (cmf::upslope::ET::VolumeStress *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::upslope::ET::VolumeStress *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__VolumeStress, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VolumeStress_copy" "', argument " "1"" of type '" "cmf::upslope::ET::VolumeStress const *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::VolumeStress * >(argp1); + { + try { + result = (cmf::upslope::ET::VolumeStress *)((cmf::upslope::ET::VolumeStress const *)arg1)->copy(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__ET__VolumeStress, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_VolumeStress(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::ET::VolumeStress *arg1 = (cmf::upslope::ET::VolumeStress *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__VolumeStress, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_VolumeStress" "', argument " "1"" of type '" "cmf::upslope::ET::VolumeStress *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::VolumeStress * >(argp1); + { + try { + delete arg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *VolumeStress_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__ET__VolumeStress, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *VolumeStress_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_new_log_wind_profile(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::Cell *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + char * kwnames[] = { + (char *) "_cell", NULL + }; + cmf::atmosphere::log_wind_profile *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:new_log_wind_profile",kwnames,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_cmf__upslope__Cell, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_log_wind_profile" "', argument " "1"" of type '" "cmf::upslope::Cell &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_log_wind_profile" "', argument " "1"" of type '" "cmf::upslope::Cell &""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); + { + try { + result = (cmf::atmosphere::log_wind_profile *)new cmf::atmosphere::log_wind_profile(*arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__atmosphere__log_wind_profile, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_log_wind_profile(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::log_wind_profile *arg1 = (cmf::atmosphere::log_wind_profile *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__atmosphere__log_wind_profile, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_log_wind_profile" "', argument " "1"" of type '" "cmf::atmosphere::log_wind_profile *""'"); + } + arg1 = reinterpret_cast< cmf::atmosphere::log_wind_profile * >(argp1); + { + try { + delete arg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *log_wind_profile_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__atmosphere__log_wind_profile, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *log_wind_profile_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_transpiration_method_transp_from_layer(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::ET::transpiration_method *arg1 = (cmf::upslope::ET::transpiration_method *) 0 ; + cmf::upslope::SoilLayer::ptr arg2 ; + cmf::math::Time arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "arg2",(char *) "t", NULL + }; + double result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:transpiration_method_transp_from_layer",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__ET__transpiration_method, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "transpiration_method_transp_from_layer" "', argument " "1"" of type '" "cmf::upslope::ET::transpiration_method *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::transpiration_method * >(argp1); + { + int newmem = 0; + res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 , &newmem); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "transpiration_method_transp_from_layer" "', argument " "2"" of type '" "cmf::upslope::SoilLayer::ptr""'"); + } + if (argp2) arg2 = *(reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp2)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp2); + } + { + arg3 = convert_datetime_to_cmftime(obj2); + if (arg3 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } + } + { + try { + result = (double)(arg1)->transp_from_layer(arg2,arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_transpiration_method(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::ET::transpiration_method *arg1 = (cmf::upslope::ET::transpiration_method *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__transpiration_method, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_transpiration_method" "', argument " "1"" of type '" "cmf::upslope::ET::transpiration_method *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::transpiration_method * >(argp1); + { + try { + delete arg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *transpiration_method_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__ET__transpiration_method, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_soil_evaporation_method_evap_from_layer(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::ET::soil_evaporation_method *arg1 = (cmf::upslope::ET::soil_evaporation_method *) 0 ; + cmf::upslope::SoilLayer::ptr arg2 ; + cmf::math::Time arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "arg2",(char *) "t", NULL + }; + double result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:soil_evaporation_method_evap_from_layer",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__ET__soil_evaporation_method, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "soil_evaporation_method_evap_from_layer" "', argument " "1"" of type '" "cmf::upslope::ET::soil_evaporation_method *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::soil_evaporation_method * >(argp1); + { + int newmem = 0; + res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 , &newmem); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "soil_evaporation_method_evap_from_layer" "', argument " "2"" of type '" "cmf::upslope::SoilLayer::ptr""'"); + } + if (argp2) arg2 = *(reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp2)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp2); + } + { + arg3 = convert_datetime_to_cmftime(obj2); + if (arg3 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } + } + { + try { + result = (double)(arg1)->evap_from_layer(arg2,arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_soil_evaporation_method(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::ET::soil_evaporation_method *arg1 = (cmf::upslope::ET::soil_evaporation_method *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__soil_evaporation_method, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_soil_evaporation_method" "', argument " "1"" of type '" "cmf::upslope::ET::soil_evaporation_method *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::soil_evaporation_method * >(argp1); + { + try { + delete arg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *soil_evaporation_method_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__ET__soil_evaporation_method, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_surface_water_evaporation_method_evap_from_openwater(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::ET::surface_water_evaporation_method *arg1 = (cmf::upslope::ET::surface_water_evaporation_method *) 0 ; + cmf::river::OpenWaterStorage::ptr arg2 ; + cmf::math::Time arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "arg2",(char *) "arg3", NULL + }; + double result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:surface_water_evaporation_method_evap_from_openwater",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__ET__surface_water_evaporation_method, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "surface_water_evaporation_method_evap_from_openwater" "', argument " "1"" of type '" "cmf::upslope::ET::surface_water_evaporation_method *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::surface_water_evaporation_method * >(argp1); + { + int newmem = 0; + res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__river__OpenWaterStorage_t, 0 , &newmem); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "surface_water_evaporation_method_evap_from_openwater" "', argument " "2"" of type '" "cmf::river::OpenWaterStorage::ptr""'"); + } + if (argp2) arg2 = *(reinterpret_cast< cmf::river::OpenWaterStorage::ptr * >(argp2)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::river::OpenWaterStorage::ptr * >(argp2); + } + { + arg3 = convert_datetime_to_cmftime(obj2); + if (arg3 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } + } + { + try { + result = (double)(arg1)->evap_from_openwater(arg2,arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_surface_water_evaporation_method(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::ET::surface_water_evaporation_method *arg1 = (cmf::upslope::ET::surface_water_evaporation_method *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__surface_water_evaporation_method, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_surface_water_evaporation_method" "', argument " "1"" of type '" "cmf::upslope::ET::surface_water_evaporation_method *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::surface_water_evaporation_method * >(argp1); + { + try { + delete arg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *surface_water_evaporation_method_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__ET__surface_water_evaporation_method, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_canopy_evaporation_method_evap_from_canopy(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::ET::canopy_evaporation_method *arg1 = (cmf::upslope::ET::canopy_evaporation_method *) 0 ; + cmf::water::WaterStorage::ptr arg2 ; + cmf::math::Time arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "arg2",(char *) "arg3", NULL + }; + double result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:canopy_evaporation_method_evap_from_canopy",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__ET__canopy_evaporation_method, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "canopy_evaporation_method_evap_from_canopy" "', argument " "1"" of type '" "cmf::upslope::ET::canopy_evaporation_method *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::canopy_evaporation_method * >(argp1); + { + int newmem = 0; + res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0 , &newmem); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "canopy_evaporation_method_evap_from_canopy" "', argument " "2"" of type '" "cmf::water::WaterStorage::ptr""'"); + } + if (argp2) arg2 = *(reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp2)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp2); + } + { + arg3 = convert_datetime_to_cmftime(obj2); + if (arg3 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } + } + { + try { + result = (double)(arg1)->evap_from_canopy(arg2,arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_canopy_evaporation_method(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::ET::canopy_evaporation_method *arg1 = (cmf::upslope::ET::canopy_evaporation_method *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__canopy_evaporation_method, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_canopy_evaporation_method" "', argument " "1"" of type '" "cmf::upslope::ET::canopy_evaporation_method *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::canopy_evaporation_method * >(argp1); + { + try { + delete arg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *canopy_evaporation_method_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__ET__canopy_evaporation_method, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_snow_evaporation_method_evap_from_snow(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::ET::snow_evaporation_method *arg1 = (cmf::upslope::ET::snow_evaporation_method *) 0 ; + cmf::water::WaterStorage::ptr arg2 ; + cmf::math::Time arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "snow",(char *) "t", NULL + }; + double result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:snow_evaporation_method_evap_from_snow",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__ET__snow_evaporation_method, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "snow_evaporation_method_evap_from_snow" "', argument " "1"" of type '" "cmf::upslope::ET::snow_evaporation_method *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::snow_evaporation_method * >(argp1); + { + int newmem = 0; + res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0 , &newmem); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "snow_evaporation_method_evap_from_snow" "', argument " "2"" of type '" "cmf::water::WaterStorage::ptr""'"); + } + if (argp2) arg2 = *(reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp2)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp2); + } + { + arg3 = convert_datetime_to_cmftime(obj2); + if (arg3 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } + } + { + try { + result = (double)(arg1)->evap_from_snow(arg2,arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_snow_evaporation_method(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::ET::snow_evaporation_method *arg1 = (cmf::upslope::ET::snow_evaporation_method *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__snow_evaporation_method, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_snow_evaporation_method" "', argument " "1"" of type '" "cmf::upslope::ET::snow_evaporation_method *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::snow_evaporation_method * >(argp1); + { + try { + delete arg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *snow_evaporation_method_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__ET__snow_evaporation_method, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_transpiration(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::SoilLayer::ptr arg1 ; + cmf::water::flux_node::ptr arg2 ; + SwigValueWrapper< std::shared_ptr< cmf::upslope::ET::transpiration_method > > arg3 ; + std::string arg4 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + void *argp3 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + char * kwnames[] = { + (char *) "source",(char *) "ET_target",(char *) "_method",(char *) "method_name", NULL + }; + cmf::upslope::ET::transpiration *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO:new_transpiration",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_transpiration" "', argument " "1"" of type '" "cmf::upslope::SoilLayer::ptr""'"); + } + if (argp1) arg1 = *(reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp1)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp1); + } + { + int newmem = 0; + res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_transpiration" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); + } + if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); + } + { + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__ET__transpiration_method_t, 0 | 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_transpiration" "', argument " "3"" of type '" "std::shared_ptr< cmf::upslope::ET::transpiration_method >""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_transpiration" "', argument " "3"" of type '" "std::shared_ptr< cmf::upslope::ET::transpiration_method >""'"); + } else { + std::shared_ptr< cmf::upslope::ET::transpiration_method > * temp = reinterpret_cast< std::shared_ptr< cmf::upslope::ET::transpiration_method > * >(argp3); + arg3 = *temp; + if (SWIG_IsNewObj(res3)) delete temp; + } + } + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string(obj3, &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "new_transpiration" "', argument " "4"" of type '" "std::string""'"); + } + arg4 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + { + try { + result = (cmf::upslope::ET::transpiration *)new cmf::upslope::ET::transpiration(arg1,arg2,arg3,arg4); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__ET__transpiration, SWIG_POINTER_NEW | 0 ); + + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_transpiration(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::ET::transpiration *arg1 = (cmf::upslope::ET::transpiration *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__transpiration, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_transpiration" "', argument " "1"" of type '" "cmf::upslope::ET::transpiration *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::transpiration * >(argp1); + { + try { + + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *transpiration_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__ET__transpiration, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *transpiration_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_new_soil_evaporation(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::SoilLayer::ptr arg1 ; + cmf::water::flux_node::ptr arg2 ; + SwigValueWrapper< std::shared_ptr< cmf::upslope::ET::soil_evaporation_method > > arg3 ; + std::string arg4 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + void *argp3 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + char * kwnames[] = { + (char *) "source",(char *) "ET_target",(char *) "_method",(char *) "method_name", NULL + }; + cmf::upslope::ET::soil_evaporation *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO:new_soil_evaporation",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_soil_evaporation" "', argument " "1"" of type '" "cmf::upslope::SoilLayer::ptr""'"); + } + if (argp1) arg1 = *(reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp1)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp1); + } + { + int newmem = 0; + res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_soil_evaporation" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); + } + if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); + } + { + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__ET__soil_evaporation_method_t, 0 | 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_soil_evaporation" "', argument " "3"" of type '" "std::shared_ptr< cmf::upslope::ET::soil_evaporation_method >""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_soil_evaporation" "', argument " "3"" of type '" "std::shared_ptr< cmf::upslope::ET::soil_evaporation_method >""'"); + } else { + std::shared_ptr< cmf::upslope::ET::soil_evaporation_method > * temp = reinterpret_cast< std::shared_ptr< cmf::upslope::ET::soil_evaporation_method > * >(argp3); + arg3 = *temp; + if (SWIG_IsNewObj(res3)) delete temp; + } + } + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string(obj3, &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "new_soil_evaporation" "', argument " "4"" of type '" "std::string""'"); + } + arg4 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + { + try { + result = (cmf::upslope::ET::soil_evaporation *)new cmf::upslope::ET::soil_evaporation(arg1,arg2,arg3,arg4); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__ET__soil_evaporation, SWIG_POINTER_NEW | 0 ); + + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_soil_evaporation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::ET::soil_evaporation *arg1 = (cmf::upslope::ET::soil_evaporation *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__soil_evaporation, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_soil_evaporation" "', argument " "1"" of type '" "cmf::upslope::ET::soil_evaporation *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::soil_evaporation * >(argp1); + { + try { + + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *soil_evaporation_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__ET__soil_evaporation, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *soil_evaporation_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_new_canopy_evaporation(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::WaterStorage::ptr arg1 ; + cmf::water::flux_node::ptr arg2 ; + SwigValueWrapper< std::shared_ptr< cmf::upslope::ET::canopy_evaporation_method > > arg3 ; + std::string arg4 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + void *argp3 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + char * kwnames[] = { + (char *) "source",(char *) "ET_target",(char *) "_method",(char *) "method_name", NULL + }; + cmf::upslope::ET::canopy_evaporation *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO:new_canopy_evaporation",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_canopy_evaporation" "', argument " "1"" of type '" "cmf::water::WaterStorage::ptr""'"); + } + if (argp1) arg1 = *(reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp1)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp1); + } + { + int newmem = 0; + res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_canopy_evaporation" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); + } + if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); + } + { + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__ET__canopy_evaporation_method_t, 0 | 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_canopy_evaporation" "', argument " "3"" of type '" "std::shared_ptr< cmf::upslope::ET::canopy_evaporation_method >""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_canopy_evaporation" "', argument " "3"" of type '" "std::shared_ptr< cmf::upslope::ET::canopy_evaporation_method >""'"); + } else { + std::shared_ptr< cmf::upslope::ET::canopy_evaporation_method > * temp = reinterpret_cast< std::shared_ptr< cmf::upslope::ET::canopy_evaporation_method > * >(argp3); + arg3 = *temp; + if (SWIG_IsNewObj(res3)) delete temp; + } + } + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string(obj3, &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "new_canopy_evaporation" "', argument " "4"" of type '" "std::string""'"); + } + arg4 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + { + try { + result = (cmf::upslope::ET::canopy_evaporation *)new cmf::upslope::ET::canopy_evaporation(arg1,arg2,arg3,arg4); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__ET__canopy_evaporation, SWIG_POINTER_NEW | 0 ); + + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_canopy_evaporation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::ET::canopy_evaporation *arg1 = (cmf::upslope::ET::canopy_evaporation *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__canopy_evaporation, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_canopy_evaporation" "', argument " "1"" of type '" "cmf::upslope::ET::canopy_evaporation *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::canopy_evaporation * >(argp1); + { + try { + + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *canopy_evaporation_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__ET__canopy_evaporation, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *canopy_evaporation_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_new_snow_evaporation(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::WaterStorage::ptr arg1 ; + cmf::water::flux_node::ptr arg2 ; + SwigValueWrapper< std::shared_ptr< cmf::upslope::ET::snow_evaporation_method > > arg3 ; + std::string arg4 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + void *argp3 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + char * kwnames[] = { + (char *) "source",(char *) "ET_target",(char *) "_method",(char *) "method_name", NULL + }; + cmf::upslope::ET::snow_evaporation *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO:new_snow_evaporation",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_snow_evaporation" "', argument " "1"" of type '" "cmf::water::WaterStorage::ptr""'"); + } + if (argp1) arg1 = *(reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp1)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp1); + } + { + int newmem = 0; + res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_snow_evaporation" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); + } + if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); + } + { + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__ET__snow_evaporation_method_t, 0 | 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_snow_evaporation" "', argument " "3"" of type '" "std::shared_ptr< cmf::upslope::ET::snow_evaporation_method >""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_snow_evaporation" "', argument " "3"" of type '" "std::shared_ptr< cmf::upslope::ET::snow_evaporation_method >""'"); + } else { + std::shared_ptr< cmf::upslope::ET::snow_evaporation_method > * temp = reinterpret_cast< std::shared_ptr< cmf::upslope::ET::snow_evaporation_method > * >(argp3); + arg3 = *temp; + if (SWIG_IsNewObj(res3)) delete temp; + } + } + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string(obj3, &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "new_snow_evaporation" "', argument " "4"" of type '" "std::string""'"); + } + arg4 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + { + try { + result = (cmf::upslope::ET::snow_evaporation *)new cmf::upslope::ET::snow_evaporation(arg1,arg2,arg3,arg4); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__ET__snow_evaporation, SWIG_POINTER_NEW | 0 ); + + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_snow_evaporation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::ET::snow_evaporation *arg1 = (cmf::upslope::ET::snow_evaporation *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__snow_evaporation, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_snow_evaporation" "', argument " "1"" of type '" "cmf::upslope::ET::snow_evaporation *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::snow_evaporation * >(argp1); + { + try { + + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *snow_evaporation_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__ET__snow_evaporation, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *snow_evaporation_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_new_surface_water_evaporation(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::river::OpenWaterStorage::ptr arg1 ; + cmf::water::flux_node::ptr arg2 ; + SwigValueWrapper< std::shared_ptr< cmf::upslope::ET::surface_water_evaporation_method > > arg3 ; + std::string arg4 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + void *argp3 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + char * kwnames[] = { + (char *) "source",(char *) "ET_target",(char *) "_method",(char *) "method_name", NULL + }; + cmf::upslope::ET::surface_water_evaporation *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO:new_surface_water_evaporation",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__river__OpenWaterStorage_t, 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_surface_water_evaporation" "', argument " "1"" of type '" "cmf::river::OpenWaterStorage::ptr""'"); + } + if (argp1) arg1 = *(reinterpret_cast< cmf::river::OpenWaterStorage::ptr * >(argp1)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::river::OpenWaterStorage::ptr * >(argp1); + } + { + int newmem = 0; + res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_surface_water_evaporation" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); + } + if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); + } + { + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__ET__surface_water_evaporation_method_t, 0 | 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_surface_water_evaporation" "', argument " "3"" of type '" "std::shared_ptr< cmf::upslope::ET::surface_water_evaporation_method >""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_surface_water_evaporation" "', argument " "3"" of type '" "std::shared_ptr< cmf::upslope::ET::surface_water_evaporation_method >""'"); + } else { + std::shared_ptr< cmf::upslope::ET::surface_water_evaporation_method > * temp = reinterpret_cast< std::shared_ptr< cmf::upslope::ET::surface_water_evaporation_method > * >(argp3); + arg3 = *temp; + if (SWIG_IsNewObj(res3)) delete temp; + } + } + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string(obj3, &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "new_surface_water_evaporation" "', argument " "4"" of type '" "std::string""'"); + } + arg4 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + { + try { + result = (cmf::upslope::ET::surface_water_evaporation *)new cmf::upslope::ET::surface_water_evaporation(arg1,arg2,arg3,arg4); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__ET__surface_water_evaporation, SWIG_POINTER_NEW | 0 ); + + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_surface_water_evaporation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::ET::surface_water_evaporation *arg1 = (cmf::upslope::ET::surface_water_evaporation *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__surface_water_evaporation, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_surface_water_evaporation" "', argument " "1"" of type '" "cmf::upslope::ET::surface_water_evaporation *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::surface_water_evaporation * >(argp1); + { + try { + + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *surface_water_evaporation_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__ET__surface_water_evaporation, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *surface_water_evaporation_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_PenmanMonteith__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + real arg1 ; + real arg2 ; + real arg3 ; + real arg4 ; + real arg5 ; + double val1 ; + int ecode1 = 0 ; + double val2 ; + int ecode2 = 0 ; + double val3 ; + int ecode3 = 0 ; + double val4 ; + int ecode4 = 0 ; + double val5 ; + int ecode5 = 0 ; + real result; + + if ((nobjs < 5) || (nobjs > 5)) SWIG_fail; + ecode1 = SWIG_AsVal_double(swig_obj[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "PenmanMonteith" "', argument " "1"" of type '" "real""'"); + } + arg1 = static_cast< real >(val1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "PenmanMonteith" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "PenmanMonteith" "', argument " "3"" of type '" "real""'"); + } + arg3 = static_cast< real >(val3); + ecode4 = SWIG_AsVal_double(swig_obj[3], &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "PenmanMonteith" "', argument " "4"" of type '" "real""'"); + } + arg4 = static_cast< real >(val4); + ecode5 = SWIG_AsVal_double(swig_obj[4], &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "PenmanMonteith" "', argument " "5"" of type '" "real""'"); + } + arg5 = static_cast< real >(val5); + { + try { + result = (real)cmf::upslope::ET::PenmanMonteith(arg1,arg2,arg3,arg4,arg5); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_PenmanMonteith__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::atmosphere::Weather arg1 ; + cmf::upslope::vegetation::Vegetation *arg2 = 0 ; + double arg3 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + double val3 ; + int ecode3 = 0 ; + real result; + + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + { + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_cmf__atmosphere__Weather, 0 | 0); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PenmanMonteith" "', argument " "1"" of type '" "cmf::atmosphere::Weather""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "PenmanMonteith" "', argument " "1"" of type '" "cmf::atmosphere::Weather""'"); + } else { + cmf::atmosphere::Weather * temp = reinterpret_cast< cmf::atmosphere::Weather * >(argp1); + arg1 = *temp; + if (SWIG_IsNewObj(res1)) delete temp; + } + } + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_cmf__upslope__vegetation__Vegetation, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "PenmanMonteith" "', argument " "2"" of type '" "cmf::upslope::vegetation::Vegetation const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "PenmanMonteith" "', argument " "2"" of type '" "cmf::upslope::vegetation::Vegetation const &""'"); + } + arg2 = reinterpret_cast< cmf::upslope::vegetation::Vegetation * >(argp2); + ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "PenmanMonteith" "', argument " "3"" of type '" "double""'"); + } + arg3 = static_cast< double >(val3); + { + try { + result = (real)cmf::upslope::ET::PenmanMonteith(arg1,(cmf::upslope::vegetation::Vegetation const &)*arg2,arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_PenmanMonteith(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[6] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"PenmanMonteith",0,5,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_cmf__atmosphere__Weather, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_cmf__upslope__vegetation__Vegetation, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_double(argv[2], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 5) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + { + int res = SWIG_AsVal_double(argv[0], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_double(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_double(argv[2], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_double(argv[3], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_double(argv[4], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_PenmanMonteith__SWIG_1(self, argc, argv); + case 2: + return _wrap_PenmanMonteith__SWIG_0(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'PenmanMonteith'.\n" + " Possible C/C++ prototypes are:\n" + " cmf::upslope::ET::PenmanMonteith(real,real,real,real,real)\n" + " cmf::upslope::ET::PenmanMonteith(cmf::atmosphere::Weather,cmf::upslope::vegetation::Vegetation const &,double)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_stressedET_set_stressfunction(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::ET::stressedET *arg1 = (cmf::upslope::ET::stressedET *) 0 ; + cmf::upslope::ET::RootUptakeStessFunction *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "stressfunction", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:stressedET_set_stressfunction",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__ET__stressedET, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "stressedET_set_stressfunction" "', argument " "1"" of type '" "cmf::upslope::ET::stressedET *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::stressedET * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_cmf__upslope__ET__RootUptakeStessFunction, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "stressedET_set_stressfunction" "', argument " "2"" of type '" "cmf::upslope::ET::RootUptakeStessFunction const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "stressedET_set_stressfunction" "', argument " "2"" of type '" "cmf::upslope::ET::RootUptakeStessFunction const &""'"); + } + arg2 = reinterpret_cast< cmf::upslope::ET::RootUptakeStessFunction * >(argp2); + { + try { + (arg1)->set_stressfunction((cmf::upslope::ET::RootUptakeStessFunction const &)*arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_stressedET_get_layer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::ET::stressedET *arg1 = (cmf::upslope::ET::stressedET *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::upslope::SoilLayer::ptr result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__stressedET, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "stressedET_get_layer" "', argument " "1"" of type '" "cmf::upslope::ET::stressedET const *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::stressedET * >(argp1); + { + try { + result = ((cmf::upslope::ET::stressedET const *)arg1)->get_layer(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + std::shared_ptr< cmf::upslope::SoilLayer > *smartresult = result ? new std::shared_ptr< cmf::upslope::SoilLayer >(result) : 0; + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, SWIG_POINTER_OWN); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_stressedET_ETpot(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::ET::stressedET *arg1 = (cmf::upslope::ET::stressedET *) 0 ; + cmf::math::Time arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "t", NULL + }; + real result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:stressedET_ETpot",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__ET__stressedET, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "stressedET_ETpot" "', argument " "1"" of type '" "cmf::upslope::ET::stressedET const *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::stressedET * >(argp1); + { + arg2 = convert_datetime_to_cmftime(obj1); + if (arg2 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } + } + { + try { + result = (real)((cmf::upslope::ET::stressedET const *)arg1)->ETpot(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_stressedET(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::ET::stressedET *arg1 = (cmf::upslope::ET::stressedET *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__stressedET, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_stressedET" "', argument " "1"" of type '" "cmf::upslope::ET::stressedET *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::stressedET * >(argp1); + { + try { + + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *stressedET_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__ET__stressedET, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_constantETpot_ETpot_value_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::ET::constantETpot *arg1 = (cmf::upslope::ET::constantETpot *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"constantETpot_ETpot_value_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__constantETpot, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "constantETpot_ETpot_value_set" "', argument " "1"" of type '" "cmf::upslope::ET::constantETpot *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::constantETpot * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "constantETpot_ETpot_value_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->ETpot_value = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_constantETpot_ETpot_value_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::ET::constantETpot *arg1 = (cmf::upslope::ET::constantETpot *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__constantETpot, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "constantETpot_ETpot_value_get" "', argument " "1"" of type '" "cmf::upslope::ET::constantETpot *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::constantETpot * >(argp1); + result = (real) ((arg1)->ETpot_value); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_constantETpot_GetETpot(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::ET::constantETpot *arg1 = (cmf::upslope::ET::constantETpot *) 0 ; + cmf::math::Time arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "t", NULL + }; + real result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:constantETpot_GetETpot",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__upslope__ET__constantETpot, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "constantETpot_GetETpot" "', argument " "1"" of type '" "cmf::upslope::ET::constantETpot const *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::constantETpot * >(argp1); + { + arg2 = convert_datetime_to_cmftime(obj1); + if (arg2 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } + } + { + try { + result = (real)((cmf::upslope::ET::constantETpot const *)arg1)->GetETpot(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_constantETpot(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::SoilLayer::ptr arg1 ; + cmf::water::flux_node::ptr arg2 ; + double arg3 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + double val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "source",(char *) "ET_target",(char *) "constantETpot_value", NULL + }; + cmf::upslope::ET::constantETpot *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:new_constantETpot",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_constantETpot" "', argument " "1"" of type '" "cmf::upslope::SoilLayer::ptr""'"); + } + if (argp1) arg1 = *(reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp1)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp1); + } + { + int newmem = 0; + res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_constantETpot" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); + } + if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); + } + ecode3 = SWIG_AsVal_double(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_constantETpot" "', argument " "3"" of type '" "double""'"); + } + arg3 = static_cast< double >(val3); + { + try { + result = (cmf::upslope::ET::constantETpot *)new cmf::upslope::ET::constantETpot(arg1,arg2,arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__ET__constantETpot, SWIG_POINTER_NEW | 0 ); + + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_constantETpot(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::ET::constantETpot *arg1 = (cmf::upslope::ET::constantETpot *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__constantETpot, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_constantETpot" "', argument " "1"" of type '" "cmf::upslope::ET::constantETpot *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::constantETpot * >(argp1); + { + try { + + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *constantETpot_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__ET__constantETpot, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *constantETpot_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_timeseriesETpot_ETpot_data_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::ET::timeseriesETpot *arg1 = (cmf::upslope::ET::timeseriesETpot *) 0 ; + cmf::math::timeseries *arg2 = (cmf::math::timeseries *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"timeseriesETpot_ETpot_data_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__timeseriesETpot, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseriesETpot_ETpot_data_set" "', argument " "1"" of type '" "cmf::upslope::ET::timeseriesETpot *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::timeseriesETpot * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "timeseriesETpot_ETpot_data_set" "', argument " "2"" of type '" "cmf::math::timeseries *""'"); + } + arg2 = reinterpret_cast< cmf::math::timeseries * >(argp2); + if (arg1) (arg1)->ETpot_data = *arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_timeseriesETpot_ETpot_data_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::ET::timeseriesETpot *arg1 = (cmf::upslope::ET::timeseriesETpot *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::math::timeseries *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__timeseriesETpot, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "timeseriesETpot_ETpot_data_get" "', argument " "1"" of type '" "cmf::upslope::ET::timeseriesETpot *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::timeseriesETpot * >(argp1); + result = (cmf::math::timeseries *)& ((arg1)->ETpot_data); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__timeseries, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_timeseriesETpot(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::SoilLayer::ptr arg1 ; + cmf::water::flux_node::ptr arg2 ; + cmf::math::timeseries arg3 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "source",(char *) "ET_target",(char *) "ETpot_values", NULL + }; + cmf::upslope::ET::timeseriesETpot *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:new_timeseriesETpot",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_timeseriesETpot" "', argument " "1"" of type '" "cmf::upslope::SoilLayer::ptr""'"); + } + if (argp1) arg1 = *(reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp1)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp1); + } + { + int newmem = 0; + res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_timeseriesETpot" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); + } + if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); + } + { + cmf::math::timeseries *p_ts = &arg3; + int res=SWIG_ConvertPtr(obj2,(void**)(&p_ts),SWIGTYPE_p_cmf__math__timeseries,0); + if (!(SWIG_IsOK(res)) || p_ts==0) { + if (PyNumber_Check(obj2)) { + double scalar = PyFloat_AsDouble(obj2); + arg3 = cmf::math::timeseries::from_scalar(scalar); + } else { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.timeseries object"); + } + } else { + arg3 = *p_ts; + } + } + { + try { + result = (cmf::upslope::ET::timeseriesETpot *)new cmf::upslope::ET::timeseriesETpot(arg1,arg2,arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__ET__timeseriesETpot, SWIG_POINTER_NEW | 0 ); + + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_timeseriesETpot(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::ET::timeseriesETpot *arg1 = (cmf::upslope::ET::timeseriesETpot *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__timeseriesETpot, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_timeseriesETpot" "', argument " "1"" of type '" "cmf::upslope::ET::timeseriesETpot *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::timeseriesETpot * >(argp1); + { + try { + + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *timeseriesETpot_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__ET__timeseriesETpot, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *timeseriesETpot_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_PenmanMonteithET_daily_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::ET::PenmanMonteithET *arg1 = (cmf::upslope::ET::PenmanMonteithET *) 0 ; + bool arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"PenmanMonteithET_daily_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__PenmanMonteithET, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PenmanMonteithET_daily_set" "', argument " "1"" of type '" "cmf::upslope::ET::PenmanMonteithET *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::PenmanMonteithET * >(argp1); + ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "PenmanMonteithET_daily_set" "', argument " "2"" of type '" "bool""'"); + } + arg2 = static_cast< bool >(val2); + if (arg1) (arg1)->daily = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_PenmanMonteithET_daily_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::ET::PenmanMonteithET *arg1 = (cmf::upslope::ET::PenmanMonteithET *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + bool result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__PenmanMonteithET, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PenmanMonteithET_daily_get" "', argument " "1"" of type '" "cmf::upslope::ET::PenmanMonteithET *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::PenmanMonteithET * >(argp1); + result = (bool) ((arg1)->daily); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_PenmanMonteithET(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::SoilLayer::ptr arg1 ; + cmf::water::flux_node::ptr arg2 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "source",(char *) "ET_target", NULL + }; + cmf::upslope::ET::PenmanMonteithET *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:new_PenmanMonteithET",kwnames,&obj0,&obj1)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_PenmanMonteithET" "', argument " "1"" of type '" "cmf::upslope::SoilLayer::ptr""'"); + } + if (argp1) arg1 = *(reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp1)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp1); + } + { + int newmem = 0; + res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_PenmanMonteithET" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); + } + if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); + } + { + try { + result = (cmf::upslope::ET::PenmanMonteithET *)new cmf::upslope::ET::PenmanMonteithET(arg1,arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__ET__PenmanMonteithET, SWIG_POINTER_NEW | 0 ); + + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_PenmanMonteithET_r_s(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::vegetation::Vegetation *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + char * kwnames[] = { + (char *) "veg", NULL + }; + real result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:PenmanMonteithET_r_s",kwnames,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_cmf__upslope__vegetation__Vegetation, 0 | 0); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PenmanMonteithET_r_s" "', argument " "1"" of type '" "cmf::upslope::vegetation::Vegetation const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "PenmanMonteithET_r_s" "', argument " "1"" of type '" "cmf::upslope::vegetation::Vegetation const &""'"); + } + arg1 = reinterpret_cast< cmf::upslope::vegetation::Vegetation * >(argp1); + { + try { + result = (real)cmf::upslope::ET::PenmanMonteithET::r_s((cmf::upslope::vegetation::Vegetation const &)*arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_PenmanMonteithET_r_a(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::atmosphere::Weather arg1 ; + real arg2 ; + void *argp1 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "A",(char *) "veg_height", NULL + }; + real result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PenmanMonteithET_r_a",kwnames,&obj0,&obj1)) SWIG_fail; + { + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_cmf__atmosphere__Weather, 0 | 0); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PenmanMonteithET_r_a" "', argument " "1"" of type '" "cmf::atmosphere::Weather""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "PenmanMonteithET_r_a" "', argument " "1"" of type '" "cmf::atmosphere::Weather""'"); + } else { + cmf::atmosphere::Weather * temp = reinterpret_cast< cmf::atmosphere::Weather * >(argp1); + arg1 = *temp; + if (SWIG_IsNewObj(res1)) delete temp; + } + } + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "PenmanMonteithET_r_a" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + { + try { + result = (real)cmf::upslope::ET::PenmanMonteithET::r_a(arg1,arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_PenmanMonteithET_use_for_cell(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::Cell *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + char * kwnames[] = { + (char *) "cell", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:PenmanMonteithET_use_for_cell",kwnames,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_cmf__upslope__Cell, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PenmanMonteithET_use_for_cell" "', argument " "1"" of type '" "cmf::upslope::Cell &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "PenmanMonteithET_use_for_cell" "', argument " "1"" of type '" "cmf::upslope::Cell &""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); + { + try { + cmf::upslope::ET::PenmanMonteithET::use_for_cell(*arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_PenmanMonteithET(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::ET::PenmanMonteithET *arg1 = (cmf::upslope::ET::PenmanMonteithET *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__PenmanMonteithET, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_PenmanMonteithET" "', argument " "1"" of type '" "cmf::upslope::ET::PenmanMonteithET *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::PenmanMonteithET * >(argp1); + { + try { + + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *PenmanMonteithET_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__ET__PenmanMonteithET, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *PenmanMonteithET_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_PriestleyTaylorET_daily_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::ET::PriestleyTaylorET *arg1 = (cmf::upslope::ET::PriestleyTaylorET *) 0 ; + bool arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"PriestleyTaylorET_daily_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__PriestleyTaylorET, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PriestleyTaylorET_daily_set" "', argument " "1"" of type '" "cmf::upslope::ET::PriestleyTaylorET *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::PriestleyTaylorET * >(argp1); + ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "PriestleyTaylorET_daily_set" "', argument " "2"" of type '" "bool""'"); + } + arg2 = static_cast< bool >(val2); + if (arg1) (arg1)->daily = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_PriestleyTaylorET_daily_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::ET::PriestleyTaylorET *arg1 = (cmf::upslope::ET::PriestleyTaylorET *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + bool result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__PriestleyTaylorET, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PriestleyTaylorET_daily_get" "', argument " "1"" of type '" "cmf::upslope::ET::PriestleyTaylorET *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::PriestleyTaylorET * >(argp1); + result = (bool) ((arg1)->daily); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_PriestleyTaylorET_alpha_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::ET::PriestleyTaylorET *arg1 = (cmf::upslope::ET::PriestleyTaylorET *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"PriestleyTaylorET_alpha_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__PriestleyTaylorET, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PriestleyTaylorET_alpha_set" "', argument " "1"" of type '" "cmf::upslope::ET::PriestleyTaylorET *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::PriestleyTaylorET * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "PriestleyTaylorET_alpha_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->alpha = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_PriestleyTaylorET_alpha_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::ET::PriestleyTaylorET *arg1 = (cmf::upslope::ET::PriestleyTaylorET *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__PriestleyTaylorET, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PriestleyTaylorET_alpha_get" "', argument " "1"" of type '" "cmf::upslope::ET::PriestleyTaylorET *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::PriestleyTaylorET * >(argp1); + result = (real) ((arg1)->alpha); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_PriestleyTaylorET(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::SoilLayer::ptr arg1 ; + cmf::water::flux_node::ptr arg2 ; + real arg3 = (real) 1.26 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + double val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "source",(char *) "ET_target",(char *) "alpha", NULL + }; + cmf::upslope::ET::PriestleyTaylorET *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:new_PriestleyTaylorET",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_PriestleyTaylorET" "', argument " "1"" of type '" "cmf::upslope::SoilLayer::ptr""'"); + } + if (argp1) arg1 = *(reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp1)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp1); + } + { + int newmem = 0; + res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_PriestleyTaylorET" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); + } + if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); + } + if (obj2) { + ecode3 = SWIG_AsVal_double(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_PriestleyTaylorET" "', argument " "3"" of type '" "real""'"); + } + arg3 = static_cast< real >(val3); + } + { + try { + result = (cmf::upslope::ET::PriestleyTaylorET *)new cmf::upslope::ET::PriestleyTaylorET(arg1,arg2,arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__ET__PriestleyTaylorET, SWIG_POINTER_NEW | 0 ); + + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_PriestleyTaylorET_use_for_cell(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::Cell *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + char * kwnames[] = { + (char *) "cell", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:PriestleyTaylorET_use_for_cell",kwnames,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_cmf__upslope__Cell, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PriestleyTaylorET_use_for_cell" "', argument " "1"" of type '" "cmf::upslope::Cell &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "PriestleyTaylorET_use_for_cell" "', argument " "1"" of type '" "cmf::upslope::Cell &""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); + { + try { + cmf::upslope::ET::PriestleyTaylorET::use_for_cell(*arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_PriestleyTaylorET(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::ET::PriestleyTaylorET *arg1 = (cmf::upslope::ET::PriestleyTaylorET *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__PriestleyTaylorET, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_PriestleyTaylorET" "', argument " "1"" of type '" "cmf::upslope::ET::PriestleyTaylorET *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::PriestleyTaylorET * >(argp1); + { + try { + + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *PriestleyTaylorET_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__ET__PriestleyTaylorET, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *PriestleyTaylorET_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_new_HargreaveET(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::SoilLayer::ptr arg1 ; + cmf::water::flux_node::ptr arg2 ; + real arg3 = (real) 51.0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + double val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "source",(char *) "ET_target",(char *) "latitude", NULL + }; + cmf::upslope::ET::HargreaveET *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:new_HargreaveET",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_HargreaveET" "', argument " "1"" of type '" "cmf::upslope::SoilLayer::ptr""'"); + } + if (argp1) arg1 = *(reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp1)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp1); + } + { + int newmem = 0; + res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_HargreaveET" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); + } + if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); + } + if (obj2) { + ecode3 = SWIG_AsVal_double(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_HargreaveET" "', argument " "3"" of type '" "real""'"); + } + arg3 = static_cast< real >(val3); + } + { + try { + result = (cmf::upslope::ET::HargreaveET *)new cmf::upslope::ET::HargreaveET(arg1,arg2,arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__ET__HargreaveET, SWIG_POINTER_NEW | 0 ); + + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_HargreaveET_lat_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::ET::HargreaveET *arg1 = (cmf::upslope::ET::HargreaveET *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"HargreaveET_lat_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__HargreaveET, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HargreaveET_lat_set" "', argument " "1"" of type '" "cmf::upslope::ET::HargreaveET *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::HargreaveET * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HargreaveET_lat_set" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + if (arg1) (arg1)->lat = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_HargreaveET_lat_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::ET::HargreaveET *arg1 = (cmf::upslope::ET::HargreaveET *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + real result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__HargreaveET, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HargreaveET_lat_get" "', argument " "1"" of type '" "cmf::upslope::ET::HargreaveET *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::HargreaveET * >(argp1); + result = (real) ((arg1)->lat); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_HargreaveET_use_for_cell(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::Cell *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + char * kwnames[] = { + (char *) "cell", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:HargreaveET_use_for_cell",kwnames,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_cmf__upslope__Cell, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HargreaveET_use_for_cell" "', argument " "1"" of type '" "cmf::upslope::Cell &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HargreaveET_use_for_cell" "', argument " "1"" of type '" "cmf::upslope::Cell &""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); + { + try { + cmf::upslope::ET::HargreaveET::use_for_cell(*arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_HargreaveET(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::ET::HargreaveET *arg1 = (cmf::upslope::ET::HargreaveET *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__HargreaveET, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_HargreaveET" "', argument " "1"" of type '" "cmf::upslope::ET::HargreaveET *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::HargreaveET * >(argp1); + { + try { + + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *HargreaveET_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__ET__HargreaveET, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *HargreaveET_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_new_TurcET(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::SoilLayer::ptr arg1 ; + cmf::water::flux_node::ptr arg2 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "source",(char *) "ET_target", NULL + }; + cmf::upslope::ET::TurcET *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:new_TurcET",kwnames,&obj0,&obj1)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_TurcET" "', argument " "1"" of type '" "cmf::upslope::SoilLayer::ptr""'"); + } + if (argp1) arg1 = *(reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp1)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::upslope::SoilLayer::ptr * >(argp1); + } + { + int newmem = 0; + res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_TurcET" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); + } + if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); + } + { + try { + result = (cmf::upslope::ET::TurcET *)new cmf::upslope::ET::TurcET(arg1,arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__ET__TurcET, SWIG_POINTER_NEW | 0 ); + + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TurcET_use_for_cell(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::Cell *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + char * kwnames[] = { + (char *) "cell", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:TurcET_use_for_cell",kwnames,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_cmf__upslope__Cell, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TurcET_use_for_cell" "', argument " "1"" of type '" "cmf::upslope::Cell &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "TurcET_use_for_cell" "', argument " "1"" of type '" "cmf::upslope::Cell &""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); + { + try { + cmf::upslope::ET::TurcET::use_for_cell(*arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_TurcET(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::ET::TurcET *arg1 = (cmf::upslope::ET::TurcET *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__TurcET, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_TurcET" "', argument " "1"" of type '" "cmf::upslope::ET::TurcET *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::TurcET * >(argp1); + { + try { + + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *TurcET_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__ET__TurcET, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *TurcET_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_new_CanopyStorageEvaporation(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::water::WaterStorage::ptr arg1 ; + cmf::water::flux_node::ptr arg2 ; + cmf::upslope::Cell *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "CanopyStorage",(char *) "ET_target",(char *) "cell", NULL + }; + cmf::upslope::ET::CanopyStorageEvaporation *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:new_CanopyStorageEvaporation",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CanopyStorageEvaporation" "', argument " "1"" of type '" "cmf::water::WaterStorage::ptr""'"); + } + if (argp1) arg1 = *(reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp1)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp1); + } + { + int newmem = 0; + res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_CanopyStorageEvaporation" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); + } + if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); + } + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_cmf__upslope__Cell, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_CanopyStorageEvaporation" "', argument " "3"" of type '" "cmf::upslope::Cell &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CanopyStorageEvaporation" "', argument " "3"" of type '" "cmf::upslope::Cell &""'"); + } + arg3 = reinterpret_cast< cmf::upslope::Cell * >(argp3); + { + try { + result = (cmf::upslope::ET::CanopyStorageEvaporation *)new cmf::upslope::ET::CanopyStorageEvaporation(arg1,arg2,*arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__ET__CanopyStorageEvaporation, SWIG_POINTER_NEW | 0 ); + + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_CanopyStorageEvaporation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::ET::CanopyStorageEvaporation *arg1 = (cmf::upslope::ET::CanopyStorageEvaporation *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__CanopyStorageEvaporation, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CanopyStorageEvaporation" "', argument " "1"" of type '" "cmf::upslope::ET::CanopyStorageEvaporation *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::CanopyStorageEvaporation * >(argp1); + { + try { + + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *CanopyStorageEvaporation_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__ET__CanopyStorageEvaporation, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *CanopyStorageEvaporation_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_new_PenmanEvaporation(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::river::OpenWaterStorage::ptr arg1 ; + cmf::water::flux_node::ptr arg2 ; + cmf::atmosphere::Meteorology *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "source",(char *) "Evap_target",(char *) "meteo", NULL + }; + cmf::upslope::ET::PenmanEvaporation *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:new_PenmanEvaporation",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + { + int newmem = 0; + res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_cmf__river__OpenWaterStorage_t, 0 , &newmem); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_PenmanEvaporation" "', argument " "1"" of type '" "cmf::river::OpenWaterStorage::ptr""'"); + } + if (argp1) arg1 = *(reinterpret_cast< cmf::river::OpenWaterStorage::ptr * >(argp1)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::river::OpenWaterStorage::ptr * >(argp1); + } + { + int newmem = 0; + res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_PenmanEvaporation" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); + } + if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); + } + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_cmf__atmosphere__Meteorology, 0 | 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_PenmanEvaporation" "', argument " "3"" of type '" "cmf::atmosphere::Meteorology const &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PenmanEvaporation" "', argument " "3"" of type '" "cmf::atmosphere::Meteorology const &""'"); + } + arg3 = reinterpret_cast< cmf::atmosphere::Meteorology * >(argp3); + { + try { + result = (cmf::upslope::ET::PenmanEvaporation *)new cmf::upslope::ET::PenmanEvaporation(arg1,arg2,(cmf::atmosphere::Meteorology const &)*arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__ET__PenmanEvaporation, SWIG_POINTER_NEW | 0 ); + + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_PenmanEvaporation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::ET::PenmanEvaporation *arg1 = (cmf::upslope::ET::PenmanEvaporation *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__PenmanEvaporation, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_PenmanEvaporation" "', argument " "1"" of type '" "cmf::upslope::ET::PenmanEvaporation *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::PenmanEvaporation * >(argp1); + { + try { + + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *PenmanEvaporation_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__ET__PenmanEvaporation, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *PenmanEvaporation_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_ShuttleworthWallace_RAA_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::ET::ShuttleworthWallace *arg1 = (cmf::upslope::ET::ShuttleworthWallace *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"ShuttleworthWallace_RAA_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__ShuttleworthWallace, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShuttleworthWallace_RAA_set" "', argument " "1"" of type '" "cmf::upslope::ET::ShuttleworthWallace *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::ShuttleworthWallace * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShuttleworthWallace_RAA_set" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + if (arg1) (arg1)->RAA = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ShuttleworthWallace_RAA_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::ET::ShuttleworthWallace *arg1 = (cmf::upslope::ET::ShuttleworthWallace *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__ShuttleworthWallace, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShuttleworthWallace_RAA_get" "', argument " "1"" of type '" "cmf::upslope::ET::ShuttleworthWallace *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::ShuttleworthWallace * >(argp1); + result = (double) ((arg1)->RAA); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ShuttleworthWallace_RAC_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::ET::ShuttleworthWallace *arg1 = (cmf::upslope::ET::ShuttleworthWallace *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"ShuttleworthWallace_RAC_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__ShuttleworthWallace, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShuttleworthWallace_RAC_set" "', argument " "1"" of type '" "cmf::upslope::ET::ShuttleworthWallace *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::ShuttleworthWallace * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShuttleworthWallace_RAC_set" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + if (arg1) (arg1)->RAC = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ShuttleworthWallace_RAC_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::ET::ShuttleworthWallace *arg1 = (cmf::upslope::ET::ShuttleworthWallace *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__ShuttleworthWallace, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShuttleworthWallace_RAC_get" "', argument " "1"" of type '" "cmf::upslope::ET::ShuttleworthWallace *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::ShuttleworthWallace * >(argp1); + result = (double) ((arg1)->RAC); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ShuttleworthWallace_RAS_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::ET::ShuttleworthWallace *arg1 = (cmf::upslope::ET::ShuttleworthWallace *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"ShuttleworthWallace_RAS_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__ShuttleworthWallace, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShuttleworthWallace_RAS_set" "', argument " "1"" of type '" "cmf::upslope::ET::ShuttleworthWallace *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::ShuttleworthWallace * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShuttleworthWallace_RAS_set" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + if (arg1) (arg1)->RAS = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ShuttleworthWallace_RAS_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::ET::ShuttleworthWallace *arg1 = (cmf::upslope::ET::ShuttleworthWallace *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__ShuttleworthWallace, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShuttleworthWallace_RAS_get" "', argument " "1"" of type '" "cmf::upslope::ET::ShuttleworthWallace *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::ShuttleworthWallace * >(argp1); + result = (double) ((arg1)->RAS); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ShuttleworthWallace_RSS_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::ET::ShuttleworthWallace *arg1 = (cmf::upslope::ET::ShuttleworthWallace *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"ShuttleworthWallace_RSS_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__ShuttleworthWallace, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShuttleworthWallace_RSS_set" "', argument " "1"" of type '" "cmf::upslope::ET::ShuttleworthWallace *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::ShuttleworthWallace * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShuttleworthWallace_RSS_set" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + if (arg1) (arg1)->RSS = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ShuttleworthWallace_RSS_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::ET::ShuttleworthWallace *arg1 = (cmf::upslope::ET::ShuttleworthWallace *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__ShuttleworthWallace, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShuttleworthWallace_RSS_get" "', argument " "1"" of type '" "cmf::upslope::ET::ShuttleworthWallace *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::ShuttleworthWallace * >(argp1); + result = (double) ((arg1)->RSS); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ShuttleworthWallace_RSC_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::ET::ShuttleworthWallace *arg1 = (cmf::upslope::ET::ShuttleworthWallace *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"ShuttleworthWallace_RSC_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__ShuttleworthWallace, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShuttleworthWallace_RSC_set" "', argument " "1"" of type '" "cmf::upslope::ET::ShuttleworthWallace *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::ShuttleworthWallace * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShuttleworthWallace_RSC_set" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + if (arg1) (arg1)->RSC = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ShuttleworthWallace_RSC_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::ET::ShuttleworthWallace *arg1 = (cmf::upslope::ET::ShuttleworthWallace *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__ShuttleworthWallace, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShuttleworthWallace_RSC_get" "', argument " "1"" of type '" "cmf::upslope::ET::ShuttleworthWallace *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::ShuttleworthWallace * >(argp1); + result = (double) ((arg1)->RSC); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ShuttleworthWallace_refresh_counter_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::ET::ShuttleworthWallace *arg1 = (cmf::upslope::ET::ShuttleworthWallace *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"ShuttleworthWallace_refresh_counter_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__ShuttleworthWallace, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShuttleworthWallace_refresh_counter_set" "', argument " "1"" of type '" "cmf::upslope::ET::ShuttleworthWallace *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::ShuttleworthWallace * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShuttleworthWallace_refresh_counter_set" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->refresh_counter = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ShuttleworthWallace_refresh_counter_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::ET::ShuttleworthWallace *arg1 = (cmf::upslope::ET::ShuttleworthWallace *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__ShuttleworthWallace, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShuttleworthWallace_refresh_counter_get" "', argument " "1"" of type '" "cmf::upslope::ET::ShuttleworthWallace *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::ShuttleworthWallace * >(argp1); + result = (int) ((arg1)->refresh_counter); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ShuttleworthWallace_refresh__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::upslope::ET::ShuttleworthWallace *arg1 = (cmf::upslope::ET::ShuttleworthWallace *) 0 ; + cmf::math::Time arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__ShuttleworthWallace, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShuttleworthWallace_refresh" "', argument " "1"" of type '" "cmf::upslope::ET::ShuttleworthWallace *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::ShuttleworthWallace * >(argp1); + { + arg2 = convert_datetime_to_cmftime(swig_obj[1]); + if (arg2 == cmf::math::never) { + SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); + } + } + { + try { + (arg1)->refresh(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ShuttleworthWallace_refresh__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::upslope::ET::ShuttleworthWallace *arg1 = (cmf::upslope::ET::ShuttleworthWallace *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__ShuttleworthWallace, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShuttleworthWallace_refresh" "', argument " "1"" of type '" "cmf::upslope::ET::ShuttleworthWallace *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::ShuttleworthWallace * >(argp1); + { + try { + (arg1)->refresh(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ShuttleworthWallace_refresh(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"ShuttleworthWallace_refresh",0,2,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__upslope__ET__ShuttleworthWallace, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_cmf__upslope__ET__ShuttleworthWallace, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + _v = check_time(argv[1]); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_ShuttleworthWallace_refresh__SWIG_1(self, argc, argv); + case 2: + return _wrap_ShuttleworthWallace_refresh__SWIG_0(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'ShuttleworthWallace_refresh'.\n" + " Possible C/C++ prototypes are:\n" + " cmf::upslope::ET::ShuttleworthWallace::refresh(cmf::math::Time)\n" + " cmf::upslope::ET::ShuttleworthWallace::refresh()\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_ShuttleworthWallace_PTR_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::ET::ShuttleworthWallace *arg1 = (cmf::upslope::ET::ShuttleworthWallace *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"ShuttleworthWallace_PTR_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__ShuttleworthWallace, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShuttleworthWallace_PTR_set" "', argument " "1"" of type '" "cmf::upslope::ET::ShuttleworthWallace *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::ShuttleworthWallace * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShuttleworthWallace_PTR_set" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + if (arg1) (arg1)->PTR = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ShuttleworthWallace_PTR_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::ET::ShuttleworthWallace *arg1 = (cmf::upslope::ET::ShuttleworthWallace *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__ShuttleworthWallace, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShuttleworthWallace_PTR_get" "', argument " "1"" of type '" "cmf::upslope::ET::ShuttleworthWallace *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::ShuttleworthWallace * >(argp1); + result = (double) ((arg1)->PTR); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ShuttleworthWallace_PSNVP_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::ET::ShuttleworthWallace *arg1 = (cmf::upslope::ET::ShuttleworthWallace *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"ShuttleworthWallace_PSNVP_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__ShuttleworthWallace, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShuttleworthWallace_PSNVP_set" "', argument " "1"" of type '" "cmf::upslope::ET::ShuttleworthWallace *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::ShuttleworthWallace * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShuttleworthWallace_PSNVP_set" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + if (arg1) (arg1)->PSNVP = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ShuttleworthWallace_PSNVP_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::ET::ShuttleworthWallace *arg1 = (cmf::upslope::ET::ShuttleworthWallace *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__ShuttleworthWallace, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShuttleworthWallace_PSNVP_get" "', argument " "1"" of type '" "cmf::upslope::ET::ShuttleworthWallace *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::ShuttleworthWallace * >(argp1); + result = (double) ((arg1)->PSNVP); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ShuttleworthWallace_ASNVP_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::ET::ShuttleworthWallace *arg1 = (cmf::upslope::ET::ShuttleworthWallace *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"ShuttleworthWallace_ASNVP_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__ShuttleworthWallace, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShuttleworthWallace_ASNVP_set" "', argument " "1"" of type '" "cmf::upslope::ET::ShuttleworthWallace *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::ShuttleworthWallace * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShuttleworthWallace_ASNVP_set" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + if (arg1) (arg1)->ASNVP = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ShuttleworthWallace_ASNVP_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::ET::ShuttleworthWallace *arg1 = (cmf::upslope::ET::ShuttleworthWallace *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__ShuttleworthWallace, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShuttleworthWallace_ASNVP_get" "', argument " "1"" of type '" "cmf::upslope::ET::ShuttleworthWallace *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::ShuttleworthWallace * >(argp1); + result = (double) ((arg1)->ASNVP); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ShuttleworthWallace_GER_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::ET::ShuttleworthWallace *arg1 = (cmf::upslope::ET::ShuttleworthWallace *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"ShuttleworthWallace_GER_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__ShuttleworthWallace, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShuttleworthWallace_GER_set" "', argument " "1"" of type '" "cmf::upslope::ET::ShuttleworthWallace *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::ShuttleworthWallace * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShuttleworthWallace_GER_set" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + if (arg1) (arg1)->GER = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ShuttleworthWallace_GER_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::ET::ShuttleworthWallace *arg1 = (cmf::upslope::ET::ShuttleworthWallace *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__ShuttleworthWallace, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShuttleworthWallace_GER_get" "', argument " "1"" of type '" "cmf::upslope::ET::ShuttleworthWallace *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::ShuttleworthWallace * >(argp1); + result = (double) ((arg1)->GER); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ShuttleworthWallace_PIR_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::ET::ShuttleworthWallace *arg1 = (cmf::upslope::ET::ShuttleworthWallace *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"ShuttleworthWallace_PIR_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__ShuttleworthWallace, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShuttleworthWallace_PIR_set" "', argument " "1"" of type '" "cmf::upslope::ET::ShuttleworthWallace *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::ShuttleworthWallace * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShuttleworthWallace_PIR_set" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + if (arg1) (arg1)->PIR = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ShuttleworthWallace_PIR_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::ET::ShuttleworthWallace *arg1 = (cmf::upslope::ET::ShuttleworthWallace *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__ShuttleworthWallace, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShuttleworthWallace_PIR_get" "', argument " "1"" of type '" "cmf::upslope::ET::ShuttleworthWallace *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::ShuttleworthWallace * >(argp1); + result = (double) ((arg1)->PIR); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ShuttleworthWallace_AIR_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::ET::ShuttleworthWallace *arg1 = (cmf::upslope::ET::ShuttleworthWallace *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"ShuttleworthWallace_AIR_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__ShuttleworthWallace, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShuttleworthWallace_AIR_set" "', argument " "1"" of type '" "cmf::upslope::ET::ShuttleworthWallace *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::ShuttleworthWallace * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShuttleworthWallace_AIR_set" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + if (arg1) (arg1)->AIR = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ShuttleworthWallace_AIR_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::ET::ShuttleworthWallace *arg1 = (cmf::upslope::ET::ShuttleworthWallace *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__ShuttleworthWallace, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShuttleworthWallace_AIR_get" "', argument " "1"" of type '" "cmf::upslope::ET::ShuttleworthWallace *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::ShuttleworthWallace * >(argp1); + result = (double) ((arg1)->AIR); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ShuttleworthWallace_GIR_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::ET::ShuttleworthWallace *arg1 = (cmf::upslope::ET::ShuttleworthWallace *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"ShuttleworthWallace_GIR_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__ShuttleworthWallace, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShuttleworthWallace_GIR_set" "', argument " "1"" of type '" "cmf::upslope::ET::ShuttleworthWallace *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::ShuttleworthWallace * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShuttleworthWallace_GIR_set" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + if (arg1) (arg1)->GIR = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ShuttleworthWallace_GIR_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::ET::ShuttleworthWallace *arg1 = (cmf::upslope::ET::ShuttleworthWallace *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__ShuttleworthWallace, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShuttleworthWallace_GIR_get" "', argument " "1"" of type '" "cmf::upslope::ET::ShuttleworthWallace *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::ShuttleworthWallace * >(argp1); + result = (double) ((arg1)->GIR); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ShuttleworthWallace_ATR_sum_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::ET::ShuttleworthWallace *arg1 = (cmf::upslope::ET::ShuttleworthWallace *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"ShuttleworthWallace_ATR_sum_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__ShuttleworthWallace, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShuttleworthWallace_ATR_sum_set" "', argument " "1"" of type '" "cmf::upslope::ET::ShuttleworthWallace *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::ShuttleworthWallace * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShuttleworthWallace_ATR_sum_set" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + if (arg1) (arg1)->ATR_sum = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ShuttleworthWallace_ATR_sum_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::ET::ShuttleworthWallace *arg1 = (cmf::upslope::ET::ShuttleworthWallace *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__ShuttleworthWallace, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShuttleworthWallace_ATR_sum_get" "', argument " "1"" of type '" "cmf::upslope::ET::ShuttleworthWallace *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::ShuttleworthWallace * >(argp1); + result = (double) ((arg1)->ATR_sum); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ShuttleworthWallace_ATR_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::ET::ShuttleworthWallace *arg1 = (cmf::upslope::ET::ShuttleworthWallace *) 0 ; + cmf::math::num_array arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"ShuttleworthWallace_ATR_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__ShuttleworthWallace, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShuttleworthWallace_ATR_set" "', argument " "1"" of type '" "cmf::upslope::ET::ShuttleworthWallace *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::ShuttleworthWallace * >(argp1); + { + // Convert a array_wrapper from numpy array + double * data=0; + ptrdiff_t size = from_npy_array(swig_obj[1],&data); + if (!data) { + SWIG_exception_fail(SWIG_TypeError,"Input data is not 'array-like' (in the sense of numpy arrays)"); + return NULL; + } + arg2 = cmf::math::num_array(size,data); + } + if (arg1) (arg1)->ATR = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ShuttleworthWallace_ATR_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::ET::ShuttleworthWallace *arg1 = (cmf::upslope::ET::ShuttleworthWallace *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::math::num_array result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__ShuttleworthWallace, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShuttleworthWallace_ATR_get" "', argument " "1"" of type '" "cmf::upslope::ET::ShuttleworthWallace *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::ShuttleworthWallace * >(argp1); + result = ((arg1)->ATR); + { + resultobj = as_npy_array(result); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ShuttleworthWallace_KSNVP_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::ET::ShuttleworthWallace *arg1 = (cmf::upslope::ET::ShuttleworthWallace *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"ShuttleworthWallace_KSNVP_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__ShuttleworthWallace, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShuttleworthWallace_KSNVP_set" "', argument " "1"" of type '" "cmf::upslope::ET::ShuttleworthWallace *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::ShuttleworthWallace * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShuttleworthWallace_KSNVP_set" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + if (arg1) (arg1)->KSNVP = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ShuttleworthWallace_KSNVP_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::ET::ShuttleworthWallace *arg1 = (cmf::upslope::ET::ShuttleworthWallace *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__ShuttleworthWallace, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShuttleworthWallace_KSNVP_get" "', argument " "1"" of type '" "cmf::upslope::ET::ShuttleworthWallace *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::ShuttleworthWallace * >(argp1); + result = (double) ((arg1)->KSNVP); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ShuttleworthWallace_allow_dew_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::ET::ShuttleworthWallace *arg1 = (cmf::upslope::ET::ShuttleworthWallace *) 0 ; + bool arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"ShuttleworthWallace_allow_dew_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__ShuttleworthWallace, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShuttleworthWallace_allow_dew_set" "', argument " "1"" of type '" "cmf::upslope::ET::ShuttleworthWallace *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::ShuttleworthWallace * >(argp1); + ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShuttleworthWallace_allow_dew_set" "', argument " "2"" of type '" "bool""'"); + } + arg2 = static_cast< bool >(val2); + if (arg1) (arg1)->allow_dew = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ShuttleworthWallace_allow_dew_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::ET::ShuttleworthWallace *arg1 = (cmf::upslope::ET::ShuttleworthWallace *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + bool result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__ShuttleworthWallace, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShuttleworthWallace_allow_dew_get" "', argument " "1"" of type '" "cmf::upslope::ET::ShuttleworthWallace *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::ShuttleworthWallace * >(argp1); + result = (bool) ((arg1)->allow_dew); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ShuttleworthWallace_set_RSS_parameters(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + double arg1 = (double) 500. ; + double arg2 = (double) 1.0 ; + double arg3 = (double) -3.22 ; + double val1 ; + int ecode1 = 0 ; + double val2 ; + int ecode2 = 0 ; + double val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "_RSSa",(char *) "_RSSb",(char *) "_RSSa_pot", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|OOO:ShuttleworthWallace_set_RSS_parameters",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + if (obj0) { + ecode1 = SWIG_AsVal_double(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "ShuttleworthWallace_set_RSS_parameters" "', argument " "1"" of type '" "double""'"); + } + arg1 = static_cast< double >(val1); + } + if (obj1) { + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShuttleworthWallace_set_RSS_parameters" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + } + if (obj2) { + ecode3 = SWIG_AsVal_double(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ShuttleworthWallace_set_RSS_parameters" "', argument " "3"" of type '" "double""'"); + } + arg3 = static_cast< double >(val3); + } + { + try { + cmf::upslope::ET::ShuttleworthWallace::set_RSS_parameters(arg1,arg2,arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ShuttleworthWallace(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::Cell *arg1 = 0 ; + bool arg2 = (bool) true ; + void *argp1 = 0 ; + int res1 = 0 ; + bool val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "cell",(char *) "allow_dew", NULL + }; + cmf::upslope::ET::ShuttleworthWallace *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:new_ShuttleworthWallace",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_cmf__upslope__Cell, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ShuttleworthWallace" "', argument " "1"" of type '" "cmf::upslope::Cell &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ShuttleworthWallace" "', argument " "1"" of type '" "cmf::upslope::Cell &""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); + if (obj1) { + ecode2 = SWIG_AsVal_bool(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_ShuttleworthWallace" "', argument " "2"" of type '" "bool""'"); + } + arg2 = static_cast< bool >(val2); + } + { + try { + result = (cmf::upslope::ET::ShuttleworthWallace *)new cmf::upslope::ET::ShuttleworthWallace(*arg1,arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__ET__ShuttleworthWallace, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ShuttleworthWallace_use_for_cell(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::upslope::Cell *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + char * kwnames[] = { + (char *) "cell", NULL + }; + cmf::upslope::ET::ShuttleworthWallace *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:ShuttleworthWallace_use_for_cell",kwnames,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_cmf__upslope__Cell, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShuttleworthWallace_use_for_cell" "', argument " "1"" of type '" "cmf::upslope::Cell &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ShuttleworthWallace_use_for_cell" "', argument " "1"" of type '" "cmf::upslope::Cell &""'"); + } + arg1 = reinterpret_cast< cmf::upslope::Cell * >(argp1); + { + try { + result = (cmf::upslope::ET::ShuttleworthWallace *)cmf::upslope::ET::ShuttleworthWallace::use_for_cell(*arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__ET__ShuttleworthWallace, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_ShuttleworthWallace(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::upslope::ET::ShuttleworthWallace *arg1 = (cmf::upslope::ET::ShuttleworthWallace *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__upslope__ET__ShuttleworthWallace, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ShuttleworthWallace" "', argument " "1"" of type '" "cmf::upslope::ET::ShuttleworthWallace *""'"); + } + arg1 = reinterpret_cast< cmf::upslope::ET::ShuttleworthWallace * >(argp1); + { + try { + delete arg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *ShuttleworthWallace_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__upslope__ET__ShuttleworthWallace, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *ShuttleworthWallace_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_project_remove_node(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::project *arg1 = (cmf::project *) 0 ; + cmf::water::flux_node::ptr arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "node", NULL + }; + size_t result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:project_remove_node",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__project, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "project_remove_node" "', argument " "1"" of type '" "cmf::project *""'"); + } + arg1 = reinterpret_cast< cmf::project * >(argp1); + { + int newmem = 0; + res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, 0 , &newmem); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "project_remove_node" "', argument " "2"" of type '" "cmf::water::flux_node::ptr""'"); + } + if (argp2) arg2 = *(reinterpret_cast< cmf::water::flux_node::ptr * >(argp2)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::flux_node::ptr * >(argp2); + } + { + try { + result = (arg1)->remove_node(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_project_solutes_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::project *arg1 = (cmf::project *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::water::solute_vector *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__project, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "project_solutes_get" "', argument " "1"" of type '" "cmf::project *""'"); + } + arg1 = reinterpret_cast< cmf::project * >(argp1); + result = (cmf::water::solute_vector *)& ((arg1)->solutes); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__water__solute_vector, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_project_meteo_stations_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::project *arg1 = (cmf::project *) 0 ; + cmf::atmosphere::MeteoStationList *arg2 = (cmf::atmosphere::MeteoStationList *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"project_meteo_stations_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__project, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "project_meteo_stations_set" "', argument " "1"" of type '" "cmf::project *""'"); + } + arg1 = reinterpret_cast< cmf::project * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_cmf__atmosphere__MeteoStationList, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "project_meteo_stations_set" "', argument " "2"" of type '" "cmf::atmosphere::MeteoStationList *""'"); + } + arg2 = reinterpret_cast< cmf::atmosphere::MeteoStationList * >(argp2); + if (arg1) (arg1)->meteo_stations = *arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_project_meteo_stations_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::project *arg1 = (cmf::project *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::atmosphere::MeteoStationList *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__project, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "project_meteo_stations_get" "', argument " "1"" of type '" "cmf::project *""'"); + } + arg1 = reinterpret_cast< cmf::project * >(argp1); + result = (cmf::atmosphere::MeteoStationList *)& ((arg1)->meteo_stations); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__atmosphere__MeteoStationList, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_project_rainfall_stations_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::project *arg1 = (cmf::project *) 0 ; + cmf::atmosphere::RainfallStationList *arg2 = (cmf::atmosphere::RainfallStationList *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"project_rainfall_stations_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__project, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "project_rainfall_stations_set" "', argument " "1"" of type '" "cmf::project *""'"); + } + arg1 = reinterpret_cast< cmf::project * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_cmf__atmosphere__RainfallStationList, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "project_rainfall_stations_set" "', argument " "2"" of type '" "cmf::atmosphere::RainfallStationList *""'"); + } + arg2 = reinterpret_cast< cmf::atmosphere::RainfallStationList * >(argp2); + if (arg1) (arg1)->rainfall_stations = *arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_project_rainfall_stations_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::project *arg1 = (cmf::project *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::atmosphere::RainfallStationList *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__project, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "project_rainfall_stations_get" "', argument " "1"" of type '" "cmf::project *""'"); + } + arg1 = reinterpret_cast< cmf::project * >(argp1); + result = (cmf::atmosphere::RainfallStationList *)& ((arg1)->rainfall_stations); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__atmosphere__RainfallStationList, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_project_use_IDW_meteo(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::project *arg1 = (cmf::project *) 0 ; + double arg2 = (double) 0 ; + double arg3 = (double) 2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + double val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "z_weight",(char *) "power", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OO:project_use_IDW_meteo",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__project, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "project_use_IDW_meteo" "', argument " "1"" of type '" "cmf::project *""'"); + } + arg1 = reinterpret_cast< cmf::project * >(argp1); + if (obj1) { + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "project_use_IDW_meteo" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + } + if (obj2) { + ecode3 = SWIG_AsVal_double(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "project_use_IDW_meteo" "', argument " "3"" of type '" "double""'"); + } + arg3 = static_cast< double >(val3); + } + { + try { + (arg1)->use_IDW_meteo(arg2,arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_project_use_nearest_meteo(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::project *arg1 = (cmf::project *) 0 ; + double arg2 = (double) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "z_weight", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:project_use_nearest_meteo",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__project, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "project_use_nearest_meteo" "', argument " "1"" of type '" "cmf::project *""'"); + } + arg1 = reinterpret_cast< cmf::project * >(argp1); + if (obj1) { + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "project_use_nearest_meteo" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + } + { + try { + (arg1)->use_nearest_meteo(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_project_use_IDW_rainfall(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::project *arg1 = (cmf::project *) 0 ; + double arg2 = (double) 0 ; + double arg3 = (double) 2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + double val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "z_weight",(char *) "power", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OO:project_use_IDW_rainfall",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__project, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "project_use_IDW_rainfall" "', argument " "1"" of type '" "cmf::project *""'"); + } + arg1 = reinterpret_cast< cmf::project * >(argp1); + if (obj1) { + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "project_use_IDW_rainfall" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + } + if (obj2) { + ecode3 = SWIG_AsVal_double(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "project_use_IDW_rainfall" "', argument " "3"" of type '" "double""'"); + } + arg3 = static_cast< double >(val3); + } + { + try { + (arg1)->use_IDW_rainfall(arg2,arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_project_use_nearest_rainfall(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::project *arg1 = (cmf::project *) 0 ; + double arg2 = (double) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "z_weight", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:project_use_nearest_rainfall",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__project, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "project_use_nearest_rainfall" "', argument " "1"" of type '" "cmf::project *""'"); + } + arg1 = reinterpret_cast< cmf::project * >(argp1); + if (obj1) { + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "project_use_nearest_rainfall" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + } + { + try { + (arg1)->use_nearest_rainfall(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_project_get_cell(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::project *arg1 = (cmf::project *) 0 ; + ptrdiff_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "index", NULL + }; + cmf::upslope::Cell *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:project_get_cell",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__project, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "project_get_cell" "', argument " "1"" of type '" "cmf::project *""'"); + } + arg1 = reinterpret_cast< cmf::project * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "project_get_cell" "', argument " "2"" of type '" "ptrdiff_t""'"); + } + arg2 = static_cast< ptrdiff_t >(val2); + { + try { + result = (cmf::upslope::Cell *) &(arg1)->get_cell(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_project_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::project *arg1 = (cmf::project *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + size_t result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__project, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "project_size" "', argument " "1"" of type '" "cmf::project const *""'"); + } + arg1 = reinterpret_cast< cmf::project * >(argp1); + { + try { + result = ((cmf::project const *)arg1)->size(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_project(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + std::string arg1 = (std::string) "" ; + PyObject * obj0 = 0 ; + char * kwnames[] = { + (char *) "solute_names", NULL + }; + cmf::project *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|O:new_project",kwnames,&obj0)) SWIG_fail; + if (obj0) { + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string(obj0, &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "new_project" "', argument " "1"" of type '" "std::string""'"); + } + arg1 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + } + { + try { + result = (cmf::project *)new cmf::project(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__project, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_project(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::project *arg1 = (cmf::project *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__project, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_project" "', argument " "1"" of type '" "cmf::project *""'"); + } + arg1 = reinterpret_cast< cmf::project * >(argp1); + { + try { + delete arg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_project_NewCell(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::project *arg1 = (cmf::project *) 0 ; + double arg2 ; + double arg3 ; + double arg4 ; + double arg5 ; + bool arg6 = (bool) false ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + double val3 ; + int ecode3 = 0 ; + double val4 ; + int ecode4 = 0 ; + double val5 ; + int ecode5 = 0 ; + bool val6 ; + int ecode6 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + PyObject * obj5 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "x",(char *) "y",(char *) "z",(char *) "area",(char *) "with_surfacewater", NULL + }; + cmf::upslope::Cell *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOO|O:project_NewCell",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__project, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "project_NewCell" "', argument " "1"" of type '" "cmf::project *""'"); + } + arg1 = reinterpret_cast< cmf::project * >(argp1); + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "project_NewCell" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + ecode3 = SWIG_AsVal_double(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "project_NewCell" "', argument " "3"" of type '" "double""'"); + } + arg3 = static_cast< double >(val3); + ecode4 = SWIG_AsVal_double(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "project_NewCell" "', argument " "4"" of type '" "double""'"); + } + arg4 = static_cast< double >(val4); + ecode5 = SWIG_AsVal_double(obj4, &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "project_NewCell" "', argument " "5"" of type '" "double""'"); + } + arg5 = static_cast< double >(val5); + if (obj5) { + ecode6 = SWIG_AsVal_bool(obj5, &val6); + if (!SWIG_IsOK(ecode6)) { + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "project_NewCell" "', argument " "6"" of type '" "bool""'"); + } + arg6 = static_cast< bool >(val6); + } + { + try { + result = (cmf::upslope::Cell *)(arg1)->NewCell(arg2,arg3,arg4,arg5,arg6); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__Cell, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_project_NewOutlet(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::project *arg1 = (cmf::project *) 0 ; + std::string arg2 ; + double arg3 = (double) 0 ; + double arg4 = (double) 0 ; + double arg5 = (double) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val3 ; + int ecode3 = 0 ; + double val4 ; + int ecode4 = 0 ; + double val5 ; + int ecode5 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "name",(char *) "x",(char *) "y",(char *) "z", NULL + }; + cmf::water::DirichletBoundary::ptr result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOO:project_NewOutlet",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__project, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "project_NewOutlet" "', argument " "1"" of type '" "cmf::project *""'"); + } + arg1 = reinterpret_cast< cmf::project * >(argp1); + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string(obj1, &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "project_NewOutlet" "', argument " "2"" of type '" "std::string""'"); + } + arg2 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + if (obj2) { + ecode3 = SWIG_AsVal_double(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "project_NewOutlet" "', argument " "3"" of type '" "double""'"); + } + arg3 = static_cast< double >(val3); + } + if (obj3) { + ecode4 = SWIG_AsVal_double(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "project_NewOutlet" "', argument " "4"" of type '" "double""'"); + } + arg4 = static_cast< double >(val4); + } + if (obj4) { + ecode5 = SWIG_AsVal_double(obj4, &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "project_NewOutlet" "', argument " "5"" of type '" "double""'"); + } + arg5 = static_cast< double >(val5); + } + { + try { + result = (arg1)->NewOutlet(arg2,arg3,arg4,arg5); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + std::shared_ptr< cmf::water::DirichletBoundary > *smartresult = result ? new std::shared_ptr< cmf::water::DirichletBoundary >(result) : 0; + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__water__DirichletBoundary_t, SWIG_POINTER_OWN); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_project_NewStorage(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::project *arg1 = (cmf::project *) 0 ; + std::string arg2 ; + double arg3 = (double) 0 ; + double arg4 = (double) 0 ; + double arg5 = (double) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val3 ; + int ecode3 = 0 ; + double val4 ; + int ecode4 = 0 ; + double val5 ; + int ecode5 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "name",(char *) "x",(char *) "y",(char *) "z", NULL + }; + cmf::water::WaterStorage::ptr result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOO:project_NewStorage",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__project, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "project_NewStorage" "', argument " "1"" of type '" "cmf::project *""'"); + } + arg1 = reinterpret_cast< cmf::project * >(argp1); + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string(obj1, &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "project_NewStorage" "', argument " "2"" of type '" "std::string""'"); + } + arg2 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + if (obj2) { + ecode3 = SWIG_AsVal_double(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "project_NewStorage" "', argument " "3"" of type '" "double""'"); + } + arg3 = static_cast< double >(val3); + } + if (obj3) { + ecode4 = SWIG_AsVal_double(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "project_NewStorage" "', argument " "4"" of type '" "double""'"); + } + arg4 = static_cast< double >(val4); + } + if (obj4) { + ecode5 = SWIG_AsVal_double(obj4, &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "project_NewStorage" "', argument " "5"" of type '" "double""'"); + } + arg5 = static_cast< double >(val5); + } + { + try { + result = (arg1)->NewStorage(arg2,arg3,arg4,arg5); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + std::shared_ptr< cmf::water::WaterStorage > *smartresult = result ? new std::shared_ptr< cmf::water::WaterStorage >(result) : 0; + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, SWIG_POINTER_OWN); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_project_NewOpenStorage(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::project *arg1 = (cmf::project *) 0 ; + std::string arg2 ; + double arg3 ; + double arg4 ; + double arg5 ; + double arg6 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val3 ; + int ecode3 = 0 ; + double val4 ; + int ecode4 = 0 ; + double val5 ; + int ecode5 = 0 ; + double val6 ; + int ecode6 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + PyObject * obj5 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "name",(char *) "x",(char *) "y",(char *) "z",(char *) "area", NULL + }; + cmf::river::OpenWaterStorage::ptr result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOOO:project_NewOpenStorage",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__project, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "project_NewOpenStorage" "', argument " "1"" of type '" "cmf::project *""'"); + } + arg1 = reinterpret_cast< cmf::project * >(argp1); + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string(obj1, &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "project_NewOpenStorage" "', argument " "2"" of type '" "std::string""'"); + } + arg2 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + ecode3 = SWIG_AsVal_double(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "project_NewOpenStorage" "', argument " "3"" of type '" "double""'"); + } + arg3 = static_cast< double >(val3); + ecode4 = SWIG_AsVal_double(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "project_NewOpenStorage" "', argument " "4"" of type '" "double""'"); + } + arg4 = static_cast< double >(val4); + ecode5 = SWIG_AsVal_double(obj4, &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "project_NewOpenStorage" "', argument " "5"" of type '" "double""'"); + } + arg5 = static_cast< double >(val5); + ecode6 = SWIG_AsVal_double(obj5, &val6); + if (!SWIG_IsOK(ecode6)) { + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "project_NewOpenStorage" "', argument " "6"" of type '" "double""'"); + } + arg6 = static_cast< double >(val6); + { + try { + result = (arg1)->NewOpenStorage(arg2,arg3,arg4,arg5,arg6); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + std::shared_ptr< cmf::river::OpenWaterStorage > *smartresult = result ? new std::shared_ptr< cmf::river::OpenWaterStorage >(result) : 0; + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__river__OpenWaterStorage_t, SWIG_POINTER_OWN); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_project_NewNeumannBoundary(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::project *arg1 = (cmf::project *) 0 ; + std::string arg2 ; + cmf::water::WaterStorage::ptr arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp3 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "name",(char *) "target", NULL + }; + cmf::water::NeumannBoundary::ptr result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:project_NewNeumannBoundary",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__project, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "project_NewNeumannBoundary" "', argument " "1"" of type '" "cmf::project *""'"); + } + arg1 = reinterpret_cast< cmf::project * >(argp1); + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string(obj1, &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "project_NewNeumannBoundary" "', argument " "2"" of type '" "std::string""'"); + } + arg2 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + { + int newmem = 0; + res3 = SWIG_ConvertPtrAndOwn(obj2, &argp3, SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0 , &newmem); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "project_NewNeumannBoundary" "', argument " "3"" of type '" "cmf::water::WaterStorage::ptr""'"); + } + if (argp3) arg3 = *(reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp3)); + if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< cmf::water::WaterStorage::ptr * >(argp3); + } + { + try { + result = (arg1)->NewNeumannBoundary(arg2,arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + std::shared_ptr< cmf::water::NeumannBoundary > *smartresult = result ? new std::shared_ptr< cmf::water::NeumannBoundary >(result) : 0; + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__water__NeumannBoundary_t, SWIG_POINTER_OWN); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_project_NewReach(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::project *arg1 = (cmf::project *) 0 ; + double arg2 ; + double arg3 ; + double arg4 ; + cmf::river::IChannel *arg5 = 0 ; + bool arg6 = (bool) false ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + double val3 ; + int ecode3 = 0 ; + double val4 ; + int ecode4 = 0 ; + void *argp5 = 0 ; + int res5 = 0 ; + bool val6 ; + int ecode6 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + PyObject * obj5 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "x",(char *) "y",(char *) "z",(char *) "shape",(char *) "diffusive", NULL + }; + cmf::river::Reach::ptr result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOO|O:project_NewReach",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__project, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "project_NewReach" "', argument " "1"" of type '" "cmf::project *""'"); + } + arg1 = reinterpret_cast< cmf::project * >(argp1); + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "project_NewReach" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + ecode3 = SWIG_AsVal_double(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "project_NewReach" "', argument " "3"" of type '" "double""'"); + } + arg3 = static_cast< double >(val3); + ecode4 = SWIG_AsVal_double(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "project_NewReach" "', argument " "4"" of type '" "double""'"); + } + arg4 = static_cast< double >(val4); + res5 = SWIG_ConvertPtr(obj4, &argp5, SWIGTYPE_p_cmf__river__IChannel, 0 ); + if (!SWIG_IsOK(res5)) { + SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "project_NewReach" "', argument " "5"" of type '" "cmf::river::IChannel &""'"); + } + if (!argp5) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "project_NewReach" "', argument " "5"" of type '" "cmf::river::IChannel &""'"); + } + arg5 = reinterpret_cast< cmf::river::IChannel * >(argp5); + if (obj5) { + ecode6 = SWIG_AsVal_bool(obj5, &val6); + if (!SWIG_IsOK(ecode6)) { + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "project_NewReach" "', argument " "6"" of type '" "bool""'"); + } + arg6 = static_cast< bool >(val6); + } + { + try { + result = (arg1)->NewReach(arg2,arg3,arg4,*arg5,arg6); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + std::shared_ptr< cmf::river::Reach > *smartresult = result ? new std::shared_ptr< cmf::river::Reach >(result) : 0; + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__river__Reach_t, SWIG_POINTER_OWN); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_project_get_reach(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::project *arg1 = (cmf::project *) 0 ; + ptrdiff_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "index", NULL + }; + cmf::river::Reach::ptr result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:project_get_reach",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__project, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "project_get_reach" "', argument " "1"" of type '" "cmf::project *""'"); + } + arg1 = reinterpret_cast< cmf::project * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "project_get_reach" "', argument " "2"" of type '" "ptrdiff_t""'"); + } + arg2 = static_cast< ptrdiff_t >(val2); + { + try { + result = (arg1)->get_reach(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + std::shared_ptr< cmf::river::Reach > *smartresult = result ? new std::shared_ptr< cmf::river::Reach >(result) : 0; + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__river__Reach_t, SWIG_POINTER_OWN); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_project_reach_count(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::project *arg1 = (cmf::project *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + size_t result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__project, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "project_reach_count" "', argument " "1"" of type '" "cmf::project const *""'"); + } + arg1 = reinterpret_cast< cmf::project * >(argp1); + { + try { + result = ((cmf::project const *)arg1)->reach_count(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_project_get_node(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + cmf::project *arg1 = (cmf::project *) 0 ; + ptrdiff_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "index", NULL + }; + cmf::water::flux_node::ptr result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:project_get_node",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cmf__project, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "project_get_node" "', argument " "1"" of type '" "cmf::project *""'"); + } + arg1 = reinterpret_cast< cmf::project * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "project_get_node" "', argument " "2"" of type '" "ptrdiff_t""'"); + } + arg2 = static_cast< ptrdiff_t >(val2); + { + try { + result = (arg1)->get_node(arg2); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + { + std::shared_ptr< cmf::water::flux_node > *smartresult = result ? new std::shared_ptr< cmf::water::flux_node >(result) : 0; + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t, SWIG_POINTER_OWN); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_project_node_count(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::project *arg1 = (cmf::project *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + size_t result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__project, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "project_node_count" "', argument " "1"" of type '" "cmf::project const *""'"); + } + arg1 = reinterpret_cast< cmf::project * >(argp1); + { + try { + result = ((cmf::project const *)arg1)->node_count(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_project_get_storages(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::project *arg1 = (cmf::project *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::water::node_list result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__project, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "project_get_storages" "', argument " "1"" of type '" "cmf::project *""'"); + } + arg1 = reinterpret_cast< cmf::project * >(argp1); + { + try { + result = (arg1)->get_storages(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj((new cmf::water::node_list(static_cast< const cmf::water::node_list& >(result))), SWIGTYPE_p_cmf__water__node_list, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_project_cells_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::project *arg1 = (cmf::project *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::upslope::cell_vector *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__project, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "project_cells_get" "', argument " "1"" of type '" "cmf::project *""'"); + } + arg1 = reinterpret_cast< cmf::project * >(argp1); + { + try { + result = (cmf::upslope::cell_vector *)cmf_project_cells_get(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__upslope__cell_vector, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *project_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__project, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *project_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_SoluteWaterIntegrator_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::SoluteWaterIntegrator *arg1 = (cmf::math::SoluteWaterIntegrator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cmf::math::SoluteWaterIntegrator *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__SoluteWaterIntegrator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SoluteWaterIntegrator_copy" "', argument " "1"" of type '" "cmf::math::SoluteWaterIntegrator const *""'"); + } + arg1 = reinterpret_cast< cmf::math::SoluteWaterIntegrator * >(argp1); + { + try { + result = (cmf::math::SoluteWaterIntegrator *)((cmf::math::SoluteWaterIntegrator const *)arg1)->copy(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__SoluteWaterIntegrator, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_SoluteWaterIntegrator__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + cmf::water::solute_vector *arg1 = 0 ; + cmf::math::Integrator *arg2 = 0 ; + cmf::math::Integrator *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + cmf::math::SoluteWaterIntegrator *result = 0 ; + + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_cmf__water__solute_vector, 0 | 0); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SoluteWaterIntegrator" "', argument " "1"" of type '" "cmf::water::solute_vector const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SoluteWaterIntegrator" "', argument " "1"" of type '" "cmf::water::solute_vector const &""'"); + } + arg1 = reinterpret_cast< cmf::water::solute_vector * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_cmf__math__Integrator, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SoluteWaterIntegrator" "', argument " "2"" of type '" "cmf::math::Integrator const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SoluteWaterIntegrator" "', argument " "2"" of type '" "cmf::math::Integrator const &""'"); + } + arg2 = reinterpret_cast< cmf::math::Integrator * >(argp2); + res3 = SWIG_ConvertPtr(swig_obj[2], &argp3, SWIGTYPE_p_cmf__math__Integrator, 0 | 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_SoluteWaterIntegrator" "', argument " "3"" of type '" "cmf::math::Integrator const &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SoluteWaterIntegrator" "', argument " "3"" of type '" "cmf::math::Integrator const &""'"); + } + arg3 = reinterpret_cast< cmf::math::Integrator * >(argp3); + { + try { + result = (cmf::math::SoluteWaterIntegrator *)new cmf::math::SoluteWaterIntegrator((cmf::water::solute_vector const &)*arg1,(cmf::math::Integrator const &)*arg2,(cmf::math::Integrator const &)*arg3); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__SoluteWaterIntegrator, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_SoluteWaterIntegrator__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + SwigValueWrapper< cmf::water::solute_vector > arg1 ; + cmf::math::Integrator *arg2 = 0 ; + cmf::math::Integrator *arg3 = 0 ; + cmf::math::StateVariableOwner *arg4 = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + void *argp4 = 0 ; + int res4 = 0 ; + cmf::math::SoluteWaterIntegrator *result = 0 ; + + if ((nobjs < 4) || (nobjs > 4)) SWIG_fail; + { + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_cmf__water__solute_vector, 0 | 0); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SoluteWaterIntegrator" "', argument " "1"" of type '" "cmf::water::solute_vector""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SoluteWaterIntegrator" "', argument " "1"" of type '" "cmf::water::solute_vector""'"); + } else { + cmf::water::solute_vector * temp = reinterpret_cast< cmf::water::solute_vector * >(argp1); + arg1 = *temp; + if (SWIG_IsNewObj(res1)) delete temp; + } + } + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_cmf__math__Integrator, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SoluteWaterIntegrator" "', argument " "2"" of type '" "cmf::math::Integrator const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SoluteWaterIntegrator" "', argument " "2"" of type '" "cmf::math::Integrator const &""'"); + } + arg2 = reinterpret_cast< cmf::math::Integrator * >(argp2); + res3 = SWIG_ConvertPtr(swig_obj[2], &argp3, SWIGTYPE_p_cmf__math__Integrator, 0 | 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_SoluteWaterIntegrator" "', argument " "3"" of type '" "cmf::math::Integrator const &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SoluteWaterIntegrator" "', argument " "3"" of type '" "cmf::math::Integrator const &""'"); + } + arg3 = reinterpret_cast< cmf::math::Integrator * >(argp3); + res4 = SWIG_ConvertPtr(swig_obj[3], &argp4, SWIGTYPE_p_cmf__math__StateVariableOwner, 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_SoluteWaterIntegrator" "', argument " "4"" of type '" "cmf::math::StateVariableOwner &""'"); + } + if (!argp4) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SoluteWaterIntegrator" "', argument " "4"" of type '" "cmf::math::StateVariableOwner &""'"); + } + arg4 = reinterpret_cast< cmf::math::StateVariableOwner * >(argp4); + { + try { + result = (cmf::math::SoluteWaterIntegrator *)new cmf::math::SoluteWaterIntegrator(arg1,(cmf::math::Integrator const &)*arg2,(cmf::math::Integrator const &)*arg3,*arg4); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cmf__math__SoluteWaterIntegrator, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_SoluteWaterIntegrator(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[5] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"new_SoluteWaterIntegrator",0,4,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_cmf__water__solute_vector, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_cmf__math__Integrator, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_cmf__math__Integrator, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_cmf__water__solute_vector, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_cmf__math__Integrator, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_cmf__math__Integrator, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_cmf__math__StateVariableOwner, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_new_SoluteWaterIntegrator__SWIG_0(self, argc, argv); + case 2: + return _wrap_new_SoluteWaterIntegrator__SWIG_1(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_SoluteWaterIntegrator'.\n" + " Possible C/C++ prototypes are:\n" + " cmf::math::SoluteWaterIntegrator::SoluteWaterIntegrator(cmf::water::solute_vector const &,cmf::math::Integrator const &,cmf::math::Integrator const &)\n" + " cmf::math::SoluteWaterIntegrator::SoluteWaterIntegrator(cmf::water::solute_vector,cmf::math::Integrator const &,cmf::math::Integrator const &,cmf::math::StateVariableOwner &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_delete_SoluteWaterIntegrator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::SoluteWaterIntegrator *arg1 = (cmf::math::SoluteWaterIntegrator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__SoluteWaterIntegrator, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SoluteWaterIntegrator" "', argument " "1"" of type '" "cmf::math::SoluteWaterIntegrator *""'"); + } + arg1 = reinterpret_cast< cmf::math::SoluteWaterIntegrator * >(argp1); + { + try { + delete arg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SoluteWaterIntegrator_to_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::SoluteWaterIntegrator *arg1 = (cmf::math::SoluteWaterIntegrator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::string result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__SoluteWaterIntegrator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SoluteWaterIntegrator_to_string" "', argument " "1"" of type '" "cmf::math::SoluteWaterIntegrator const *""'"); + } + arg1 = reinterpret_cast< cmf::math::SoluteWaterIntegrator * >(argp1); + { + try { + result = ((cmf::math::SoluteWaterIntegrator const *)arg1)->to_string(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *SoluteWaterIntegrator_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cmf__math__SoluteWaterIntegrator, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *SoluteWaterIntegrator_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +static PyMethodDef SwigMethods[] = { + { (char *)"SWIG_PyInstanceMethod_New", (PyCFunction)SWIG_PyInstanceMethod_New, METH_O, NULL}, + { (char *)"get_parallel_threads", (PyCFunction)_wrap_get_parallel_threads, METH_NOARGS, (char *)"\n" + "get_parallel_threads() -> int\n" + "\n" + "int\n" + "cmf::math::get_parallel_threads()\n" + "\n" + "Returns the max number of threads used by OpenMP in parallel sections\n" + "of the code. \n" + ""}, + { (char *)"set_parallel_threads", (PyCFunction) _wrap_set_parallel_threads, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "set_parallel_threads(int numthreads) -> int\n" + "\n" + "int\n" + "cmf::math::set_parallel_threads(int numthreads)\n" + "\n" + "Set the number of threads used by OpenMP in parallel sections of the\n" + "code. \n" + ""}, + { (char *)"new_cubicspline", (PyCFunction) _wrap_new_cubicspline, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "new_cubicspline(cmf::math::num_array const & x, cmf::math::num_array const & y) -> cubicspline\n" + "\n" + "cubicspline(const cmf::math::num_array &x, const cmf::math::num_array\n" + "&y) \n" + ""}, + { (char *)"cubicspline_generate", (PyCFunction)_wrap_cubicspline_generate, METH_O, (char *)"\n" + "cubicspline_generate(cubicspline self)\n" + "\n" + "void\n" + "generate() \n" + ""}, + { (char *)"cubicspline_size", (PyCFunction)_wrap_cubicspline_size, METH_O, (char *)"\n" + "cubicspline_size(cubicspline self) -> size_t\n" + "\n" + "size_t size()\n" + "const \n" + ""}, + { (char *)"cubicspline___call__", (PyCFunction) _wrap_cubicspline___call__, METH_VARARGS | METH_KEYWORDS, (char *)"cubicspline___call__(cubicspline self, real x) -> real"}, + { (char *)"delete_cubicspline", (PyCFunction)_wrap_delete_cubicspline, METH_O, (char *)"delete_cubicspline(cubicspline self)"}, + { (char *)"cubicspline_swigregister", cubicspline_swigregister, METH_VARARGS, NULL}, + { (char *)"cubicspline_swiginit", cubicspline_swiginit, METH_VARARGS, NULL}, + { (char *)"point_x_set", _wrap_point_x_set, METH_VARARGS, (char *)"point_x_set(point self, double x)"}, + { (char *)"point_x_get", (PyCFunction)_wrap_point_x_get, METH_O, (char *)"point_x_get(point self) -> double"}, + { (char *)"point_y_set", _wrap_point_y_set, METH_VARARGS, (char *)"point_y_set(point self, double y)"}, + { (char *)"point_y_get", (PyCFunction)_wrap_point_y_get, METH_O, (char *)"point_y_get(point self) -> double"}, + { (char *)"point_z_set", _wrap_point_z_set, METH_VARARGS, (char *)"point_z_set(point self, double z)"}, + { (char *)"point_z_get", (PyCFunction)_wrap_point_z_get, METH_O, (char *)"point_z_get(point self) -> double"}, + { (char *)"new_point", _wrap_new_point, METH_VARARGS, (char *)"\n" + "point()\n" + "point(point p)\n" + "new_point(double x_, double y_, double z_=0.0) -> point\n" + "\n" + "point(double x_,\n" + "double y_, double z_=0.0)\n" + "\n" + "Creates a point from two doubles. \n" + ""}, + { (char *)"point_distanceTo", (PyCFunction) _wrap_point_distanceTo, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "point_distanceTo(point self, point p) -> double\n" + "\n" + "double\n" + "distanceTo(point p) const\n" + "\n" + "Returns the horizontal euclidian distance to another point p.\n" + "\n" + ":math:`\\\\sqrt{(this.x-p.x)^2+(this.y-p.y)^2}` \n" + ""}, + { (char *)"point_z_weight_distance", (PyCFunction) _wrap_point_z_weight_distance, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "point_z_weight_distance(point self, point p, double z_weight) -> double\n" + "\n" + "double z_weight_distance(point p, double z_weight) const\n" + "\n" + "Returns the horizontal euclidian distance plus the absolute of the\n" + "height difference times a factor.\n" + "\n" + ":math:`\\\\sqrt{(this.x-p.x)^2+(this.y-p.y)^2}\\\\ +\\\\ w_{z}|this.z-p.z|`\n" + "\n" + ""}, + { (char *)"point_distance3DTo", (PyCFunction) _wrap_point_distance3DTo, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "point_distance3DTo(point self, point p) -> double\n" + "\n" + "double\n" + "distance3DTo(point p) const\n" + "\n" + "Returns the euclidian distance in space to another point p. \n" + ""}, + { (char *)"point_distance", (PyCFunction) _wrap_point_distance, METH_VARARGS | METH_KEYWORDS, (char *)"point_distance(point p1, point p2) -> double"}, + { (char *)"point_distance_max", (PyCFunction) _wrap_point_distance_max, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "point_distance_max(point self, point p) -> double\n" + "\n" + "double\n" + "distance_max(point p) const\n" + "\n" + "Returns the distance by the maximum orthogonal offset. \n" + ""}, + { (char *)"point_azimuth", (PyCFunction) _wrap_point_azimuth, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "point_azimuth(point self, point p) -> double\n" + "\n" + "double\n" + "azimuth(point p) const\n" + "\n" + "Returns the azimuth angle of the line :math:`\\\\overline{this,p}` to the\n" + "Azimuth in degrees. \n" + ""}, + { (char *)"point_angleToXAxis", (PyCFunction) _wrap_point_angleToXAxis, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "point_angleToXAxis(point self, point p) -> double\n" + "\n" + "double\n" + "angleToXAxis(point p) const\n" + "\n" + "Returns the angle between the line :math:`\\\\overline{this,p}` to the\n" + "x-Axis in degrees. \n" + ""}, + { (char *)"point_sum", (PyCFunction)_wrap_point_sum, METH_O, (char *)"\n" + "point_sum(point self) -> double\n" + "\n" + "double sum() const\n" + "\n" + "Returns x+y+z. \n" + ""}, + { (char *)"point_length", (PyCFunction)_wrap_point_length, METH_O, (char *)"\n" + "point_length(point self) -> double\n" + "\n" + "double length()\n" + "const \n" + ""}, + { (char *)"point___add__", (PyCFunction) _wrap_point___add__, METH_VARARGS | METH_KEYWORDS, (char *)"point___add__(point self, point p) -> point"}, + { (char *)"point___iadd__", (PyCFunction) _wrap_point___iadd__, METH_VARARGS | METH_KEYWORDS, (char *)"point___iadd__(point self, point left) -> point"}, + { (char *)"point___sub__", (PyCFunction) _wrap_point___sub__, METH_VARARGS | METH_KEYWORDS, (char *)"point___sub__(point self, point p) -> point"}, + { (char *)"point___isub__", (PyCFunction) _wrap_point___isub__, METH_VARARGS | METH_KEYWORDS, (char *)"point___isub__(point self, point left) -> point"}, + { (char *)"point___mul__", _wrap_point___mul__, METH_VARARGS, (char *)"\n" + "__mul__(double left) -> point\n" + "point___mul__(point self, point p) -> point\n" + ""}, + { (char *)"point___imul__", _wrap_point___imul__, METH_VARARGS, (char *)"\n" + "__imul__(double left) -> point\n" + "point___imul__(point self, point left) -> point\n" + ""}, + { (char *)"point___truediv__", _wrap_point___truediv__, METH_VARARGS, (char *)"\n" + "__truediv__(double left) -> point\n" + "point___truediv__(point self, point p) -> point\n" + ""}, + { (char *)"point___itruediv__", _wrap_point___itruediv__, METH_VARARGS, (char *)"\n" + "__itruediv__(double left) -> point\n" + "point___itruediv__(point self, point left) -> point\n" + ""}, + { (char *)"point___eq__", (PyCFunction) _wrap_point___eq__, METH_VARARGS | METH_KEYWORDS, (char *)"point___eq__(point self, point p) -> bool"}, + { (char *)"point___ne__", (PyCFunction) _wrap_point___ne__, METH_VARARGS | METH_KEYWORDS, (char *)"point___ne__(point self, point p) -> bool"}, + { (char *)"point___len__", (PyCFunction)_wrap_point___len__, METH_O, (char *)"point___len__(point self) -> int"}, + { (char *)"point___rmul__", (PyCFunction) _wrap_point___rmul__, METH_VARARGS | METH_KEYWORDS, (char *)"point___rmul__(point self, double val) -> point"}, + { (char *)"point___rdiv__", (PyCFunction) _wrap_point___rdiv__, METH_VARARGS | METH_KEYWORDS, (char *)"point___rdiv__(point self, double val) -> point"}, + { (char *)"delete_point", (PyCFunction)_wrap_delete_point, METH_O, (char *)"delete_point(point self)"}, + { (char *)"point_swigregister", point_swigregister, METH_VARARGS, NULL}, + { (char *)"point_swiginit", point_swiginit, METH_VARARGS, NULL}, + { (char *)"dot", (PyCFunction) _wrap_dot, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "dot(point p1, point p2) -> double\n" + "\n" + "double\n" + "cmf::geometry::dot(const point &p1, const point &p2) \n" + ""}, + { (char *)"distance", (PyCFunction) _wrap_distance, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "distance(point p1, point p2) -> double\n" + "\n" + "double\n" + "cmf::geometry::distance(const point &p1, const point &p2) \n" + ""}, + { (char *)"point_vector_X_set", _wrap_point_vector_X_set, METH_VARARGS, (char *)"point_vector_X_set(point_vector self, cmf::math::num_array X)"}, + { (char *)"point_vector_X_get", (PyCFunction)_wrap_point_vector_X_get, METH_O, (char *)"point_vector_X_get(point_vector self) -> cmf::math::num_array"}, + { (char *)"point_vector_Y_set", _wrap_point_vector_Y_set, METH_VARARGS, (char *)"point_vector_Y_set(point_vector self, cmf::math::num_array Y)"}, + { (char *)"point_vector_Y_get", (PyCFunction)_wrap_point_vector_Y_get, METH_O, (char *)"point_vector_Y_get(point_vector self) -> cmf::math::num_array"}, + { (char *)"point_vector_Z_set", _wrap_point_vector_Z_set, METH_VARARGS, (char *)"point_vector_Z_set(point_vector self, cmf::math::num_array Z)"}, + { (char *)"point_vector_Z_get", (PyCFunction)_wrap_point_vector_Z_get, METH_O, (char *)"point_vector_Z_get(point_vector self) -> cmf::math::num_array"}, + { (char *)"new_point_vector", (PyCFunction) _wrap_new_point_vector, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "new_point_vector(ptrdiff_t size) -> point_vector\n" + "\n" + "point_vector(ptrdiff_t size)\n" + "\n" + "Create a point vector of a specific size. \n" + ""}, + { (char *)"point_vector_get", (PyCFunction) _wrap_point_vector_get, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "point_vector_get(point_vector self, ptrdiff_t index) -> point\n" + "\n" + "point\n" + "get(ptrdiff_t index) const\n" + "\n" + "Return a point at index. \n" + ""}, + { (char *)"point_vector_set", (PyCFunction) _wrap_point_vector_set, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "point_vector_set(point_vector self, ptrdiff_t index, point p)\n" + "\n" + "void\n" + "set(ptrdiff_t index, cmf::geometry::point p)\n" + "\n" + "Change the point at index. \n" + ""}, + { (char *)"point_vector_size", (PyCFunction)_wrap_point_vector_size, METH_O, (char *)"\n" + "point_vector_size(point_vector self) -> size_t\n" + "\n" + "size_t\n" + "size() const\n" + "\n" + "Return the number of points in the point_vector. \n" + ""}, + { (char *)"delete_point_vector", (PyCFunction)_wrap_delete_point_vector, METH_O, (char *)"delete_point_vector(point_vector self)"}, + { (char *)"point_vector_swigregister", point_vector_swigregister, METH_VARARGS, NULL}, + { (char *)"point_vector_swiginit", point_vector_swiginit, METH_VARARGS, NULL}, + { (char *)"minimum", (PyCFunction) _wrap_minimum, METH_VARARGS | METH_KEYWORDS, (char *)"minimum(real a, real b) -> real"}, + { (char *)"maximum", (PyCFunction) _wrap_maximum, METH_VARARGS | METH_KEYWORDS, (char *)"maximum(real a, real b) -> real"}, + { (char *)"minmax", (PyCFunction) _wrap_minmax, METH_VARARGS | METH_KEYWORDS, (char *)"minmax(real x, real min, real max) -> real"}, + { (char *)"mean", (PyCFunction) _wrap_mean, METH_VARARGS | METH_KEYWORDS, (char *)"mean(real a, real b) -> real"}, + { (char *)"geo_mean", (PyCFunction) _wrap_geo_mean, METH_VARARGS | METH_KEYWORDS, (char *)"geo_mean(real a, real b) -> real"}, + { (char *)"harmonic_mean", (PyCFunction) _wrap_harmonic_mean, METH_VARARGS | METH_KEYWORDS, (char *)"harmonic_mean(real a, real b) -> real"}, + { (char *)"piecewise_linear", (PyCFunction) _wrap_piecewise_linear, METH_VARARGS | METH_KEYWORDS, (char *)"piecewise_linear(real x, real xmin, real xmax, real ymin=0, real ymax=1) -> real"}, + { (char *)"boltzmann", (PyCFunction) _wrap_boltzmann, METH_VARARGS | METH_KEYWORDS, (char *)"boltzmann(real x, real x_half, real tau) -> real"}, + { (char *)"sign", (PyCFunction) _wrap_sign, METH_VARARGS | METH_KEYWORDS, (char *)"sign(real x) -> real"}, + { (char *)"square", (PyCFunction) _wrap_square, METH_VARARGS | METH_KEYWORDS, (char *)"square(real x) -> real"}, + { (char *)"new_Time", _wrap_new_Time, METH_VARARGS, (char *)"\n" + "Time(int day, int month, int year, int hour=0, int minute=0, int second=0, int ms=0)\n" + "Time(Date date)\n" + "Time(Time t)\n" + "new_Time() -> Time\n" + "\n" + "Time(long long ms) \n" + ""}, + { (char *)"Time_AsDays", (PyCFunction)_wrap_Time_AsDays, METH_O, (char *)"\n" + "Time_AsDays(Time self) -> double\n" + "\n" + "double AsDays() const\n" + "\n" + "Time in days. \n" + ""}, + { (char *)"Time_AsHours", (PyCFunction)_wrap_Time_AsHours, METH_O, (char *)"\n" + "Time_AsHours(Time self) -> double\n" + "\n" + "double AsHours()\n" + "const\n" + "\n" + "Time in hours. \n" + ""}, + { (char *)"Time_AsMinutes", (PyCFunction)_wrap_Time_AsMinutes, METH_O, (char *)"\n" + "Time_AsMinutes(Time self) -> double\n" + "\n" + "double AsMinutes()\n" + "const\n" + "\n" + "Time in minutes. \n" + ""}, + { (char *)"Time_AsSeconds", (PyCFunction)_wrap_Time_AsSeconds, METH_O, (char *)"\n" + "Time_AsSeconds(Time self) -> double\n" + "\n" + "double AsSeconds()\n" + "const\n" + "\n" + "Time in seconds. \n" + ""}, + { (char *)"Time_AsMilliseconds", (PyCFunction)_wrap_Time_AsMilliseconds, METH_O, (char *)"\n" + "Time_AsMilliseconds(Time self) -> long long\n" + "\n" + "long long\n" + "AsMilliseconds() const\n" + "\n" + "Time in milliseconds. \n" + ""}, + { (char *)"Time_AsDate", (PyCFunction)_wrap_Time_AsDate, METH_O, (char *)"\n" + "Time_AsDate(Time self) -> Date\n" + "\n" + "Date AsDate() const\n" + "\n" + ""}, + { (char *)"Time_to_string", (PyCFunction) _wrap_Time_to_string, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "Time_to_string(Time self, char seperator) -> std::string\n" + "\n" + "std::string\n" + "to_string(char seperator=':') \n" + ""}, + { (char *)"Time_is_not_0", (PyCFunction)_wrap_Time_is_not_0, METH_O, (char *)"\n" + "Time_is_not_0(Time self) -> bool\n" + "\n" + "bool is_not_0()\n" + "const \n" + ""}, + { (char *)"Time_DOY", (PyCFunction)_wrap_Time_DOY, METH_O, (char *)"\n" + "Time_DOY(Time self) -> double\n" + "\n" + "double DOY() const \n" + ""}, + { (char *)"Time___add__", (PyCFunction) _wrap_Time___add__, METH_VARARGS | METH_KEYWORDS, (char *)"Time___add__(Time self, Time t1) -> Time"}, + { (char *)"Time___sub__", (PyCFunction) _wrap_Time___sub__, METH_VARARGS | METH_KEYWORDS, (char *)"Time___sub__(Time self, Time t1) -> Time"}, + { (char *)"Time___iadd__", (PyCFunction) _wrap_Time___iadd__, METH_VARARGS | METH_KEYWORDS, (char *)"Time___iadd__(Time self, Time t1) -> Time"}, + { (char *)"Time___isub__", (PyCFunction) _wrap_Time___isub__, METH_VARARGS | METH_KEYWORDS, (char *)"Time___isub__(Time self, Time t1) -> Time"}, + { (char *)"Time___mod__", (PyCFunction) _wrap_Time___mod__, METH_VARARGS | METH_KEYWORDS, (char *)"Time___mod__(Time self, Time t1) -> Time"}, + { (char *)"Time___mul__", _wrap_Time___mul__, METH_VARARGS, (char *)"\n" + "__mul__(double x) -> Time\n" + "__mul__(long long x) -> Time\n" + "Time___mul__(Time self, int x) -> Time\n" + ""}, + { (char *)"Time___imul__", _wrap_Time___imul__, METH_VARARGS, (char *)"\n" + "__imul__(double x) -> Time\n" + "__imul__(long long x) -> Time\n" + "Time___imul__(Time self, int x) -> Time\n" + ""}, + { (char *)"Time___itruediv__", _wrap_Time___itruediv__, METH_VARARGS, (char *)"\n" + "__itruediv__(double x) -> Time\n" + "__itruediv__(long long x) -> Time\n" + "Time___itruediv__(Time self, int x) -> Time\n" + ""}, + { (char *)"Time___imod__", (PyCFunction) _wrap_Time___imod__, METH_VARARGS | METH_KEYWORDS, (char *)"Time___imod__(Time self, Time t1) -> Time"}, + { (char *)"Time___truediv__", _wrap_Time___truediv__, METH_VARARGS, (char *)"\n" + "__truediv__(double x) -> Time\n" + "__truediv__(long long x) -> Time\n" + "__truediv__(int x) -> Time\n" + "Time___truediv__(Time self, Time t1) -> double\n" + ""}, + { (char *)"Time_times_in", (PyCFunction) _wrap_Time_times_in, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "Time_times_in(Time self, Time t1) -> long long\n" + "\n" + "long long\n" + "times_in(const Time &t1) const\n" + "\n" + "Returns the number of times this is included in t1. \n" + ""}, + { (char *)"Time___lt__", (PyCFunction) _wrap_Time___lt__, METH_VARARGS | METH_KEYWORDS, (char *)"Time___lt__(Time self, Time t1) -> bool"}, + { (char *)"Time___gt__", (PyCFunction) _wrap_Time___gt__, METH_VARARGS | METH_KEYWORDS, (char *)"Time___gt__(Time self, Time t1) -> bool"}, + { (char *)"Time___le__", (PyCFunction) _wrap_Time___le__, METH_VARARGS | METH_KEYWORDS, (char *)"Time___le__(Time self, Time t1) -> bool"}, + { (char *)"Time___ge__", (PyCFunction) _wrap_Time___ge__, METH_VARARGS | METH_KEYWORDS, (char *)"Time___ge__(Time self, Time t1) -> bool"}, + { (char *)"Time___eq__", (PyCFunction) _wrap_Time___eq__, METH_VARARGS | METH_KEYWORDS, (char *)"Time___eq__(Time self, Time t1) -> bool"}, + { (char *)"Time___ne__", (PyCFunction) _wrap_Time___ne__, METH_VARARGS | METH_KEYWORDS, (char *)"Time___ne__(Time self, Time t1) -> bool"}, + { (char *)"delete_Time", (PyCFunction)_wrap_delete_Time, METH_O, (char *)"delete_Time(Time self)"}, + { (char *)"Time_swigregister", Time_swigregister, METH_VARARGS, NULL}, + { (char *)"Time_swiginit", Time_swiginit, METH_VARARGS, NULL}, + { (char *)"Date_year_set", _wrap_Date_year_set, METH_VARARGS, (char *)"Date_year_set(Date self, int year)"}, + { (char *)"Date_year_get", (PyCFunction)_wrap_Date_year_get, METH_O, (char *)"Date_year_get(Date self) -> int"}, + { (char *)"Date_month_set", _wrap_Date_month_set, METH_VARARGS, (char *)"Date_month_set(Date self, int month)"}, + { (char *)"Date_month_get", (PyCFunction)_wrap_Date_month_get, METH_O, (char *)"Date_month_get(Date self) -> int"}, + { (char *)"Date_day_set", _wrap_Date_day_set, METH_VARARGS, (char *)"Date_day_set(Date self, int day)"}, + { (char *)"Date_day_get", (PyCFunction)_wrap_Date_day_get, METH_O, (char *)"Date_day_get(Date self) -> int"}, + { (char *)"Date_hour_set", _wrap_Date_hour_set, METH_VARARGS, (char *)"Date_hour_set(Date self, int hour)"}, + { (char *)"Date_hour_get", (PyCFunction)_wrap_Date_hour_get, METH_O, (char *)"Date_hour_get(Date self) -> int"}, + { (char *)"Date_minute_set", _wrap_Date_minute_set, METH_VARARGS, (char *)"Date_minute_set(Date self, int minute)"}, + { (char *)"Date_minute_get", (PyCFunction)_wrap_Date_minute_get, METH_O, (char *)"Date_minute_get(Date self) -> int"}, + { (char *)"Date_second_set", _wrap_Date_second_set, METH_VARARGS, (char *)"Date_second_set(Date self, int second)"}, + { (char *)"Date_second_get", (PyCFunction)_wrap_Date_second_get, METH_O, (char *)"Date_second_get(Date self) -> int"}, + { (char *)"Date_ms_set", _wrap_Date_ms_set, METH_VARARGS, (char *)"Date_ms_set(Date self, int ms)"}, + { (char *)"Date_ms_get", (PyCFunction)_wrap_Date_ms_get, METH_O, (char *)"Date_ms_get(Date self) -> int"}, + { (char *)"new_Date", _wrap_new_Date, METH_VARARGS, (char *)"\n" + "Date(int _day, int _month, int _year, int _hour=0, int _minute=0, int _second=0, int _ms=0)\n" + "new_Date(Time time) -> Date\n" + "\n" + "Date(const Time &time)\n" + "\n" + "Creates a new date from time (based on the 31.12.1899, like in\n" + "Excel(TM)) \n" + ""}, + { (char *)"Date_ToTime", (PyCFunction)_wrap_Date_ToTime, METH_O, (char *)"\n" + "Date_ToTime(Date self) -> Time\n" + "\n" + "Time ToTime()\n" + "\n" + "Converts a date to Time (based on the 31.12.1899, like in Excel(TM) \n" + ""}, + { (char *)"Date_DOY", (PyCFunction)_wrap_Date_DOY, METH_O, (char *)"\n" + "Date_DOY(Date self) -> double\n" + "\n" + "double DOY()\n" + "\n" + "Returns the day of year. \n" + ""}, + { (char *)"Date_to_string", (PyCFunction)_wrap_Date_to_string, METH_O, (char *)"\n" + "Date_to_string(Date self) -> std::string\n" + "\n" + "std::string\n" + "to_string()\n" + "\n" + "Returns a string representing the date. \n" + ""}, + { (char *)"delete_Date", (PyCFunction)_wrap_delete_Date, METH_O, (char *)"delete_Date(Date self)"}, + { (char *)"Date_swigregister", Date_swigregister, METH_VARARGS, NULL}, + { (char *)"Date_swiginit", Date_swiginit, METH_VARARGS, NULL}, + { (char *)"timeseries_interpolationpower", (PyCFunction)_wrap_timeseries_interpolationpower, METH_O, (char *)"\n" + "timeseries_interpolationpower(timeseries self) -> int\n" + "\n" + "int\n" + "interpolationpower() const\n" + "\n" + "Method for the interpolation (0 - Nearest neighbor, 1- linear, 2 -\n" + "cubic spline (not implemented yet) \n" + ""}, + { (char *)"timeseries_add", (PyCFunction) _wrap_timeseries_add, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "timeseries_add(timeseries self, double Value)\n" + "\n" + "void add(double\n" + "Value)\n" + "\n" + "Appends a measurement. \n" + ""}, + { (char *)"timeseries_is_empty", (PyCFunction)_wrap_timeseries_is_empty, METH_O, (char *)"\n" + "timeseries_is_empty(timeseries self) -> bool\n" + "\n" + "bool\n" + "is_empty() const\n" + "\n" + "returns true if no values are added to the timeseries \n" + ""}, + { (char *)"timeseries_clear", (PyCFunction)_wrap_timeseries_clear, METH_O, (char *)"\n" + "timeseries_clear(timeseries self)\n" + "\n" + "void clear() \n" + ""}, + { (char *)"timeseries_adress", (PyCFunction)_wrap_timeseries_adress, METH_O, (char *)"\n" + "timeseries_adress(timeseries self) -> size_t\n" + "\n" + "size_t adress()\n" + "const \n" + ""}, + { (char *)"timeseries_copy", (PyCFunction)_wrap_timeseries_copy, METH_O, (char *)"\n" + "timeseries_copy(timeseries self) -> timeseries\n" + "\n" + "timeseries copy()\n" + "const \n" + ""}, + { (char *)"timeseries_size", (PyCFunction)_wrap_timeseries_size, METH_O, (char *)"\n" + "timeseries_size(timeseries self) -> size_t\n" + "\n" + "size_t size()\n" + "const\n" + "\n" + "Number of items in the timeseries. \n" + ""}, + { (char *)"timeseries_count_values", (PyCFunction)_wrap_timeseries_count_values, METH_O, (char *)"\n" + "timeseries_count_values(timeseries self) -> size_t\n" + "\n" + "size_t\n" + "count_values() const\n" + "\n" + "Number of valid values (=size - # of NaN's) \n" + ""}, + { (char *)"new_timeseries", (PyCFunction) _wrap_new_timeseries, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "new_timeseries(Time begin, Time step, int interpolationmethod=1, size_t count=0) -> timeseries\n" + "\n" + "timeseries(const cmf::math::timeseries &ts) \n" + ""}, + { (char *)"timeseries_from_array", (PyCFunction) _wrap_timeseries_from_array, METH_VARARGS | METH_KEYWORDS, (char *)"timeseries_from_array(Time begin, Time step, cmf::math::num_array const & data) -> timeseries"}, + { (char *)"timeseries_from_scalar", (PyCFunction) _wrap_timeseries_from_scalar, METH_VARARGS | METH_KEYWORDS, (char *)"timeseries_from_scalar(double scalar) -> timeseries"}, + { (char *)"timeseries_from_file", (PyCFunction) _wrap_timeseries_from_file, METH_VARARGS | METH_KEYWORDS, (char *)"timeseries_from_file(std::string filename) -> timeseries"}, + { (char *)"timeseries_get_t", (PyCFunction) _wrap_timeseries_get_t, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "timeseries_get_t(timeseries self, Time t) -> double\n" + "\n" + "double\n" + "get_t(cmf::math::Time t) const \n" + ""}, + { (char *)"timeseries_get_i", (PyCFunction) _wrap_timeseries_get_i, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "timeseries_get_i(timeseries self, ptrdiff_t i) -> double\n" + "\n" + "double\n" + "get_i(ptrdiff_t i) const \n" + ""}, + { (char *)"timeseries_set_t", (PyCFunction) _wrap_timeseries_set_t, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "timeseries_set_t(timeseries self, Time t, double value)\n" + "\n" + "void\n" + "set_t(cmf::math::Time t, double value) \n" + ""}, + { (char *)"timeseries_set_i", (PyCFunction) _wrap_timeseries_set_i, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "timeseries_set_i(timeseries self, ptrdiff_t i, double value)\n" + "\n" + "void\n" + "set_i(ptrdiff_t i, double value) \n" + ""}, + { (char *)"timeseries_get_slice", _wrap_timeseries_get_slice, METH_VARARGS, (char *)"\n" + "get_slice(Time _begin, Time _end, Time _step) -> timeseries\n" + "timeseries_get_slice(timeseries self, ptrdiff_t _begin, ptrdiff_t _end, ptrdiff_t step=1) -> timeseries\n" + "\n" + "cmf::math::timeseries get_slice(ptrdiff_t _begin, ptrdiff_t _end,\n" + "ptrdiff_t step=1) \n" + ""}, + { (char *)"timeseries_set_slice", _wrap_timeseries_set_slice, METH_VARARGS, (char *)"\n" + "set_slice(Time _begin, Time _end, timeseries values)\n" + "timeseries_set_slice(timeseries self, ptrdiff_t _begin, ptrdiff_t _end, timeseries _values)\n" + "\n" + "void\n" + "set_slice(ptrdiff_t _begin, ptrdiff_t _end, cmf::math::timeseries\n" + "_values) \n" + ""}, + { (char *)"timeseries_remove_nodata", (PyCFunction) _wrap_timeseries_remove_nodata, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "timeseries_remove_nodata(timeseries self, double nodata_value)\n" + "\n" + "void\n" + "remove_nodata(double nodata_value) \n" + ""}, + { (char *)"timeseries___iadd__", _wrap_timeseries___iadd__, METH_VARARGS, (char *)"\n" + "__iadd__(timeseries arg2) -> timeseries\n" + "timeseries___iadd__(timeseries self, double arg3) -> timeseries\n" + ""}, + { (char *)"timeseries___isub__", _wrap_timeseries___isub__, METH_VARARGS, (char *)"\n" + "__isub__(timeseries arg2) -> timeseries\n" + "timeseries___isub__(timeseries self, double arg3) -> timeseries\n" + ""}, + { (char *)"timeseries___imul__", _wrap_timeseries___imul__, METH_VARARGS, (char *)"\n" + "__imul__(timeseries arg2) -> timeseries\n" + "timeseries___imul__(timeseries self, double arg3) -> timeseries\n" + ""}, + { (char *)"timeseries___itruediv__", _wrap_timeseries___itruediv__, METH_VARARGS, (char *)"\n" + "__itruediv__(timeseries arg2) -> timeseries\n" + "timeseries___itruediv__(timeseries self, double arg3) -> timeseries\n" + ""}, + { (char *)"timeseries___add__", _wrap_timeseries___add__, METH_VARARGS, (char *)"\n" + "__add__(timeseries arg2) -> timeseries\n" + "timeseries___add__(timeseries self, double arg3) -> timeseries\n" + ""}, + { (char *)"timeseries___sub__", _wrap_timeseries___sub__, METH_VARARGS, (char *)"\n" + "__sub__(timeseries arg2) -> timeseries\n" + "timeseries___sub__(timeseries self, double arg3) -> timeseries\n" + ""}, + { (char *)"timeseries___mul__", _wrap_timeseries___mul__, METH_VARARGS, (char *)"\n" + "__mul__(timeseries arg2) -> timeseries\n" + "timeseries___mul__(timeseries self, double arg3) -> timeseries\n" + ""}, + { (char *)"timeseries___truediv__", _wrap_timeseries___truediv__, METH_VARARGS, (char *)"\n" + "__truediv__(timeseries arg2) -> timeseries\n" + "timeseries___truediv__(timeseries self, double arg3) -> timeseries\n" + ""}, + { (char *)"timeseries___neg__", (PyCFunction)_wrap_timeseries___neg__, METH_O, (char *)"timeseries___neg__(timeseries self) -> timeseries"}, + { (char *)"timeseries_inv", (PyCFunction)_wrap_timeseries_inv, METH_O, (char *)"\n" + "timeseries_inv(timeseries self) -> timeseries\n" + "\n" + "timeseries inv()\n" + "const \n" + ""}, + { (char *)"timeseries_reduce_min", (PyCFunction) _wrap_timeseries_reduce_min, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "timeseries_reduce_min(timeseries self, Time begin, Time step) -> timeseries\n" + "\n" + "timeseries\n" + "reduce_min(cmf::math::Time begin, cmf::math::Time step) const\n" + "\n" + "Creates a timeseries with a bigger timestep, containing the minimum.\n" + "\n" + ""}, + { (char *)"timeseries_reduce_max", (PyCFunction) _wrap_timeseries_reduce_max, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "timeseries_reduce_max(timeseries self, Time begin, Time step) -> timeseries\n" + "\n" + "timeseries\n" + "reduce_max(cmf::math::Time begin, cmf::math::Time step) const\n" + "\n" + "Creates a timeseries with a bigger timestep, containing the maximum.\n" + "\n" + ""}, + { (char *)"timeseries_reduce_sum", (PyCFunction) _wrap_timeseries_reduce_sum, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "timeseries_reduce_sum(timeseries self, Time begin, Time step) -> timeseries\n" + "\n" + "timeseries\n" + "reduce_sum(cmf::math::Time begin, cmf::math::Time step) const\n" + "\n" + "Creates a timeseries with a bigger timestep, containing the sum. \n" + ""}, + { (char *)"timeseries_reduce_avg", (PyCFunction) _wrap_timeseries_reduce_avg, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "timeseries_reduce_avg(timeseries self, Time begin, Time step) -> timeseries\n" + "\n" + "timeseries\n" + "reduce_avg(cmf::math::Time begin, cmf::math::Time step) const\n" + "\n" + "Creates a timeseries with a bigger timestep, containing the average.\n" + "\n" + ""}, + { (char *)"timeseries_floating_avg", _wrap_timeseries_floating_avg, METH_VARARGS, (char *)"\n" + "floating_avg(Time window_width) -> timeseries\n" + "timeseries_floating_avg(timeseries self, size_t window_size) -> timeseries\n" + "\n" + "timeseries floating_avg(size_t window_size) const \n" + ""}, + { (char *)"timeseries_floating_max", (PyCFunction) _wrap_timeseries_floating_max, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "timeseries_floating_max(timeseries self, Time window_width) -> timeseries\n" + "\n" + "timeseries floating_max(cmf::math::Time window_width) const \n" + ""}, + { (char *)"timeseries_floating_min", (PyCFunction) _wrap_timeseries_floating_min, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "timeseries_floating_min(timeseries self, Time window_width) -> timeseries\n" + "\n" + "timeseries floating_min(cmf::math::Time window_width) const \n" + ""}, + { (char *)"timeseries_mean", (PyCFunction)_wrap_timeseries_mean, METH_O, (char *)"\n" + "timeseries_mean(timeseries self) -> double\n" + "\n" + "double mean()\n" + "const \n" + ""}, + { (char *)"timeseries_min", (PyCFunction)_wrap_timeseries_min, METH_O, (char *)"\n" + "timeseries_min(timeseries self) -> double\n" + "\n" + "double min() const\n" + "\n" + ""}, + { (char *)"timeseries_max", (PyCFunction)_wrap_timeseries_max, METH_O, (char *)"\n" + "timeseries_max(timeseries self) -> double\n" + "\n" + "double max() const\n" + "\n" + ""}, + { (char *)"timeseries_log", (PyCFunction)_wrap_timeseries_log, METH_O, (char *)"\n" + "timeseries_log(timeseries self) -> timeseries\n" + "\n" + "timeseries log()\n" + "const \n" + ""}, + { (char *)"timeseries_log10", (PyCFunction)_wrap_timeseries_log10, METH_O, (char *)"\n" + "timeseries_log10(timeseries self) -> timeseries\n" + "\n" + "timeseries\n" + "log10() const \n" + ""}, + { (char *)"timeseries_power", (PyCFunction) _wrap_timeseries_power, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "timeseries_power(timeseries self, double exponent) -> timeseries\n" + "\n" + "timeseries\n" + "power(double exponent) const \n" + ""}, + { (char *)"timeseries_exp", (PyCFunction)_wrap_timeseries_exp, METH_O, (char *)"\n" + "timeseries_exp(timeseries self) -> timeseries\n" + "\n" + "timeseries exp()\n" + "const \n" + ""}, + { (char *)"timeseries_begin_get", (PyCFunction)_wrap_timeseries_begin_get, METH_O, (char *)"\n" + "timeseries_begin_get(timeseries self) -> Time\n" + "\n" + "cmf::math::Time\n" + "begin() const\n" + "\n" + "First date of measurement. \n" + ""}, + { (char *)"timeseries_step_get", (PyCFunction)_wrap_timeseries_step_get, METH_O, (char *)"\n" + "timeseries_step_get(timeseries self) -> Time\n" + "\n" + "cmf::math::Time\n" + "step() const\n" + "\n" + "Time between the measurements. \n" + ""}, + { (char *)"timeseries_end_get", (PyCFunction)_wrap_timeseries_end_get, METH_O, (char *)"\n" + "timeseries_end_get(timeseries self) -> Time\n" + "\n" + "cmf::math::Time\n" + "end() const\n" + "\n" + "Last date of measurements. \n" + ""}, + { (char *)"timeseries___len__", (PyCFunction)_wrap_timeseries___len__, METH_O, (char *)"timeseries___len__(timeseries self) -> ptrdiff_t"}, + { (char *)"delete_timeseries", (PyCFunction)_wrap_delete_timeseries, METH_O, (char *)"delete_timeseries(timeseries self)"}, + { (char *)"timeseries_swigregister", timeseries_swigregister, METH_VARARGS, NULL}, + { (char *)"timeseries_swiginit", timeseries_swiginit, METH_VARARGS, NULL}, + { (char *)"nash_sutcliffe", (PyCFunction) _wrap_nash_sutcliffe, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "nash_sutcliffe(timeseries model, timeseries observation) -> double\n" + "\n" + "double\n" + "cmf::math::nash_sutcliffe(const cmf::math::timeseries &model, const\n" + "cmf::math::timeseries &observation)\n" + "\n" + "Calculates the Nash-Sutcliffe efficiency of a modeled timeseries in\n" + "comparison with an observed timeseries.\n" + "\n" + "The Nash-Sutcliffe efficiancy is defined as: \n" + "\n" + ".. math::\n" + "\n" + " E = 1 -\n" + " \\\\frac{\\\\sum_{t=1}^{T}(M_t - O_t)^2}{\\\\sum_{t=1}^{T}(O_t -\n" + " \\\\overline{O})^2}\n" + "\n" + "where :math:`T` is the number of observation time\n" + "steps\n" + "\n" + ":math:`M` is the timeseries of model results matchinig O\n" + "\n" + ":math:`O` is the timeseries containing observations\n" + "\n" + ":math:`\\\\overline{O}` is the arithmetic mean of observations \n" + ""}, + { (char *)"integratable_integrate", (PyCFunction) _wrap_integratable_integrate, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "integratable_integrate(integratable self, Time t)\n" + "\n" + "virtual\n" + "void integrate(Time t)=0\n" + "\n" + "Integrates the variable until time t. \n" + ""}, + { (char *)"integratable_reset", (PyCFunction) _wrap_integratable_reset, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "integratable_reset(integratable self, Time t)\n" + "\n" + "virtual void\n" + "reset(Time t)=0\n" + "\n" + "Sets the start time of the integral. \n" + ""}, + { (char *)"integratable_sum", (PyCFunction)_wrap_integratable_sum, METH_O, (char *)"\n" + "integratable_sum(integratable self) -> double\n" + "\n" + "virtual double\n" + "sum() const =0\n" + "\n" + "Get the integral from the last reset until the last call of integrate.\n" + "\n" + ""}, + { (char *)"integratable_avg", (PyCFunction)_wrap_integratable_avg, METH_O, (char *)"\n" + "integratable_avg(integratable self) -> double\n" + "\n" + "virtual double\n" + "avg() const =0\n" + "\n" + "Returns average of the integrated variable (eg. flux) from the last\n" + "reset until the last call of integrate. \n" + ""}, + { (char *)"delete_integratable", (PyCFunction)_wrap_delete_integratable, METH_O, (char *)"delete_integratable(integratable self)"}, + { (char *)"integratable_swigregister", integratable_swigregister, METH_VARARGS, NULL}, + { (char *)"integratable_list_append", (PyCFunction) _wrap_integratable_list_append, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "integratable_list_append(integratable_list self, cmf::math::integratable::ptr add)\n" + "\n" + "void\n" + "append(cmf::math::integratable::ptr add)\n" + "\n" + "Adds an integratable to the list. \n" + ""}, + { (char *)"integratable_list_remove", (PyCFunction) _wrap_integratable_list_remove, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "integratable_list_remove(integratable_list self, cmf::math::integratable::ptr rm)\n" + "\n" + "void\n" + "remove(cmf::math::integratable::ptr rm)\n" + "\n" + "Removes an integratable from the list. \n" + ""}, + { (char *)"integratable_list___getitem", (PyCFunction) _wrap_integratable_list___getitem, METH_VARARGS | METH_KEYWORDS, (char *)"integratable_list___getitem(integratable_list self, int index) -> cmf::math::integratable::ptr"}, + { (char *)"integratable_list_size", (PyCFunction)_wrap_integratable_list_size, METH_O, (char *)"\n" + "integratable_list_size(integratable_list self) -> size_t\n" + "\n" + "size_t\n" + "size() const\n" + "\n" + "Number of integratables in the list. \n" + ""}, + { (char *)"integratable_list_avg", (PyCFunction)_wrap_integratable_list_avg, METH_O, (char *)"\n" + "integratable_list_avg(integratable_list self) -> cmf::math::num_array\n" + "\n" + "cmf::math::num_array avg() const \n" + ""}, + { (char *)"integratable_list_sum", (PyCFunction)_wrap_integratable_list_sum, METH_O, (char *)"\n" + "integratable_list_sum(integratable_list self) -> cmf::math::num_array\n" + "\n" + "cmf::math::num_array sum() const \n" + ""}, + { (char *)"integratable_list_reset", (PyCFunction) _wrap_integratable_list_reset, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "integratable_list_reset(integratable_list self, Time t)\n" + "\n" + "void\n" + "reset(Time t) \n" + ""}, + { (char *)"integratable_list_integrate", (PyCFunction) _wrap_integratable_list_integrate, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "integratable_list_integrate(integratable_list self, Time t)\n" + "\n" + "void\n" + "integrate(Time t) \n" + ""}, + { (char *)"new_integratable_list", _wrap_new_integratable_list, METH_VARARGS, (char *)"\n" + "integratable_list()\n" + "new_integratable_list(integratable_list for_copy) -> integratable_list\n" + "\n" + "integratable_list(const integratable_list &for_copy) \n" + ""}, + { (char *)"integratable_list___len__", (PyCFunction)_wrap_integratable_list___len__, METH_O, (char *)"integratable_list___len__(integratable_list self) -> size_t"}, + { (char *)"delete_integratable_list", (PyCFunction)_wrap_delete_integratable_list, METH_O, (char *)"delete_integratable_list(integratable_list self)"}, + { (char *)"integratable_list_swigregister", integratable_list_swigregister, METH_VARARGS, NULL}, + { (char *)"integratable_list_swiginit", integratable_list_swiginit, METH_VARARGS, NULL}, + { (char *)"StateVariable_dxdt", (PyCFunction) _wrap_StateVariable_dxdt, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "StateVariable_dxdt(StateVariable self, Time time) -> real\n" + "\n" + "virtual real\n" + "dxdt(const cmf::math::Time &time)=0\n" + "\n" + "Returns the derivate of the state variable at time time. \n" + ""}, + { (char *)"StateVariable_get_abs_errtol", (PyCFunction) _wrap_StateVariable_get_abs_errtol, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "StateVariable_get_abs_errtol(StateVariable self, real rel_errtol) -> real\n" + "\n" + "virtual real get_abs_errtol(real rel_errtol) const \n" + ""}, + { (char *)"StateVariable_to_string", (PyCFunction)_wrap_StateVariable_to_string, METH_O, (char *)"\n" + "StateVariable_to_string(StateVariable self) -> std::string\n" + "\n" + "virtual\n" + "std::string to_string() const =0 \n" + ""}, + { (char *)"delete_StateVariable", (PyCFunction)_wrap_delete_StateVariable, METH_O, (char *)"\n" + "delete_StateVariable(StateVariable self)\n" + "\n" + "virtual ~StateVariable() \n" + ""}, + { (char *)"StateVariable_state_set", _wrap_StateVariable_state_set, METH_VARARGS, (char *)"StateVariable_state_set(StateVariable self, real state)"}, + { (char *)"StateVariable_state_get", (PyCFunction)_wrap_StateVariable_state_get, METH_O, (char *)"StateVariable_state_get(StateVariable self) -> real"}, + { (char *)"StateVariable_swigregister", StateVariable_swigregister, METH_VARARGS, NULL}, + { (char *)"StateVariableOwner_get_states", (PyCFunction)_wrap_StateVariableOwner_get_states, METH_O, (char *)"\n" + "StateVariableOwner_get_states(StateVariableOwner self) -> StateVariableList\n" + "\n" + "virtual StateVariableList get_states()=0\n" + "\n" + "Add the state variables, owned by an object derived from\n" + "StateVariableOwner, to the given vector. \n" + ""}, + { (char *)"delete_StateVariableOwner", (PyCFunction)_wrap_delete_StateVariableOwner, METH_O, (char *)"\n" + "delete_StateVariableOwner(StateVariableOwner self)\n" + "\n" + "virtual\n" + "~StateVariableOwner() \n" + ""}, + { (char *)"StateVariableOwner_swigregister", StateVariableOwner_swigregister, METH_VARARGS, NULL}, + { (char *)"StateVariableList_append", (PyCFunction) _wrap_StateVariableList_append, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "StateVariableList_append(StateVariableList self, cmf::math::StateVariable::ptr sv)\n" + "\n" + "void\n" + "append(StateVariable::ptr sv) \n" + ""}, + { (char *)"StateVariableList_extend", (PyCFunction) _wrap_StateVariableList_extend, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "StateVariableList_extend(StateVariableList self, StateVariableOwner svo)\n" + "\n" + "void\n" + "extend(StateVariableOwner &svo) \n" + ""}, + { (char *)"StateVariableList___iadd__", _wrap_StateVariableList___iadd__, METH_VARARGS, (char *)"\n" + "__iadd__(StateVariableList food) -> StateVariableList\n" + "StateVariableList___iadd__(StateVariableList self, StateVariableOwner svo) -> StateVariableList\n" + ""}, + { (char *)"StateVariableList_size", (PyCFunction)_wrap_StateVariableList_size, METH_O, (char *)"\n" + "StateVariableList_size(StateVariableList self) -> size_t\n" + "\n" + "size_t\n" + "size() const \n" + ""}, + { (char *)"delete_StateVariableList", (PyCFunction)_wrap_delete_StateVariableList, METH_O, (char *)"\n" + "delete_StateVariableList(StateVariableList self)\n" + "\n" + "virtual\n" + "~StateVariableList() \n" + ""}, + { (char *)"StateVariableList___len__", (PyCFunction)_wrap_StateVariableList___len__, METH_O, (char *)"StateVariableList___len__(StateVariableList self) -> size_t"}, + { (char *)"new_StateVariableList", (PyCFunction)_wrap_new_StateVariableList, METH_NOARGS, (char *)"new_StateVariableList() -> StateVariableList"}, + { (char *)"StateVariableList_swigregister", StateVariableList_swigregister, METH_VARARGS, NULL}, + { (char *)"StateVariableList_swiginit", StateVariableList_swiginit, METH_VARARGS, NULL}, + { (char *)"Integrator_get_dxdt", (PyCFunction) _wrap_Integrator_get_dxdt, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "Integrator_get_dxdt(Integrator self, Time time) -> cmf::math::num_array\n" + "\n" + "cmf::math::num_array get_dxdt(Time time) const \n" + ""}, + { (char *)"Integrator_add_states", (PyCFunction) _wrap_Integrator_add_states, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "Integrator_add_states(Integrator self, StateVariableOwner stateOwner)\n" + "\n" + "virtual\n" + "void add_states(cmf::math::StateVariableOwner &stateOwner)\n" + "\n" + "Add state variables from a StateVariableOwner. \n" + ""}, + { (char *)"Integrator_add_single_state", (PyCFunction) _wrap_Integrator_add_single_state, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "Integrator_add_single_state(Integrator self, cmf::math::StateVariable::ptr state)\n" + "\n" + "virtual void add_single_state(cmf::math::StateVariable::ptr state)\n" + "\n" + "Adds a single state variable to the integrator. \n" + ""}, + { (char *)"Integrator_integratables_set", _wrap_Integrator_integratables_set, METH_VARARGS, (char *)"Integrator_integratables_set(Integrator self, integratable_list integratables)"}, + { (char *)"Integrator_integratables_get", (PyCFunction)_wrap_Integrator_integratables_get, METH_O, (char *)"Integrator_integratables_get(Integrator self) -> integratable_list"}, + { (char *)"Integrator_reset_integratables_set", _wrap_Integrator_reset_integratables_set, METH_VARARGS, (char *)"Integrator_reset_integratables_set(Integrator self, bool reset_integratables)"}, + { (char *)"Integrator_reset_integratables_get", (PyCFunction)_wrap_Integrator_reset_integratables_get, METH_O, (char *)"Integrator_reset_integratables_get(Integrator self) -> bool"}, + { (char *)"Integrator_use_OpenMP_set", _wrap_Integrator_use_OpenMP_set, METH_VARARGS, (char *)"Integrator_use_OpenMP_set(Integrator self, bool use_OpenMP)"}, + { (char *)"Integrator_use_OpenMP_get", (PyCFunction)_wrap_Integrator_use_OpenMP_get, METH_O, (char *)"Integrator_use_OpenMP_get(Integrator self) -> bool"}, + { (char *)"Integrator_size", (PyCFunction)_wrap_Integrator_size, METH_O, (char *)"\n" + "Integrator_size(Integrator self) -> size_t\n" + "\n" + "size_t size()\n" + "const\n" + "\n" + "returns the number of state variables \n" + ""}, + { (char *)"Integrator_get_state", (PyCFunction) _wrap_Integrator_get_state, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "Integrator_get_state(Integrator self, ptrdiff_t position) -> real\n" + "\n" + "real\n" + "get_state(ptrdiff_t position) const\n" + "\n" + "Returns the statevariable at position Simplifies the assessment of\n" + "state variables. \n" + ""}, + { (char *)"Integrator_set_state", (PyCFunction) _wrap_Integrator_set_state, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "Integrator_set_state(Integrator self, ptrdiff_t position, real newState)\n" + "\n" + "void\n" + "set_state(ptrdiff_t position, real newState)\n" + "\n" + "Simplifies the assessment of state variables. \n" + ""}, + { (char *)"Integrator_get_states", _wrap_Integrator_get_states, METH_VARARGS, (char *)"\n" + "get_states() -> cmf::math::num_array\n" + "Integrator_get_states(Integrator self) -> StateVariableList\n" + "\n" + "StateVariableList get_states()\n" + "\n" + "gets the state variables of the integrator \n" + ""}, + { (char *)"delete_Integrator", (PyCFunction)_wrap_delete_Integrator, METH_O, (char *)"\n" + "delete_Integrator(Integrator self)\n" + "\n" + "virtual\n" + "~Integrator() \n" + ""}, + { (char *)"Integrator_get_t", (PyCFunction)_wrap_Integrator_get_t, METH_O, (char *)"\n" + "Integrator_get_t(Integrator self) -> Time\n" + "\n" + "cmf::math::Time\n" + "get_t() const\n" + "\n" + "Returns the current model time. \n" + ""}, + { (char *)"Integrator_set_t", (PyCFunction) _wrap_Integrator_set_t, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "Integrator_set_t(Integrator self, Time val)\n" + "\n" + "void\n" + "set_t(cmf::math::Time val)\n" + "\n" + "Sets the current model time. \n" + ""}, + { (char *)"Integrator_get_dt", (PyCFunction)_wrap_Integrator_get_dt, METH_O, (char *)"\n" + "Integrator_get_dt(Integrator self) -> Time\n" + "\n" + "cmf::math::Time\n" + "get_dt() const\n" + "\n" + "Returns the last time step. \n" + ""}, + { (char *)"Integrator_reset", (PyCFunction)_wrap_Integrator_reset, METH_O, (char *)"\n" + "Integrator_reset(Integrator self)\n" + "\n" + "virtual void\n" + "reset()\n" + "\n" + "Resets any saved history (for multistep methods) \n" + ""}, + { (char *)"Integrator_copy", (PyCFunction)_wrap_Integrator_copy, METH_O, (char *)"\n" + "Integrator_copy(Integrator self) -> Integrator\n" + "\n" + "virtual\n" + "Integrator* copy() const =0\n" + "\n" + "Polymorphic copy constructor. \n" + ""}, + { (char *)"Integrator_integrate", (PyCFunction) _wrap_Integrator_integrate, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "Integrator_integrate(Integrator self, Time t_max, Time dt) -> int\n" + "\n" + "virtual int\n" + "integrate(cmf::math::Time t_max, cmf::math::Time dt)=0\n" + "\n" + "Integrates the vector of state variables.\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "t_max: To stop the model (if running in a model framework) at time\n" + "steps of value exchange e.g. full hours, the next value exchange time\n" + "can be given\n" + "\n" + "dt: Takes the proposed time step, and changes it into the effectively\n" + "used time step according to the local stiffness of the problem and\n" + "MaxTime \n" + ""}, + { (char *)"Integrator_integrate_until", (PyCFunction) _wrap_Integrator_integrate_until, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "Integrator_integrate_until(Integrator self, Time t_max, Time dt, bool reset=False)\n" + "\n" + "void\n" + "integrate_until(cmf::math::Time t_max, cmf::math::Time dt=Time(), bool\n" + "reset=false)\n" + "\n" + "Integrates the vector of state variables until t_max.\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "t_max: Time, the solver should run to\n" + "\n" + "dt: Time step (may be omitted)\n" + "\n" + "reset: If true, solver is reseted before integration starts \n" + ""}, + { (char *)"Integrator___getitem__", (PyCFunction) _wrap_Integrator___getitem__, METH_VARARGS | METH_KEYWORDS, (char *)"Integrator___getitem__(Integrator self, int index) -> cmf::math::StateVariable::ptr"}, + { (char *)"Integrator_swigregister", Integrator_swigregister, METH_VARARGS, NULL}, + { (char *)"BDF2_get_error_position", (PyCFunction)_wrap_BDF2_get_error_position, METH_O, (char *)"\n" + "BDF2_get_error_position(BDF2 self) -> int\n" + "\n" + "int\n" + "get_error_position() const\n" + "\n" + "Returns the position of the biggest error. \n" + ""}, + { (char *)"BDF2_max_order_set", _wrap_BDF2_max_order_set, METH_VARARGS, (char *)"BDF2_max_order_set(BDF2 self, int max_order)"}, + { (char *)"BDF2_max_order_get", (PyCFunction)_wrap_BDF2_max_order_get, METH_O, (char *)"BDF2_max_order_get(BDF2 self) -> int"}, + { (char *)"new_BDF2", _wrap_new_BDF2, METH_VARARGS, (char *)"\n" + "BDF2(real epsilon=1e-9, Time tStepMin)\n" + "BDF2(StateVariableOwner states, real epsilon=1e-9, Time tStepMin)\n" + "new_BDF2(Integrator templ) -> BDF2\n" + "\n" + "BDF2(const Integrator\n" + "&templ)\n" + "\n" + "Constructs a new BDF2 integrator.\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "templ: Template to be used to construct a BDF2 method \n" + ""}, + { (char *)"delete_BDF2", (PyCFunction)_wrap_delete_BDF2, METH_O, (char *)"delete_BDF2(BDF2 self)"}, + { (char *)"BDF2_swigregister", BDF2_swigregister, METH_VARARGS, NULL}, + { (char *)"BDF2_swiginit", BDF2_swiginit, METH_VARARGS, NULL}, + { (char *)"new_ExplicitEuler_fixed", _wrap_new_ExplicitEuler_fixed, METH_VARARGS, (char *)"\n" + "ExplicitEuler_fixed(StateVariableOwner states)\n" + "ExplicitEuler_fixed()\n" + "new_ExplicitEuler_fixed(Integrator copy) -> ExplicitEuler_fixed\n" + "\n" + "ExplicitEuler_fixed(const Integrator ©)\n" + "\n" + "copy constructor \n" + ""}, + { (char *)"delete_ExplicitEuler_fixed", (PyCFunction)_wrap_delete_ExplicitEuler_fixed, METH_O, (char *)"\n" + "delete_ExplicitEuler_fixed(ExplicitEuler_fixed self)\n" + "\n" + "virtual\n" + "~ExplicitEuler_fixed() \n" + ""}, + { (char *)"ExplicitEuler_fixed_swigregister", ExplicitEuler_fixed_swigregister, METH_VARARGS, NULL}, + { (char *)"ExplicitEuler_fixed_swiginit", ExplicitEuler_fixed_swiginit, METH_VARARGS, NULL}, + { (char *)"HeunIntegrator_alpha_set", _wrap_HeunIntegrator_alpha_set, METH_VARARGS, (char *)"HeunIntegrator_alpha_set(HeunIntegrator self, real alpha)"}, + { (char *)"HeunIntegrator_alpha_get", (PyCFunction)_wrap_HeunIntegrator_alpha_get, METH_O, (char *)"HeunIntegrator_alpha_get(HeunIntegrator self) -> real"}, + { (char *)"new_HeunIntegrator", _wrap_new_HeunIntegrator, METH_VARARGS, (char *)"\n" + "HeunIntegrator(StateVariableOwner states, real Alpha=0.5)\n" + "HeunIntegrator(real Alpha=0.5)\n" + "new_HeunIntegrator(Integrator copy) -> HeunIntegrator\n" + "\n" + "HeunIntegrator(const Integrator ©)\n" + "\n" + "copy constructor \n" + ""}, + { (char *)"delete_HeunIntegrator", (PyCFunction)_wrap_delete_HeunIntegrator, METH_O, (char *)"\n" + "delete_HeunIntegrator(HeunIntegrator self)\n" + "\n" + "virtual ~HeunIntegrator() \n" + ""}, + { (char *)"HeunIntegrator_swigregister", HeunIntegrator_swigregister, METH_VARARGS, NULL}, + { (char *)"HeunIntegrator_swiginit", HeunIntegrator_swiginit, METH_VARARGS, NULL}, + { (char *)"ImplicitEuler_dt_min_set", _wrap_ImplicitEuler_dt_min_set, METH_VARARGS, (char *)"ImplicitEuler_dt_min_set(ImplicitEuler self, Time dt_min)"}, + { (char *)"ImplicitEuler_dt_min_get", (PyCFunction)_wrap_ImplicitEuler_dt_min_get, METH_O, (char *)"ImplicitEuler_dt_min_get(ImplicitEuler self) -> Time"}, + { (char *)"new_ImplicitEuler", _wrap_new_ImplicitEuler, METH_VARARGS, (char *)"\n" + "ImplicitEuler(StateVariableOwner states, real epsilon=1e-9, Time tStepMin)\n" + "ImplicitEuler(real epsilon=1e-9, Time tStepMin)\n" + "new_ImplicitEuler(Integrator arg2) -> ImplicitEuler\n" + "\n" + "ImplicitEuler(const Integrator &)\n" + "\n" + "copy constructor \n" + ""}, + { (char *)"delete_ImplicitEuler", (PyCFunction)_wrap_delete_ImplicitEuler, METH_O, (char *)"delete_ImplicitEuler(ImplicitEuler self)"}, + { (char *)"ImplicitEuler_swigregister", ImplicitEuler_swigregister, METH_VARARGS, NULL}, + { (char *)"ImplicitEuler_swiginit", ImplicitEuler_swiginit, METH_VARARGS, NULL}, + { (char *)"new_RKFIntegrator", _wrap_new_RKFIntegrator, METH_VARARGS, (char *)"\n" + "RKFIntegrator(StateVariableOwner states, real epsilon=1e-9, Time dt_min)\n" + "new_RKFIntegrator(real epsilon=1e-9, Time dt_min) -> RKFIntegrator\n" + "\n" + "RKFIntegrator(real epsilon=1e-9, cmf::math::Time\n" + "dt_min=cmf::math::timespan(1000))\n" + "\n" + "Constructs a new RKFIntegrator.\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "epsilon: relative error tolerance per time step (default=1e-9)\n" + "\n" + "dt_min: minimum time step (default=1s) \n" + ""}, + { (char *)"delete_RKFIntegrator", (PyCFunction)_wrap_delete_RKFIntegrator, METH_O, (char *)"delete_RKFIntegrator(RKFIntegrator self)"}, + { (char *)"RKFIntegrator_swigregister", RKFIntegrator_swigregister, METH_VARARGS, NULL}, + { (char *)"RKFIntegrator_swiginit", RKFIntegrator_swiginit, METH_VARARGS, NULL}, + { (char *)"CVodeIntegrator_preconditioner_set", _wrap_CVodeIntegrator_preconditioner_set, METH_VARARGS, (char *)"CVodeIntegrator_preconditioner_set(CVodeIntegrator self, char preconditioner)"}, + { (char *)"CVodeIntegrator_preconditioner_get", (PyCFunction)_wrap_CVodeIntegrator_preconditioner_get, METH_O, (char *)"CVodeIntegrator_preconditioner_get(CVodeIntegrator self) -> char"}, + { (char *)"CVodeIntegrator_MaxNonLinearIterations_set", _wrap_CVodeIntegrator_MaxNonLinearIterations_set, METH_VARARGS, (char *)"CVodeIntegrator_MaxNonLinearIterations_set(CVodeIntegrator self, int MaxNonLinearIterations)"}, + { (char *)"CVodeIntegrator_MaxNonLinearIterations_get", (PyCFunction)_wrap_CVodeIntegrator_MaxNonLinearIterations_get, METH_O, (char *)"CVodeIntegrator_MaxNonLinearIterations_get(CVodeIntegrator self) -> int"}, + { (char *)"CVodeIntegrator_MaxConvergenceFailures_set", _wrap_CVodeIntegrator_MaxConvergenceFailures_set, METH_VARARGS, (char *)"CVodeIntegrator_MaxConvergenceFailures_set(CVodeIntegrator self, int MaxConvergenceFailures)"}, + { (char *)"CVodeIntegrator_MaxConvergenceFailures_get", (PyCFunction)_wrap_CVodeIntegrator_MaxConvergenceFailures_get, METH_O, (char *)"CVodeIntegrator_MaxConvergenceFailures_get(CVodeIntegrator self) -> int"}, + { (char *)"CVodeIntegrator_MaxErrorTestFailures_set", _wrap_CVodeIntegrator_MaxErrorTestFailures_set, METH_VARARGS, (char *)"CVodeIntegrator_MaxErrorTestFailures_set(CVodeIntegrator self, int MaxErrorTestFailures)"}, + { (char *)"CVodeIntegrator_MaxErrorTestFailures_get", (PyCFunction)_wrap_CVodeIntegrator_MaxErrorTestFailures_get, METH_O, (char *)"CVodeIntegrator_MaxErrorTestFailures_get(CVodeIntegrator self) -> int"}, + { (char *)"CVodeIntegrator_maxl_set", _wrap_CVodeIntegrator_maxl_set, METH_VARARGS, (char *)"CVodeIntegrator_maxl_set(CVodeIntegrator self, int maxl)"}, + { (char *)"CVodeIntegrator_maxl_get", (PyCFunction)_wrap_CVodeIntegrator_maxl_get, METH_O, (char *)"CVodeIntegrator_maxl_get(CVodeIntegrator self) -> int"}, + { (char *)"CVodeIntegrator_LinearSolver_set", _wrap_CVodeIntegrator_LinearSolver_set, METH_VARARGS, (char *)"CVodeIntegrator_LinearSolver_set(CVodeIntegrator self, int LinearSolver)"}, + { (char *)"CVodeIntegrator_LinearSolver_get", (PyCFunction)_wrap_CVodeIntegrator_LinearSolver_get, METH_O, (char *)"CVodeIntegrator_LinearSolver_get(CVodeIntegrator self) -> int"}, + { (char *)"CVodeIntegrator_MaxOrder_set", _wrap_CVodeIntegrator_MaxOrder_set, METH_VARARGS, (char *)"CVodeIntegrator_MaxOrder_set(CVodeIntegrator self, int MaxOrder)"}, + { (char *)"CVodeIntegrator_MaxOrder_get", (PyCFunction)_wrap_CVodeIntegrator_MaxOrder_get, METH_O, (char *)"CVodeIntegrator_MaxOrder_get(CVodeIntegrator self) -> int"}, + { (char *)"CVodeIntegrator_max_step_set", _wrap_CVodeIntegrator_max_step_set, METH_VARARGS, (char *)"CVodeIntegrator_max_step_set(CVodeIntegrator self, Time max_step)"}, + { (char *)"CVodeIntegrator_max_step_get", (PyCFunction)_wrap_CVodeIntegrator_max_step_get, METH_O, (char *)"CVodeIntegrator_max_step_get(CVodeIntegrator self) -> Time"}, + { (char *)"CVodeIntegrator_initialize", (PyCFunction)_wrap_CVodeIntegrator_initialize, METH_O, (char *)"\n" + "CVodeIntegrator_initialize(CVodeIntegrator self)\n" + "\n" + "void\n" + "initialize()\n" + "\n" + "Initializes the solver. Do not add or remove state variables after\n" + "initialization. The solver is automatically intialized when\n" + "integrating. \n" + ""}, + { (char *)"CVodeIntegrator_release", (PyCFunction)_wrap_CVodeIntegrator_release, METH_O, (char *)"\n" + "CVodeIntegrator_release(CVodeIntegrator self)\n" + "\n" + "void\n" + "release()\n" + "\n" + "Releases the internal solver. Call release before you add state\n" + "variables or to change properties. \n" + ""}, + { (char *)"new_CVodeIntegrator", _wrap_new_CVodeIntegrator, METH_VARARGS, (char *)"\n" + "CVodeIntegrator(real epsilon=1e-9, char _preconditioner)\n" + "CVodeIntegrator(StateVariableOwner states, real epsilon=1e-9, char _preconditioner)\n" + "new_CVodeIntegrator(CVodeIntegrator templ) -> CVodeIntegrator\n" + "\n" + "CVodeIntegrator(const CVodeIntegrator &templ)\n" + "\n" + "copy constructor, creates a new CVODE integrator similiar to the\n" + "given, but without statevariables \n" + ""}, + { (char *)"CVodeIntegrator_get_error", (PyCFunction)_wrap_CVodeIntegrator_get_error, METH_O, (char *)"\n" + "CVodeIntegrator_get_error(CVodeIntegrator self) -> cmf::math::num_array\n" + "\n" + "cmf::math::num_array get_error() const\n" + "\n" + "Error vector of the integrator. \n" + ""}, + { (char *)"CVodeIntegrator_get_nonlinear_iterations", (PyCFunction)_wrap_CVodeIntegrator_get_nonlinear_iterations, METH_O, (char *)"\n" + "CVodeIntegrator_get_nonlinear_iterations(CVodeIntegrator self) -> int\n" + "\n" + "int\n" + "get_nonlinear_iterations() const\n" + "\n" + "Returns the number of non-linear iterations performed. Calls\n" + "CVodeGetNumNonlinSolvIters. \n" + ""}, + { (char *)"CVodeIntegrator_get_rhsevals", (PyCFunction)_wrap_CVodeIntegrator_get_rhsevals, METH_O, (char *)"\n" + "CVodeIntegrator_get_rhsevals(CVodeIntegrator self) -> int\n" + "\n" + "int\n" + "get_rhsevals() const\n" + "\n" + "Returns the number of evaluations of the right hand side of the ODE.\n" + "Calls CVodeGetNumRhsEvals. \n" + ""}, + { (char *)"CVodeIntegrator_copy", (PyCFunction)_wrap_CVodeIntegrator_copy, METH_O, (char *)"\n" + "CVodeIntegrator_copy(CVodeIntegrator self) -> CVodeIntegrator\n" + "\n" + "CVodeIntegrator* copy() const\n" + "\n" + "Polymorphic copy constructor. \n" + ""}, + { (char *)"delete_CVodeIntegrator", (PyCFunction)_wrap_delete_CVodeIntegrator, METH_O, (char *)"\n" + "delete_CVodeIntegrator(CVodeIntegrator self)\n" + "\n" + "virtual ~CVodeIntegrator() \n" + ""}, + { (char *)"CVodeIntegrator_order_get", (PyCFunction)_wrap_CVodeIntegrator_order_get, METH_O, (char *)"CVodeIntegrator_order_get(CVodeIntegrator self) -> int"}, + { (char *)"CVodeIntegrator_swigregister", CVodeIntegrator_swigregister, METH_VARARGS, NULL}, + { (char *)"CVodeIntegrator_swiginit", CVodeIntegrator_swiginit, METH_VARARGS, NULL}, + { (char *)"MultiIntegrator_copy", (PyCFunction)_wrap_MultiIntegrator_copy, METH_O, (char *)"\n" + "MultiIntegrator_copy(MultiIntegrator self) -> MultiIntegrator\n" + "\n" + "virtual\n" + "cmf::math::MultiIntegrator* copy() const\n" + "\n" + "Polymorphic copy constructor. \n" + ""}, + { (char *)"MultiIntegrator_add_states_to_integrator", (PyCFunction) _wrap_MultiIntegrator_add_states_to_integrator, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "MultiIntegrator_add_states_to_integrator(MultiIntegrator self, StateVariableOwner stateOwner, int integrator_position)\n" + "\n" + "void\n" + "add_states_to_integrator(cmf::math::StateVariableOwner &stateOwner,\n" + "int integrator_position)\n" + "\n" + "Add state variables from a StateVariableOwner. \n" + ""}, + { (char *)"new_MultiIntegrator", (PyCFunction) _wrap_new_MultiIntegrator, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "new_MultiIntegrator(Integrator template_integrator, int count) -> MultiIntegrator\n" + "\n" + "MultiIntegrator(const cmf::math::Integrator &template_integrator, int\n" + "count)\n" + "\n" + "Creates a new MultiIntegrator.\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "template_integrator: Template for the integrators\n" + "\n" + "count: Number of integrators \n" + ""}, + { (char *)"delete_MultiIntegrator", (PyCFunction)_wrap_delete_MultiIntegrator, METH_O, (char *)"delete_MultiIntegrator(MultiIntegrator self)"}, + { (char *)"MultiIntegrator_swigregister", MultiIntegrator_swigregister, METH_VARARGS, NULL}, + { (char *)"MultiIntegrator_swiginit", MultiIntegrator_swiginit, METH_VARARGS, NULL}, + { (char *)"Adsorption_freesolute", (PyCFunction) _wrap_Adsorption_freesolute, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "Adsorption_freesolute(Adsorption self, real xt, real V) -> real\n" + "\n" + "virtual\n" + "real freesolute(real xt, real V) const =0\n" + "\n" + "Returns the mass of dissolved tracer as a function of the total tracer\n" + "mass in the solute storage and the water volume.\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "xt: :math:`x_t` the total tracer mass in the storage\n" + "\n" + "V: :math:`V m^3` the water volume in the storage\n" + "\n" + ":math:`x_f` the dissolved mass of the tracer \n" + ""}, + { (char *)"Adsorption_totalsolute", (PyCFunction) _wrap_Adsorption_totalsolute, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "Adsorption_totalsolute(Adsorption self, real xf, real V) -> real\n" + "\n" + "virtual\n" + "real totalsolute(real xf, real V) const =0\n" + "\n" + "Returns the total mass of the tracer from the dissolved concetration\n" + "in tracer unit/m3.\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "xf: :math:`x_f` the dissolved tracer mass in the storage\n" + "\n" + "V: :math:`V m^3` the water volume in the storage\n" + "\n" + ":math:`x_t` the total mass of the tracer \n" + ""}, + { (char *)"Adsorption_copy", (PyCFunction) _wrap_Adsorption_copy, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "Adsorption_copy(Adsorption self, real m=-1) -> Adsorption\n" + "\n" + "virtual\n" + "Adsorption* copy(real m=-1) const =0\n" + "\n" + "returns a copy of the Adsorption object.\n" + "\n" + "If the adsorption is depending on the sorbent mass, you can give a\n" + "positive value for the sorbent mass m. If the value is not given or\n" + "negative, m is used from the original object. \n" + ""}, + { (char *)"delete_Adsorption", (PyCFunction)_wrap_delete_Adsorption, METH_O, (char *)"\n" + "delete_Adsorption(Adsorption self)\n" + "\n" + "virtual\n" + "~Adsorption() \n" + ""}, + { (char *)"Adsorption_swigregister", Adsorption_swigregister, METH_VARARGS, NULL}, + { (char *)"NullAdsorption_copy", (PyCFunction) _wrap_NullAdsorption_copy, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "NullAdsorption_copy(NullAdsorption self, real m=-1) -> NullAdsorption\n" + "\n" + "virtual\n" + "NullAdsorption* copy(real m=-1) const\n" + "\n" + "returns a copy of the Adsorption object.\n" + "\n" + "If the adsorption is depending on the sorbent mass, you can give a\n" + "positive value for the sorbent mass m. If the value is not given or\n" + "negative, m is used from the original object. \n" + ""}, + { (char *)"delete_NullAdsorption", (PyCFunction)_wrap_delete_NullAdsorption, METH_O, (char *)"\n" + "delete_NullAdsorption(NullAdsorption self)\n" + "\n" + "virtual ~NullAdsorption() \n" + ""}, + { (char *)"new_NullAdsorption", (PyCFunction)_wrap_new_NullAdsorption, METH_NOARGS, (char *)"new_NullAdsorption() -> NullAdsorption"}, + { (char *)"NullAdsorption_swigregister", NullAdsorption_swigregister, METH_VARARGS, NULL}, + { (char *)"NullAdsorption_swiginit", NullAdsorption_swiginit, METH_VARARGS, NULL}, + { (char *)"LinearAdsorption_K_set", _wrap_LinearAdsorption_K_set, METH_VARARGS, (char *)"LinearAdsorption_K_set(LinearAdsorption self, real K)"}, + { (char *)"LinearAdsorption_K_get", (PyCFunction)_wrap_LinearAdsorption_K_get, METH_O, (char *)"LinearAdsorption_K_get(LinearAdsorption self) -> real"}, + { (char *)"LinearAdsorption_m_set", _wrap_LinearAdsorption_m_set, METH_VARARGS, (char *)"LinearAdsorption_m_set(LinearAdsorption self, real m)"}, + { (char *)"LinearAdsorption_m_get", (PyCFunction)_wrap_LinearAdsorption_m_get, METH_O, (char *)"LinearAdsorption_m_get(LinearAdsorption self) -> real"}, + { (char *)"new_LinearAdsorption", _wrap_new_LinearAdsorption, METH_VARARGS, (char *)"\n" + "LinearAdsorption(real K, real m)\n" + "new_LinearAdsorption(LinearAdsorption other) -> LinearAdsorption\n" + "\n" + "LinearAdsorption(const LinearAdsorption &other) \n" + ""}, + { (char *)"LinearAdsorption_copy", (PyCFunction) _wrap_LinearAdsorption_copy, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "LinearAdsorption_copy(LinearAdsorption self, real m=-1) -> LinearAdsorption\n" + "\n" + "LinearAdsorption* copy(real m=-1) const\n" + "\n" + "returns a copy of the Adsorption object.\n" + "\n" + "If the adsorption is depending on the sorbent mass, you can give a\n" + "positive value for the sorbent mass m. If the value is not given or\n" + "negative, m is used from the original object. \n" + ""}, + { (char *)"delete_LinearAdsorption", (PyCFunction)_wrap_delete_LinearAdsorption, METH_O, (char *)"\n" + "delete_LinearAdsorption(LinearAdsorption self)\n" + "\n" + "virtual ~LinearAdsorption() \n" + ""}, + { (char *)"LinearAdsorption_swigregister", LinearAdsorption_swigregister, METH_VARARGS, NULL}, + { (char *)"LinearAdsorption_swiginit", LinearAdsorption_swiginit, METH_VARARGS, NULL}, + { (char *)"FreundlichAdsorbtion_K_set", _wrap_FreundlichAdsorbtion_K_set, METH_VARARGS, (char *)"FreundlichAdsorbtion_K_set(FreundlichAdsorbtion self, real K)"}, + { (char *)"FreundlichAdsorbtion_K_get", (PyCFunction)_wrap_FreundlichAdsorbtion_K_get, METH_O, (char *)"FreundlichAdsorbtion_K_get(FreundlichAdsorbtion self) -> real"}, + { (char *)"FreundlichAdsorbtion_n_set", _wrap_FreundlichAdsorbtion_n_set, METH_VARARGS, (char *)"FreundlichAdsorbtion_n_set(FreundlichAdsorbtion self, real n)"}, + { (char *)"FreundlichAdsorbtion_n_get", (PyCFunction)_wrap_FreundlichAdsorbtion_n_get, METH_O, (char *)"FreundlichAdsorbtion_n_get(FreundlichAdsorbtion self) -> real"}, + { (char *)"FreundlichAdsorbtion_m_set", _wrap_FreundlichAdsorbtion_m_set, METH_VARARGS, (char *)"FreundlichAdsorbtion_m_set(FreundlichAdsorbtion self, real m)"}, + { (char *)"FreundlichAdsorbtion_m_get", (PyCFunction)_wrap_FreundlichAdsorbtion_m_get, METH_O, (char *)"FreundlichAdsorbtion_m_get(FreundlichAdsorbtion self) -> real"}, + { (char *)"FreundlichAdsorbtion_epsilon_set", _wrap_FreundlichAdsorbtion_epsilon_set, METH_VARARGS, (char *)"FreundlichAdsorbtion_epsilon_set(FreundlichAdsorbtion self, real epsilon)"}, + { (char *)"FreundlichAdsorbtion_epsilon_get", (PyCFunction)_wrap_FreundlichAdsorbtion_epsilon_get, METH_O, (char *)"FreundlichAdsorbtion_epsilon_get(FreundlichAdsorbtion self) -> real"}, + { (char *)"FreundlichAdsorbtion_maxiter_set", _wrap_FreundlichAdsorbtion_maxiter_set, METH_VARARGS, (char *)"FreundlichAdsorbtion_maxiter_set(FreundlichAdsorbtion self, int maxiter)"}, + { (char *)"FreundlichAdsorbtion_maxiter_get", (PyCFunction)_wrap_FreundlichAdsorbtion_maxiter_get, METH_O, (char *)"FreundlichAdsorbtion_maxiter_get(FreundlichAdsorbtion self) -> int"}, + { (char *)"new_FreundlichAdsorbtion", _wrap_new_FreundlichAdsorbtion, METH_VARARGS, (char *)"\n" + "FreundlichAdsorbtion(real K, real n, real m, real epsilon=1e-12, int maxiter=100)\n" + "new_FreundlichAdsorbtion(FreundlichAdsorbtion other) -> FreundlichAdsorbtion\n" + "\n" + "FreundlichAdsorbtion(const FreundlichAdsorbtion &other) \n" + ""}, + { (char *)"FreundlichAdsorbtion_copy", (PyCFunction) _wrap_FreundlichAdsorbtion_copy, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "FreundlichAdsorbtion_copy(FreundlichAdsorbtion self, real m=-1) -> FreundlichAdsorbtion\n" + "\n" + "FreundlichAdsorbtion* copy(real m=-1) const\n" + "\n" + "returns a copy of the Adsorption object.\n" + "\n" + "If the adsorption is depending on the sorbent mass, you can give a\n" + "positive value for the sorbent mass m. If the value is not given or\n" + "negative, m is used from the original object. \n" + ""}, + { (char *)"delete_FreundlichAdsorbtion", (PyCFunction)_wrap_delete_FreundlichAdsorbtion, METH_O, (char *)"\n" + "delete_FreundlichAdsorbtion(FreundlichAdsorbtion self)\n" + "\n" + "virtual\n" + "~FreundlichAdsorbtion() \n" + ""}, + { (char *)"FreundlichAdsorbtion_swigregister", FreundlichAdsorbtion_swigregister, METH_VARARGS, NULL}, + { (char *)"FreundlichAdsorbtion_swiginit", FreundlichAdsorbtion_swiginit, METH_VARARGS, NULL}, + { (char *)"LangmuirAdsorption_K_set", _wrap_LangmuirAdsorption_K_set, METH_VARARGS, (char *)"LangmuirAdsorption_K_set(LangmuirAdsorption self, real K)"}, + { (char *)"LangmuirAdsorption_K_get", (PyCFunction)_wrap_LangmuirAdsorption_K_get, METH_O, (char *)"LangmuirAdsorption_K_get(LangmuirAdsorption self) -> real"}, + { (char *)"LangmuirAdsorption_m_set", _wrap_LangmuirAdsorption_m_set, METH_VARARGS, (char *)"LangmuirAdsorption_m_set(LangmuirAdsorption self, real m)"}, + { (char *)"LangmuirAdsorption_m_get", (PyCFunction)_wrap_LangmuirAdsorption_m_get, METH_O, (char *)"LangmuirAdsorption_m_get(LangmuirAdsorption self) -> real"}, + { (char *)"new_LangmuirAdsorption", _wrap_new_LangmuirAdsorption, METH_VARARGS, (char *)"\n" + "LangmuirAdsorption(real K, real m)\n" + "new_LangmuirAdsorption(LangmuirAdsorption other) -> LangmuirAdsorption\n" + "\n" + "LangmuirAdsorption(const LangmuirAdsorption &other) \n" + ""}, + { (char *)"LangmuirAdsorption_copy", (PyCFunction) _wrap_LangmuirAdsorption_copy, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "LangmuirAdsorption_copy(LangmuirAdsorption self, real m=-1) -> LangmuirAdsorption\n" + "\n" + "LangmuirAdsorption* copy(real m=-1) const\n" + "\n" + "returns a copy of the Adsorption object.\n" + "\n" + "If the adsorption is depending on the sorbent mass, you can give a\n" + "positive value for the sorbent mass m. If the value is not given or\n" + "negative, m is used from the original object. \n" + ""}, + { (char *)"delete_LangmuirAdsorption", (PyCFunction)_wrap_delete_LangmuirAdsorption, METH_O, (char *)"\n" + "delete_LangmuirAdsorption(LangmuirAdsorption self)\n" + "\n" + "virtual\n" + "~LangmuirAdsorption() \n" + ""}, + { (char *)"LangmuirAdsorption_swigregister", LangmuirAdsorption_swigregister, METH_VARARGS, NULL}, + { (char *)"LangmuirAdsorption_swiginit", LangmuirAdsorption_swiginit, METH_VARARGS, NULL}, + { (char *)"new_solute", (PyCFunction) _wrap_new_solute, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "new_solute(solute copy) -> solute\n" + "\n" + "solute(const\n" + "solute ©) \n" + ""}, + { (char *)"solute___eq__", (PyCFunction) _wrap_solute___eq__, METH_VARARGS | METH_KEYWORDS, (char *)"solute___eq__(solute self, solute cmp) -> bool"}, + { (char *)"solute___lt__", (PyCFunction) _wrap_solute___lt__, METH_VARARGS | METH_KEYWORDS, (char *)"solute___lt__(solute self, solute cmp) -> bool"}, + { (char *)"solute___gt__", (PyCFunction) _wrap_solute___gt__, METH_VARARGS | METH_KEYWORDS, (char *)"solute___gt__(solute self, solute cmp) -> bool"}, + { (char *)"solute___le__", (PyCFunction) _wrap_solute___le__, METH_VARARGS | METH_KEYWORDS, (char *)"solute___le__(solute self, solute cmp) -> bool"}, + { (char *)"solute___ge__", (PyCFunction) _wrap_solute___ge__, METH_VARARGS | METH_KEYWORDS, (char *)"solute___ge__(solute self, solute cmp) -> bool"}, + { (char *)"solute___ne__", (PyCFunction) _wrap_solute___ne__, METH_VARARGS | METH_KEYWORDS, (char *)"solute___ne__(solute self, solute cmp) -> bool"}, + { (char *)"solute_Name_set", _wrap_solute_Name_set, METH_VARARGS, (char *)"solute_Name_set(solute self, std::string const & Name)"}, + { (char *)"solute_Name_get", (PyCFunction)_wrap_solute_Name_get, METH_O, (char *)"solute_Name_get(solute self) -> std::string const &"}, + { (char *)"solute_Unit_set", _wrap_solute_Unit_set, METH_VARARGS, (char *)"solute_Unit_set(solute self, std::string const & Unit)"}, + { (char *)"solute_Unit_get", (PyCFunction)_wrap_solute_Unit_get, METH_O, (char *)"solute_Unit_get(solute self) -> std::string const &"}, + { (char *)"solute_Uptake_set", _wrap_solute_Uptake_set, METH_VARARGS, (char *)"solute_Uptake_set(solute self, double Uptake)"}, + { (char *)"solute_Uptake_get", (PyCFunction)_wrap_solute_Uptake_get, METH_O, (char *)"solute_Uptake_get(solute self) -> double"}, + { (char *)"solute_Id_get", (PyCFunction)_wrap_solute_Id_get, METH_O, (char *)"solute_Id_get(solute self) -> size_t const"}, + { (char *)"solute___repr__", (PyCFunction)_wrap_solute___repr__, METH_O, (char *)"solute___repr__(solute self) -> std::string"}, + { (char *)"delete_solute", (PyCFunction)_wrap_delete_solute, METH_O, (char *)"delete_solute(solute self)"}, + { (char *)"solute_swigregister", solute_swigregister, METH_VARARGS, NULL}, + { (char *)"solute_swiginit", solute_swiginit, METH_VARARGS, NULL}, + { (char *)"solute_vector_size", (PyCFunction)_wrap_solute_vector_size, METH_O, (char *)"\n" + "solute_vector_size(solute_vector self) -> size_t\n" + "\n" + "size_t size()\n" + "const \n" + ""}, + { (char *)"new_solute_vector", (PyCFunction) _wrap_new_solute_vector, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "new_solute_vector(std::string str) -> solute_vector\n" + "\n" + "solute_vector(std::string str)\n" + "\n" + "Creates a solute vector from solute names, separated by whitespace.\n" + "E.g. solutes= solute_vector(\"dO18 dH2\") \n" + ""}, + { (char *)"solute_vector_get_solute", (PyCFunction) _wrap_solute_vector_get_solute, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "solute_vector_get_solute(solute_vector self, int position) -> solute\n" + "\n" + "cmf::water::solute* get_solute(int position) \n" + ""}, + { (char *)"solute_vector___getitem__", (PyCFunction) _wrap_solute_vector___getitem__, METH_VARARGS | METH_KEYWORDS, (char *)"solute_vector___getitem__(solute_vector self, int i) -> solute"}, + { (char *)"solute_vector___len__", (PyCFunction)_wrap_solute_vector___len__, METH_O, (char *)"solute_vector___len__(solute_vector self) -> size_t"}, + { (char *)"delete_solute_vector", (PyCFunction)_wrap_delete_solute_vector, METH_O, (char *)"delete_solute_vector(solute_vector self)"}, + { (char *)"solute_vector_swigregister", solute_vector_swigregister, METH_VARARGS, NULL}, + { (char *)"solute_vector_swiginit", solute_vector_swiginit, METH_VARARGS, NULL}, + { (char *)"SoluteTimeseries_conc", (PyCFunction) _wrap_SoluteTimeseries_conc, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "SoluteTimeseries_conc(SoluteTimeseries self, Time t, solute _Solute) -> real\n" + "\n" + "real\n" + "conc(cmf::math::Time t, const cmf::water::solute &_Solute) const \n" + ""}, + { (char *)"SoluteTimeseries_size", (PyCFunction)_wrap_SoluteTimeseries_size, METH_O, (char *)"\n" + "SoluteTimeseries_size(SoluteTimeseries self) -> size_t\n" + "\n" + "size_t\n" + "size() const\n" + "\n" + "Returns the number of solutes in the solution. \n" + ""}, + { (char *)"new_SoluteTimeseries", _wrap_new_SoluteTimeseries, METH_VARARGS, (char *)"\n" + "SoluteTimeseries()\n" + "SoluteTimeseries(solute_vector solutes, Time begin, Time step)\n" + "new_SoluteTimeseries(SoluteTimeseries sts) -> SoluteTimeseries\n" + "\n" + "SoluteTimeseries(const cmf::water::SoluteTimeseries &sts) \n" + ""}, + { (char *)"SoluteTimeseries___getitem__", (PyCFunction) _wrap_SoluteTimeseries___getitem__, METH_VARARGS | METH_KEYWORDS, (char *)"SoluteTimeseries___getitem__(SoluteTimeseries self, solute solute) -> timeseries"}, + { (char *)"SoluteTimeseries___setitem__", (PyCFunction) _wrap_SoluteTimeseries___setitem__, METH_VARARGS | METH_KEYWORDS, (char *)"SoluteTimeseries___setitem__(SoluteTimeseries self, solute solute, timeseries concentration)"}, + { (char *)"SoluteTimeseries___len__", (PyCFunction)_wrap_SoluteTimeseries___len__, METH_O, (char *)"SoluteTimeseries___len__(SoluteTimeseries self) -> size_t"}, + { (char *)"delete_SoluteTimeseries", (PyCFunction)_wrap_delete_SoluteTimeseries, METH_O, (char *)"delete_SoluteTimeseries(SoluteTimeseries self)"}, + { (char *)"SoluteTimeseries_swigregister", SoluteTimeseries_swigregister, METH_VARARGS, NULL}, + { (char *)"SoluteTimeseries_swiginit", SoluteTimeseries_swiginit, METH_VARARGS, NULL}, + { (char *)"SoluteStorage_set_adsorption", (PyCFunction) _wrap_SoluteStorage_set_adsorption, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "SoluteStorage_set_adsorption(SoluteStorage self, Adsorption newadsorption, real m=-1)\n" + "\n" + "void set_adsorption(const Adsorption &newadsorption, real m=-1) \n" + ""}, + { (char *)"SoluteStorage_decay_set", _wrap_SoluteStorage_decay_set, METH_VARARGS, (char *)"SoluteStorage_decay_set(SoluteStorage self, real decay)"}, + { (char *)"SoluteStorage_decay_get", (PyCFunction)_wrap_SoluteStorage_decay_get, METH_O, (char *)"SoluteStorage_decay_get(SoluteStorage self) -> real"}, + { (char *)"SoluteStorage_source_set", _wrap_SoluteStorage_source_set, METH_VARARGS, (char *)"SoluteStorage_source_set(SoluteStorage self, real source)"}, + { (char *)"SoluteStorage_source_get", (PyCFunction)_wrap_SoluteStorage_source_get, METH_O, (char *)"SoluteStorage_source_get(SoluteStorage self) -> real"}, + { (char *)"SoluteStorage_Solute_get", (PyCFunction)_wrap_SoluteStorage_Solute_get, METH_O, (char *)"SoluteStorage_Solute_get(SoluteStorage self) -> solute"}, + { (char *)"SoluteStorage_conc", (PyCFunction)_wrap_SoluteStorage_conc, METH_O, (char *)"\n" + "SoluteStorage_conc(SoluteStorage self) -> real\n" + "\n" + "real conc()\n" + "const\n" + "\n" + "Returns the concentration of the solute. \n" + ""}, + { (char *)"SoluteStorage_set_conc", (PyCFunction) _wrap_SoluteStorage_set_conc, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "SoluteStorage_set_conc(SoluteStorage self, real NewConcentration)\n" + "\n" + "void\n" + "set_conc(real NewConcentration)\n" + "\n" + "set a new concentration of dissolved tracers.\n" + "\n" + "In case of adsorption functions, the isotherm is used \n" + ""}, + { (char *)"delete_SoluteStorage", (PyCFunction)_wrap_delete_SoluteStorage, METH_O, (char *)"delete_SoluteStorage(SoluteStorage self)"}, + { (char *)"SoluteStorage_swigregister", SoluteStorage_swigregister, METH_VARARGS, NULL}, + { (char *)"flux_node_node_id_get", (PyCFunction)_wrap_flux_node_node_id_get, METH_O, (char *)"flux_node_node_id_get(flux_node self) -> int const"}, + { (char *)"flux_node_is_storage", (PyCFunction)_wrap_flux_node_is_storage, METH_O, (char *)"\n" + "flux_node_is_storage(flux_node self) -> bool\n" + "\n" + "virtual\n" + "bool is_storage() const\n" + "\n" + "true, if this is a waterstorage \n" + ""}, + { (char *)"flux_node_Name_set", _wrap_flux_node_Name_set, METH_VARARGS, (char *)"flux_node_Name_set(flux_node self, std::string const & Name)"}, + { (char *)"flux_node_Name_get", (PyCFunction)_wrap_flux_node_Name_get, METH_O, (char *)"flux_node_Name_get(flux_node self) -> std::string const &"}, + { (char *)"flux_node_to_string", (PyCFunction)_wrap_flux_node_to_string, METH_O, (char *)"\n" + "flux_node_to_string(flux_node self) -> std::string\n" + "\n" + "virtual\n" + "std::string to_string() const \n" + ""}, + { (char *)"delete_flux_node", (PyCFunction)_wrap_delete_flux_node, METH_O, (char *)"\n" + "delete_flux_node(flux_node self)\n" + "\n" + "virtual\n" + "~flux_node()\n" + "\n" + "The destructor deletes all connections. \n" + ""}, + { (char *)"flux_node___eq__", (PyCFunction) _wrap_flux_node___eq__, METH_VARARGS | METH_KEYWORDS, (char *)"flux_node___eq__(flux_node self, flux_node other) -> bool"}, + { (char *)"flux_node_RecalcFluxes", (PyCFunction) _wrap_flux_node_RecalcFluxes, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "flux_node_RecalcFluxes(flux_node self, Time t) -> bool\n" + "\n" + "virtual\n" + "bool RecalcFluxes(cmf::math::Time t)\n" + "\n" + "Pure flux_nodes do not influence fluxes, therefore no recalculation of\n" + "fluxes is required by flux_node.\n" + "\n" + "WaterStorage overrides this, since state changes require an update of\n" + "the fluxes \n" + ""}, + { (char *)"flux_node_connection_to", (PyCFunction) _wrap_flux_node_connection_to, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "flux_node_connection_to(flux_node self, flux_node target) -> flux_connection\n" + "\n" + "cmf::water::flux_connection* connection_to(const cmf::water::flux_node\n" + "&target)\n" + "\n" + "Returns the connection between this and target. \n" + ""}, + { (char *)"flux_node_remove_connection", (PyCFunction) _wrap_flux_node_remove_connection, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "flux_node_remove_connection(flux_node self, cmf::water::flux_node::ptr To) -> bool\n" + "\n" + "bool\n" + "remove_connection(cmf::water::flux_node::ptr To)\n" + "\n" + "Remove the connection. \n" + ""}, + { (char *)"flux_node_flux_to", (PyCFunction) _wrap_flux_node_flux_to, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "flux_node_flux_to(flux_node self, flux_node target, Time t) -> real\n" + "\n" + "real\n" + "flux_to(const cmf::water::flux_node &target, cmf::math::Time t)\n" + "\n" + "Returns the actual flux between this and target (positive sign means\n" + "\"from this into target\") \n" + ""}, + { (char *)"flux_node_flux3d_to", (PyCFunction) _wrap_flux_node_flux3d_to, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "flux_node_flux3d_to(flux_node self, flux_node target, Time t) -> point\n" + "\n" + "cmf::geometry::point flux3d_to(const cmf::water::flux_node &target,\n" + "cmf::math::Time t) \n" + ""}, + { (char *)"flux_node_get_3d_flux", (PyCFunction) _wrap_flux_node_get_3d_flux, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "flux_node_get_3d_flux(flux_node self, Time t) -> point\n" + "\n" + "cmf::geometry::point get_3d_flux(cmf::math::Time t)\n" + "\n" + "Returns the sum of all flux vectors. \n" + ""}, + { (char *)"flux_node_waterbalance", (PyCFunction) _wrap_flux_node_waterbalance, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "flux_node_waterbalance(flux_node self, Time t, flux_connection Without=None) -> real\n" + "\n" + "real\n" + "waterbalance(cmf::math::Time t, const flux_connection *Without=0)\n" + "const\n" + "\n" + "Returns the sum of all fluxes (positive and negative) at time t.\n" + "\n" + "Single fluxes can be excluded from the calculation\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "t: Time of the query\n" + "\n" + "Without: A flux_connection that is excluded from the waterbalance\n" + "(e.g. to prevent closed circuits) \n" + ""}, + { (char *)"flux_node___call__", (PyCFunction) _wrap_flux_node___call__, METH_VARARGS | METH_KEYWORDS, (char *)"flux_node___call__(flux_node self, Time t) -> real"}, + { (char *)"flux_node_conc", (PyCFunction) _wrap_flux_node_conc, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "flux_node_conc(flux_node self, Time t, solute Solute) -> real\n" + "\n" + "virtual real\n" + "conc(cmf::math::Time t, const cmf::water::solute &Solute) const\n" + "\n" + "Returns the water quality of the flux_node, if it is not overridden\n" + "this is the mix of the incoming fluxes. \n" + ""}, + { (char *)"flux_node_position_set", _wrap_flux_node_position_set, METH_VARARGS, (char *)"flux_node_position_set(flux_node self, point position)"}, + { (char *)"flux_node_position_get", (PyCFunction)_wrap_flux_node_position_get, METH_O, (char *)"flux_node_position_get(flux_node self) -> point"}, + { (char *)"flux_node_is_empty", (PyCFunction)_wrap_flux_node_is_empty, METH_O, (char *)"\n" + "flux_node_is_empty(flux_node self) -> double\n" + "\n" + "virtual\n" + "double is_empty() const\n" + "\n" + "Returns true if the node has no water. \n" + ""}, + { (char *)"new_flux_node", (PyCFunction) _wrap_new_flux_node, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "new_flux_node(project _project, point location) -> flux_node\n" + "\n" + "flux_node(cmf::project &_project, cmf::geometry::point\n" + "location=cmf::geometry::point()) \n" + ""}, + { (char *)"flux_node_project_get", (PyCFunction)_wrap_flux_node_project_get, METH_O, (char *)"flux_node_project_get(flux_node self) -> project"}, + { (char *)"flux_node_potential_set", _wrap_flux_node_potential_set, METH_VARARGS, (char *)"flux_node_potential_set(flux_node self, real potential)"}, + { (char *)"flux_node_potential_get", (PyCFunction)_wrap_flux_node_potential_get, METH_O, (char *)"flux_node_potential_get(flux_node self) -> real"}, + { (char *)"flux_node_connections_get", (PyCFunction)_wrap_flux_node_connections_get, METH_O, (char *)"flux_node_connections_get(flux_node self) -> connection_list"}, + { (char *)"flux_node_swigregister", flux_node_swigregister, METH_VARARGS, NULL}, + { (char *)"flux_node_swiginit", flux_node_swiginit, METH_VARARGS, NULL}, + { (char *)"count_node_references", (PyCFunction) _wrap_count_node_references, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "count_node_references(cmf::water::flux_node::ptr node) -> int\n" + "\n" + "int\n" + "cmf::water::count_node_references(flux_node::ptr node) \n" + ""}, + { (char *)"get_higher_node", (PyCFunction) _wrap_get_higher_node, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "get_higher_node(cmf::water::flux_node::ptr node1, cmf::water::flux_node::ptr node2) -> cmf::water::flux_node::ptr\n" + "\n" + "flux_node::ptr\n" + "cmf::water::get_higher_node(flux_node::ptr node1, flux_node::ptr\n" + "node2) \n" + ""}, + { (char *)"get_lower_node", (PyCFunction) _wrap_get_lower_node, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "get_lower_node(cmf::water::flux_node::ptr node1, cmf::water::flux_node::ptr node2) -> cmf::water::flux_node::ptr\n" + "\n" + "flux_node::ptr\n" + "cmf::water::get_lower_node(flux_node::ptr node1, flux_node::ptr node2)\n" + "\n" + ""}, + { (char *)"waterbalance_integrator_integration_t", (PyCFunction)_wrap_waterbalance_integrator_integration_t, METH_O, (char *)"\n" + "waterbalance_integrator_integration_t(waterbalance_integrator self) -> Time\n" + "\n" + "cmf::math::Time\n" + "integration_t() const\n" + "\n" + "Returns the duration of the integration. \n" + ""}, + { (char *)"waterbalance_integrator_t0", (PyCFunction)_wrap_waterbalance_integrator_t0, METH_O, (char *)"\n" + "waterbalance_integrator_t0(waterbalance_integrator self) -> Time\n" + "\n" + "cmf::math::Time t0() const\n" + "\n" + "Returns the start time of the integration. \n" + ""}, + { (char *)"waterbalance_integrator___get_node", (PyCFunction)_wrap_waterbalance_integrator___get_node, METH_O, (char *)"\n" + "waterbalance_integrator___get_node(waterbalance_integrator self) -> cmf::water::flux_node::ptr\n" + "\n" + "flux_node::ptr get_node() const\n" + "\n" + "Returns the node of this integrator. \n" + ""}, + { (char *)"waterbalance_integrator___set_node", (PyCFunction) _wrap_waterbalance_integrator___set_node, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "waterbalance_integrator___set_node(waterbalance_integrator self, cmf::water::flux_node::ptr node)\n" + "\n" + "void set_node(cmf::water::flux_node::ptr node) \n" + ""}, + { (char *)"new_waterbalance_integrator", (PyCFunction) _wrap_new_waterbalance_integrator, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "new_waterbalance_integrator(cmf::water::flux_node::ptr node) -> waterbalance_integrator\n" + "\n" + "waterbalance_integrator(cmf::water::flux_node::ptr node) \n" + ""}, + { (char *)"delete_waterbalance_integrator", (PyCFunction)_wrap_delete_waterbalance_integrator, METH_O, (char *)"delete_waterbalance_integrator(waterbalance_integrator self)"}, + { (char *)"waterbalance_integrator_swigregister", waterbalance_integrator_swigregister, METH_VARARGS, NULL}, + { (char *)"waterbalance_integrator_swiginit", waterbalance_integrator_swiginit, METH_VARARGS, NULL}, + { (char *)"flux_connection_left_node", (PyCFunction)_wrap_flux_connection_left_node, METH_O, (char *)"\n" + "flux_connection_left_node(flux_connection self) -> cmf::water::flux_node::ptr\n" + "\n" + "flux_node::ptr left_node() const\n" + "\n" + "Returns the left node of this connection. \n" + ""}, + { (char *)"flux_connection_right_node", (PyCFunction)_wrap_flux_connection_right_node, METH_O, (char *)"\n" + "flux_connection_right_node(flux_connection self) -> cmf::water::flux_node::ptr\n" + "\n" + "flux_node::ptr right_node() const\n" + "\n" + "returns the right node of this connection \n" + ""}, + { (char *)"flux_connection_kill_me", (PyCFunction)_wrap_flux_connection_kill_me, METH_O, (char *)"\n" + "flux_connection_kill_me(flux_connection self) -> bool\n" + "\n" + "bool\n" + "kill_me()\n" + "\n" + "Deregisters this connection from its nodes. Returns true if only one\n" + "reference is left. \n" + ""}, + { (char *)"flux_connection_refresh", (PyCFunction) _wrap_flux_connection_refresh, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "flux_connection_refresh(flux_connection self, Time t)\n" + "\n" + "void\n" + "refresh(cmf::math::Time t)\n" + "\n" + "Performes a new calculation of the flux. \n" + ""}, + { (char *)"flux_connection_connection_id_get", (PyCFunction)_wrap_flux_connection_connection_id_get, METH_O, (char *)"flux_connection_connection_id_get(flux_connection self) -> int const"}, + { (char *)"flux_connection___eq__", (PyCFunction) _wrap_flux_connection___eq__, METH_VARARGS | METH_KEYWORDS, (char *)"flux_connection___eq__(flux_connection self, flux_connection other) -> bool"}, + { (char *)"flux_connection_get_target", _wrap_flux_connection_get_target, METH_VARARGS, (char *)"\n" + "get_target(flux_node inquirer) -> cmf::water::flux_node::ptr\n" + "flux_connection_get_target(flux_connection self, int index) -> cmf::water::flux_node::ptr\n" + "\n" + "flux_node::ptr get_target(int index) const\n" + "\n" + "With index 0, the left node is returned, with index 1 the right node\n" + "of the connection. \n" + ""}, + { (char *)"flux_connection_exchange_target", (PyCFunction) _wrap_flux_connection_exchange_target, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "flux_connection_exchange_target(flux_connection self, cmf::water::flux_node::ptr oldtarget, cmf::water::flux_node::ptr newTarget)\n" + "\n" + "void exchange_target(flux_node::ptr oldtarget, flux_node::ptr\n" + "newTarget) \n" + ""}, + { (char *)"flux_connection_q", (PyCFunction) _wrap_flux_connection_q, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "flux_connection_q(flux_connection self, flux_node inquirer, Time t) -> real\n" + "\n" + "real q(const\n" + "flux_node &inquirer, cmf::math::Time t)\n" + "\n" + "Returns the current flux through a connection. Negative signs mean out\n" + "of the inquirer, positive are inflows to the inquirer. \n" + ""}, + { (char *)"flux_connection_conc", (PyCFunction) _wrap_flux_connection_conc, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "flux_connection_conc(flux_connection self, Time t, solute _Solute) -> real\n" + "\n" + "real\n" + "conc(cmf::math::Time t, const cmf::water::solute &_Solute)\n" + "\n" + "Returns the concentration of the flux.\n" + "\n" + "If not overridden, it returns the concentration of the source of the\n" + "flux (direction depending) \n" + ""}, + { (char *)"flux_connection_type_get", (PyCFunction)_wrap_flux_connection_type_get, METH_O, (char *)"flux_connection_type_get(flux_connection self) -> std::string const &"}, + { (char *)"flux_connection_get_tracer_filter", _wrap_flux_connection_get_tracer_filter, METH_VARARGS, (char *)"\n" + "get_tracer_filter() -> real\n" + "flux_connection_get_tracer_filter(flux_connection self, solute S) -> real\n" + "\n" + "real get_tracer_filter(solute S)\n" + "\n" + "A value ranging from 0 to 1 to filter tracers out of the water flux.\n" + "\n" + ""}, + { (char *)"flux_connection_set_tracer_filter", _wrap_flux_connection_set_tracer_filter, METH_VARARGS, (char *)"\n" + "set_tracer_filter(real value)\n" + "flux_connection_set_tracer_filter(flux_connection self, solute S, real value)\n" + "\n" + "void set_tracer_filter(solute S, real value) \n" + ""}, + { (char *)"flux_connection_to_string", (PyCFunction)_wrap_flux_connection_to_string, METH_O, (char *)"\n" + "flux_connection_to_string(flux_connection self) -> std::string\n" + "\n" + "virtual std::string to_string() const \n" + ""}, + { (char *)"flux_connection_short_string", (PyCFunction)_wrap_flux_connection_short_string, METH_O, (char *)"\n" + "flux_connection_short_string(flux_connection self) -> std::string\n" + "\n" + "virtual std::string short_string() const \n" + ""}, + { (char *)"delete_flux_connection", (PyCFunction)_wrap_delete_flux_connection, METH_O, (char *)"\n" + "delete_flux_connection(flux_connection self)\n" + "\n" + "virtual ~flux_connection() \n" + ""}, + { (char *)"flux_connection_swigregister", flux_connection_swigregister, METH_VARARGS, NULL}, + { (char *)"replace_node", (PyCFunction) _wrap_replace_node, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "replace_node(cmf::water::flux_node::ptr oldnode, cmf::water::flux_node::ptr newnode) -> int\n" + "\n" + "int\n" + "cmf::water::replace_node(cmf::water::flux_node::ptr oldnode,\n" + "cmf::water::flux_node::ptr newnode) \n" + ""}, + { (char *)"connection_list_append", (PyCFunction) _wrap_connection_list_append, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "connection_list_append(connection_list self, cmf::water::flux_connection::ptr connection) -> bool\n" + "\n" + "bool\n" + "append(cmf::water::flux_connection::ptr connection) \n" + ""}, + { (char *)"connection_list_extend", (PyCFunction) _wrap_connection_list_extend, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "connection_list_extend(connection_list self, connection_list connections)\n" + "\n" + "void\n" + "extend(const connection_list &connections) \n" + ""}, + { (char *)"connection_list_contains", (PyCFunction) _wrap_connection_list_contains, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "connection_list_contains(connection_list self, cmf::water::flux_connection::ptr connection) -> bool\n" + "\n" + "bool\n" + "contains(cmf::water::flux_connection::ptr connection) const \n" + ""}, + { (char *)"connection_list_remove", (PyCFunction) _wrap_connection_list_remove, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "connection_list_remove(connection_list self, cmf::water::flux_connection::ptr connection) -> bool\n" + "\n" + "bool\n" + "remove(cmf::water::flux_connection::ptr connection) \n" + ""}, + { (char *)"connection_list_do_action", (PyCFunction) _wrap_connection_list_do_action, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "connection_list_do_action(connection_list self, Time t, bool use_OpenMP=True)\n" + "\n" + "void\n" + "do_action(cmf::math::Time t, bool use_OpenMP=true) \n" + ""}, + { (char *)"connection_list_size", (PyCFunction)_wrap_connection_list_size, METH_O, (char *)"\n" + "connection_list_size(connection_list self) -> size_t\n" + "\n" + "size_t\n" + "size() const \n" + ""}, + { (char *)"connection_list_at", (PyCFunction) _wrap_connection_list_at, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "connection_list_at(connection_list self, size_t pos) -> cmf::water::flux_connection::ptr\n" + "\n" + "cmf::water::flux_connection::ptr at(size_t pos) const \n" + ""}, + { (char *)"connection_list_begin", _wrap_connection_list_begin, METH_VARARGS, (char *)"\n" + "begin() -> cmf::water::connection_list::iterator\n" + "connection_list_begin(connection_list self) -> cmf::water::connection_list::const_iterator\n" + "\n" + "const_iterator begin() const \n" + ""}, + { (char *)"connection_list_end", _wrap_connection_list_end, METH_VARARGS, (char *)"\n" + "end() -> cmf::water::connection_list::iterator\n" + "connection_list_end(connection_list self) -> cmf::water::connection_list::const_iterator\n" + "\n" + "const_iterator end() const \n" + ""}, + { (char *)"delete_connection_list", (PyCFunction)_wrap_delete_connection_list, METH_O, (char *)"\n" + "delete_connection_list(connection_list self)\n" + "\n" + "virtual ~connection_list() \n" + ""}, + { (char *)"connection_list___len__", (PyCFunction)_wrap_connection_list___len__, METH_O, (char *)"connection_list___len__(connection_list self) -> size_t"}, + { (char *)"connection_list___contains__", (PyCFunction) _wrap_connection_list___contains__, METH_VARARGS | METH_KEYWORDS, (char *)"connection_list___contains__(connection_list self, cmf::water::flux_connection::ptr const & con) -> bool"}, + { (char *)"new_connection_list", (PyCFunction)_wrap_new_connection_list, METH_NOARGS, (char *)"new_connection_list() -> connection_list"}, + { (char *)"connection_list_swigregister", connection_list_swigregister, METH_VARARGS, NULL}, + { (char *)"connection_list_swiginit", connection_list_swiginit, METH_VARARGS, NULL}, + { (char *)"flux_integrator_integration_t", (PyCFunction)_wrap_flux_integrator_integration_t, METH_O, (char *)"\n" + "flux_integrator_integration_t(flux_integrator self) -> Time\n" + "\n" + "cmf::math::Time integration_t() const\n" + "\n" + "Returns the duration of the integration. \n" + ""}, + { (char *)"flux_integrator_t0", (PyCFunction)_wrap_flux_integrator_t0, METH_O, (char *)"\n" + "flux_integrator_t0(flux_integrator self) -> Time\n" + "\n" + "cmf::math::Time t0() const\n" + "\n" + "Returns the start time of the integration. \n" + ""}, + { (char *)"flux_integrator_invert_set", _wrap_flux_integrator_invert_set, METH_VARARGS, (char *)"flux_integrator_invert_set(flux_integrator self, bool invert)"}, + { (char *)"flux_integrator_invert_get", (PyCFunction)_wrap_flux_integrator_invert_get, METH_O, (char *)"flux_integrator_invert_get(flux_integrator self) -> bool"}, + { (char *)"flux_integrator_connection", (PyCFunction)_wrap_flux_integrator_connection, METH_O, (char *)"\n" + "flux_integrator_connection(flux_integrator self) -> cmf::water::flux_connection::ptr\n" + "\n" + "flux_connection::ptr connection() const\n" + "\n" + "Returns the flux_connection. \n" + ""}, + { (char *)"new_flux_integrator", _wrap_new_flux_integrator, METH_VARARGS, (char *)"\n" + "flux_integrator(flux_connection connection)\n" + "new_flux_integrator(cmf::water::flux_node::ptr left, cmf::water::flux_node::ptr right) -> flux_integrator\n" + "\n" + "flux_integrator(cmf::water::flux_node::ptr left,\n" + "cmf::water::flux_node::ptr right)\n" + "\n" + "Creates a flux_integrator from the endpoints of a connection. Throws\n" + "if there is no connection between the endpoints. \n" + ""}, + { (char *)"delete_flux_integrator", (PyCFunction)_wrap_delete_flux_integrator, METH_O, (char *)"delete_flux_integrator(flux_integrator self)"}, + { (char *)"flux_integrator_swigregister", flux_integrator_swigregister, METH_VARARGS, NULL}, + { (char *)"flux_integrator_swiginit", flux_integrator_swiginit, METH_VARARGS, NULL}, + { (char *)"linear_scale_displacement_set", _wrap_linear_scale_displacement_set, METH_VARARGS, (char *)"linear_scale_displacement_set(linear_scale self, real displacement)"}, + { (char *)"linear_scale_displacement_get", (PyCFunction)_wrap_linear_scale_displacement_get, METH_O, (char *)"linear_scale_displacement_get(linear_scale self) -> real"}, + { (char *)"linear_scale_slope_set", _wrap_linear_scale_slope_set, METH_VARARGS, (char *)"linear_scale_slope_set(linear_scale self, real slope)"}, + { (char *)"linear_scale_slope_get", (PyCFunction)_wrap_linear_scale_slope_get, METH_O, (char *)"linear_scale_slope_get(linear_scale self) -> real"}, + { (char *)"linear_scale___call__", (PyCFunction) _wrap_linear_scale___call__, METH_VARARGS | METH_KEYWORDS, (char *)"linear_scale___call__(linear_scale self, real value) -> real"}, + { (char *)"new_linear_scale", (PyCFunction) _wrap_new_linear_scale, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "new_linear_scale(real _slope=1, real _displacement=0) -> linear_scale\n" + "\n" + "linear_scale(real _slope=1, real _displacement=0)\n" + "\n" + "Creates a linear scale (by default it is a unity scale, :math:`a=1; b=0`) \n" + ""}, + { (char *)"delete_linear_scale", (PyCFunction)_wrap_delete_linear_scale, METH_O, (char *)"delete_linear_scale(linear_scale self)"}, + { (char *)"linear_scale_swigregister", linear_scale_swigregister, METH_VARARGS, NULL}, + { (char *)"linear_scale_swiginit", linear_scale_swiginit, METH_VARARGS, NULL}, + { (char *)"DirichletBoundary_set_conc", (PyCFunction) _wrap_DirichletBoundary_set_conc, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "DirichletBoundary_set_conc(DirichletBoundary self, solute _Solute, double value)\n" + "\n" + "virtual void set_conc(const cmf::water::solute &_Solute, double value)\n" + "\n" + ""}, + { (char *)"DirichletBoundary_is_source_set", _wrap_DirichletBoundary_is_source_set, METH_VARARGS, (char *)"DirichletBoundary_is_source_set(DirichletBoundary self, bool is_source)"}, + { (char *)"DirichletBoundary_is_source_get", (PyCFunction)_wrap_DirichletBoundary_is_source_get, METH_O, (char *)"DirichletBoundary_is_source_get(DirichletBoundary self) -> bool"}, + { (char *)"DirichletBoundary_RecalcFluxes", (PyCFunction) _wrap_DirichletBoundary_RecalcFluxes, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "DirichletBoundary_RecalcFluxes(DirichletBoundary self, Time t) -> bool\n" + "\n" + "virtual bool RecalcFluxes(cmf::math::Time t)\n" + "\n" + "Pure flux_nodes do not influence fluxes, therefore no recalculation of\n" + "fluxes is required by flux_node.\n" + "\n" + "WaterStorage overrides this, since state changes require an update of\n" + "the fluxes \n" + ""}, + { (char *)"new_DirichletBoundary", (PyCFunction) _wrap_new_DirichletBoundary, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "new_DirichletBoundary(project _p, real potential, point Location) -> DirichletBoundary\n" + "\n" + "DirichletBoundary(cmf::project &_p, real potential,\n" + "cmf::geometry::point Location=cmf::geometry::point()) \n" + ""}, + { (char *)"delete_DirichletBoundary", (PyCFunction)_wrap_delete_DirichletBoundary, METH_O, (char *)"delete_DirichletBoundary(DirichletBoundary self)"}, + { (char *)"DirichletBoundary_swigregister", DirichletBoundary_swigregister, METH_VARARGS, NULL}, + { (char *)"DirichletBoundary_swiginit", DirichletBoundary_swiginit, METH_VARARGS, NULL}, + { (char *)"NeumannBoundary_get_flux", (PyCFunction)_wrap_NeumannBoundary_get_flux, METH_O, (char *)"\n" + "NeumannBoundary_get_flux(NeumannBoundary self) -> timeseries\n" + "\n" + "cmf::math::timeseries get_flux()\n" + "\n" + "The timeseries of the boundary flux. \n" + ""}, + { (char *)"NeumannBoundary_set_flux", _wrap_NeumannBoundary_set_flux, METH_VARARGS, (char *)"\n" + "set_flux(timeseries new_flux)\n" + "NeumannBoundary_set_flux(NeumannBoundary self, double new_flux)\n" + "\n" + "void\n" + "set_flux(double new_flux)\n" + "\n" + "Set a constant as the boundary flux. \n" + ""}, + { (char *)"NeumannBoundary_flux_scale_set", _wrap_NeumannBoundary_flux_scale_set, METH_VARARGS, (char *)"NeumannBoundary_flux_scale_set(NeumannBoundary self, linear_scale flux_scale)"}, + { (char *)"NeumannBoundary_flux_scale_get", (PyCFunction)_wrap_NeumannBoundary_flux_scale_get, METH_O, (char *)"NeumannBoundary_flux_scale_get(NeumannBoundary self) -> linear_scale"}, + { (char *)"NeumannBoundary_concentration_set", _wrap_NeumannBoundary_concentration_set, METH_VARARGS, (char *)"NeumannBoundary_concentration_set(NeumannBoundary self, SoluteTimeseries concentration)"}, + { (char *)"NeumannBoundary_concentration_get", (PyCFunction)_wrap_NeumannBoundary_concentration_get, METH_O, (char *)"NeumannBoundary_concentration_get(NeumannBoundary self) -> SoluteTimeseries"}, + { (char *)"NeumannBoundary___call__", (PyCFunction) _wrap_NeumannBoundary___call__, METH_VARARGS | METH_KEYWORDS, (char *)"NeumannBoundary___call__(NeumannBoundary self, Time t) -> real"}, + { (char *)"NeumannBoundary_connect_to", (PyCFunction) _wrap_NeumannBoundary_connect_to, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "NeumannBoundary_connect_to(NeumannBoundary self, cmf::water::flux_node::ptr target)\n" + "\n" + "void\n" + "connect_to(cmf::water::flux_node::ptr target) \n" + ""}, + { (char *)"new_NeumannBoundary", _wrap_new_NeumannBoundary, METH_VARARGS, (char *)"\n" + "NeumannBoundary(project _project, timeseries _flux, SoluteTimeseries _concentration, point loc)\n" + "new_NeumannBoundary(project _project, point loc) -> NeumannBoundary\n" + "\n" + "NeumannBoundary(cmf::project &_project, cmf::geometry::point\n" + "loc=cmf::geometry::point()) \n" + ""}, + { (char *)"NeumannBoundary_create", (PyCFunction) _wrap_NeumannBoundary_create, METH_VARARGS | METH_KEYWORDS, (char *)"NeumannBoundary_create(cmf::water::flux_node::ptr target) -> cmf::water::NeumannBoundary::ptr"}, + { (char *)"delete_NeumannBoundary", (PyCFunction)_wrap_delete_NeumannBoundary, METH_O, (char *)"delete_NeumannBoundary(NeumannBoundary self)"}, + { (char *)"NeumannBoundary_swigregister", NeumannBoundary_swigregister, METH_VARARGS, NULL}, + { (char *)"NeumannBoundary_swiginit", NeumannBoundary_swiginit, METH_VARARGS, NULL}, + { (char *)"new_NeumannFlux", (PyCFunction) _wrap_new_NeumannFlux, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "new_NeumannFlux(std::shared_ptr< cmf::water::NeumannBoundary > left, cmf::water::flux_node::ptr right) -> NeumannFlux\n" + "\n" + "NeumannFlux(std::shared_ptr< NeumannBoundary > left,\n" + "cmf::water::flux_node::ptr right) \n" + ""}, + { (char *)"delete_NeumannFlux", (PyCFunction)_wrap_delete_NeumannFlux, METH_O, (char *)"delete_NeumannFlux(NeumannFlux self)"}, + { (char *)"NeumannFlux_swigregister", NeumannFlux_swigregister, METH_VARARGS, NULL}, + { (char *)"NeumannFlux_swiginit", NeumannFlux_swiginit, METH_VARARGS, NULL}, + { (char *)"new_WaterStorage", (PyCFunction) _wrap_new_WaterStorage, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "new_WaterStorage(project project, std::string const & Name, double InitialState=0, double scale=1) -> WaterStorage\n" + "\n" + "WaterStorage(cmf::project &project, const std::string &Name=\"\",\n" + "double InitialState=0, double scale=1)\n" + "\n" + "creates a water storage (abstract class)\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "project: The project the waterstorage belongs to\n" + "\n" + "Name: Name of the water storage\n" + "\n" + "InitialState: Initial water content in m3\n" + "\n" + "scale: A kind of \"standard size\" in m3 of the water storage to\n" + "scale tolerances, default 1m3 \n" + ""}, + { (char *)"WaterStorage_from_node", (PyCFunction) _wrap_WaterStorage_from_node, METH_VARARGS | METH_KEYWORDS, (char *)"WaterStorage_from_node(cmf::water::flux_node::ptr node) -> std::shared_ptr< cmf::water::WaterStorage >"}, + { (char *)"WaterStorage_Solute", _wrap_WaterStorage_Solute, METH_VARARGS, (char *)"\n" + "Solute(solute _Solute) -> SoluteStorage\n" + "WaterStorage_Solute(WaterStorage self, solute _Solute) -> SoluteStorage\n" + "\n" + "const\n" + "SoluteStorage& Solute(const cmf::water::solute &_Solute) const \n" + ""}, + { (char *)"WaterStorage_conc", _wrap_WaterStorage_conc, METH_VARARGS, (char *)"\n" + "conc(solute _Solute) -> real\n" + "conc(Time t, solute _Solute) -> real\n" + "WaterStorage_conc(WaterStorage self, solute _Solute, real NewConcetration)\n" + "\n" + "void\n" + "conc(const cmf::water::solute &_Solute, real NewConcetration)\n" + "\n" + "Sets a new concentration. \n" + ""}, + { (char *)"WaterStorage_cast", (PyCFunction) _wrap_WaterStorage_cast, METH_VARARGS | METH_KEYWORDS, (char *)"WaterStorage_cast(std::shared_ptr< cmf::water::flux_node > node) -> std::shared_ptr< cmf::water::WaterStorage >"}, + { (char *)"WaterStorage_create", (PyCFunction) _wrap_WaterStorage_create, METH_VARARGS | METH_KEYWORDS, (char *)"WaterStorage_create(project _project, real initial_state=0.0, real scale=1.0) -> std::shared_ptr< cmf::water::WaterStorage >"}, + { (char *)"WaterStorage_volume_set", _wrap_WaterStorage_volume_set, METH_VARARGS, (char *)"WaterStorage_volume_set(WaterStorage self, real volume)"}, + { (char *)"WaterStorage_volume_get", (PyCFunction)_wrap_WaterStorage_volume_get, METH_O, (char *)"WaterStorage_volume_get(WaterStorage self) -> real"}, + { (char *)"WaterStorage_statevariable_set", _wrap_WaterStorage_statevariable_set, METH_VARARGS, (char *)"WaterStorage_statevariable_set(WaterStorage self, char statevariable)"}, + { (char *)"WaterStorage_statevariable_get", (PyCFunction)_wrap_WaterStorage_statevariable_get, METH_O, (char *)"WaterStorage_statevariable_get(WaterStorage self) -> char"}, + { (char *)"delete_WaterStorage", (PyCFunction)_wrap_delete_WaterStorage, METH_O, (char *)"delete_WaterStorage(WaterStorage self)"}, + { (char *)"WaterStorage_swigregister", WaterStorage_swigregister, METH_VARARGS, NULL}, + { (char *)"WaterStorage_swiginit", WaterStorage_swiginit, METH_VARARGS, NULL}, + { (char *)"new_waterbalance_connection", (PyCFunction) _wrap_new_waterbalance_connection, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "new_waterbalance_connection(cmf::water::flux_node::ptr source, cmf::water::flux_node::ptr target) -> waterbalance_connection\n" + "\n" + "waterbalance_connection(flux_node::ptr source, flux_node::ptr target)\n" + "\n" + ""}, + { (char *)"delete_waterbalance_connection", (PyCFunction)_wrap_delete_waterbalance_connection, METH_O, (char *)"delete_waterbalance_connection(waterbalance_connection self)"}, + { (char *)"waterbalance_connection_swigregister", waterbalance_connection_swigregister, METH_VARARGS, NULL}, + { (char *)"waterbalance_connection_swiginit", waterbalance_connection_swiginit, METH_VARARGS, NULL}, + { (char *)"external_control_connection_flux_set", _wrap_external_control_connection_flux_set, METH_VARARGS, (char *)"external_control_connection_flux_set(external_control_connection self, real flux)"}, + { (char *)"external_control_connection_flux_get", (PyCFunction)_wrap_external_control_connection_flux_get, METH_O, (char *)"external_control_connection_flux_get(external_control_connection self) -> real"}, + { (char *)"new_external_control_connection", (PyCFunction) _wrap_new_external_control_connection, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "new_external_control_connection(cmf::water::flux_node::ptr source, cmf::water::flux_node::ptr target, real flux_value=0) -> external_control_connection\n" + "\n" + "external_control_connection(flux_node::ptr source, flux_node::ptr\n" + "target, real flux_value=0) \n" + ""}, + { (char *)"delete_external_control_connection", (PyCFunction)_wrap_delete_external_control_connection, METH_O, (char *)"delete_external_control_connection(external_control_connection self)"}, + { (char *)"external_control_connection_swigregister", external_control_connection_swigregister, METH_VARARGS, NULL}, + { (char *)"external_control_connection_swiginit", external_control_connection_swiginit, METH_VARARGS, NULL}, + { (char *)"set_flux", (PyCFunction) _wrap_set_flux, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "set_flux(cmf::water::flux_node::ptr source, cmf::water::flux_node::ptr target, real flux_value)\n" + "\n" + "void\n" + "cmf::water::set_flux(flux_node::ptr source, flux_node::ptr target,\n" + "real flux_value)\n" + "\n" + "Sets a constant flux between two nodes, if an\n" + "external_control_connection exists. \n" + ""}, + { (char *)"can_set_flux", (PyCFunction) _wrap_can_set_flux, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "can_set_flux(cmf::water::flux_node::ptr source, cmf::water::flux_node::ptr target) -> bool\n" + "\n" + "bool\n" + "cmf::water::can_set_flux(flux_node::ptr source, flux_node::ptr target)\n" + "\n" + "Checks if a constant flux between two nodes can be set.\n" + "\n" + "Returns true if the nodes are connected by an\n" + "external_control_connection \n" + ""}, + { (char *)"kinematic_wave_residencetime_set", _wrap_kinematic_wave_residencetime_set, METH_VARARGS, (char *)"kinematic_wave_residencetime_set(kinematic_wave self, real residencetime)"}, + { (char *)"kinematic_wave_residencetime_get", (PyCFunction)_wrap_kinematic_wave_residencetime_get, METH_O, (char *)"kinematic_wave_residencetime_get(kinematic_wave self) -> real"}, + { (char *)"kinematic_wave_exponent_set", _wrap_kinematic_wave_exponent_set, METH_VARARGS, (char *)"kinematic_wave_exponent_set(kinematic_wave self, real exponent)"}, + { (char *)"kinematic_wave_exponent_get", (PyCFunction)_wrap_kinematic_wave_exponent_get, METH_O, (char *)"kinematic_wave_exponent_get(kinematic_wave self) -> real"}, + { (char *)"kinematic_wave_residual_set", _wrap_kinematic_wave_residual_set, METH_VARARGS, (char *)"kinematic_wave_residual_set(kinematic_wave self, real residual)"}, + { (char *)"kinematic_wave_residual_get", (PyCFunction)_wrap_kinematic_wave_residual_get, METH_O, (char *)"kinematic_wave_residual_get(kinematic_wave self) -> real"}, + { (char *)"kinematic_wave_V0_set", _wrap_kinematic_wave_V0_set, METH_VARARGS, (char *)"kinematic_wave_V0_set(kinematic_wave self, real V0)"}, + { (char *)"kinematic_wave_V0_get", (PyCFunction)_wrap_kinematic_wave_V0_get, METH_O, (char *)"kinematic_wave_V0_get(kinematic_wave self) -> real"}, + { (char *)"new_kinematic_wave", (PyCFunction) _wrap_new_kinematic_wave, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "new_kinematic_wave(cmf::water::WaterStorage::ptr source, cmf::water::flux_node::ptr target, real residencetime, real exponent=1.0, real residual=0.0, real V0=1.0) -> kinematic_wave\n" + "\n" + "kinematic_wave(WaterStorage::ptr source, flux_node::ptr target, real\n" + "residencetime, real exponent=1.0, real residual=0.0, real V0=1.0)\n" + "\n" + "Creates a kinematic wave connection.\n" + "\n" + "\n" + "\n" + ".. math::\n" + "\n" + " q = \\\\frac 1 {t_r} {\\\\left(\\\\frac{V - V_{residual}}{V_0}\n" + " \\\\right)^\\\\beta} \n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "source: Water storage from which the water flows out. Flux is a\n" + "function of source.volume\n" + "\n" + "target: Target node (boundary condition or storage). Does not\n" + "influence the strength of the flow\n" + "\n" + "residencetime: :math:`t_r [days]` The residence time of the water in this\n" + "storage\n" + "\n" + "exponent: :math:`\\\\beta [-]` An empirical exponent to shape the flux\n" + "function (default = 1 (linear function))\n" + "\n" + "residual: :math:`V_{residual} [m^3]` The volume of water not flowing out\n" + "(default = 0)\n" + "\n" + "V0: :math:`V_0` The reference volume to scale the exponent \n" + ""}, + { (char *)"delete_kinematic_wave", (PyCFunction)_wrap_delete_kinematic_wave, METH_O, (char *)"delete_kinematic_wave(kinematic_wave self)"}, + { (char *)"kinematic_wave_swigregister", kinematic_wave_swigregister, METH_VARARGS, NULL}, + { (char *)"kinematic_wave_swiginit", kinematic_wave_swiginit, METH_VARARGS, NULL}, + { (char *)"LinearStorageConnection_residencetime_set", _wrap_LinearStorageConnection_residencetime_set, METH_VARARGS, (char *)"LinearStorageConnection_residencetime_set(LinearStorageConnection self, real residencetime)"}, + { (char *)"LinearStorageConnection_residencetime_get", (PyCFunction)_wrap_LinearStorageConnection_residencetime_get, METH_O, (char *)"LinearStorageConnection_residencetime_get(LinearStorageConnection self) -> real"}, + { (char *)"LinearStorageConnection_residual_set", _wrap_LinearStorageConnection_residual_set, METH_VARARGS, (char *)"LinearStorageConnection_residual_set(LinearStorageConnection self, real residual)"}, + { (char *)"LinearStorageConnection_residual_get", (PyCFunction)_wrap_LinearStorageConnection_residual_get, METH_O, (char *)"LinearStorageConnection_residual_get(LinearStorageConnection self) -> real"}, + { (char *)"new_LinearStorageConnection", (PyCFunction) _wrap_new_LinearStorageConnection, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "new_LinearStorageConnection(cmf::water::WaterStorage::ptr source, cmf::water::flux_node::ptr target, real residencetime, real residual=0.0) -> LinearStorageConnection\n" + "\n" + "LinearStorageConnection(WaterStorage::ptr source, flux_node::ptr\n" + "target, real residencetime, real residual=0.0)\n" + "\n" + "Creates a linear storage connection or Nash-box.\n" + "\n" + "\n" + "\n" + ".. math::\n" + "\n" + " q = \\\\frac{V - V_{residual}}{t_r}} \n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "source: Water storage from which the water flows out. Flux is a\n" + "function of source.volume\n" + "\n" + "target: Target node (boundary condition or storage). Does not\n" + "influence the strength of the flow\n" + "\n" + "residencetime: :math:`t_r [days]` The residence time of the water in this\n" + "storage\n" + "\n" + "residual: :math:`V_{residual} [m^3]` The volume of water not flowing out\n" + "(default = 0) \n" + ""}, + { (char *)"delete_LinearStorageConnection", (PyCFunction)_wrap_delete_LinearStorageConnection, METH_O, (char *)"delete_LinearStorageConnection(LinearStorageConnection self)"}, + { (char *)"LinearStorageConnection_swigregister", LinearStorageConnection_swigregister, METH_VARARGS, NULL}, + { (char *)"LinearStorageConnection_swiginit", LinearStorageConnection_swiginit, METH_VARARGS, NULL}, + { (char *)"PowerLawConnection_Q0_set", _wrap_PowerLawConnection_Q0_set, METH_VARARGS, (char *)"PowerLawConnection_Q0_set(PowerLawConnection self, real Q0)"}, + { (char *)"PowerLawConnection_Q0_get", (PyCFunction)_wrap_PowerLawConnection_Q0_get, METH_O, (char *)"PowerLawConnection_Q0_get(PowerLawConnection self) -> real"}, + { (char *)"PowerLawConnection_beta_set", _wrap_PowerLawConnection_beta_set, METH_VARARGS, (char *)"PowerLawConnection_beta_set(PowerLawConnection self, real beta)"}, + { (char *)"PowerLawConnection_beta_get", (PyCFunction)_wrap_PowerLawConnection_beta_get, METH_O, (char *)"PowerLawConnection_beta_get(PowerLawConnection self) -> real"}, + { (char *)"PowerLawConnection_residual_set", _wrap_PowerLawConnection_residual_set, METH_VARARGS, (char *)"PowerLawConnection_residual_set(PowerLawConnection self, real residual)"}, + { (char *)"PowerLawConnection_residual_get", (PyCFunction)_wrap_PowerLawConnection_residual_get, METH_O, (char *)"PowerLawConnection_residual_get(PowerLawConnection self) -> real"}, + { (char *)"PowerLawConnection_V0_set", _wrap_PowerLawConnection_V0_set, METH_VARARGS, (char *)"PowerLawConnection_V0_set(PowerLawConnection self, real V0)"}, + { (char *)"PowerLawConnection_V0_get", (PyCFunction)_wrap_PowerLawConnection_V0_get, METH_O, (char *)"PowerLawConnection_V0_get(PowerLawConnection self) -> real"}, + { (char *)"new_PowerLawConnection", (PyCFunction) _wrap_new_PowerLawConnection, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "new_PowerLawConnection(cmf::water::WaterStorage::ptr source, cmf::water::flux_node::ptr target, real Q0, real V0, real beta=1.0, real residual=0.0) -> PowerLawConnection\n" + "\n" + "PowerLawConnection(WaterStorage::ptr source, flux_node::ptr target,\n" + "real Q0, real V0, real beta=1.0, real residual=0.0)\n" + "\n" + "Creates a power law connection.\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "source: Water storage from which the water flows out. Flux is a\n" + "function of source.volume\n" + "\n" + "target: Target node (boundary condition or storage). Does not\n" + "influence the strength of the flow\n" + "\n" + "Q0: Reference flow :math:`Q_0 = q(V_0)` Outflow when the source storage\n" + "equals the reference volume\n" + "\n" + "V0: Reference volume :math:`V_0` The reference volume to scale the exponent\n" + "\n" + "beta: :math:`\\\\beta [-]` An empirical exponent to shape the flux\n" + "function (default = 1 (linear function))\n" + "\n" + "residual: :math:`V_{residual} [m^3]` The volume of water not flowing out\n" + "(default = 0) \n" + ""}, + { (char *)"delete_PowerLawConnection", (PyCFunction)_wrap_delete_PowerLawConnection, METH_O, (char *)"delete_PowerLawConnection(PowerLawConnection self)"}, + { (char *)"PowerLawConnection_swigregister", PowerLawConnection_swigregister, METH_VARARGS, NULL}, + { (char *)"PowerLawConnection_swiginit", PowerLawConnection_swiginit, METH_VARARGS, NULL}, + { (char *)"ExponentialDeclineConnection_Q0_set", _wrap_ExponentialDeclineConnection_Q0_set, METH_VARARGS, (char *)"ExponentialDeclineConnection_Q0_set(ExponentialDeclineConnection self, real Q0)"}, + { (char *)"ExponentialDeclineConnection_Q0_get", (PyCFunction)_wrap_ExponentialDeclineConnection_Q0_get, METH_O, (char *)"ExponentialDeclineConnection_Q0_get(ExponentialDeclineConnection self) -> real"}, + { (char *)"ExponentialDeclineConnection_m_set", _wrap_ExponentialDeclineConnection_m_set, METH_VARARGS, (char *)"ExponentialDeclineConnection_m_set(ExponentialDeclineConnection self, real m)"}, + { (char *)"ExponentialDeclineConnection_m_get", (PyCFunction)_wrap_ExponentialDeclineConnection_m_get, METH_O, (char *)"ExponentialDeclineConnection_m_get(ExponentialDeclineConnection self) -> real"}, + { (char *)"ExponentialDeclineConnection_V0_set", _wrap_ExponentialDeclineConnection_V0_set, METH_VARARGS, (char *)"ExponentialDeclineConnection_V0_set(ExponentialDeclineConnection self, real V0)"}, + { (char *)"ExponentialDeclineConnection_V0_get", (PyCFunction)_wrap_ExponentialDeclineConnection_V0_get, METH_O, (char *)"ExponentialDeclineConnection_V0_get(ExponentialDeclineConnection self) -> real"}, + { (char *)"new_ExponentialDeclineConnection", (PyCFunction) _wrap_new_ExponentialDeclineConnection, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "new_ExponentialDeclineConnection(cmf::water::WaterStorage::ptr source, cmf::water::flux_node::ptr target, real Q0, real V0, real m) -> ExponentialDeclineConnection\n" + "\n" + "ExponentialDeclineConnection(WaterStorage::ptr source,\n" + "flux_node::ptr target, real Q0, real V0, real m)\n" + "\n" + "creates the exponential decline connection \n" + ""}, + { (char *)"delete_ExponentialDeclineConnection", (PyCFunction)_wrap_delete_ExponentialDeclineConnection, METH_O, (char *)"delete_ExponentialDeclineConnection(ExponentialDeclineConnection self)"}, + { (char *)"ExponentialDeclineConnection_swigregister", ExponentialDeclineConnection_swigregister, METH_VARARGS, NULL}, + { (char *)"ExponentialDeclineConnection_swiginit", ExponentialDeclineConnection_swiginit, METH_VARARGS, NULL}, + { (char *)"ConstraintLinearStorageConnection_residencetime_set", _wrap_ConstraintLinearStorageConnection_residencetime_set, METH_VARARGS, (char *)"ConstraintLinearStorageConnection_residencetime_set(ConstraintLinearStorageConnection self, real residencetime)"}, + { (char *)"ConstraintLinearStorageConnection_residencetime_get", (PyCFunction)_wrap_ConstraintLinearStorageConnection_residencetime_get, METH_O, (char *)"ConstraintLinearStorageConnection_residencetime_get(ConstraintLinearStorageConnection self) -> real"}, + { (char *)"ConstraintLinearStorageConnection_Vlmin_set", _wrap_ConstraintLinearStorageConnection_Vlmin_set, METH_VARARGS, (char *)"ConstraintLinearStorageConnection_Vlmin_set(ConstraintLinearStorageConnection self, real Vlmin)"}, + { (char *)"ConstraintLinearStorageConnection_Vlmin_get", (PyCFunction)_wrap_ConstraintLinearStorageConnection_Vlmin_get, METH_O, (char *)"ConstraintLinearStorageConnection_Vlmin_get(ConstraintLinearStorageConnection self) -> real"}, + { (char *)"ConstraintLinearStorageConnection_Vrmax_set", _wrap_ConstraintLinearStorageConnection_Vrmax_set, METH_VARARGS, (char *)"ConstraintLinearStorageConnection_Vrmax_set(ConstraintLinearStorageConnection self, real Vrmax)"}, + { (char *)"ConstraintLinearStorageConnection_Vrmax_get", (PyCFunction)_wrap_ConstraintLinearStorageConnection_Vrmax_get, METH_O, (char *)"ConstraintLinearStorageConnection_Vrmax_get(ConstraintLinearStorageConnection self) -> real"}, + { (char *)"new_ConstraintLinearStorageConnection", (PyCFunction) _wrap_new_ConstraintLinearStorageConnection, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "new_ConstraintLinearStorageConnection(cmf::water::WaterStorage::ptr source, cmf::water::WaterStorage::ptr target, real residencetime=1.0, real Vlmin=0.0, real Vrmax=1.0) -> ConstraintLinearStorageConnection\n" + "\n" + "ConstraintLinearStorageConnection(WaterStorage::ptr source,\n" + "WaterStorage::ptr target, real residencetime=1.0, real Vlmin=0.0, real\n" + "Vrmax=1.0)\n" + "\n" + "Creates a kinematic wave connection.\n" + "\n" + "\n" + "\n" + ".. math::\n" + "\n" + " q = \\\\frac 1 {t_r} {\\\\left(\\\\frac{V - V_{residual}}{V_0}\n" + " \\\\right)^\\\\beta} \n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "source: Water storage from which the water flows out. Flux is a\n" + "function of source.volume\n" + "\n" + "target: Target node (boundary condition or storage). Does not\n" + "influence the strength of the flow\n" + "\n" + "residencetime: :math:`t_r [days]` The residence time of the water in this\n" + "storage\n" + "\n" + "Vlmin: :math:`V_{l,min} [m^3]` The volume of water not flowing out\n" + "(default = 0)\n" + "\n" + "Vrmax: :math:`V_{r,max}` Capacity of the target water storage in m3 \n" + ""}, + { (char *)"delete_ConstraintLinearStorageConnection", (PyCFunction)_wrap_delete_ConstraintLinearStorageConnection, METH_O, (char *)"delete_ConstraintLinearStorageConnection(ConstraintLinearStorageConnection self)"}, + { (char *)"ConstraintLinearStorageConnection_swigregister", ConstraintLinearStorageConnection_swigregister, METH_VARARGS, NULL}, + { (char *)"ConstraintLinearStorageConnection_swiginit", ConstraintLinearStorageConnection_swiginit, METH_VARARGS, NULL}, + { (char *)"bidirectional_kinematic_exchange_Vmaxsuc_set", _wrap_bidirectional_kinematic_exchange_Vmaxsuc_set, METH_VARARGS, (char *)"bidirectional_kinematic_exchange_Vmaxsuc_set(bidirectional_kinematic_exchange self, real Vmaxsuc)"}, + { (char *)"bidirectional_kinematic_exchange_Vmaxsuc_get", (PyCFunction)_wrap_bidirectional_kinematic_exchange_Vmaxsuc_get, METH_O, (char *)"bidirectional_kinematic_exchange_Vmaxsuc_get(bidirectional_kinematic_exchange self) -> real"}, + { (char *)"bidirectional_kinematic_exchange_Vminspill_set", _wrap_bidirectional_kinematic_exchange_Vminspill_set, METH_VARARGS, (char *)"bidirectional_kinematic_exchange_Vminspill_set(bidirectional_kinematic_exchange self, real Vminspill)"}, + { (char *)"bidirectional_kinematic_exchange_Vminspill_get", (PyCFunction)_wrap_bidirectional_kinematic_exchange_Vminspill_get, METH_O, (char *)"bidirectional_kinematic_exchange_Vminspill_get(bidirectional_kinematic_exchange self) -> real"}, + { (char *)"bidirectional_kinematic_exchange_qspill_set", _wrap_bidirectional_kinematic_exchange_qspill_set, METH_VARARGS, (char *)"bidirectional_kinematic_exchange_qspill_set(bidirectional_kinematic_exchange self, real qspill)"}, + { (char *)"bidirectional_kinematic_exchange_qspill_get", (PyCFunction)_wrap_bidirectional_kinematic_exchange_qspill_get, METH_O, (char *)"bidirectional_kinematic_exchange_qspill_get(bidirectional_kinematic_exchange self) -> real"}, + { (char *)"bidirectional_kinematic_exchange_qsuc_set", _wrap_bidirectional_kinematic_exchange_qsuc_set, METH_VARARGS, (char *)"bidirectional_kinematic_exchange_qsuc_set(bidirectional_kinematic_exchange self, real qsuc)"}, + { (char *)"bidirectional_kinematic_exchange_qsuc_get", (PyCFunction)_wrap_bidirectional_kinematic_exchange_qsuc_get, METH_O, (char *)"bidirectional_kinematic_exchange_qsuc_get(bidirectional_kinematic_exchange self) -> real"}, + { (char *)"bidirectional_kinematic_exchange_beta_suc_set", _wrap_bidirectional_kinematic_exchange_beta_suc_set, METH_VARARGS, (char *)"bidirectional_kinematic_exchange_beta_suc_set(bidirectional_kinematic_exchange self, real beta_suc)"}, + { (char *)"bidirectional_kinematic_exchange_beta_suc_get", (PyCFunction)_wrap_bidirectional_kinematic_exchange_beta_suc_get, METH_O, (char *)"bidirectional_kinematic_exchange_beta_suc_get(bidirectional_kinematic_exchange self) -> real"}, + { (char *)"bidirectional_kinematic_exchange_beta_spill_set", _wrap_bidirectional_kinematic_exchange_beta_spill_set, METH_VARARGS, (char *)"bidirectional_kinematic_exchange_beta_spill_set(bidirectional_kinematic_exchange self, real beta_spill)"}, + { (char *)"bidirectional_kinematic_exchange_beta_spill_get", (PyCFunction)_wrap_bidirectional_kinematic_exchange_beta_spill_get, METH_O, (char *)"bidirectional_kinematic_exchange_beta_spill_get(bidirectional_kinematic_exchange self) -> real"}, + { (char *)"new_bidirectional_kinematic_exchange", (PyCFunction) _wrap_new_bidirectional_kinematic_exchange, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "new_bidirectional_kinematic_exchange(cmf::water::WaterStorage::ptr source, cmf::water::flux_node::ptr target, real Vminspill, real Vmaxsuc, real qspill, real qsuc, real beta_spill, real beta_suc) -> bidirectional_kinematic_exchange\n" + "\n" + "bidirectional_kinematic_exchange(WaterStorage::ptr source,\n" + "flux_node::ptr target, real Vminspill, real Vmaxsuc, real qspill, real\n" + "qsuc, real beta_spill, real beta_suc)\n" + "\n" + "Creates a kinematic wave connection.\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "source: Water storage from which the water flows out. Flux is a\n" + "function of source.volume\n" + "\n" + "target: Target node (boundary condition or storage). Does not\n" + "influence the strength of the flow\n" + "\n" + "Vmaxsuc: Suction starts below this threshold volume of source\n" + "\n" + "Vminspill: Spilling starts above this threshold volume of source\n" + "\n" + "qspill: Spill flow at 2*Vminspill in m3/day\n" + "\n" + "qsuc: Suction flow at V=0 m3\n" + "\n" + "beta_suc: beta_spill: Exponent for spill / suction flow \n" + ""}, + { (char *)"delete_bidirectional_kinematic_exchange", (PyCFunction)_wrap_delete_bidirectional_kinematic_exchange, METH_O, (char *)"delete_bidirectional_kinematic_exchange(bidirectional_kinematic_exchange self)"}, + { (char *)"bidirectional_kinematic_exchange_swigregister", bidirectional_kinematic_exchange_swigregister, METH_VARARGS, NULL}, + { (char *)"bidirectional_kinematic_exchange_swiginit", bidirectional_kinematic_exchange_swiginit, METH_VARARGS, NULL}, + { (char *)"constraint_kinematic_wave_residencetime_set", _wrap_constraint_kinematic_wave_residencetime_set, METH_VARARGS, (char *)"constraint_kinematic_wave_residencetime_set(constraint_kinematic_wave self, real residencetime)"}, + { (char *)"constraint_kinematic_wave_residencetime_get", (PyCFunction)_wrap_constraint_kinematic_wave_residencetime_get, METH_O, (char *)"constraint_kinematic_wave_residencetime_get(constraint_kinematic_wave self) -> real"}, + { (char *)"constraint_kinematic_wave_beta_set", _wrap_constraint_kinematic_wave_beta_set, METH_VARARGS, (char *)"constraint_kinematic_wave_beta_set(constraint_kinematic_wave self, real beta)"}, + { (char *)"constraint_kinematic_wave_beta_get", (PyCFunction)_wrap_constraint_kinematic_wave_beta_get, METH_O, (char *)"constraint_kinematic_wave_beta_get(constraint_kinematic_wave self) -> real"}, + { (char *)"constraint_kinematic_wave_residual_set", _wrap_constraint_kinematic_wave_residual_set, METH_VARARGS, (char *)"constraint_kinematic_wave_residual_set(constraint_kinematic_wave self, real residual)"}, + { (char *)"constraint_kinematic_wave_residual_get", (PyCFunction)_wrap_constraint_kinematic_wave_residual_get, METH_O, (char *)"constraint_kinematic_wave_residual_get(constraint_kinematic_wave self) -> real"}, + { (char *)"constraint_kinematic_wave_V0_set", _wrap_constraint_kinematic_wave_V0_set, METH_VARARGS, (char *)"constraint_kinematic_wave_V0_set(constraint_kinematic_wave self, real V0)"}, + { (char *)"constraint_kinematic_wave_V0_get", (PyCFunction)_wrap_constraint_kinematic_wave_V0_get, METH_O, (char *)"constraint_kinematic_wave_V0_get(constraint_kinematic_wave self) -> real"}, + { (char *)"constraint_kinematic_wave_Vrmax_set", _wrap_constraint_kinematic_wave_Vrmax_set, METH_VARARGS, (char *)"constraint_kinematic_wave_Vrmax_set(constraint_kinematic_wave self, real Vrmax)"}, + { (char *)"constraint_kinematic_wave_Vrmax_get", (PyCFunction)_wrap_constraint_kinematic_wave_Vrmax_get, METH_O, (char *)"constraint_kinematic_wave_Vrmax_get(constraint_kinematic_wave self) -> real"}, + { (char *)"constraint_kinematic_wave_gamma_set", _wrap_constraint_kinematic_wave_gamma_set, METH_VARARGS, (char *)"constraint_kinematic_wave_gamma_set(constraint_kinematic_wave self, real gamma)"}, + { (char *)"constraint_kinematic_wave_gamma_get", (PyCFunction)_wrap_constraint_kinematic_wave_gamma_get, METH_O, (char *)"constraint_kinematic_wave_gamma_get(constraint_kinematic_wave self) -> real"}, + { (char *)"new_constraint_kinematic_wave", (PyCFunction) _wrap_new_constraint_kinematic_wave, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "new_constraint_kinematic_wave(cmf::water::WaterStorage::ptr source, cmf::water::WaterStorage::ptr target, real residencetime=1.0, real exponent=1.0, real residual=0.0, real V0=1.0, real Vrmax=1.0, real gamma=1.0) -> constraint_kinematic_wave\n" + "\n" + "constraint_kinematic_wave(WaterStorage::ptr source, WaterStorage::ptr\n" + "target, real residencetime=1.0, real exponent=1.0, real residual=0.0,\n" + "real V0=1.0, real Vrmax=1.0, real gamma=1.0)\n" + "\n" + "Creates a kinematic wave connection.\n" + "\n" + "\n" + "\n" + ".. math::\n" + "\n" + " q = \\\\frac 1 {t_r} {\\\\left(\\\\frac{V - V_{residual}}{V_0}\n" + " \\\\right)^\\\\beta} \n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "source: Water storage from which the water flows out. Flux is a\n" + "function of source.volume\n" + "\n" + "target: Target node (boundary condition or storage). Does not\n" + "influence the strength of the flow\n" + "\n" + "residencetime: :math:`t_r [days]` The residence time of the water in this\n" + "storage\n" + "\n" + "exponent: :math:`\\\\beta [-]` An empirical exponent to shape the flux\n" + "function (default = 1 (linear function))\n" + "\n" + "residual: :math:`V_{residual} [m^3]` The volume of water not flowing out\n" + "(default = 0)\n" + "\n" + "V0: :math:`V_0` The reference volume to scale the exponent\n" + "\n" + "Vrmax: :math:`V_{r,max}` Capacity of the target water storage in m3\n" + "\n" + "gamma: :math:`\\\\gamma` Target capacity constriction curve shape \n" + ""}, + { (char *)"delete_constraint_kinematic_wave", (PyCFunction)_wrap_delete_constraint_kinematic_wave, METH_O, (char *)"delete_constraint_kinematic_wave(constraint_kinematic_wave self)"}, + { (char *)"constraint_kinematic_wave_swigregister", constraint_kinematic_wave_swigregister, METH_VARARGS, NULL}, + { (char *)"constraint_kinematic_wave_swiginit", constraint_kinematic_wave_swiginit, METH_VARARGS, NULL}, + { (char *)"TechnicalFlux_MaxFlux_set", _wrap_TechnicalFlux_MaxFlux_set, METH_VARARGS, (char *)"TechnicalFlux_MaxFlux_set(TechnicalFlux self, real MaxFlux)"}, + { (char *)"TechnicalFlux_MaxFlux_get", (PyCFunction)_wrap_TechnicalFlux_MaxFlux_get, METH_O, (char *)"TechnicalFlux_MaxFlux_get(TechnicalFlux self) -> real"}, + { (char *)"TechnicalFlux_MinState_set", _wrap_TechnicalFlux_MinState_set, METH_VARARGS, (char *)"TechnicalFlux_MinState_set(TechnicalFlux self, real MinState)"}, + { (char *)"TechnicalFlux_MinState_get", (PyCFunction)_wrap_TechnicalFlux_MinState_get, METH_O, (char *)"TechnicalFlux_MinState_get(TechnicalFlux self) -> real"}, + { (char *)"TechnicalFlux_FluxDecreaseTime_set", _wrap_TechnicalFlux_FluxDecreaseTime_set, METH_VARARGS, (char *)"TechnicalFlux_FluxDecreaseTime_set(TechnicalFlux self, Time FluxDecreaseTime)"}, + { (char *)"TechnicalFlux_FluxDecreaseTime_get", (PyCFunction)_wrap_TechnicalFlux_FluxDecreaseTime_get, METH_O, (char *)"TechnicalFlux_FluxDecreaseTime_get(TechnicalFlux self) -> Time"}, + { (char *)"new_TechnicalFlux", (PyCFunction) _wrap_new_TechnicalFlux, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "new_TechnicalFlux(cmf::water::WaterStorage::ptr source, cmf::water::flux_node::ptr target, real maximum_flux, real minimal_state=0, Time flux_decrease_time) -> TechnicalFlux\n" + "\n" + "TechnicalFlux(cmf::water::WaterStorage::ptr source,\n" + "cmf::water::flux_node::ptr target, real maximum_flux, real\n" + "minimal_state=0, cmf::math::Time flux_decrease_time=cmf::math::h)\n" + "\n" + "Produces a constant but changeable flux from a source to a target, if\n" + "enough water is present in the source.\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "source: The source of the water\n" + "\n" + "target: The target of the water\n" + "\n" + "maximum_flux: The requested flux :math:`q_{0}`\n" + "\n" + "minimal_state: Minimal volume of stored water in source\n" + "\n" + "flux_decrease_time: ( cmf::math::Time) \n" + ""}, + { (char *)"delete_TechnicalFlux", (PyCFunction)_wrap_delete_TechnicalFlux, METH_O, (char *)"delete_TechnicalFlux(TechnicalFlux self)"}, + { (char *)"TechnicalFlux_swigregister", TechnicalFlux_swigregister, METH_VARARGS, NULL}, + { (char *)"TechnicalFlux_swiginit", TechnicalFlux_swiginit, METH_VARARGS, NULL}, + { (char *)"generic_gradient_connection_K_set", _wrap_generic_gradient_connection_K_set, METH_VARARGS, (char *)"generic_gradient_connection_K_set(generic_gradient_connection self, real K)"}, + { (char *)"generic_gradient_connection_K_get", (PyCFunction)_wrap_generic_gradient_connection_K_get, METH_O, (char *)"generic_gradient_connection_K_get(generic_gradient_connection self) -> real"}, + { (char *)"generic_gradient_connection_A_set", _wrap_generic_gradient_connection_A_set, METH_VARARGS, (char *)"generic_gradient_connection_A_set(generic_gradient_connection self, real A)"}, + { (char *)"generic_gradient_connection_A_get", (PyCFunction)_wrap_generic_gradient_connection_A_get, METH_O, (char *)"generic_gradient_connection_A_get(generic_gradient_connection self) -> real"}, + { (char *)"generic_gradient_connection_d_set", _wrap_generic_gradient_connection_d_set, METH_VARARGS, (char *)"generic_gradient_connection_d_set(generic_gradient_connection self, real d)"}, + { (char *)"generic_gradient_connection_d_get", (PyCFunction)_wrap_generic_gradient_connection_d_get, METH_O, (char *)"generic_gradient_connection_d_get(generic_gradient_connection self) -> real"}, + { (char *)"new_generic_gradient_connection", (PyCFunction) _wrap_new_generic_gradient_connection, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "new_generic_gradient_connection(cmf::water::WaterStorage::ptr left, cmf::water::WaterStorage::ptr right, real K, real d=1.0, real A=1.0) -> generic_gradient_connection\n" + "\n" + "generic_gradient_connection(cmf::water::WaterStorage::ptr left,\n" + "cmf::water::WaterStorage::ptr right, real K, real d=1.0, real A=1.0)\n" + "\n" + "Creates a generic gradient based flux, if enough water is present in\n" + "the source.\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "left: The left node of the connection\n" + "\n" + "right: The right node of the connection\n" + "\n" + "K: the conductivity of the connection in m/day\n" + "\n" + "d: the topographic lenght of the connection in m\n" + "\n" + "A: the area of the connection cross section in m2 \n" + ""}, + { (char *)"delete_generic_gradient_connection", (PyCFunction)_wrap_delete_generic_gradient_connection, METH_O, (char *)"delete_generic_gradient_connection(generic_gradient_connection self)"}, + { (char *)"generic_gradient_connection_swigregister", generic_gradient_connection_swigregister, METH_VARARGS, NULL}, + { (char *)"generic_gradient_connection_swiginit", generic_gradient_connection_swiginit, METH_VARARGS, NULL}, + { (char *)"statecontrol_connection_reaction_time_set", _wrap_statecontrol_connection_reaction_time_set, METH_VARARGS, (char *)"statecontrol_connection_reaction_time_set(statecontrol_connection self, Time reaction_time)"}, + { (char *)"statecontrol_connection_reaction_time_get", (PyCFunction)_wrap_statecontrol_connection_reaction_time_get, METH_O, (char *)"statecontrol_connection_reaction_time_get(statecontrol_connection self) -> Time"}, + { (char *)"statecontrol_connection_target_state_set", _wrap_statecontrol_connection_target_state_set, METH_VARARGS, (char *)"statecontrol_connection_target_state_set(statecontrol_connection self, real target_state)"}, + { (char *)"statecontrol_connection_target_state_get", (PyCFunction)_wrap_statecontrol_connection_target_state_get, METH_O, (char *)"statecontrol_connection_target_state_get(statecontrol_connection self) -> real"}, + { (char *)"new_statecontrol_connection", (PyCFunction) _wrap_new_statecontrol_connection, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "new_statecontrol_connection(cmf::water::WaterStorage::ptr controlled_storage, cmf::water::flux_node::ptr other_end, real target_state, Time reaction_time) -> statecontrol_connection\n" + "\n" + "statecontrol_connection(cmf::water::WaterStorage::ptr\n" + "controlled_storage, cmf::water::flux_node::ptr other_end, real\n" + "target_state, cmf::math::Time reaction_time)\n" + "\n" + "Creates a flux connection to control the state of a storage.\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "controlled_storage: Water storage, to be controlled\n" + "\n" + "other_end: source of missing water or target of excessive water\n" + "\n" + "target_state: State the controlled storage should hold (\n" + ":math:`h_{target}`)\n" + "\n" + "reaction_time: Time to reach state ( :math:`t_c`) \n" + ""}, + { (char *)"delete_statecontrol_connection", (PyCFunction)_wrap_delete_statecontrol_connection, METH_O, (char *)"delete_statecontrol_connection(statecontrol_connection self)"}, + { (char *)"statecontrol_connection_swigregister", statecontrol_connection_swigregister, METH_VARARGS, NULL}, + { (char *)"statecontrol_connection_swiginit", statecontrol_connection_swiginit, METH_VARARGS, NULL}, + { (char *)"node_list_size", (PyCFunction)_wrap_node_list_size, METH_O, (char *)"\n" + "node_list_size(node_list self) -> size_t\n" + "\n" + "size_t size()\n" + "const\n" + "\n" + "The number of nodes. \n" + ""}, + { (char *)"new_node_list", _wrap_new_node_list, METH_VARARGS, (char *)"\n" + "node_list()\n" + "new_node_list(node_list forcopy) -> node_list\n" + "\n" + "node_list(const cmf::water::node_list &forcopy)\n" + "\n" + "Copy the node_list. \n" + ""}, + { (char *)"node_list___iadd__", (PyCFunction) _wrap_node_list___iadd__, METH_VARARGS | METH_KEYWORDS, (char *)"node_list___iadd__(node_list self, node_list right) -> node_list"}, + { (char *)"node_list___add__", (PyCFunction) _wrap_node_list___add__, METH_VARARGS | METH_KEYWORDS, (char *)"node_list___add__(node_list self, node_list right) -> node_list"}, + { (char *)"node_list___get", (PyCFunction) _wrap_node_list___get, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "node_list___get(node_list self, ptrdiff_t index) -> cmf::water::flux_node::ptr\n" + "\n" + "flux_node::ptr\n" + "get(ptrdiff_t index) const\n" + "\n" + "Returns a node in the node_list. \n" + ""}, + { (char *)"node_list___getslice", (PyCFunction) _wrap_node_list___getslice, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "node_list___getslice(node_list self, ptrdiff_t begin, ptrdiff_t end, ptrdiff_t step=1) -> node_list\n" + "\n" + "node_list\n" + "getslice(ptrdiff_t begin, ptrdiff_t end, ptrdiff_t step=1) const\n" + "\n" + "Returns a slice of the node_list. \n" + ""}, + { (char *)"node_list_append", (PyCFunction) _wrap_node_list_append, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "node_list_append(node_list self, cmf::water::flux_node::ptr node)\n" + "\n" + "void\n" + "append(flux_node::ptr node)\n" + "\n" + "Adds a flux node to the list. \n" + ""}, + { (char *)"node_list_remove", (PyCFunction) _wrap_node_list_remove, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "node_list_remove(node_list self, cmf::water::flux_node::ptr node) -> bool\n" + "\n" + "bool\n" + "remove(flux_node::ptr node)\n" + "\n" + "Removes a flux node from the list, returns true if successful. \n" + ""}, + { (char *)"node_list_global_water_balance", (PyCFunction) _wrap_node_list_global_water_balance, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "node_list_global_water_balance(node_list self, Time t) -> real\n" + "\n" + "real global_water_balance(cmf::math::Time t) const\n" + "\n" + "Returns the sum of the water balances of the nodes.\n" + "\n" + "\n" + "\n" + ".. math::\n" + "\n" + " \\\\sigma_{global} =\n" + " \\\\sum_{i=0}^N{\\\\sum_{j=0}^{C_i}{q_{ij}(t)}} \n" + "\n" + "Replaces slow Python code like: \n" + ""}, + { (char *)"node_list_water_balance", (PyCFunction) _wrap_node_list_water_balance, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "node_list_water_balance(node_list self, Time t) -> cmf::math::num_array\n" + "\n" + "cmf::math::num_array water_balance(cmf::math::Time t) const\n" + "\n" + "Returns the water balance of each vector as a vector.\n" + "\n" + "\n" + "\n" + ".. math::\n" + "\n" + " \\\\sigma_i = \\\\sum_{j=0}^{C_i}{q_{ij}(t)} \n" + "\n" + "Replaces slow Python code like: \n" + ""}, + { (char *)"node_list_conc", (PyCFunction) _wrap_node_list_conc, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "node_list_conc(node_list self, Time t, solute _Solute) -> cmf::math::num_array\n" + "\n" + "cmf::math::num_array conc(cmf::math::Time t, const cmf::water::solute\n" + "&_Solute) const\n" + "\n" + "Returns an array holding the concentration of all the flux nodes for\n" + "the given solute. \n" + ""}, + { (char *)"node_list_set_solute_source", (PyCFunction) _wrap_node_list_set_solute_source, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "node_list_set_solute_source(node_list self, solute _Solute, cmf::math::num_array source_fluxes) -> ptrdiff_t\n" + "\n" + "ptrdiff_t set_solute_source(const cmf::water::solute &_Solute,\n" + "cmf::math::num_array source_fluxes)\n" + "\n" + "Sets the source flux of a solute storage associated with a node (node\n" + "has to be a water storage) \n" + ""}, + { (char *)"node_list_get_fluxes_to", (PyCFunction) _wrap_node_list_get_fluxes_to, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "node_list_get_fluxes_to(node_list self, node_list targets, Time t) -> cmf::math::num_array\n" + "\n" + "cmf::math::num_array get_fluxes_to(const cmf::water::node_list\n" + "&targets, cmf::math::Time t) const\n" + "\n" + "A fast method to perform flux queries as a batch.\n" + "\n" + "The node lists left and right should have the same length.\n" + "\n" + "The vector containing the flux from left to right at the same position\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "targets: A node_list containing the source nodes\n" + "\n" + "t: The time for the fluxes\n" + "\n" + "Replaces slow Python code like: \n" + ""}, + { (char *)"node_list_get_fluxes3d_to", (PyCFunction) _wrap_node_list_get_fluxes3d_to, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "node_list_get_fluxes3d_to(node_list self, node_list targets, Time t) -> point_vector\n" + "\n" + "cmf::geometry::point_vector get_fluxes3d_to(const\n" + "cmf::water::node_list &targets, cmf::math::Time t) const\n" + "\n" + "Returns the flux vectors to the nodes of a given target node_list. \n" + ""}, + { (char *)"node_list_get_fluxes3d", (PyCFunction) _wrap_node_list_get_fluxes3d, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "node_list_get_fluxes3d(node_list self, Time t) -> point_vector\n" + "\n" + "cmf::geometry::point_vector get_fluxes3d(cmf::math::Time t) const\n" + "\n" + "Returns the current flow vector for each node. \n" + ""}, + { (char *)"node_list_get_positions", (PyCFunction)_wrap_node_list_get_positions, METH_O, (char *)"\n" + "node_list_get_positions(node_list self) -> point_vector\n" + "\n" + "cmf::geometry::point_vector get_positions() const\n" + "\n" + "Returns the positions of the nodes. \n" + ""}, + { (char *)"delete_node_list", (PyCFunction)_wrap_delete_node_list, METH_O, (char *)"\n" + "delete_node_list(node_list self)\n" + "\n" + "virtual\n" + "~node_list() \n" + ""}, + { (char *)"node_list_potentials_set", _wrap_node_list_potentials_set, METH_VARARGS, (char *)"node_list_potentials_set(node_list self, cmf::math::num_array potentials)"}, + { (char *)"node_list_potentials_get", (PyCFunction)_wrap_node_list_potentials_get, METH_O, (char *)"node_list_potentials_get(node_list self) -> cmf::math::num_array"}, + { (char *)"node_list_swigregister", node_list_swigregister, METH_VARARGS, NULL}, + { (char *)"node_list_swiginit", node_list_swiginit, METH_VARARGS, NULL}, + { (char *)"NeumannBoundary_list_get", (PyCFunction) _wrap_NeumannBoundary_list_get, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "NeumannBoundary_list_get(NeumannBoundary_list self, ptrdiff_t index) -> cmf::water::NeumannBoundary::ptr\n" + "\n" + "NeumannBoundary::ptr get(ptrdiff_t index) const\n" + "\n" + "Returns the Neumann boundary condition at position index.\n" + "\n" + "From Python you can use [] \n" + ""}, + { (char *)"NeumannBoundary_list_get_fluxes", (PyCFunction) _wrap_NeumannBoundary_list_get_fluxes, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "NeumannBoundary_list_get_fluxes(NeumannBoundary_list self, Time t) -> cmf::math::num_array\n" + "\n" + "cmf::math::num_array get_fluxes(cmf::math::Time t=cmf::math::Time())\n" + "const\n" + "\n" + "Returns the fluxes of the items as an array.\n" + "\n" + "get_fluxes and set_fluxes are wrapped with the Python property fluxes\n" + "\n" + ""}, + { (char *)"NeumannBoundary_list_append", (PyCFunction) _wrap_NeumannBoundary_list_append, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "NeumannBoundary_list_append(NeumannBoundary_list self, cmf::water::NeumannBoundary::ptr nbc)\n" + "\n" + "void\n" + "append(NeumannBoundary::ptr nbc)\n" + "\n" + "Appends a neumann boundary to this list. \n" + ""}, + { (char *)"NeumannBoundary_list_size", (PyCFunction)_wrap_NeumannBoundary_list_size, METH_O, (char *)"\n" + "NeumannBoundary_list_size(NeumannBoundary_list self) -> size_t\n" + "\n" + "size_t\n" + "size() const\n" + "\n" + "returns the number of stored boundary conditions \n" + ""}, + { (char *)"new_NeumannBoundary_list", _wrap_new_NeumannBoundary_list, METH_VARARGS, (char *)"\n" + "NeumannBoundary_list()\n" + "NeumannBoundary_list(node_list copy)\n" + "new_NeumannBoundary_list(NeumannBoundary_list copy) -> NeumannBoundary_list\n" + "\n" + "NeumannBoundary_list(const NeumannBoundary_list ©) \n" + ""}, + { (char *)"NeumannBoundary_list_to_node_list", (PyCFunction)_wrap_NeumannBoundary_list_to_node_list, METH_O, (char *)"\n" + "NeumannBoundary_list_to_node_list(NeumannBoundary_list self) -> node_list\n" + "\n" + "cmf::water::node_list to_node_list() const\n" + "\n" + "Creates a node_list from this NeumannBoundary_list. \n" + ""}, + { (char *)"NeumannBoundary_list_global_water_balance", (PyCFunction) _wrap_NeumannBoundary_list_global_water_balance, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "NeumannBoundary_list_global_water_balance(NeumannBoundary_list self, Time t) -> real\n" + "\n" + "real\n" + "global_water_balance(cmf::math::Time t) const\n" + "\n" + "Returns the sum of the water balances of the nodes\n" + "\n" + "\n" + ".. math::\n" + "\n" + " \\\\sigma_{global} =\n" + " \\\\sum_{i=0}^N{\\\\sum_{j=0}^{C_i}{q_{ij}(t)}} \n" + "\n" + ".\n" + "\n" + "Replaces slow Python code like: \n" + ""}, + { (char *)"NeumannBoundary_list_water_balance", (PyCFunction) _wrap_NeumannBoundary_list_water_balance, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "NeumannBoundary_list_water_balance(NeumannBoundary_list self, Time t) -> cmf::math::num_array\n" + "\n" + "cmf::math::num_array water_balance(cmf::math::Time t) const\n" + "\n" + "Returns the water balance of each vector as a vector \n" + "\n" + ".. math::\n" + "\n" + " \\\\sigma_i\n" + " = \\\\sum_{j=0}^{C_i}{q_{ij}(t)} \n" + "\n" + ".\n" + "\n" + "Replaces slow Python code like: \n" + ""}, + { (char *)"NeumannBoundary_list_fluxes_set", _wrap_NeumannBoundary_list_fluxes_set, METH_VARARGS, (char *)"NeumannBoundary_list_fluxes_set(NeumannBoundary_list self, cmf::math::num_array fluxes)"}, + { (char *)"NeumannBoundary_list_fluxes_get", (PyCFunction)_wrap_NeumannBoundary_list_fluxes_get, METH_O, (char *)"NeumannBoundary_list_fluxes_get(NeumannBoundary_list self) -> cmf::math::num_array"}, + { (char *)"delete_NeumannBoundary_list", (PyCFunction)_wrap_delete_NeumannBoundary_list, METH_O, (char *)"delete_NeumannBoundary_list(NeumannBoundary_list self)"}, + { (char *)"NeumannBoundary_list_swigregister", NeumannBoundary_list_swigregister, METH_VARARGS, NULL}, + { (char *)"NeumannBoundary_list_swiginit", NeumannBoundary_list_swiginit, METH_VARARGS, NULL}, + { (char *)"SystemBridge_get_upper_node", (PyCFunction)_wrap_SystemBridge_get_upper_node, METH_O, (char *)"\n" + "SystemBridge_get_upper_node(SystemBridge self) -> cmf::water::flux_node::ptr\n" + "\n" + "flux_node::ptr get_upper_node() const\n" + "\n" + "Returns the upper node. \n" + ""}, + { (char *)"SystemBridge_get_lower_node", (PyCFunction)_wrap_SystemBridge_get_lower_node, METH_O, (char *)"\n" + "SystemBridge_get_lower_node(SystemBridge self) -> cmf::water::flux_node::ptr\n" + "\n" + "flux_node::ptr get_lower_node() const\n" + "\n" + "Returns the lower node. \n" + ""}, + { (char *)"SystemBridge_get_down_flux", (PyCFunction)_wrap_SystemBridge_get_down_flux, METH_O, (char *)"\n" + "SystemBridge_get_down_flux(SystemBridge self) -> double\n" + "\n" + "double get_down_flux() const\n" + "\n" + "Returns the currently integrated flux to the lower node. \n" + ""}, + { (char *)"SystemBridge_down_flux_integrator", (PyCFunction)_wrap_SystemBridge_down_flux_integrator, METH_O, (char *)"\n" + "SystemBridge_down_flux_integrator(SystemBridge self) -> cmf::water::flux_integrator::ptr\n" + "\n" + "flux_integrator::ptr down_flux_integrator() const \n" + ""}, + { (char *)"delete_SystemBridge", (PyCFunction)_wrap_delete_SystemBridge, METH_O, (char *)"delete_SystemBridge(SystemBridge self)"}, + { (char *)"SystemBridge_swigregister", SystemBridge_swigregister, METH_VARARGS, NULL}, + { (char *)"delete_SystemBridgeConnection", (PyCFunction)_wrap_delete_SystemBridgeConnection, METH_O, (char *)"delete_SystemBridgeConnection(SystemBridgeConnection self)"}, + { (char *)"SystemBridgeConnection_swigregister", SystemBridgeConnection_swigregister, METH_VARARGS, NULL}, + { (char *)"system_bridge", (PyCFunction) _wrap_system_bridge, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "system_bridge(project p, cmf::water::flux_node::ptr upper, cmf::water::flux_node::ptr lower) -> cmf::water::SystemBridge::ptr\n" + "\n" + "SystemBridge::ptr\n" + "cmf::water::system_bridge(cmf::project &p, flux_node::ptr upper,\n" + "flux_node::ptr lower)\n" + "\n" + "Creates a SystemBridge object.\n" + "\n" + "This is an advanced feature for tuning of the calculation time.\n" + "\n" + "A SystemBridge can be used to replace an existing connection between\n" + "nodes. After installation, the two nodes can more safely be added to\n" + "different integrator systems. One node (called upper) is connected\n" + "with the system bridge with the connection formerly connecting the\n" + "nodes, the second node (called lower) is connected to the system\n" + "bridge with as a Neumann boundary condition. The flux equals the\n" + "average flux of the connection upper <-> SystemBridge. Therefore, the\n" + "system bridge must become an integratable of the integrator system the\n" + "upper node belongs to. Use as an upper system (system upper node is\n" + "belonging to) the faster reacting system. For the connection between\n" + "upper and SystemBridge, the SystemBridge reacts as an Dirichlet\n" + "boundary condition, providing the potential of the lower node. \n" + ""}, + { (char *)"vapour_pressure", (PyCFunction) _wrap_vapour_pressure, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "vapour_pressure(double T) -> double\n" + "\n" + "double\n" + "cmf::atmosphere::vapour_pressure(double T)\n" + "\n" + "Returns the saturated vapor pressure in Pa for temperature T [degC].\n" + "\n" + "The saturated vapor pressure :math:`e_s` is calculated follwing the\n" + "following formula \n" + "\n" + ".. math::\n" + "\n" + " e_s = 0.6108 \\\\exp{\\\\frac{17.27\n" + " T}{T+237.3}}\n" + "\n" + "The definition is\n" + "fromhttp://www.fao.org/docrep/X0490E/x0490e07.htm#concepts \n" + ""}, + { (char *)"vpd_from_rH", (PyCFunction) _wrap_vpd_from_rH, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "vpd_from_rH(double T, double rH) -> double\n" + "\n" + "double\n" + "cmf::atmosphere::vpd_from_rH(double T, double rH)\n" + "\n" + "Returns the vapor pressure deficit in Pa for temperature T [degC] and\n" + "rel.\n" + "\n" + "humidity rH [%]\n" + "\n" + "The vapor pressure deficit :math:`e_s - e_a` is calculated from rel.\n" + "humidity as: \n" + "\n" + ".. math::\n" + "\n" + " e_s - e_a = (1-rH/100) * e_s(T)\n" + "\n" + "The definition\n" + "is fromhttp://www.fao.org/docrep/X0490E/x0490e07.htm#concepts\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "T: Air temperature in degC\n" + "\n" + "rH: Rel. humidity in %\n" + "\n" + ":math:`e_s(T)` is calculated using cmf::atmosphere::vapor_pressure(double)\n" + "\n" + ""}, + { (char *)"rH_from_vpd", (PyCFunction) _wrap_rH_from_vpd, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "rH_from_vpd(double T, double vpd) -> double\n" + "\n" + "double\n" + "cmf::atmosphere::rH_from_vpd(double T, double vpd)\n" + "\n" + "Returns the rel.\n" + "\n" + "humidity in % for temperature T [degC] and vapor pressure deficit vpd\n" + "[Pa]\n" + "\n" + "the rel. humidity is calculated from the vapor pressure deficit :math:`vpd = e_s - e_a` as: \n" + "\n" + ".. math::\n" + "\n" + " rH = 100 * \\\\frac{e_a}{e_s(T)}, e_a = e_s(T) -\n" + " vpd\n" + "\n" + "The definition is\n" + "fromhttp://www.fao.org/docrep/X0490E/x0490e07.htm#concepts\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "T: Air temperature in degC\n" + "\n" + "vpd: Vapor pressure deficit in Pa\n" + "\n" + ":math:`e_s(T)` is calculated using cmf::atmosphere::vapor_pressure(double)\n" + "\n" + ""}, + { (char *)"global_radiation", (PyCFunction) _wrap_global_radiation, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "global_radiation(Time t, double height, double sunshine_fraction, double longitude=8, double latitude=51, double time_zone=1, bool daily=False) -> double\n" + "\n" + "double\n" + "cmf::atmosphere::global_radiation(cmf::math::Time t, double height,\n" + "double sunshine_fraction, double longitude=8, double latitude=51,\n" + "double time_zone=1, bool daily=0)\n" + "\n" + "Calculates the global radiation in MJ/(m2 day) from the sun position\n" + "and the sunshine fraction.\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "t: actual time step\n" + "\n" + "height: Height above sea level\n" + "\n" + "sunshine_fraction: Fraction of sunshine hours per potential sunshine\n" + "duration in h/h\n" + "\n" + "longitude: latitude: Geographical position in degree. Latitude is\n" + "only taken into acount for subdaily calculation\n" + "\n" + "time_zone: Offset by timezone from GMT, eg. central Europe=1 US west\n" + "coast = -8\n" + "\n" + "daily: If true, the average radiation for the whole day is given\n" + "(therefore latitude and time zone ignored), otherwise the average of\n" + "the current hour is returned\n" + "\n" + "The calculation of the global radiation\n" + "followshttp://www.fao.org/docrep/X0490E/x0490e07.htm#radiation.\n" + "\n" + "The following formula is used: \n" + "\n" + ".. math::\n" + "\n" + " \\\\phi &=&\n" + " \\\\frac{(\\\\mbox{geogr. Latitude})^\\\\circ \\\\pi}{180^\\\\circ}\n" + " \\\\mbox{ Latitude in }rad \\\\\\\\ \\\\delta &=& 0.409\n" + " \\\\sin\\\\left(\\\\frac{2\\\\pi}{365}DOY - 1.39\\\\right) \\\\mbox{\n" + " Declination, DOY is day of year}\\\\\\\\ \\\\omega_s &=&\n" + " \\\\arccos(-\\\\tan\\\\phi\\\\tan\\\\delta) \\\\mbox{ Sunset angle}\n" + " \\\\\\\\ G_{sc} &=& 0.0802 \\\\frac{MJ}{m^2min} \\\\mbox{Solar\n" + " constant} \\\\\\\\ d_r &=& 1+0.033\n" + " \\\\cos\\\\left(\\\\frac{2\\\\pi}{365}DOY\\\\right) \\\\mbox{Inverse\n" + " relative distance Earth-Sun} \\\\\\\\ b &=&\n" + " \\\\frac{2\\\\pi(DOY-81)}{364}\\\\\\\\ S_c &=&\n" + " 0.1645\\\\sin(2b)-0.1255\\\\cos(b)-0.025\\\\sin(b) \\\\mbox{ Seasonal\n" + " correction for solar time} \\\\\\\\ \\\\omega &=& \\\\frac {\\\\pi}\n" + " {12} \\\\left(t_h+\\\\frac{(\\\\mbox{geogr.\n" + " Longitude})^\\\\circ}{15}-\\\\mbox{Timezone}+S_c-12\\\\right)\n" + " \\\\mbox{ solar time in }rad \\\\\\\\ \\\\mbox{If daily} \\\\\\\\ R_a\n" + " &=& \\\\frac{24\\\\ 60}{\\\\pi}G_{sc}\\\\ d_r \\\\left(\\\\omega_s\n" + " \\\\sin\\\\phi \\\\sin\\\\delta + \\\\cos\\\\phi \\\\cos\\\\delta\n" + " \\\\sin\\\\omega_s\\\\right) \\\\mbox{Extraterrestrial radiation }\n" + " \\\\frac{MJ}{m^2 day} \\\\\\\\ \\\\mbox{If hourly} \\\\\\\\ R_a &=&\n" + " \\\\frac{12\\\\ 24\\\\ 60}{\\\\pi}G_{sc}\\\\ d_r\n" + " \\\\left(\\\\left(\\\\omega^+ -\\\\omega^-\\\\right) \\\\sin\\\\phi\n" + " \\\\sin\\\\delta + \\\\cos\\\\phi \\\\cos\\\\delta\n" + " \\\\left(\\\\sin\\\\omega^+ - \\\\sin\\\\omega^-\\\\right)\\\\right)\n" + " \\\\\\\\ && \\\\omega^+,\\\\omega^- = \\\\omega\n" + " \\\\pm\\\\frac{\\\\pi}{24} \\\\\\\\ \\\\frac n N &=&\n" + " \\\\mbox{Fractional sunshine duration} \\\\\\\\ R_s &=&\n" + " \\\\left(0.25+\\\\left(0.5+2\\\\\n" + " 10^{-5}z\\\\right)\\\\frac{n}{N}\\\\right)R_a \\\\mbox{Global\n" + " radiation in }\\\\frac{MJ}{m^2 day} \\\\\\\\ && z=\\\\mbox{Height\n" + " a.s.l. in }m \\\\\\\\ \n" + "\n" + "\n" + ""}, + { (char *)"Pressure", (PyCFunction) _wrap_Pressure, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "Pressure(double height) -> double\n" + "\n" + "double\n" + "cmf::atmosphere::Pressure(double height)\n" + "\n" + "Returns the average air pressure for a height (m a.s.l.) \n" + ""}, + { (char *)"Weather_T_set", _wrap_Weather_T_set, METH_VARARGS, (char *)"Weather_T_set(Weather self, double T)"}, + { (char *)"Weather_T_get", (PyCFunction)_wrap_Weather_T_get, METH_O, (char *)"Weather_T_get(Weather self) -> double"}, + { (char *)"Weather_Tmax_set", _wrap_Weather_Tmax_set, METH_VARARGS, (char *)"Weather_Tmax_set(Weather self, double Tmax)"}, + { (char *)"Weather_Tmax_get", (PyCFunction)_wrap_Weather_Tmax_get, METH_O, (char *)"Weather_Tmax_get(Weather self) -> double"}, + { (char *)"Weather_Tmin_set", _wrap_Weather_Tmin_set, METH_VARARGS, (char *)"Weather_Tmin_set(Weather self, double Tmin)"}, + { (char *)"Weather_Tmin_get", (PyCFunction)_wrap_Weather_Tmin_get, METH_O, (char *)"Weather_Tmin_get(Weather self) -> double"}, + { (char *)"Weather_Tground_set", _wrap_Weather_Tground_set, METH_VARARGS, (char *)"Weather_Tground_set(Weather self, double Tground)"}, + { (char *)"Weather_Tground_get", (PyCFunction)_wrap_Weather_Tground_get, METH_O, (char *)"Weather_Tground_get(Weather self) -> double"}, + { (char *)"Weather_Windspeed_set", _wrap_Weather_Windspeed_set, METH_VARARGS, (char *)"Weather_Windspeed_set(Weather self, double Windspeed)"}, + { (char *)"Weather_Windspeed_get", (PyCFunction)_wrap_Weather_Windspeed_get, METH_O, (char *)"Weather_Windspeed_get(Weather self) -> double"}, + { (char *)"Weather_e_a_set", _wrap_Weather_e_a_set, METH_VARARGS, (char *)"Weather_e_a_set(Weather self, double e_a)"}, + { (char *)"Weather_e_a_get", (PyCFunction)_wrap_Weather_e_a_get, METH_O, (char *)"Weather_e_a_get(Weather self) -> double"}, + { (char *)"Weather_e_s_set", _wrap_Weather_e_s_set, METH_VARARGS, (char *)"Weather_e_s_set(Weather self, double e_s)"}, + { (char *)"Weather_e_s_get", (PyCFunction)_wrap_Weather_e_s_get, METH_O, (char *)"Weather_e_s_get(Weather self) -> double"}, + { (char *)"Weather_sunshine_set", _wrap_Weather_sunshine_set, METH_VARARGS, (char *)"Weather_sunshine_set(Weather self, double sunshine)"}, + { (char *)"Weather_sunshine_get", (PyCFunction)_wrap_Weather_sunshine_get, METH_O, (char *)"Weather_sunshine_get(Weather self) -> double"}, + { (char *)"Weather_Rs_set", _wrap_Weather_Rs_set, METH_VARARGS, (char *)"Weather_Rs_set(Weather self, double Rs)"}, + { (char *)"Weather_Rs_get", (PyCFunction)_wrap_Weather_Rs_get, METH_O, (char *)"Weather_Rs_get(Weather self) -> double"}, + { (char *)"Weather_daylength_set", _wrap_Weather_daylength_set, METH_VARARGS, (char *)"Weather_daylength_set(Weather self, double daylength)"}, + { (char *)"Weather_daylength_get", (PyCFunction)_wrap_Weather_daylength_get, METH_O, (char *)"Weather_daylength_get(Weather self) -> double"}, + { (char *)"Weather_instrument_height_set", _wrap_Weather_instrument_height_set, METH_VARARGS, (char *)"Weather_instrument_height_set(Weather self, double instrument_height)"}, + { (char *)"Weather_instrument_height_get", (PyCFunction)_wrap_Weather_instrument_height_get, METH_O, (char *)"Weather_instrument_height_get(Weather self) -> double"}, + { (char *)"Weather_Rn", (PyCFunction) _wrap_Weather_Rn, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "Weather_Rn(Weather self, double albedo, bool daily=False) -> double\n" + "\n" + "double Rn(double\n" + "albedo, bool daily=false) const\n" + "\n" + "Calculates the net radiation flux :math:`R_n \\\\left[\\\\frac{MJ}{m^2 day}\\\\right]`.\n" + "\n" + "\n" + "\n" + ".. math::\n" + "\n" + " R_{n} &=& R_{ns} - R_{nl} \\\\\\\\ \\\\mbox{ Net\n" + " short wave radiation: }R_{ns} &=& (1-\\\\alpha) R_s \\\\\\\\ \\\\mbox{\n" + " Net long wave radiation: }R_{nl} &=& R_{black}\\\\ \\\\beta_{v}\\\\\n" + " \\\\beta_{c} \\\\\\\\ \\\\mbox{Black body radiation: } R_{black} &=&\n" + " \\\\left\\\\{\\\\begin{array}{cl} \\\\sigma T^4 & \\\\mbox{for less\n" + " than daily time steps} \\\\\\\\ \\\\sigma \\\\frac {T_{max}^4 +\n" + " T_{min}^4} 2 & \\\\mbox{for daily time steps} \\\\end{array}\n" + " \\\\right. \\\\\\\\ T &=& \\\\mbox{Temperature }[K] \\\\\\\\ \\\\sigma\n" + " &=& 4.903\\\\ 10^{-9} \\\\frac{MJ}{K^4 m^2 day} \\\\mbox{ Stefan-\n" + " Boltzmann constant } \\\\\\\\ \\\\mbox{Long wave reflectance: }\n" + " \\\\\\\\ \\\\mbox{by water vapor: }\\\\beta_{v} &=& 0.34 - 0.14\n" + " \\\\sqrt{e_a} \\\\\\\\ \\\\mbox{ by clouds: }\\\\beta_{c} &=& 0.1 +\n" + " 0.9 \\\\frac n N \n" + "\n" + "\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "albedo: the albedo :math:`\\\\alpha` of the surface\n" + "\n" + "daily: If true, the net radiation for daily averages will be\n" + "calculated \n" + ""}, + { (char *)"new_Weather", (PyCFunction) _wrap_new_Weather, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "new_Weather(double T=15.0, double Tmax=17.0, double Tmin=13.0, double rH=70.0, double wind=2.0, double sunshine=0.5, double Rs=15, double daylength=12) -> Weather\n" + "\n" + "Weather(double T=15.0, double Tmax=17.0, double Tmin=13.0, double\n" + "rH=70.0, double wind=2.0, double sunshine=0.5, double Rs=15, double\n" + "daylength=12)\n" + "\n" + "Creates a \"weather\" from given data.\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "T: actual Temperature in deg C\n" + "\n" + "Tmax: daily maximum Temperature in deg C\n" + "\n" + "Tmin: daily minimum Temperature in deg C\n" + "\n" + "rH: actual relative humidity in % [0..100]\n" + "\n" + "wind: actual wind speed in m/s\n" + "\n" + "sunshine: actual fraction of sunshine duration per potential sunshine\n" + "duration in h/h\n" + "\n" + "Rs: actual incoming shortwave global radiation in MJ/(m2 day)\n" + "\n" + "daylength: length of the day in h \n" + ""}, + { (char *)"Weather_to_string", (PyCFunction)_wrap_Weather_to_string, METH_O, (char *)"\n" + "Weather_to_string(Weather self) -> std::string\n" + "\n" + "std::string to_string() const\n" + "\n" + "Returns a string representation. \n" + ""}, + { (char *)"Weather_set_snow_threshold", (PyCFunction) _wrap_Weather_set_snow_threshold, METH_VARARGS | METH_KEYWORDS, (char *)"Weather_set_snow_threshold(double new_threshold)"}, + { (char *)"Weather_get_snow_threshold", (PyCFunction)_wrap_Weather_get_snow_threshold, METH_NOARGS, (char *)"Weather_get_snow_threshold() -> double"}, + { (char *)"Weather___iadd__", (PyCFunction) _wrap_Weather___iadd__, METH_VARARGS | METH_KEYWORDS, (char *)"Weather___iadd__(Weather self, Weather w) -> Weather"}, + { (char *)"Weather___imul__", (PyCFunction) _wrap_Weather___imul__, METH_VARARGS | METH_KEYWORDS, (char *)"Weather___imul__(Weather self, double factor) -> Weather"}, + { (char *)"Weather___add__", (PyCFunction) _wrap_Weather___add__, METH_VARARGS | METH_KEYWORDS, (char *)"Weather___add__(Weather self, Weather w) -> Weather"}, + { (char *)"Weather___mul__", (PyCFunction) _wrap_Weather___mul__, METH_VARARGS | METH_KEYWORDS, (char *)"Weather___mul__(Weather self, double factor) -> Weather"}, + { (char *)"delete_Weather", (PyCFunction)_wrap_delete_Weather, METH_O, (char *)"delete_Weather(Weather self)"}, + { (char *)"Weather_swigregister", Weather_swigregister, METH_VARARGS, NULL}, + { (char *)"Weather_swiginit", Weather_swiginit, METH_VARARGS, NULL}, + { (char *)"Meteorology___call__", (PyCFunction) _wrap_Meteorology___call__, METH_VARARGS | METH_KEYWORDS, (char *)"Meteorology___call__(Meteorology self, Time t) -> Weather"}, + { (char *)"Meteorology_get_weather", (PyCFunction) _wrap_Meteorology_get_weather, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "Meteorology_get_weather(Meteorology self, Time t) -> Weather\n" + "\n" + "virtual cmf::atmosphere::Weather get_weather(cmf::math::Time t) const\n" + "=0\n" + "\n" + "Returns the Weather at time t. Pure virtual function. Must get\n" + "implemented by child functions. \n" + ""}, + { (char *)"Meteorology_copy", (PyCFunction)_wrap_Meteorology_copy, METH_O, (char *)"\n" + "Meteorology_copy(Meteorology self) -> Meteorology\n" + "\n" + "virtual\n" + "Meteorology* copy() const =0\n" + "\n" + "Returns a copy of the meteorology object. Pure virtual function, needs\n" + "to be implemented. \n" + ""}, + { (char *)"Meteorology_get_instrument_height", (PyCFunction)_wrap_Meteorology_get_instrument_height, METH_O, (char *)"\n" + "Meteorology_get_instrument_height(Meteorology self) -> real\n" + "\n" + "virtual real\n" + "get_instrument_height() const =0\n" + "\n" + "Returns the height of the instruments above canopy. \n" + ""}, + { (char *)"delete_Meteorology", (PyCFunction)_wrap_delete_Meteorology, METH_O, (char *)"\n" + "delete_Meteorology(Meteorology self)\n" + "\n" + "virtual ~Meteorology() \n" + ""}, + { (char *)"Meteorology_swigregister", Meteorology_swigregister, METH_VARARGS, NULL}, + { (char *)"ConstantMeteorology_weather_set", _wrap_ConstantMeteorology_weather_set, METH_VARARGS, (char *)"ConstantMeteorology_weather_set(ConstantMeteorology self, Weather weather)"}, + { (char *)"ConstantMeteorology_weather_get", (PyCFunction)_wrap_ConstantMeteorology_weather_get, METH_O, (char *)"ConstantMeteorology_weather_get(ConstantMeteorology self) -> Weather"}, + { (char *)"new_ConstantMeteorology", _wrap_new_ConstantMeteorology, METH_VARARGS, (char *)"\n" + "ConstantMeteorology()\n" + "ConstantMeteorology(Weather w)\n" + "new_ConstantMeteorology(ConstantMeteorology other) -> ConstantMeteorology\n" + "\n" + "ConstantMeteorology(const cmf::atmosphere::ConstantMeteorology &other)\n" + "\n" + "Copy constructor. \n" + ""}, + { (char *)"ConstantMeteorology_copy", (PyCFunction)_wrap_ConstantMeteorology_copy, METH_O, (char *)"\n" + "ConstantMeteorology_copy(ConstantMeteorology self) -> ConstantMeteorology\n" + "\n" + "ConstantMeteorology* copy() const\n" + "\n" + "Creates a new instannce of the ConstantMeteorology with the same\n" + "weather. \n" + ""}, + { (char *)"delete_ConstantMeteorology", (PyCFunction)_wrap_delete_ConstantMeteorology, METH_O, (char *)"delete_ConstantMeteorology(ConstantMeteorology self)"}, + { (char *)"ConstantMeteorology_swigregister", ConstantMeteorology_swigregister, METH_VARARGS, NULL}, + { (char *)"ConstantMeteorology_swiginit", ConstantMeteorology_swiginit, METH_VARARGS, NULL}, + { (char *)"MeteoStation_Latitude_set", _wrap_MeteoStation_Latitude_set, METH_VARARGS, (char *)"MeteoStation_Latitude_set(MeteoStation self, double Latitude)"}, + { (char *)"MeteoStation_Latitude_get", (PyCFunction)_wrap_MeteoStation_Latitude_get, METH_O, (char *)"MeteoStation_Latitude_get(MeteoStation self) -> double"}, + { (char *)"MeteoStation_Longitude_set", _wrap_MeteoStation_Longitude_set, METH_VARARGS, (char *)"MeteoStation_Longitude_set(MeteoStation self, double Longitude)"}, + { (char *)"MeteoStation_Longitude_get", (PyCFunction)_wrap_MeteoStation_Longitude_get, METH_O, (char *)"MeteoStation_Longitude_get(MeteoStation self) -> double"}, + { (char *)"MeteoStation_Timezone_set", _wrap_MeteoStation_Timezone_set, METH_VARARGS, (char *)"MeteoStation_Timezone_set(MeteoStation self, double Timezone)"}, + { (char *)"MeteoStation_Timezone_get", (PyCFunction)_wrap_MeteoStation_Timezone_get, METH_O, (char *)"MeteoStation_Timezone_get(MeteoStation self) -> double"}, + { (char *)"MeteoStation_x_set", _wrap_MeteoStation_x_set, METH_VARARGS, (char *)"MeteoStation_x_set(MeteoStation self, double x)"}, + { (char *)"MeteoStation_x_get", (PyCFunction)_wrap_MeteoStation_x_get, METH_O, (char *)"MeteoStation_x_get(MeteoStation self) -> double"}, + { (char *)"MeteoStation_y_set", _wrap_MeteoStation_y_set, METH_VARARGS, (char *)"MeteoStation_y_set(MeteoStation self, double y)"}, + { (char *)"MeteoStation_y_get", (PyCFunction)_wrap_MeteoStation_y_get, METH_O, (char *)"MeteoStation_y_get(MeteoStation self) -> double"}, + { (char *)"MeteoStation_z_set", _wrap_MeteoStation_z_set, METH_VARARGS, (char *)"MeteoStation_z_set(MeteoStation self, double z)"}, + { (char *)"MeteoStation_z_get", (PyCFunction)_wrap_MeteoStation_z_get, METH_O, (char *)"MeteoStation_z_get(MeteoStation self) -> double"}, + { (char *)"MeteoStation_Name_set", _wrap_MeteoStation_Name_set, METH_VARARGS, (char *)"MeteoStation_Name_set(MeteoStation self, std::string const & Name)"}, + { (char *)"MeteoStation_Name_get", (PyCFunction)_wrap_MeteoStation_Name_get, METH_O, (char *)"MeteoStation_Name_get(MeteoStation self) -> std::string const &"}, + { (char *)"MeteoStation_get_position", (PyCFunction)_wrap_MeteoStation_get_position, METH_O, (char *)"\n" + "MeteoStation_get_position(MeteoStation self) -> point\n" + "\n" + "cmf::geometry::point get_position() const \n" + ""}, + { (char *)"MeteoStation_daily_set", _wrap_MeteoStation_daily_set, METH_VARARGS, (char *)"MeteoStation_daily_set(MeteoStation self, bool daily)"}, + { (char *)"MeteoStation_daily_get", (PyCFunction)_wrap_MeteoStation_daily_get, METH_O, (char *)"MeteoStation_daily_get(MeteoStation self) -> bool"}, + { (char *)"MeteoStation_InstrumentHeight_set", _wrap_MeteoStation_InstrumentHeight_set, METH_VARARGS, (char *)"MeteoStation_InstrumentHeight_set(MeteoStation self, real InstrumentHeight)"}, + { (char *)"MeteoStation_InstrumentHeight_get", (PyCFunction)_wrap_MeteoStation_InstrumentHeight_get, METH_O, (char *)"MeteoStation_InstrumentHeight_get(MeteoStation self) -> real"}, + { (char *)"new_MeteoStation", (PyCFunction) _wrap_new_MeteoStation, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "new_MeteoStation(MeteoStation other) -> MeteoStation\n" + "\n" + "MeteoStation(const cmf::atmosphere::MeteoStation &other)\n" + "\n" + "Copy c'tor. \n" + ""}, + { (char *)"MeteoStation_get_data", (PyCFunction) _wrap_MeteoStation_get_data, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "MeteoStation_get_data(MeteoStation self, Time t, double height) -> Weather\n" + "\n" + "cmf::atmosphere::Weather get_data(cmf::math::Time t, double height)\n" + "const\n" + "\n" + "Returns the current Atmosphere state. Uses default values for missing\n" + "timeseries. \n" + ""}, + { (char *)"MeteoStation_use_for_cell", (PyCFunction) _wrap_MeteoStation_use_for_cell, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "MeteoStation_use_for_cell(MeteoStation self, Cell c)\n" + "\n" + "void use_for_cell(cmf::upslope::Cell &c)\n" + "\n" + "Connects this meteostation as a meteo data provider with the cell. \n" + ""}, + { (char *)"MeteoStation_SetSunshineFraction", (PyCFunction) _wrap_MeteoStation_SetSunshineFraction, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "MeteoStation_SetSunshineFraction(MeteoStation self, timeseries sunshine_duration)\n" + "\n" + "void\n" + "SetSunshineFraction(cmf::math::timeseries sunshine_duration)\n" + "\n" + "Calculates a timeseries of the sunshine fraction (to put into\n" + "Sunshine) from a timeseries of absolute sunshine duration.\n" + "\n" + "seehttp://www.fao.org/docrep/X0490E/x0490e07.htm#radiation\n" + "\n" + "\n" + ".. math::\n" + "\n" + " \\\\phi &=& \\\\frac{(\\\\mbox{geogr.\n" + " Latitude})^\\\\circ \\\\pi}{180^\\\\circ} \\\\mbox{ Latitude in }rad\n" + " \\\\\\\\ \\\\delta &=& 0.409 \\\\sin\\\\left(\\\\frac{2\\\\pi}{365}DOY\n" + " - 1.39\\\\right) \\\\mbox{ Declination, DOY is day of year}\\\\\\\\\n" + " \\\\omega_s &=& \\\\arccos(-\\\\tan\\\\phi\\\\tan\\\\delta) \\\\mbox{\n" + " Sunset angle in }rad \\\\\\\\ N &=& \\\\frac{24}{\\\\pi}\\\\omega_s\n" + " \\\\mbox{ potential duration of sunshine in }h \\\\\\\\ \\\\frac n N\n" + " &=& n\\\\mbox{ absolute sunshine duration in }h \n" + "\n" + "\n" + ""}, + { (char *)"MeteoStation_T_set", _wrap_MeteoStation_T_set, METH_VARARGS, (char *)"MeteoStation_T_set(MeteoStation self, timeseries T)"}, + { (char *)"MeteoStation_T_get", (PyCFunction)_wrap_MeteoStation_T_get, METH_O, (char *)"MeteoStation_T_get(MeteoStation self) -> timeseries"}, + { (char *)"MeteoStation_Tmax_set", _wrap_MeteoStation_Tmax_set, METH_VARARGS, (char *)"MeteoStation_Tmax_set(MeteoStation self, timeseries Tmax)"}, + { (char *)"MeteoStation_Tmax_get", (PyCFunction)_wrap_MeteoStation_Tmax_get, METH_O, (char *)"MeteoStation_Tmax_get(MeteoStation self) -> timeseries"}, + { (char *)"MeteoStation_Tmin_set", _wrap_MeteoStation_Tmin_set, METH_VARARGS, (char *)"MeteoStation_Tmin_set(MeteoStation self, timeseries Tmin)"}, + { (char *)"MeteoStation_Tmin_get", (PyCFunction)_wrap_MeteoStation_Tmin_get, METH_O, (char *)"MeteoStation_Tmin_get(MeteoStation self) -> timeseries"}, + { (char *)"MeteoStation_Tground_set", _wrap_MeteoStation_Tground_set, METH_VARARGS, (char *)"MeteoStation_Tground_set(MeteoStation self, timeseries Tground)"}, + { (char *)"MeteoStation_Tground_get", (PyCFunction)_wrap_MeteoStation_Tground_get, METH_O, (char *)"MeteoStation_Tground_get(MeteoStation self) -> timeseries"}, + { (char *)"MeteoStation_Windspeed_set", _wrap_MeteoStation_Windspeed_set, METH_VARARGS, (char *)"MeteoStation_Windspeed_set(MeteoStation self, timeseries Windspeed)"}, + { (char *)"MeteoStation_Windspeed_get", (PyCFunction)_wrap_MeteoStation_Windspeed_get, METH_O, (char *)"MeteoStation_Windspeed_get(MeteoStation self) -> timeseries"}, + { (char *)"MeteoStation_rHmean_set", _wrap_MeteoStation_rHmean_set, METH_VARARGS, (char *)"MeteoStation_rHmean_set(MeteoStation self, timeseries rHmean)"}, + { (char *)"MeteoStation_rHmean_get", (PyCFunction)_wrap_MeteoStation_rHmean_get, METH_O, (char *)"MeteoStation_rHmean_get(MeteoStation self) -> timeseries"}, + { (char *)"MeteoStation_rHmin_set", _wrap_MeteoStation_rHmin_set, METH_VARARGS, (char *)"MeteoStation_rHmin_set(MeteoStation self, timeseries rHmin)"}, + { (char *)"MeteoStation_rHmin_get", (PyCFunction)_wrap_MeteoStation_rHmin_get, METH_O, (char *)"MeteoStation_rHmin_get(MeteoStation self) -> timeseries"}, + { (char *)"MeteoStation_rHmax_set", _wrap_MeteoStation_rHmax_set, METH_VARARGS, (char *)"MeteoStation_rHmax_set(MeteoStation self, timeseries rHmax)"}, + { (char *)"MeteoStation_rHmax_get", (PyCFunction)_wrap_MeteoStation_rHmax_get, METH_O, (char *)"MeteoStation_rHmax_get(MeteoStation self) -> timeseries"}, + { (char *)"MeteoStation_Tdew_set", _wrap_MeteoStation_Tdew_set, METH_VARARGS, (char *)"MeteoStation_Tdew_set(MeteoStation self, timeseries Tdew)"}, + { (char *)"MeteoStation_Tdew_get", (PyCFunction)_wrap_MeteoStation_Tdew_get, METH_O, (char *)"MeteoStation_Tdew_get(MeteoStation self) -> timeseries"}, + { (char *)"MeteoStation_Sunshine_set", _wrap_MeteoStation_Sunshine_set, METH_VARARGS, (char *)"MeteoStation_Sunshine_set(MeteoStation self, timeseries Sunshine)"}, + { (char *)"MeteoStation_Sunshine_get", (PyCFunction)_wrap_MeteoStation_Sunshine_get, METH_O, (char *)"MeteoStation_Sunshine_get(MeteoStation self) -> timeseries"}, + { (char *)"MeteoStation_Rs_set", _wrap_MeteoStation_Rs_set, METH_VARARGS, (char *)"MeteoStation_Rs_set(MeteoStation self, timeseries Rs)"}, + { (char *)"MeteoStation_Rs_get", (PyCFunction)_wrap_MeteoStation_Rs_get, METH_O, (char *)"MeteoStation_Rs_get(MeteoStation self) -> timeseries"}, + { (char *)"MeteoStation_T_lapse_set", _wrap_MeteoStation_T_lapse_set, METH_VARARGS, (char *)"MeteoStation_T_lapse_set(MeteoStation self, timeseries T_lapse)"}, + { (char *)"MeteoStation_T_lapse_get", (PyCFunction)_wrap_MeteoStation_T_lapse_get, METH_O, (char *)"MeteoStation_T_lapse_get(MeteoStation self) -> timeseries"}, + { (char *)"delete_MeteoStation", (PyCFunction)_wrap_delete_MeteoStation, METH_O, (char *)"delete_MeteoStation(MeteoStation self)"}, + { (char *)"MeteoStation_swigregister", MeteoStation_swigregister, METH_VARARGS, NULL}, + { (char *)"MeteoStation_swiginit", MeteoStation_swiginit, METH_VARARGS, NULL}, + { (char *)"MeteoStationReference_get_station", (PyCFunction)_wrap_MeteoStationReference_get_station, METH_O, (char *)"\n" + "MeteoStationReference_get_station(MeteoStationReference self) -> cmf::atmosphere::MeteoStation::ptr\n" + "\n" + "MeteoStation::ptr get_station() const\n" + "\n" + "Returns the station referenced. \n" + ""}, + { (char *)"MeteoStationReference_get_position", (PyCFunction)_wrap_MeteoStationReference_get_position, METH_O, (char *)"\n" + "MeteoStationReference_get_position(MeteoStationReference self) -> point\n" + "\n" + "cmf::geometry::point get_position() const\n" + "\n" + "Returns the position of the reference. \n" + ""}, + { (char *)"new_MeteoStationReference", _wrap_new_MeteoStationReference, METH_VARARGS, (char *)"\n" + "MeteoStationReference(cmf::atmosphere::MeteoStation::ptr station, point location)\n" + "new_MeteoStationReference(MeteoStationReference copy) -> MeteoStationReference\n" + "\n" + "MeteoStationReference(const MeteoStationReference ©) \n" + ""}, + { (char *)"MeteoStationReference_copy", (PyCFunction)_wrap_MeteoStationReference_copy, METH_O, (char *)"\n" + "MeteoStationReference_copy(MeteoStationReference self) -> MeteoStationReference\n" + "\n" + "MeteoStationReference* copy() const\n" + "\n" + "Returns a copy of the meteorology object. Pure virtual function, needs\n" + "to be implemented. \n" + ""}, + { (char *)"delete_MeteoStationReference", (PyCFunction)_wrap_delete_MeteoStationReference, METH_O, (char *)"delete_MeteoStationReference(MeteoStationReference self)"}, + { (char *)"MeteoStationReference_swigregister", MeteoStationReference_swigregister, METH_VARARGS, NULL}, + { (char *)"MeteoStationReference_swiginit", MeteoStationReference_swiginit, METH_VARARGS, NULL}, + { (char *)"MeteoStationList___len__", (PyCFunction)_wrap_MeteoStationList___len__, METH_O, (char *)"\n" + "MeteoStationList___len__(MeteoStationList self) -> size_t\n" + "\n" + "size_t size() const\n" + "\n" + "Returns the number of stations. \n" + ""}, + { (char *)"MeteoStationList___getitem__", _wrap_MeteoStationList___getitem__, METH_VARARGS, (char *)"\n" + "__getitem__(ptrdiff_t index) -> cmf::atmosphere::MeteoStation::ptr\n" + "MeteoStationList___getitem__(MeteoStationList self, std::string const & Name) -> cmf::atmosphere::MeteoStation::ptr\n" + ""}, + { (char *)"MeteoStationList_calculate_Temp_lapse", (PyCFunction) _wrap_MeteoStationList_calculate_Temp_lapse, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "MeteoStationList_calculate_Temp_lapse(MeteoStationList self, Time begin, Time step, Time end) -> double\n" + "\n" + "double\n" + "calculate_Temp_lapse(cmf::math::Time begin, cmf::math::Time step,\n" + "cmf::math::Time end)\n" + "\n" + "Calculates the temperature lapse from all stations in the list and\n" + "sets the T_lapse attribute of each station.\n" + "\n" + "Returns the average lapse over the whole period. \n" + ""}, + { (char *)"MeteoStationList_add_station", (PyCFunction) _wrap_MeteoStationList_add_station, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "MeteoStationList_add_station(MeteoStationList self, std::string name, point position, double latitude=51.0, double longitude=8.0, double tz=1.0, Time startTime, Time timestep) -> cmf::atmosphere::MeteoStation::ptr\n" + "\n" + "MeteoStation::ptr add_station(std::string name, cmf::geometry::point\n" + "position, double latitude=51.0, double longitude=8.0, double tz=1.0,\n" + "cmf::math::Time startTime=cmf::math::Time(1, 1, 2001), cmf::math::Time\n" + "timestep=cmf::math::day)\n" + "\n" + "Creates a meteorological station at a certain position and adds it to\n" + "the list.\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "name: Name of the station\n" + "\n" + "position: The location of the station in map coordinates\n" + "\n" + "latitude: Latitude of the study area (for solar radiation)\n" + "\n" + "longitude: Longitude of the study area (for solar time)\n" + "\n" + "tz: Time zone of the study area (e.g Germany +1,U.S. Pacific time -8\n" + "\n" + "startTime: Date of the beginning of the climatic data (may be changed\n" + "for each time series later)\n" + "\n" + "timestep: Frequency of climatic data (may be changed for each time\n" + "series later) \n" + ""}, + { (char *)"MeteoStationList_remove_station", (PyCFunction) _wrap_MeteoStationList_remove_station, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "MeteoStationList_remove_station(MeteoStationList self, ptrdiff_t index) -> ptrdiff_t\n" + "\n" + "ptrdiff_t\n" + "remove_station(ptrdiff_t index)\n" + "\n" + "Removes a station and returns the number of remaining references to\n" + "the removed station. If the station is deleted, 0 is returned. \n" + ""}, + { (char *)"new_MeteoStationList", _wrap_new_MeteoStationList, METH_VARARGS, (char *)"\n" + "MeteoStationList()\n" + "new_MeteoStationList(MeteoStationList copy) -> MeteoStationList\n" + "\n" + "MeteoStationList(const MeteoStationList ©)\n" + "\n" + "Copy c'tor. \n" + ""}, + { (char *)"MeteoStationList_reference_to_nearest", (PyCFunction) _wrap_MeteoStationList_reference_to_nearest, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "MeteoStationList_reference_to_nearest(MeteoStationList self, point position, double z_weight=0) -> MeteoStationReference\n" + "\n" + "MeteoStationReference reference_to_nearest(const cmf::geometry::point\n" + "&position, double z_weight=0) const\n" + "\n" + "Creates a MeteoStationReference from the nearest station to position\n" + "at position.\n" + "\n" + "The distance is calculated as :math:`d=\\\\sqrt{(x_{s} - x_{l})^2 + (y_{s} - y_{l})^2} + \\\\lambda_z\\\\|z_{s} - z_{l}\\\\|` Where :math:`s` is the\n" + "station and :math:`l` is the locatable A Meteorology using the data of the\n" + "nearest station to position\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "position: The position (any locatable, like e.g. Cell possible) to\n" + "look for the station. The reference should be owned by the locatable\n" + "\n" + "z_weight: The weight of the height difference :math:`\\\\lambda_z` \n" + ""}, + { (char *)"delete_MeteoStationList", (PyCFunction)_wrap_delete_MeteoStationList, METH_O, (char *)"delete_MeteoStationList(MeteoStationList self)"}, + { (char *)"MeteoStationList_swigregister", MeteoStationList_swigregister, METH_VARARGS, NULL}, + { (char *)"MeteoStationList_swiginit", MeteoStationList_swiginit, METH_VARARGS, NULL}, + { (char *)"new_IDW_Meteorology", _wrap_new_IDW_Meteorology, METH_VARARGS, (char *)"\n" + "IDW_Meteorology(point position, MeteoStationList stations, double z_weight, double power)\n" + "new_IDW_Meteorology(IDW_Meteorology copy) -> IDW_Meteorology\n" + "\n" + "IDW_Meteorology(const IDW_Meteorology ©)\n" + "\n" + "Copy c'tor. \n" + ""}, + { (char *)"IDW_Meteorology_copy", (PyCFunction)_wrap_IDW_Meteorology_copy, METH_O, (char *)"\n" + "IDW_Meteorology_copy(IDW_Meteorology self) -> IDW_Meteorology\n" + "\n" + "virtual IDW_Meteorology* copy() const\n" + "\n" + "Returns a copy of the meteorology object. Pure virtual function, needs\n" + "to be implemented. \n" + ""}, + { (char *)"delete_IDW_Meteorology", (PyCFunction)_wrap_delete_IDW_Meteorology, METH_O, (char *)"delete_IDW_Meteorology(IDW_Meteorology self)"}, + { (char *)"IDW_Meteorology_swigregister", IDW_Meteorology_swigregister, METH_VARARGS, NULL}, + { (char *)"IDW_Meteorology_swiginit", IDW_Meteorology_swiginit, METH_VARARGS, NULL}, + { (char *)"aerodynamic_resistance_get_aerodynamic_resistance", (PyCFunction) _wrap_aerodynamic_resistance_get_aerodynamic_resistance, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "aerodynamic_resistance_get_aerodynamic_resistance(aerodynamic_resistance self, double & r_ag, double & r_ac, Time t)\n" + "\n" + "virtual void get_aerodynamic_resistance(double &r_ag, double &r_ac,\n" + "cmf::math::Time t) const =0\n" + "\n" + "aerodynamic resistance from ground to atmosphere (r_ag) and from\n" + "canopy to atmosphere (r_ac) \n" + ""}, + { (char *)"delete_aerodynamic_resistance", (PyCFunction)_wrap_delete_aerodynamic_resistance, METH_O, (char *)"\n" + "delete_aerodynamic_resistance(aerodynamic_resistance self)\n" + "\n" + "virtual ~aerodynamic_resistance() \n" + ""}, + { (char *)"aerodynamic_resistance_swigregister", aerodynamic_resistance_swigregister, METH_VARARGS, NULL}, + { (char *)"RainSource___call__", (PyCFunction) _wrap_RainSource___call__, METH_VARARGS | METH_KEYWORDS, (char *)"RainSource___call__(RainSource self, Time t) -> real"}, + { (char *)"RainSource_get_intensity", (PyCFunction) _wrap_RainSource_get_intensity, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "RainSource_get_intensity(RainSource self, Time t) -> real\n" + "\n" + "virtual real get_intensity(cmf::math::Time t) const =0\n" + "\n" + "Returns the actual rainfall intensity in mm/day. \n" + ""}, + { (char *)"delete_RainSource", (PyCFunction)_wrap_delete_RainSource, METH_O, (char *)"delete_RainSource(RainSource self)"}, + { (char *)"RainSource_swigregister", RainSource_swigregister, METH_VARARGS, NULL}, + { (char *)"ConstantRainSource_intensity_set", _wrap_ConstantRainSource_intensity_set, METH_VARARGS, (char *)"ConstantRainSource_intensity_set(ConstantRainSource self, real intensity)"}, + { (char *)"ConstantRainSource_intensity_get", (PyCFunction)_wrap_ConstantRainSource_intensity_get, METH_O, (char *)"ConstantRainSource_intensity_get(ConstantRainSource self) -> real"}, + { (char *)"new_ConstantRainSource", (PyCFunction) _wrap_new_ConstantRainSource, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "new_ConstantRainSource(project _project, point location, real _intensity) -> ConstantRainSource\n" + "\n" + "ConstantRainSource(cmf::project &_project, cmf::geometry::point\n" + "location, real _intensity)\n" + "\n" + "Creates a new ConstantRainSource.\n" + "\n" + "Consider using Cell::set_rainfall for internal creation of a constant\n" + "rain source, instead of direct use\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "_project: The project the rain source is belonging to.\n" + "\n" + "location: The location of the rain source\n" + "\n" + "_intensity: The constant rainfall intensity in mm/day \n" + ""}, + { (char *)"ConstantRainSource_set_conc", (PyCFunction) _wrap_ConstantRainSource_set_conc, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "ConstantRainSource_set_conc(ConstantRainSource self, solute Solute, real value)\n" + "\n" + "void set_conc(const cmf::water::solute &Solute, real value)\n" + "\n" + "Sets the concentration of a solute in the rainfall. \n" + ""}, + { (char *)"delete_ConstantRainSource", (PyCFunction)_wrap_delete_ConstantRainSource, METH_O, (char *)"delete_ConstantRainSource(ConstantRainSource self)"}, + { (char *)"ConstantRainSource_swigregister", ConstantRainSource_swigregister, METH_VARARGS, NULL}, + { (char *)"ConstantRainSource_swiginit", ConstantRainSource_swiginit, METH_VARARGS, NULL}, + { (char *)"TimeseriesRainSource_data_set", _wrap_TimeseriesRainSource_data_set, METH_VARARGS, (char *)"TimeseriesRainSource_data_set(TimeseriesRainSource self, timeseries data)"}, + { (char *)"TimeseriesRainSource_data_get", (PyCFunction)_wrap_TimeseriesRainSource_data_get, METH_O, (char *)"TimeseriesRainSource_data_get(TimeseriesRainSource self) -> timeseries"}, + { (char *)"TimeseriesRainSource_concentrations_set", _wrap_TimeseriesRainSource_concentrations_set, METH_VARARGS, (char *)"TimeseriesRainSource_concentrations_set(TimeseriesRainSource self, SoluteTimeseries concentrations)"}, + { (char *)"TimeseriesRainSource_concentrations_get", (PyCFunction)_wrap_TimeseriesRainSource_concentrations_get, METH_O, (char *)"TimeseriesRainSource_concentrations_get(TimeseriesRainSource self) -> SoluteTimeseries"}, + { (char *)"delete_TimeseriesRainSource", (PyCFunction)_wrap_delete_TimeseriesRainSource, METH_O, (char *)"delete_TimeseriesRainSource(TimeseriesRainSource self)"}, + { (char *)"TimeseriesRainSource_swigregister", TimeseriesRainSource_swigregister, METH_VARARGS, NULL}, + { (char *)"RainfallStation_Location_set", _wrap_RainfallStation_Location_set, METH_VARARGS, (char *)"RainfallStation_Location_set(RainfallStation self, point Location)"}, + { (char *)"RainfallStation_Location_get", (PyCFunction)_wrap_RainfallStation_Location_get, METH_O, (char *)"RainfallStation_Location_get(RainfallStation self) -> point"}, + { (char *)"RainfallStation_create", (PyCFunction) _wrap_RainfallStation_create, METH_VARARGS | METH_KEYWORDS, (char *)"RainfallStation_create(size_t Id, std::string Name, timeseries Data, point position) -> cmf::atmosphere::RainfallStation::ptr"}, + { (char *)"RainfallStation_id_get", (PyCFunction)_wrap_RainfallStation_id_get, METH_O, (char *)"RainfallStation_id_get(RainfallStation self) -> size_t const"}, + { (char *)"RainfallStation_name_get", (PyCFunction)_wrap_RainfallStation_name_get, METH_O, (char *)"RainfallStation_name_get(RainfallStation self) -> std::string const &"}, + { (char *)"RainfallStation_data_set", _wrap_RainfallStation_data_set, METH_VARARGS, (char *)"RainfallStation_data_set(RainfallStation self, timeseries data)"}, + { (char *)"RainfallStation_data_get", (PyCFunction)_wrap_RainfallStation_data_get, METH_O, (char *)"RainfallStation_data_get(RainfallStation self) -> timeseries"}, + { (char *)"RainfallStation___repr__", (PyCFunction)_wrap_RainfallStation___repr__, METH_O, (char *)"\n" + "RainfallStation___repr__(RainfallStation self) -> std::string\n" + "\n" + "std::string tostring() const\n" + "\n" + "Returns the name and the mean yearly rainfall. \n" + ""}, + { (char *)"RainfallStation_concentration_set", _wrap_RainfallStation_concentration_set, METH_VARARGS, (char *)"RainfallStation_concentration_set(RainfallStation self, SoluteTimeseries concentration)"}, + { (char *)"RainfallStation_concentration_get", (PyCFunction)_wrap_RainfallStation_concentration_get, METH_O, (char *)"RainfallStation_concentration_get(RainfallStation self) -> SoluteTimeseries"}, + { (char *)"RainfallStation_use_for_cell", (PyCFunction) _wrap_RainfallStation_use_for_cell, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "RainfallStation_use_for_cell(RainfallStation self, Cell c)\n" + "\n" + "void use_for_cell(cmf::upslope::Cell &c)\n" + "\n" + "Connects a cell with this rainfall station. \n" + ""}, + { (char *)"new_RainfallStation", (PyCFunction) _wrap_new_RainfallStation, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "new_RainfallStation(RainfallStation copy) -> RainfallStation\n" + "\n" + "RainfallStation(const RainfallStation ©)\n" + "\n" + "copy c'tor \n" + ""}, + { (char *)"RainfallStation___call__", (PyCFunction) _wrap_RainfallStation___call__, METH_VARARGS | METH_KEYWORDS, (char *)"RainfallStation___call__(RainfallStation self, Time t) -> double"}, + { (char *)"delete_RainfallStation", (PyCFunction)_wrap_delete_RainfallStation, METH_O, (char *)"delete_RainfallStation(RainfallStation self)"}, + { (char *)"RainfallStation_swigregister", RainfallStation_swigregister, METH_VARARGS, NULL}, + { (char *)"RainfallStation_swiginit", RainfallStation_swiginit, METH_VARARGS, NULL}, + { (char *)"RainfallStationList___len__", (PyCFunction)_wrap_RainfallStationList___len__, METH_O, (char *)"\n" + "RainfallStationList___len__(RainfallStationList self) -> size_t\n" + "\n" + "size_t size() const\n" + "\n" + "Returns the number of rainfall stations. \n" + ""}, + { (char *)"RainfallStationList___getitem__", _wrap_RainfallStationList___getitem__, METH_VARARGS, (char *)"\n" + "__getitem__(ptrdiff_t index) -> cmf::atmosphere::RainfallStation::ptr\n" + "RainfallStationList___getitem__(RainfallStationList self, ptrdiff_t index) -> cmf::atmosphere::RainfallStation::ptr const\n" + ""}, + { (char *)"RainfallStationList_add", (PyCFunction) _wrap_RainfallStationList_add, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "RainfallStationList_add(RainfallStationList self, std::string Name, timeseries Data, point Position) -> cmf::atmosphere::RainfallStation::ptr\n" + "\n" + "RainfallStation::ptr add(std::string Name, cmf::math::timeseries Data,\n" + "cmf::geometry::point Position)\n" + "\n" + "Creates a new RainfallStation and adds it to the list.\n" + "\n" + "Usage: The position of the rainfall station will be used as identifier\n" + "A new rainfall station\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "Name: Name of the station\n" + "\n" + "Data: Rainfall timeseries\n" + "\n" + "Position: Spatial position of the new station \n" + ""}, + { (char *)"RainfallStationList_remove", (PyCFunction) _wrap_RainfallStationList_remove, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "RainfallStationList_remove(RainfallStationList self, ptrdiff_t index)\n" + "\n" + "void remove(ptrdiff_t index)\n" + "\n" + "Removes the station at index from this list. \n" + ""}, + { (char *)"new_RainfallStationList", (PyCFunction)_wrap_new_RainfallStationList, METH_NOARGS, (char *)"new_RainfallStationList() -> RainfallStationList"}, + { (char *)"delete_RainfallStationList", (PyCFunction)_wrap_delete_RainfallStationList, METH_O, (char *)"delete_RainfallStationList(RainfallStationList self)"}, + { (char *)"RainfallStationList_swigregister", RainfallStationList_swigregister, METH_VARARGS, NULL}, + { (char *)"RainfallStationList_swiginit", RainfallStationList_swiginit, METH_VARARGS, NULL}, + { (char *)"RainfallStationReference_from_nearest_station", (PyCFunction) _wrap_RainfallStationReference_from_nearest_station, METH_VARARGS | METH_KEYWORDS, (char *)"RainfallStationReference_from_nearest_station(project project, point position, double z_weight) -> cmf::atmosphere::RainfallStationReference::ptr"}, + { (char *)"RainfallStationReference_from_station_id", (PyCFunction) _wrap_RainfallStationReference_from_station_id, METH_VARARGS | METH_KEYWORDS, (char *)"RainfallStationReference_from_station_id(project project, point position, size_t id) -> cmf::atmosphere::RainfallStationReference::ptr"}, + { (char *)"delete_RainfallStationReference", (PyCFunction)_wrap_delete_RainfallStationReference, METH_O, (char *)"delete_RainfallStationReference(RainfallStationReference self)"}, + { (char *)"RainfallStationReference_swigregister", RainfallStationReference_swigregister, METH_VARARGS, NULL}, + { (char *)"IDWRainfall_create", (PyCFunction) _wrap_IDWRainfall_create, METH_VARARGS | METH_KEYWORDS, (char *)"IDWRainfall_create(project project, point position, double z_weight, double power) -> cmf::atmosphere::RainSource::ptr"}, + { (char *)"delete_IDWRainfall", (PyCFunction)_wrap_delete_IDWRainfall, METH_O, (char *)"delete_IDWRainfall(IDWRainfall self)"}, + { (char *)"IDWRainfall_swigregister", IDWRainfall_swigregister, METH_VARARGS, NULL}, + { (char *)"Vegetation_LAI_set", _wrap_Vegetation_LAI_set, METH_VARARGS, (char *)"Vegetation_LAI_set(Vegetation self, double LAI)"}, + { (char *)"Vegetation_LAI_get", (PyCFunction)_wrap_Vegetation_LAI_get, METH_O, (char *)"Vegetation_LAI_get(Vegetation self) -> double"}, + { (char *)"Vegetation_Height_set", _wrap_Vegetation_Height_set, METH_VARARGS, (char *)"Vegetation_Height_set(Vegetation self, double Height)"}, + { (char *)"Vegetation_Height_get", (PyCFunction)_wrap_Vegetation_Height_get, METH_O, (char *)"Vegetation_Height_get(Vegetation self) -> double"}, + { (char *)"Vegetation_albedo_set", _wrap_Vegetation_albedo_set, METH_VARARGS, (char *)"Vegetation_albedo_set(Vegetation self, double albedo)"}, + { (char *)"Vegetation_albedo_get", (PyCFunction)_wrap_Vegetation_albedo_get, METH_O, (char *)"Vegetation_albedo_get(Vegetation self) -> double"}, + { (char *)"Vegetation_snow_albedo_set", _wrap_Vegetation_snow_albedo_set, METH_VARARGS, (char *)"Vegetation_snow_albedo_set(Vegetation self, double snow_albedo)"}, + { (char *)"Vegetation_snow_albedo_get", (PyCFunction)_wrap_Vegetation_snow_albedo_get, METH_O, (char *)"Vegetation_snow_albedo_get(Vegetation self) -> double"}, + { (char *)"Vegetation_CanopyCapacityPerLAI_set", _wrap_Vegetation_CanopyCapacityPerLAI_set, METH_VARARGS, (char *)"Vegetation_CanopyCapacityPerLAI_set(Vegetation self, double CanopyCapacityPerLAI)"}, + { (char *)"Vegetation_CanopyCapacityPerLAI_get", (PyCFunction)_wrap_Vegetation_CanopyCapacityPerLAI_get, METH_O, (char *)"Vegetation_CanopyCapacityPerLAI_get(Vegetation self) -> double"}, + { (char *)"Vegetation_RootDepth_set", _wrap_Vegetation_RootDepth_set, METH_VARARGS, (char *)"Vegetation_RootDepth_set(Vegetation self, double RootDepth)"}, + { (char *)"Vegetation_RootDepth_get", (PyCFunction)_wrap_Vegetation_RootDepth_get, METH_O, (char *)"Vegetation_RootDepth_get(Vegetation self) -> double"}, + { (char *)"Vegetation_RootContent_set", _wrap_Vegetation_RootContent_set, METH_VARARGS, (char *)"Vegetation_RootContent_set(Vegetation self, double RootContent)"}, + { (char *)"Vegetation_RootContent_get", (PyCFunction)_wrap_Vegetation_RootContent_get, METH_O, (char *)"Vegetation_RootContent_get(Vegetation self) -> double"}, + { (char *)"Vegetation_fraction_at_rootdepth_set", _wrap_Vegetation_fraction_at_rootdepth_set, METH_VARARGS, (char *)"Vegetation_fraction_at_rootdepth_set(Vegetation self, double fraction_at_rootdepth)"}, + { (char *)"Vegetation_fraction_at_rootdepth_get", (PyCFunction)_wrap_Vegetation_fraction_at_rootdepth_get, METH_O, (char *)"Vegetation_fraction_at_rootdepth_get(Vegetation self) -> double"}, + { (char *)"Vegetation_StomatalResistance_set", _wrap_Vegetation_StomatalResistance_set, METH_VARARGS, (char *)"Vegetation_StomatalResistance_set(Vegetation self, double StomatalResistance)"}, + { (char *)"Vegetation_StomatalResistance_get", (PyCFunction)_wrap_Vegetation_StomatalResistance_get, METH_O, (char *)"Vegetation_StomatalResistance_get(Vegetation self) -> double"}, + { (char *)"Vegetation_CanopyClosure_set", _wrap_Vegetation_CanopyClosure_set, METH_VARARGS, (char *)"Vegetation_CanopyClosure_set(Vegetation self, double CanopyClosure)"}, + { (char *)"Vegetation_CanopyClosure_get", (PyCFunction)_wrap_Vegetation_CanopyClosure_get, METH_O, (char *)"Vegetation_CanopyClosure_get(Vegetation self) -> double"}, + { (char *)"Vegetation_CanopyPARExtinction_set", _wrap_Vegetation_CanopyPARExtinction_set, METH_VARARGS, (char *)"Vegetation_CanopyPARExtinction_set(Vegetation self, double CanopyPARExtinction)"}, + { (char *)"Vegetation_CanopyPARExtinction_get", (PyCFunction)_wrap_Vegetation_CanopyPARExtinction_get, METH_O, (char *)"Vegetation_CanopyPARExtinction_get(Vegetation self) -> double"}, + { (char *)"Vegetation_LeafWidth_set", _wrap_Vegetation_LeafWidth_set, METH_VARARGS, (char *)"Vegetation_LeafWidth_set(Vegetation self, double LeafWidth)"}, + { (char *)"Vegetation_LeafWidth_get", (PyCFunction)_wrap_Vegetation_LeafWidth_get, METH_O, (char *)"Vegetation_LeafWidth_get(Vegetation self) -> double"}, + { (char *)"Vegetation_RootLength", (PyCFunction)_wrap_Vegetation_RootLength, METH_O, (char *)"\n" + "Vegetation_RootLength(Vegetation self) -> double\n" + "\n" + "double RootLength()\n" + "const\n" + "\n" + "Returns the average root length in m/m2. \n" + ""}, + { (char *)"Vegetation_RootFraction", _wrap_Vegetation_RootFraction, METH_VARARGS, (char *)"\n" + "RootFraction(double upperBoundary, double lowerBoundary) -> double\n" + "Vegetation_RootFraction(Vegetation self, cmf::math::num_array const & thickness) -> cmf::math::num_array\n" + "\n" + "cmf::math::num_array RootFraction(const cmf::math::num_array\n" + "&thickness) const \n" + ""}, + { (char *)"new_Vegetation", (PyCFunction) _wrap_new_Vegetation, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "new_Vegetation(double _LAI=2.88, double _Height=0.12, double _RootDepth=0.25, double _StomatalResistance=100, double _albedo=0.23, double _CanopyClosure=1, double _CanopyCapacityPerLAI=0.1, double _fraction_at_rootdepth=1.0) -> Vegetation\n" + "\n" + "Vegetation(double\n" + "_LAI=2.88, double _Height=0.12, double _RootDepth=0.25, double\n" + "_StomatalResistance=100, double _albedo=0.23, double _CanopyClosure=1,\n" + "double _CanopyCapacityPerLAI=0.1, double _fraction_at_rootdepth=1.0)\n" + "\n" + ""}, + { (char *)"Vegetation___repr__", (PyCFunction)_wrap_Vegetation___repr__, METH_O, (char *)"Vegetation___repr__(Vegetation self) -> std::string"}, + { (char *)"delete_Vegetation", (PyCFunction)_wrap_delete_Vegetation, METH_O, (char *)"delete_Vegetation(Vegetation self)"}, + { (char *)"Vegetation_swigregister", Vegetation_swigregister, METH_VARARGS, NULL}, + { (char *)"Vegetation_swiginit", Vegetation_swiginit, METH_VARARGS, NULL}, + { (char *)"new_CellConnector", (PyCFunction) _wrap_new_CellConnector, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "new_CellConnector(cmf::upslope::connectorfunction connector) -> CellConnector\n" + "\n" + "CellConnector(connectorfunction connector) \n" + ""}, + { (char *)"CellConnector___call__", (PyCFunction) _wrap_CellConnector___call__, METH_VARARGS | METH_KEYWORDS, (char *)"CellConnector___call__(CellConnector self, Cell cell1, Cell cell2, ptrdiff_t start_at_layer=0)"}, + { (char *)"CellConnector_connect", (PyCFunction) _wrap_CellConnector_connect, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "CellConnector_connect(CellConnector self, Cell cell1, Cell cell2, ptrdiff_t start_at_layer=0)\n" + "\n" + "void\n" + "connect(cmf::upslope::Cell &cell1, cmf::upslope::Cell &cell2,\n" + "ptrdiff_t start_at_layer=0) const \n" + ""}, + { (char *)"delete_CellConnector", (PyCFunction)_wrap_delete_CellConnector, METH_O, (char *)"delete_CellConnector(CellConnector self)"}, + { (char *)"CellConnector_swigregister", CellConnector_swigregister, METH_VARARGS, NULL}, + { (char *)"CellConnector_swiginit", CellConnector_swiginit, METH_VARARGS, NULL}, + { (char *)"Cell_x_set", _wrap_Cell_x_set, METH_VARARGS, (char *)"Cell_x_set(Cell self, double x)"}, + { (char *)"Cell_x_get", (PyCFunction)_wrap_Cell_x_get, METH_O, (char *)"Cell_x_get(Cell self) -> double"}, + { (char *)"Cell_y_set", _wrap_Cell_y_set, METH_VARARGS, (char *)"Cell_y_set(Cell self, double y)"}, + { (char *)"Cell_y_get", (PyCFunction)_wrap_Cell_y_get, METH_O, (char *)"Cell_y_get(Cell self) -> double"}, + { (char *)"Cell_z_set", _wrap_Cell_z_set, METH_VARARGS, (char *)"Cell_z_set(Cell self, double z)"}, + { (char *)"Cell_z_get", (PyCFunction)_wrap_Cell_z_get, METH_O, (char *)"Cell_z_get(Cell self) -> double"}, + { (char *)"Cell_get_position", (PyCFunction)_wrap_Cell_get_position, METH_O, (char *)"\n" + "Cell_get_position(Cell self) -> point\n" + "\n" + "cmf::geometry::point get_position() const\n" + "\n" + "Returns the location of the cell. \n" + ""}, + { (char *)"Cell_m3_to_mm", (PyCFunction) _wrap_Cell_m3_to_mm, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "Cell_m3_to_mm(Cell self, double volume) -> double\n" + "\n" + "double\n" + "m3_to_mm(double volume) const\n" + "\n" + "Converts a volume in m3 in mm for the cell area. \n" + ""}, + { (char *)"Cell_mm_to_m3", (PyCFunction) _wrap_Cell_mm_to_m3, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "Cell_mm_to_m3(Cell self, double depth) -> double\n" + "\n" + "double\n" + "mm_to_m3(double depth) const \n" + ""}, + { (char *)"Cell_InvalidateSatDepth", (PyCFunction)_wrap_Cell_InvalidateSatDepth, METH_O, (char *)"\n" + "Cell_InvalidateSatDepth(Cell self)\n" + "\n" + "void\n" + "InvalidateSatDepth() const\n" + "\n" + "Marks the saturated depth as unvalid. This is done automatically, when\n" + "the state of a layer changes. \n" + ""}, + { (char *)"Cell_vegetation_set", _wrap_Cell_vegetation_set, METH_VARARGS, (char *)"Cell_vegetation_set(Cell self, Vegetation vegetation)"}, + { (char *)"Cell_vegetation_get", (PyCFunction)_wrap_Cell_vegetation_get, METH_O, (char *)"Cell_vegetation_get(Cell self) -> Vegetation"}, + { (char *)"Cell_set_aerodynamic_resistance", (PyCFunction) _wrap_Cell_set_aerodynamic_resistance, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "Cell_set_aerodynamic_resistance(Cell self, cmf::atmosphere::aerodynamic_resistance::ptr Ra)\n" + "\n" + "void\n" + "set_aerodynamic_resistance(cmf::atmosphere::aerodynamic_resistance::ptr\n" + "Ra)\n" + "\n" + "Sets the method to calculate aerodynamic resistance against turbulent\n" + "sensible heat fluxes. \n" + ""}, + { (char *)"Cell_set_weather", (PyCFunction) _wrap_Cell_set_weather, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "Cell_set_weather(Cell self, Weather weather)\n" + "\n" + "void\n" + "set_weather(const cmf::atmosphere::Weather &weather)\n" + "\n" + "Sets the weather for this cell. Connectivity to a meteorological\n" + "station is lost. \n" + ""}, + { (char *)"Cell_set_rainfall", (PyCFunction) _wrap_Cell_set_rainfall, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "Cell_set_rainfall(Cell self, double rainfall)\n" + "\n" + "void\n" + "set_rainfall(double rainfall)\n" + "\n" + "Exchanges a timeseries of rainfall with a constant flux. \n" + ""}, + { (char *)"Cell_get_rainfall", (PyCFunction) _wrap_Cell_get_rainfall, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "Cell_get_rainfall(Cell self, Time t) -> double\n" + "\n" + "double\n" + "get_rainfall(cmf::math::Time t) const\n" + "\n" + "Returns the current rainfall flux in m3/day. \n" + ""}, + { (char *)"Cell___set_rain_source", (PyCFunction) _wrap_Cell___set_rain_source, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "Cell___set_rain_source(Cell self, cmf::atmosphere::RainSource::ptr new_source)\n" + "\n" + "void\n" + "set_rain_source(cmf::atmosphere::RainSource::ptr new_source)\n" + "\n" + "Changes the current source of rainfall. \n" + ""}, + { (char *)"Cell___get_rain_source", (PyCFunction)_wrap_Cell___get_rain_source, METH_O, (char *)"\n" + "Cell___get_rain_source(Cell self) -> cmf::atmosphere::RainSource::ptr\n" + "\n" + "cmf::atmosphere::RainSource::ptr get_rain_source()\n" + "\n" + "Returns the current source for rainfall. \n" + ""}, + { (char *)"Cell_set_uptakestress", (PyCFunction) _wrap_Cell_set_uptakestress, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "Cell_set_uptakestress(Cell self, RootUptakeStessFunction stressfunction)\n" + "\n" + "void\n" + "set_uptakestress(const ET::RootUptakeStessFunction &stressfunction)\n" + "\n" + "Uses the given WaterStressFunction for all stressedET like connections\n" + "to the transpiration target. \n" + ""}, + { (char *)"Cell___get_evaporation", (PyCFunction)_wrap_Cell___get_evaporation, METH_O, (char *)"\n" + "Cell___get_evaporation(Cell self) -> cmf::water::flux_node::ptr\n" + "\n" + "cmf::water::flux_node::ptr get_evaporation()\n" + "\n" + "Returns the end point of all evaporation of this cell (a\n" + "cmf::water::flux_node) \n" + ""}, + { (char *)"Cell___get_transpiration", (PyCFunction)_wrap_Cell___get_transpiration, METH_O, (char *)"\n" + "Cell___get_transpiration(Cell self) -> cmf::water::flux_node::ptr\n" + "\n" + "cmf::water::flux_node::ptr get_transpiration()\n" + "\n" + "Returns the end point of all transpiration of this cell (a\n" + "cmf::water::flux_node) \n" + ""}, + { (char *)"Cell_get_surfacewater", (PyCFunction)_wrap_Cell_get_surfacewater, METH_O, (char *)"\n" + "Cell_get_surfacewater(Cell self) -> cmf::water::flux_node::ptr\n" + "\n" + "cmf::water::flux_node::ptr get_surfacewater()\n" + "\n" + "returns the surface water of this cell. This is either a flux node or\n" + "a cmf::upslope::SurfaceWater \n" + ""}, + { (char *)"Cell_surfacewater_as_storage", (PyCFunction)_wrap_Cell_surfacewater_as_storage, METH_O, (char *)"\n" + "Cell_surfacewater_as_storage(Cell self)\n" + "\n" + "void surfacewater_as_storage()\n" + "\n" + "Makes the surfacewater of this cell a cmf::upslope::SurfaceWater\n" + "storage. \n" + ""}, + { (char *)"Cell_add_storage", _wrap_Cell_add_storage, METH_VARARGS, (char *)"\n" + "add_storage(std::string Name, char storage_role, bool isopenwater=False) -> cmf::water::WaterStorage::ptr\n" + "Cell_add_storage(Cell self, cmf::water::WaterStorage::ptr storage) -> ptrdiff_t\n" + "\n" + "ptrdiff_t\n" + "add_storage(cmf::water::WaterStorage::ptr storage)\n" + "\n" + "Bounds an existing storage to the cell. \n" + ""}, + { (char *)"Cell_remove_storage", (PyCFunction) _wrap_Cell_remove_storage, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "Cell_remove_storage(Cell self, cmf::water::WaterStorage::ptr storage)\n" + "\n" + "void\n" + "remove_storage(cmf::water::WaterStorage::ptr storage) \n" + ""}, + { (char *)"Cell_storage_count", (PyCFunction)_wrap_Cell_storage_count, METH_O, (char *)"\n" + "Cell_storage_count(Cell self) -> size_t\n" + "\n" + "size_t\n" + "storage_count() const \n" + ""}, + { (char *)"Cell_get_storage", (PyCFunction) _wrap_Cell_get_storage, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "Cell_get_storage(Cell self, ptrdiff_t index) -> cmf::water::WaterStorage::ptr\n" + "\n" + "cmf::water::WaterStorage::ptr get_storage(ptrdiff_t index) const \n" + ""}, + { (char *)"Cell_get_canopy", (PyCFunction)_wrap_Cell_get_canopy, METH_O, (char *)"\n" + "Cell_get_canopy(Cell self) -> cmf::water::WaterStorage::ptr\n" + "\n" + "cmf::water::WaterStorage::ptr get_canopy() const \n" + ""}, + { (char *)"Cell_get_snow", (PyCFunction)_wrap_Cell_get_snow, METH_O, (char *)"\n" + "Cell_get_snow(Cell self) -> cmf::water::WaterStorage::ptr\n" + "\n" + "cmf::water::WaterStorage::ptr get_snow() const \n" + ""}, + { (char *)"Cell_snow_coverage", (PyCFunction)_wrap_Cell_snow_coverage, METH_O, (char *)"\n" + "Cell_snow_coverage(Cell self) -> real\n" + "\n" + "real\n" + "snow_coverage() const \n" + ""}, + { (char *)"Cell_albedo", (PyCFunction)_wrap_Cell_albedo, METH_O, (char *)"\n" + "Cell_albedo(Cell self) -> real\n" + "\n" + "real albedo()\n" + "const \n" + ""}, + { (char *)"Cell_surface_amplitude_set", _wrap_Cell_surface_amplitude_set, METH_VARARGS, (char *)"Cell_surface_amplitude_set(Cell self, real surface_amplitude)"}, + { (char *)"Cell_surface_amplitude_get", (PyCFunction)_wrap_Cell_surface_amplitude_get, METH_O, (char *)"Cell_surface_amplitude_get(Cell self) -> real"}, + { (char *)"Cell_surface_water_coverage", (PyCFunction)_wrap_Cell_surface_water_coverage, METH_O, (char *)"\n" + "Cell_surface_water_coverage(Cell self) -> real\n" + "\n" + "real surface_water_coverage() const\n" + "\n" + "Returns the coverage of the surface water.\n" + "\n" + "The covered fraction (0..1) is simply modelled as a piecewise linear\n" + "function of the surface water depth. If the depth is above the\n" + "aggregate height, the coverage is 1, below it is given as \n" + "\n" + ".. math::\n" + "\n" + " c =\n" + " \\\\frac{h_{water}}{\\\\Delta h_{surface}}\n" + "\n" + "with c the coverage,\n" + ":math:`h_{water}` the depth of the surface water and :math:`\\\\Delta h_{surface}`\n" + "the amplitude of the surface roughness \n" + ""}, + { (char *)"Cell_heat_flux", (PyCFunction) _wrap_Cell_heat_flux, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "Cell_heat_flux(Cell self, Time t) -> real\n" + "\n" + "real\n" + "heat_flux(cmf::math::Time t) const\n" + "\n" + "Calculates the surface heat balance.\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "t: Time step \n" + ""}, + { (char *)"Cell_Tground_set", _wrap_Cell_Tground_set, METH_VARARGS, (char *)"Cell_Tground_set(Cell self, real Tground)"}, + { (char *)"Cell_Tground_get", (PyCFunction)_wrap_Cell_Tground_get, METH_O, (char *)"Cell_Tground_get(Cell self) -> real"}, + { (char *)"Cell_leave_wetness", (PyCFunction)_wrap_Cell_leave_wetness, METH_O, (char *)"\n" + "Cell_leave_wetness(Cell self) -> real\n" + "\n" + "real\n" + "leave_wetness() const\n" + "\n" + "Return the fraction of wet leaves in the canopy if a canopy water\n" + "storage exists.\n" + "\n" + "If no canopy storage is present, it returns 0.0 (=empty). The fraction\n" + "of wet leaves are calculated as the linear filling of the canopy\n" + "storage. \n" + ""}, + { (char *)"Cell_Id_set", _wrap_Cell_Id_set, METH_VARARGS, (char *)"Cell_Id_set(Cell self, ptrdiff_t Id)"}, + { (char *)"Cell_Id_get", (PyCFunction)_wrap_Cell_Id_get, METH_O, (char *)"Cell_Id_get(Cell self) -> ptrdiff_t"}, + { (char *)"Cell_get_WKB", (PyCFunction)_wrap_Cell_get_WKB, METH_O, (char *)"\n" + "Cell_get_WKB(Cell self) -> cmf::bytestring\n" + "\n" + "cmf::bytestring\n" + "get_WKB() const \n" + ""}, + { (char *)"Cell_set_WKB", (PyCFunction) _wrap_Cell_set_WKB, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "Cell_set_WKB(Cell self, cmf::bytestring wkb)\n" + "\n" + "void\n" + "set_WKB(cmf::bytestring wkb) \n" + ""}, + { (char *)"Cell_get_weather", (PyCFunction) _wrap_Cell_get_weather, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "Cell_get_weather(Cell self, Time t) -> Weather\n" + "\n" + "cmf::atmosphere::Weather get_weather(cmf::math::Time t) const\n" + "\n" + "Returns the current meteorological conditions of the cell at time t.\n" + "\n" + ""}, + { (char *)"Cell_layer_count", (PyCFunction)_wrap_Cell_layer_count, METH_O, (char *)"\n" + "Cell_layer_count(Cell self) -> size_t\n" + "\n" + "size_t\n" + "layer_count() const\n" + "\n" + "Returns the number of layers of the cell. \n" + ""}, + { (char *)"Cell_get_layer", (PyCFunction) _wrap_Cell_get_layer, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "Cell_get_layer(Cell self, ptrdiff_t ndx) -> cmf::upslope::SoilLayer::ptr\n" + "\n" + "cmf::upslope::SoilLayer::ptr get_layer(ptrdiff_t ndx) const\n" + "\n" + "Returns the layer at position ndx.\n" + "\n" + "From python this function is masked as a sequence: \n" + ""}, + { (char *)"Cell_add_layer", _wrap_Cell_add_layer, METH_VARARGS, (char *)"\n" + "add_layer(real lowerboundary, RetentionCurve r_curve, real saturateddepth=10) -> cmf::upslope::SoilLayer::ptr\n" + "Cell_add_layer(Cell self, real lowerboundary) -> cmf::upslope::SoilLayer::ptr\n" + "\n" + "cmf::upslope::SoilLayer::ptr add_layer(real lowerboundary)\n" + "\n" + "Adds a rather conceptual layer to the cell. Use this version for\n" + "conceptual models. The retention curve resambles an empty bucket. \n" + ""}, + { (char *)"Cell_remove_last_layer", (PyCFunction)_wrap_Cell_remove_last_layer, METH_O, (char *)"\n" + "Cell_remove_last_layer(Cell self)\n" + "\n" + "void\n" + "remove_last_layer()\n" + "\n" + "Remove the lowest layer from this cell. \n" + ""}, + { (char *)"Cell_remove_layers", (PyCFunction)_wrap_Cell_remove_layers, METH_O, (char *)"\n" + "Cell_remove_layers(Cell self)\n" + "\n" + "void\n" + "remove_layers()\n" + "\n" + "Removes all layers from this cell. \n" + ""}, + { (char *)"delete_Cell", (PyCFunction)_wrap_delete_Cell, METH_O, (char *)"\n" + "delete_Cell(Cell self)\n" + "\n" + "virtual ~Cell() \n" + ""}, + { (char *)"new_Cell", (PyCFunction) _wrap_new_Cell, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "new_Cell(double x, double y, double z, double area, project _project) -> Cell\n" + "\n" + "Cell(double x,\n" + "double y, double z, double area, cmf::project &_project) \n" + ""}, + { (char *)"Cell_to_string", (PyCFunction)_wrap_Cell_to_string, METH_O, (char *)"\n" + "Cell_to_string(Cell self) -> std::string\n" + "\n" + "std::string\n" + "to_string() const \n" + ""}, + { (char *)"Cell_topology_get", (PyCFunction)_wrap_Cell_topology_get, METH_O, (char *)"Cell_topology_get(Cell self) -> Topology"}, + { (char *)"Cell_meteorology_set", _wrap_Cell_meteorology_set, METH_VARARGS, (char *)"Cell_meteorology_set(Cell self, Meteorology meteorology)"}, + { (char *)"Cell_meteorology_get", (PyCFunction)_wrap_Cell_meteorology_get, METH_O, (char *)"Cell_meteorology_get(Cell self) -> Meteorology"}, + { (char *)"Cell_layers_get", (PyCFunction)_wrap_Cell_layers_get, METH_O, (char *)"Cell_layers_get(Cell self) -> layer_list"}, + { (char *)"Cell_project_get", (PyCFunction)_wrap_Cell_project_get, METH_O, (char *)"Cell_project_get(Cell self) -> project"}, + { (char *)"Cell_saturated_depth_set", _wrap_Cell_saturated_depth_set, METH_VARARGS, (char *)"Cell_saturated_depth_set(Cell self, real saturated_depth)"}, + { (char *)"Cell_saturated_depth_get", (PyCFunction)_wrap_Cell_saturated_depth_get, METH_O, (char *)"Cell_saturated_depth_get(Cell self) -> real"}, + { (char *)"Cell_area_get", (PyCFunction)_wrap_Cell_area_get, METH_O, (char *)"Cell_area_get(Cell self) -> real"}, + { (char *)"Cell_soildepth_get", (PyCFunction)_wrap_Cell_soildepth_get, METH_O, (char *)"Cell_soildepth_get(Cell self) -> real"}, + { (char *)"Cell_swigregister", Cell_swigregister, METH_VARARGS, NULL}, + { (char *)"Cell_swiginit", Cell_swiginit, METH_VARARGS, NULL}, + { (char *)"Topology_cell_get", (PyCFunction)_wrap_Topology_cell_get, METH_O, (char *)"Topology_cell_get(Topology self) -> Cell"}, + { (char *)"Topology_x_set", _wrap_Topology_x_set, METH_VARARGS, (char *)"Topology_x_set(Topology self, double & x)"}, + { (char *)"Topology_x_get", (PyCFunction)_wrap_Topology_x_get, METH_O, (char *)"Topology_x_get(Topology self) -> double &"}, + { (char *)"Topology_y_set", _wrap_Topology_y_set, METH_VARARGS, (char *)"Topology_y_set(Topology self, double & y)"}, + { (char *)"Topology_y_get", (PyCFunction)_wrap_Topology_y_get, METH_O, (char *)"Topology_y_get(Topology self) -> double &"}, + { (char *)"Topology_z_set", _wrap_Topology_z_set, METH_VARARGS, (char *)"Topology_z_set(Topology self, double & z)"}, + { (char *)"Topology_z_get", (PyCFunction)_wrap_Topology_z_get, METH_O, (char *)"Topology_z_get(Topology self) -> double &"}, + { (char *)"Topology_get_position", (PyCFunction)_wrap_Topology_get_position, METH_O, (char *)"\n" + "Topology_get_position(Topology self) -> point\n" + "\n" + "cmf::geometry::point get_position() const\n" + "\n" + "Returns the center of the cell. \n" + ""}, + { (char *)"Topology_flowwidth", _wrap_Topology_flowwidth, METH_VARARGS, (char *)"\n" + "flowwidth(Cell target) -> double\n" + "Topology_flowwidth(Topology self, Topology target) -> double\n" + "\n" + "double\n" + "flowwidth(Topology &target) \n" + ""}, + { (char *)"Topology_AddNeighbor", _wrap_Topology_AddNeighbor, METH_VARARGS, (char *)"\n" + "AddNeighbor(Cell target, double flowwidth)\n" + "Topology_AddNeighbor(Topology self, Topology target, double flowwidth)\n" + "\n" + "void\n" + "AddNeighbor(Topology &target, double flowwidth) \n" + ""}, + { (char *)"Topology_RemoveNeighbor", (PyCFunction) _wrap_Topology_RemoveNeighbor, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "Topology_RemoveNeighbor(Topology self, Topology target)\n" + "\n" + "void\n" + "RemoveNeighbor(Topology &target)\n" + "\n" + "Removes the topological relation to the given cell. \n" + ""}, + { (char *)"Topology_neighbor_count", (PyCFunction)_wrap_Topology_neighbor_count, METH_O, (char *)"\n" + "Topology_neighbor_count(Topology self) -> size_t\n" + "\n" + "size_t\n" + "neighbor_count() const\n" + "\n" + "Returns the number of neighbors. \n" + ""}, + { (char *)"Topology_MainOutlet", (PyCFunction) _wrap_Topology_MainOutlet, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "Topology_MainOutlet(Topology self, bool forceRecalc=False) -> Cell\n" + "\n" + "Cell*\n" + "MainOutlet(bool forceRecalc=false)\n" + "\n" + "Returns the mainoutlet (steepest lower neighbor) \n" + ""}, + { (char *)"Topology_ContributingArea", (PyCFunction)_wrap_Topology_ContributingArea, METH_O, (char *)"\n" + "Topology_ContributingArea(Topology self) -> double\n" + "\n" + "double ContributingArea() const\n" + "\n" + "Get the contributing area (steepest path upwards) \n" + ""}, + { (char *)"Topology_calculate_contributing_area", (PyCFunction) _wrap_Topology_calculate_contributing_area, METH_VARARGS | METH_KEYWORDS, (char *)"Topology_calculate_contributing_area(cell_vector arg2)"}, + { (char *)"Topology___eq__", (PyCFunction) _wrap_Topology___eq__, METH_VARARGS | METH_KEYWORDS, (char *)"Topology___eq__(Topology self, Topology cmp) -> bool"}, + { (char *)"delete_Topology", (PyCFunction)_wrap_delete_Topology, METH_O, (char *)"delete_Topology(Topology self)"}, + { (char *)"Topology_swigregister", Topology_swigregister, METH_VARARGS, NULL}, + { (char *)"new_neighbor_iterator", (PyCFunction) _wrap_new_neighbor_iterator, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "new_neighbor_iterator(Cell cell) -> neighbor_iterator\n" + "\n" + "neighbor_iterator(cmf::upslope::Cell *cell) \n" + ""}, + { (char *)"neighbor_iterator_cell", (PyCFunction)_wrap_neighbor_iterator_cell, METH_O, (char *)"\n" + "neighbor_iterator_cell(neighbor_iterator self) -> Cell\n" + "\n" + "Cell&\n" + "cell() \n" + ""}, + { (char *)"neighbor_iterator_flowwidth", (PyCFunction)_wrap_neighbor_iterator_flowwidth, METH_O, (char *)"\n" + "neighbor_iterator_flowwidth(neighbor_iterator self) -> double\n" + "\n" + "double flowwidth() \n" + ""}, + { (char *)"neighbor_iterator_valid", (PyCFunction)_wrap_neighbor_iterator_valid, METH_O, (char *)"\n" + "neighbor_iterator_valid(neighbor_iterator self) -> bool\n" + "\n" + "bool\n" + "valid() const \n" + ""}, + { (char *)"neighbor_iterator_next", (PyCFunction)_wrap_neighbor_iterator_next, METH_O, (char *)"\n" + "neighbor_iterator_next(neighbor_iterator self) -> neighbor_iterator\n" + "\n" + "neighbor_iterator& next()\n" + "\n" + "Points the iterator to the next neighbor. \n" + ""}, + { (char *)"neighbor_iterator___eq__", (PyCFunction) _wrap_neighbor_iterator___eq__, METH_VARARGS | METH_KEYWORDS, (char *)"neighbor_iterator___eq__(neighbor_iterator self, neighbor_iterator cmp) -> bool"}, + { (char *)"neighbor_iterator___neq__", (PyCFunction) _wrap_neighbor_iterator___neq__, METH_VARARGS | METH_KEYWORDS, (char *)"neighbor_iterator___neq__(neighbor_iterator self, neighbor_iterator cmp) -> bool"}, + { (char *)"delete_neighbor_iterator", (PyCFunction)_wrap_delete_neighbor_iterator, METH_O, (char *)"delete_neighbor_iterator(neighbor_iterator self)"}, + { (char *)"neighbor_iterator_swigregister", neighbor_iterator_swigregister, METH_VARARGS, NULL}, + { (char *)"neighbor_iterator_swiginit", neighbor_iterator_swiginit, METH_VARARGS, NULL}, + { (char *)"new_cell_vector", _wrap_new_cell_vector, METH_VARARGS, (char *)"\n" + "cell_vector()\n" + "new_cell_vector(cell_vector copy) -> cell_vector\n" + "\n" + "cell_vector(cell_const_iterator first, cell_const_iterator last) \n" + ""}, + { (char *)"cell_vector___getitem__", _wrap_cell_vector___getitem__, METH_VARARGS, (char *)"\n" + "__getitem__(ptrdiff_t index) -> Cell\n" + "cell_vector___getitem__(cell_vector self, ptrdiff_t index) -> Cell\n" + ""}, + { (char *)"cell_vector_append", (PyCFunction) _wrap_cell_vector_append, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "cell_vector_append(cell_vector self, Cell cell)\n" + "\n" + "void\n" + "append(cmf::upslope::Cell &cell) \n" + ""}, + { (char *)"cell_vector_remove", _wrap_cell_vector_remove, METH_VARARGS, (char *)"\n" + "remove(ptrdiff_t index)\n" + "cell_vector_remove(cell_vector self, Cell cell)\n" + "\n" + "void\n" + "remove(const cmf::upslope::Cell &cell) \n" + ""}, + { (char *)"cell_vector_pop", (PyCFunction)_wrap_cell_vector_pop, METH_O, (char *)"\n" + "cell_vector_pop(cell_vector self) -> Cell\n" + "\n" + "Cell& pop()\n" + "\n" + "Returns and removes the last cell. \n" + ""}, + { (char *)"cell_vector___len__", (PyCFunction)_wrap_cell_vector___len__, METH_O, (char *)"\n" + "cell_vector___len__(cell_vector self) -> size_t\n" + "\n" + "size_t size()\n" + "const \n" + ""}, + { (char *)"cell_vector___getslice__", (PyCFunction) _wrap_cell_vector___getslice__, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "cell_vector___getslice__(cell_vector self, ptrdiff_t start, ptrdiff_t end, ptrdiff_t step=1) -> cell_vector\n" + "\n" + "cell_vector get_slice(ptrdiff_t start, ptrdiff_t end, ptrdiff_t\n" + "step=1) \n" + ""}, + { (char *)"cell_vector_get_area", (PyCFunction)_wrap_cell_vector_get_area, METH_O, (char *)"\n" + "cell_vector_get_area(cell_vector self) -> double\n" + "\n" + "double\n" + "get_area() const\n" + "\n" + "Returns sum of the area of the cells. \n" + ""}, + { (char *)"cell_vector___contains__", (PyCFunction) _wrap_cell_vector___contains__, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "cell_vector___contains__(cell_vector self, Cell cell) -> bool\n" + "\n" + "bool\n" + "contains(const cmf::upslope::Cell &cell) const \n" + ""}, + { (char *)"delete_cell_vector", (PyCFunction)_wrap_delete_cell_vector, METH_O, (char *)"\n" + "delete_cell_vector(cell_vector self)\n" + "\n" + "virtual ~cell_vector() \n" + ""}, + { (char *)"cell_vector_lowest_get", (PyCFunction)_wrap_cell_vector_lowest_get, METH_O, (char *)"cell_vector_lowest_get(cell_vector self) -> Cell"}, + { (char *)"cell_vector_highest_get", (PyCFunction)_wrap_cell_vector_highest_get, METH_O, (char *)"cell_vector_highest_get(cell_vector self) -> Cell"}, + { (char *)"cell_vector_swigregister", cell_vector_swigregister, METH_VARARGS, NULL}, + { (char *)"cell_vector_swiginit", cell_vector_swiginit, METH_VARARGS, NULL}, + { (char *)"find_cell", (PyCFunction) _wrap_find_cell, METH_VARARGS | METH_KEYWORDS, (char *)"find_cell(cell_vector arg1, point p, double max_dist=1e20) -> Cell"}, + { (char *)"get_boundary_cells", (PyCFunction) _wrap_get_boundary_cells, METH_VARARGS | METH_KEYWORDS, (char *)"get_boundary_cells(cell_vector cells) -> cell_vector"}, + { (char *)"get_connections", (PyCFunction) _wrap_get_connections, METH_VARARGS | METH_KEYWORDS, (char *)"get_connections(cell_vector cells) -> connection_list"}, + { (char *)"connect_cells_with_flux", (PyCFunction) _wrap_connect_cells_with_flux, METH_VARARGS | METH_KEYWORDS, (char *)"connect_cells_with_flux(cell_vector cells, CellConnector connect, int start_at_layer=0)"}, + { (char *)"fill_sinks", (PyCFunction) _wrap_fill_sinks, METH_VARARGS | METH_KEYWORDS, (char *)"fill_sinks(cell_vector cells, double min_difference=0.001) -> int"}, + { (char *)"get_area", (PyCFunction) _wrap_get_area, METH_VARARGS | METH_KEYWORDS, (char *)"get_area(cell_vector cells) -> double"}, + { (char *)"get_center", (PyCFunction) _wrap_get_center, METH_VARARGS | METH_KEYWORDS, (char *)"get_center(cell_vector cells) -> point"}, + { (char *)"cell_positions", (PyCFunction) _wrap_cell_positions, METH_VARARGS | METH_KEYWORDS, (char *)"cell_positions(cell_vector cells) -> point_vector"}, + { (char *)"cell_flux_directions", (PyCFunction) _wrap_cell_flux_directions, METH_VARARGS | METH_KEYWORDS, (char *)"cell_flux_directions(cell_vector cells, Time arg2) -> point_vector"}, + { (char *)"cell2cellflux", (PyCFunction) _wrap_cell2cellflux, METH_VARARGS | METH_KEYWORDS, (char *)"cell2cellflux(Cell source, Cell target, Time t, bool subsurface_only=False) -> cmf::math::num_array"}, + { (char *)"cell_distance", (PyCFunction) _wrap_cell_distance, METH_VARARGS | METH_KEYWORDS, (char *)"cell_distance(Cell c1, Cell c2) -> double"}, + { (char *)"subcatchment_pourpoint_get", (PyCFunction)_wrap_subcatchment_pourpoint_get, METH_O, (char *)"subcatchment_pourpoint_get(subcatchment self) -> Cell"}, + { (char *)"subcatchment_inflowcells_set", _wrap_subcatchment_inflowcells_set, METH_VARARGS, (char *)"subcatchment_inflowcells_set(subcatchment self, cell_vector inflowcells)"}, + { (char *)"subcatchment_inflowcells_get", (PyCFunction)_wrap_subcatchment_inflowcells_get, METH_O, (char *)"subcatchment_inflowcells_get(subcatchment self) -> cell_vector"}, + { (char *)"subcatchment_cells_set", _wrap_subcatchment_cells_set, METH_VARARGS, (char *)"subcatchment_cells_set(subcatchment self, cell_vector cells)"}, + { (char *)"subcatchment_cells_get", (PyCFunction)_wrap_subcatchment_cells_get, METH_O, (char *)"subcatchment_cells_get(subcatchment self) -> cell_vector"}, + { (char *)"new_subcatchment", (PyCFunction) _wrap_new_subcatchment, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "new_subcatchment(Cell pourpoint, double area_threshold=1e308) -> subcatchment\n" + "\n" + "subcatchment(cmf::upslope::Cell &pourpoint, double\n" + "area_threshold=1e308)\n" + "\n" + "Creates a subcatchment from a pourpoint cell.\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "pourpoint: The pourpoint (outlet of the subcatchment)\n" + "\n" + "area_threshold: Minimum contributing area size to form a\n" + "subcatchment. When area_threshold > area(cells), all upslope cells of\n" + "pourpoint are used. \n" + ""}, + { (char *)"delete_subcatchment", (PyCFunction)_wrap_delete_subcatchment, METH_O, (char *)"delete_subcatchment(subcatchment self)"}, + { (char *)"subcatchment_swigregister", subcatchment_swigregister, METH_VARARGS, NULL}, + { (char *)"subcatchment_swiginit", subcatchment_swiginit, METH_VARARGS, NULL}, + { (char *)"pressure_to_waterhead", (PyCFunction) _wrap_pressure_to_waterhead, METH_VARARGS | METH_KEYWORDS, (char *)"pressure_to_waterhead(double Pressure) -> double"}, + { (char *)"waterhead_to_pressure", (PyCFunction) _wrap_waterhead_to_pressure, METH_VARARGS | METH_KEYWORDS, (char *)"waterhead_to_pressure(double waterhead) -> double"}, + { (char *)"pF_to_waterhead", (PyCFunction) _wrap_pF_to_waterhead, METH_VARARGS | METH_KEYWORDS, (char *)"pF_to_waterhead(double pF) -> double"}, + { (char *)"waterhead_to_pF", (PyCFunction) _wrap_waterhead_to_pF, METH_VARARGS | METH_KEYWORDS, (char *)"waterhead_to_pF(double waterhead) -> double"}, + { (char *)"RetentionCurve_K", _wrap_RetentionCurve_K, METH_VARARGS, (char *)"\n" + "K(real wetness) -> real\n" + "RetentionCurve_K(RetentionCurve self, cmf::math::num_array const & wetness) -> cmf::math::num_array\n" + "\n" + "cmf::math::num_array K(const cmf::math::num_array &wetness) const \n" + ""}, + { (char *)"RetentionCurve_Wetness_eff", (PyCFunction) _wrap_RetentionCurve_Wetness_eff, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "RetentionCurve_Wetness_eff(RetentionCurve self, real wetness, real pF_r=4.2) -> real\n" + "\n" + "virtual real Wetness_eff(real wetness, real pF_r=4.2) const\n" + "\n" + "Returns the effective wetness, using a residual pF value \n" + "\n" + ".. math::\n" + "\n" + " w_{eff}\n" + " =\n" + " \\\\frac{w_{act}-w\\\\left(pF_r\\\\right)}{1-w\\\\left(pF_r\\\\right)}\n" + "\n" + ".\n" + "\n" + ""}, + { (char *)"RetentionCurve_Porosity", (PyCFunction) _wrap_RetentionCurve_Porosity, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "RetentionCurve_Porosity(RetentionCurve self, real depth=0.0) -> real\n" + "\n" + "virtual real Porosity(real depth=0.0) const =0\n" + "\n" + "Returns the porosity at a certain depth. \n" + ""}, + { (char *)"RetentionCurve_VoidVolume", (PyCFunction) _wrap_RetentionCurve_VoidVolume, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "RetentionCurve_VoidVolume(RetentionCurve self, real upperDepth, real lowerDepth, real Area) -> real\n" + "\n" + "virtual real VoidVolume(real upperDepth, real lowerDepth, real Area)\n" + "const\n" + "\n" + "Returns the void volume of a soil column. \n" + ""}, + { (char *)"RetentionCurve_FillHeight", (PyCFunction) _wrap_RetentionCurve_FillHeight, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "RetentionCurve_FillHeight(RetentionCurve self, real lowerDepth, real Area, real Volume) -> real\n" + "\n" + "virtual real FillHeight(real lowerDepth, real Area, real Volume) const\n" + "\n" + "Returns the thickness of a soil column with a certain pore volume. \n" + ""}, + { (char *)"RetentionCurve_Diffusivity", _wrap_RetentionCurve_Diffusivity, METH_VARARGS, (char *)"\n" + "Diffusivity(real wetness) -> real\n" + "RetentionCurve_Diffusivity(RetentionCurve self, cmf::math::num_array & wetness) -> cmf::math::num_array\n" + "\n" + "cmf::math::num_array Diffusivity(cmf::math::num_array &wetness) \n" + ""}, + { (char *)"RetentionCurve_Wetness", _wrap_RetentionCurve_Wetness, METH_VARARGS, (char *)"\n" + "Wetness(real suction) -> real\n" + "RetentionCurve_Wetness(RetentionCurve self, cmf::math::num_array const & suction) -> cmf::math::num_array\n" + "\n" + "cmf::math::num_array Wetness(const cmf::math::num_array &suction)\n" + "const \n" + ""}, + { (char *)"RetentionCurve_theta", _wrap_RetentionCurve_theta, METH_VARARGS, (char *)"\n" + "theta(real wetness) -> real\n" + "RetentionCurve_theta(RetentionCurve self, cmf::math::num_array const & wetness) -> cmf::math::num_array\n" + "\n" + "cmf::math::num_array theta(const cmf::math::num_array &wetness) const\n" + "\n" + ""}, + { (char *)"RetentionCurve_dPsiM_dW", _wrap_RetentionCurve_dPsiM_dW, METH_VARARGS, (char *)"\n" + "dPsiM_dW(real wetness) -> real\n" + "RetentionCurve_dPsiM_dW(RetentionCurve self, cmf::math::num_array const & wetness) -> cmf::math::num_array\n" + "\n" + "cmf::math::num_array dPsiM_dW(const cmf::math::num_array &wetness)\n" + "const \n" + ""}, + { (char *)"RetentionCurve_Wetness_pF", _wrap_RetentionCurve_Wetness_pF, METH_VARARGS, (char *)"\n" + "Wetness_pF(real pF) -> real\n" + "RetentionCurve_Wetness_pF(RetentionCurve self, cmf::math::num_array const & pF) -> cmf::math::num_array\n" + "\n" + "cmf::math::num_array Wetness_pF(const cmf::math::num_array &pF) const\n" + "\n" + ""}, + { (char *)"RetentionCurve_MatricPotential", _wrap_RetentionCurve_MatricPotential, METH_VARARGS, (char *)"\n" + "MatricPotential(real wetness) -> real\n" + "RetentionCurve_MatricPotential(RetentionCurve self, cmf::math::num_array const & wetness) -> cmf::math::num_array\n" + "\n" + "cmf::math::num_array MatricPotential(const cmf::math::num_array\n" + "&wetness) const \n" + ""}, + { (char *)"RetentionCurve_copy", (PyCFunction)_wrap_RetentionCurve_copy, METH_O, (char *)"\n" + "RetentionCurve_copy(RetentionCurve self) -> RetentionCurve\n" + "\n" + "virtual\n" + "RetentionCurve* copy() const =0 \n" + ""}, + { (char *)"delete_RetentionCurve", (PyCFunction)_wrap_delete_RetentionCurve, METH_O, (char *)"\n" + "delete_RetentionCurve(RetentionCurve self)\n" + "\n" + "virtual ~RetentionCurve() \n" + ""}, + { (char *)"RetentionCurve_swigregister", RetentionCurve_swigregister, METH_VARARGS, NULL}, + { (char *)"BrooksCoreyRetentionCurve_Ksat_set", _wrap_BrooksCoreyRetentionCurve_Ksat_set, METH_VARARGS, (char *)"BrooksCoreyRetentionCurve_Ksat_set(BrooksCoreyRetentionCurve self, real Ksat)"}, + { (char *)"BrooksCoreyRetentionCurve_Ksat_get", (PyCFunction)_wrap_BrooksCoreyRetentionCurve_Ksat_get, METH_O, (char *)"BrooksCoreyRetentionCurve_Ksat_get(BrooksCoreyRetentionCurve self) -> real"}, + { (char *)"BrooksCoreyRetentionCurve_SetPorosity", (PyCFunction) _wrap_BrooksCoreyRetentionCurve_SetPorosity, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "BrooksCoreyRetentionCurve_SetPorosity(BrooksCoreyRetentionCurve self, real porosity, real porosity_decay=0)\n" + "\n" + "void\n" + "SetPorosity(real porosity, real porosity_decay=0)\n" + "\n" + "Sets the porosity (Volume of pores per volume of soil) and the\n" + "exponential porosity decline with depth. \n" + ""}, + { (char *)"BrooksCoreyRetentionCurve_Transmissivity", (PyCFunction) _wrap_BrooksCoreyRetentionCurve_Transmissivity, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "BrooksCoreyRetentionCurve_Transmissivity(BrooksCoreyRetentionCurve self, real upperDepth, real lowerDepth, real theta) -> real\n" + "\n" + "real\n" + "Transmissivity(real upperDepth, real lowerDepth, real theta) const \n" + ""}, + { (char *)"BrooksCoreyRetentionCurve_wetness_X_set", _wrap_BrooksCoreyRetentionCurve_wetness_X_set, METH_VARARGS, (char *)"BrooksCoreyRetentionCurve_wetness_X_set(BrooksCoreyRetentionCurve self, real wetness_X)"}, + { (char *)"BrooksCoreyRetentionCurve_wetness_X_get", (PyCFunction)_wrap_BrooksCoreyRetentionCurve_wetness_X_get, METH_O, (char *)"BrooksCoreyRetentionCurve_wetness_X_get(BrooksCoreyRetentionCurve self) -> real"}, + { (char *)"BrooksCoreyRetentionCurve_Psi_X_set", _wrap_BrooksCoreyRetentionCurve_Psi_X_set, METH_VARARGS, (char *)"BrooksCoreyRetentionCurve_Psi_X_set(BrooksCoreyRetentionCurve self, real Psi_X)"}, + { (char *)"BrooksCoreyRetentionCurve_Psi_X_get", (PyCFunction)_wrap_BrooksCoreyRetentionCurve_Psi_X_get, METH_O, (char *)"BrooksCoreyRetentionCurve_Psi_X_get(BrooksCoreyRetentionCurve self) -> real"}, + { (char *)"BrooksCoreyRetentionCurve_residual_theta_set", _wrap_BrooksCoreyRetentionCurve_residual_theta_set, METH_VARARGS, (char *)"BrooksCoreyRetentionCurve_residual_theta_set(BrooksCoreyRetentionCurve self, real residual_theta)"}, + { (char *)"BrooksCoreyRetentionCurve_residual_theta_get", (PyCFunction)_wrap_BrooksCoreyRetentionCurve_residual_theta_get, METH_O, (char *)"BrooksCoreyRetentionCurve_residual_theta_get(BrooksCoreyRetentionCurve self) -> real"}, + { (char *)"new_BrooksCoreyRetentionCurve", (PyCFunction) _wrap_new_BrooksCoreyRetentionCurve, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "new_BrooksCoreyRetentionCurve(real ksat=15, real porosity=0.5, real _b=5, real theta_x=0.2, real psi_x, real porosity_decay=0) -> BrooksCoreyRetentionCurve\n" + "\n" + "BrooksCoreyRetentionCurve(real ksat=15, real porosity=0.5, real _b=5,\n" + "real theta_x=0.2, real psi_x=pF_to_waterhead(2.5), real\n" + "porosity_decay=0)\n" + "\n" + "Creates a brooks corey retention curve.\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "ksat: Saturated conductivity :math:`\\\\frac{m}{day}`\n" + "\n" + "porosity: :math:`\\\\frac{m^3 Pores}{m^3 Soil}`\n" + "\n" + "_b: Shape of the retention curve (if you do not know how to\n" + "parameterize this, take a look at the other constructor)\n" + "\n" + "theta_x: :math:`\\\\theta_X` Water content at a specific suction pressure\n" + "\n" + "psi_x: Suction pressure for :math:`\\\\theta_X` in m water column, use the\n" + "conversion functions pF_to_waterhead, pressure_to_waterhead to convert\n" + "pressure in to waterhead height (default pF=2.5)\n" + "\n" + "porosity_decay: Relative decay of porosity with depth, e.g. 0.1 means\n" + "conductivity gets 10% smaller per meter \n" + ""}, + { (char *)"BrooksCoreyRetentionCurve_CreateFrom2Points", (PyCFunction) _wrap_BrooksCoreyRetentionCurve_CreateFrom2Points, METH_VARARGS | METH_KEYWORDS, (char *)"BrooksCoreyRetentionCurve_CreateFrom2Points(real ksat, real porosity, real theta1, real theta2, real psi_1, real psi_2) -> BrooksCoreyRetentionCurve"}, + { (char *)"BrooksCoreyRetentionCurve_copy", (PyCFunction)_wrap_BrooksCoreyRetentionCurve_copy, METH_O, (char *)"\n" + "BrooksCoreyRetentionCurve_copy(BrooksCoreyRetentionCurve self) -> BrooksCoreyRetentionCurve\n" + "\n" + "virtual BrooksCoreyRetentionCurve* copy() const \n" + ""}, + { (char *)"delete_BrooksCoreyRetentionCurve", (PyCFunction)_wrap_delete_BrooksCoreyRetentionCurve, METH_O, (char *)"\n" + "delete_BrooksCoreyRetentionCurve(BrooksCoreyRetentionCurve self)\n" + "\n" + "virtual ~BrooksCoreyRetentionCurve() \n" + ""}, + { (char *)"BrooksCoreyRetentionCurve_b_set", _wrap_BrooksCoreyRetentionCurve_b_set, METH_VARARGS, (char *)"BrooksCoreyRetentionCurve_b_set(BrooksCoreyRetentionCurve self, real b)"}, + { (char *)"BrooksCoreyRetentionCurve_b_get", (PyCFunction)_wrap_BrooksCoreyRetentionCurve_b_get, METH_O, (char *)"BrooksCoreyRetentionCurve_b_get(BrooksCoreyRetentionCurve self) -> real"}, + { (char *)"BrooksCoreyRetentionCurve_swigregister", BrooksCoreyRetentionCurve_swigregister, METH_VARARGS, NULL}, + { (char *)"BrooksCoreyRetentionCurve_swiginit", BrooksCoreyRetentionCurve_swiginit, METH_VARARGS, NULL}, + { (char *)"VanGenuchtenMualem_alpha_set", _wrap_VanGenuchtenMualem_alpha_set, METH_VARARGS, (char *)"VanGenuchtenMualem_alpha_set(VanGenuchtenMualem self, real alpha)"}, + { (char *)"VanGenuchtenMualem_alpha_get", (PyCFunction)_wrap_VanGenuchtenMualem_alpha_get, METH_O, (char *)"VanGenuchtenMualem_alpha_get(VanGenuchtenMualem self) -> real"}, + { (char *)"VanGenuchtenMualem_n_set", _wrap_VanGenuchtenMualem_n_set, METH_VARARGS, (char *)"VanGenuchtenMualem_n_set(VanGenuchtenMualem self, real n)"}, + { (char *)"VanGenuchtenMualem_n_get", (PyCFunction)_wrap_VanGenuchtenMualem_n_get, METH_O, (char *)"VanGenuchtenMualem_n_get(VanGenuchtenMualem self) -> real"}, + { (char *)"VanGenuchtenMualem_Ksat_set", _wrap_VanGenuchtenMualem_Ksat_set, METH_VARARGS, (char *)"VanGenuchtenMualem_Ksat_set(VanGenuchtenMualem self, real Ksat)"}, + { (char *)"VanGenuchtenMualem_Ksat_get", (PyCFunction)_wrap_VanGenuchtenMualem_Ksat_get, METH_O, (char *)"VanGenuchtenMualem_Ksat_get(VanGenuchtenMualem self) -> real"}, + { (char *)"VanGenuchtenMualem_Phi_set", _wrap_VanGenuchtenMualem_Phi_set, METH_VARARGS, (char *)"VanGenuchtenMualem_Phi_set(VanGenuchtenMualem self, real Phi)"}, + { (char *)"VanGenuchtenMualem_Phi_get", (PyCFunction)_wrap_VanGenuchtenMualem_Phi_get, METH_O, (char *)"VanGenuchtenMualem_Phi_get(VanGenuchtenMualem self) -> real"}, + { (char *)"VanGenuchtenMualem_m_set", _wrap_VanGenuchtenMualem_m_set, METH_VARARGS, (char *)"VanGenuchtenMualem_m_set(VanGenuchtenMualem self, real m)"}, + { (char *)"VanGenuchtenMualem_m_get", (PyCFunction)_wrap_VanGenuchtenMualem_m_get, METH_O, (char *)"VanGenuchtenMualem_m_get(VanGenuchtenMualem self) -> real"}, + { (char *)"VanGenuchtenMualem_l_set", _wrap_VanGenuchtenMualem_l_set, METH_VARARGS, (char *)"VanGenuchtenMualem_l_set(VanGenuchtenMualem self, real l)"}, + { (char *)"VanGenuchtenMualem_l_get", (PyCFunction)_wrap_VanGenuchtenMualem_l_get, METH_O, (char *)"VanGenuchtenMualem_l_get(VanGenuchtenMualem self) -> real"}, + { (char *)"VanGenuchtenMualem_theta_r_set", _wrap_VanGenuchtenMualem_theta_r_set, METH_VARARGS, (char *)"VanGenuchtenMualem_theta_r_set(VanGenuchtenMualem self, real theta_r)"}, + { (char *)"VanGenuchtenMualem_theta_r_get", (PyCFunction)_wrap_VanGenuchtenMualem_theta_r_get, METH_O, (char *)"VanGenuchtenMualem_theta_r_get(VanGenuchtenMualem self) -> real"}, + { (char *)"VanGenuchtenMualem_w0_set", _wrap_VanGenuchtenMualem_w0_set, METH_VARARGS, (char *)"VanGenuchtenMualem_w0_set(VanGenuchtenMualem self, real w0)"}, + { (char *)"VanGenuchtenMualem_w0_get", (PyCFunction)_wrap_VanGenuchtenMualem_w0_get, METH_O, (char *)"VanGenuchtenMualem_w0_get(VanGenuchtenMualem self) -> real"}, + { (char *)"VanGenuchtenMualem_Transmissivity", (PyCFunction) _wrap_VanGenuchtenMualem_Transmissivity, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "VanGenuchtenMualem_Transmissivity(VanGenuchtenMualem self, real upperDepth, real lowerDepth, real wetness) -> real\n" + "\n" + "virtual real\n" + "Transmissivity(real upperDepth, real lowerDepth, real wetness) const\n" + "\n" + ""}, + { (char *)"VanGenuchtenMualem_fit_w0", (PyCFunction) _wrap_VanGenuchtenMualem_fit_w0, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "VanGenuchtenMualem_fit_w0(VanGenuchtenMualem self, real w1=1.01, real Psi_p=1.0, real tolerance=0.05) -> real\n" + "\n" + "real\n" + "fit_w0(real w1=1.01, real Psi_p=1.0, real tolerance=0.05)\n" + "\n" + "Fits the break point wetness w0, to ensure a specific oversaturation\n" + "at a given hydrostatic potential.\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "w1: The oversaturation wetness to archieve (>1), default = 1.01\n" + "\n" + "Psi_p: the hydrostatic potential for w1, default = +1.0 m\n" + "\n" + "tolerance: \n" + ""}, + { (char *)"VanGenuchtenMualem_copy", (PyCFunction)_wrap_VanGenuchtenMualem_copy, METH_O, (char *)"\n" + "VanGenuchtenMualem_copy(VanGenuchtenMualem self) -> VanGenuchtenMualem\n" + "\n" + "VanGenuchtenMualem* copy() const \n" + ""}, + { (char *)"new_VanGenuchtenMualem", (PyCFunction) _wrap_new_VanGenuchtenMualem, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "new_VanGenuchtenMualem(real Ksat=15, real phi=0.5, real alpha=0.2178, real n=1.211, real m=-1) -> VanGenuchtenMualem\n" + "\n" + "VanGenuchtenMualem(real Ksat=15, real phi=0.5, real alpha=0.2178, real\n" + "n=1.211, real m=-1)\n" + "\n" + "Creates a van Genuchten-Mualem retention curve.\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "Ksat: Saturated conductivity in :math:`\\\\frac m{day}`\n" + "\n" + "phi: Porosity in :math:`\\\\frac{m^3 Pores}{m^3 Soil}`\n" + "\n" + "alpha: Van Genuchten :math:`\\\\alpha` in :math:`\\\\frac 1{cm}`\n" + "\n" + "n: Van Genuchten n\n" + "\n" + "m: Van Genuchten m parameter, if negative m is calculated as :math:`1-\\\\frac 1 n` \n" + ""}, + { (char *)"delete_VanGenuchtenMualem", (PyCFunction)_wrap_delete_VanGenuchtenMualem, METH_O, (char *)"\n" + "delete_VanGenuchtenMualem(VanGenuchtenMualem self)\n" + "\n" + "virtual\n" + "~VanGenuchtenMualem() \n" + ""}, + { (char *)"VanGenuchtenMualem_swigregister", VanGenuchtenMualem_swigregister, METH_VARARGS, NULL}, + { (char *)"VanGenuchtenMualem_swiginit", VanGenuchtenMualem_swiginit, METH_VARARGS, NULL}, + { (char *)"LinearRetention_Ksat_set", _wrap_LinearRetention_Ksat_set, METH_VARARGS, (char *)"LinearRetention_Ksat_set(LinearRetention self, real Ksat)"}, + { (char *)"LinearRetention_Ksat_get", (PyCFunction)_wrap_LinearRetention_Ksat_get, METH_O, (char *)"LinearRetention_Ksat_get(LinearRetention self) -> real"}, + { (char *)"LinearRetention_porosity_set", _wrap_LinearRetention_porosity_set, METH_VARARGS, (char *)"LinearRetention_porosity_set(LinearRetention self, real porosity)"}, + { (char *)"LinearRetention_porosity_get", (PyCFunction)_wrap_LinearRetention_porosity_get, METH_O, (char *)"LinearRetention_porosity_get(LinearRetention self) -> real"}, + { (char *)"LinearRetention_thickness_set", _wrap_LinearRetention_thickness_set, METH_VARARGS, (char *)"LinearRetention_thickness_set(LinearRetention self, real thickness)"}, + { (char *)"LinearRetention_thickness_get", (PyCFunction)_wrap_LinearRetention_thickness_get, METH_O, (char *)"LinearRetention_thickness_get(LinearRetention self) -> real"}, + { (char *)"LinearRetention_residual_wetness_set", _wrap_LinearRetention_residual_wetness_set, METH_VARARGS, (char *)"LinearRetention_residual_wetness_set(LinearRetention self, real residual_wetness)"}, + { (char *)"LinearRetention_residual_wetness_get", (PyCFunction)_wrap_LinearRetention_residual_wetness_get, METH_O, (char *)"LinearRetention_residual_wetness_get(LinearRetention self) -> real"}, + { (char *)"LinearRetention_porosity_decay_set", _wrap_LinearRetention_porosity_decay_set, METH_VARARGS, (char *)"LinearRetention_porosity_decay_set(LinearRetention self, real porosity_decay)"}, + { (char *)"LinearRetention_porosity_decay_get", (PyCFunction)_wrap_LinearRetention_porosity_decay_get, METH_O, (char *)"LinearRetention_porosity_decay_get(LinearRetention self) -> real"}, + { (char *)"LinearRetention_beta_set", _wrap_LinearRetention_beta_set, METH_VARARGS, (char *)"LinearRetention_beta_set(LinearRetention self, real beta)"}, + { (char *)"LinearRetention_beta_get", (PyCFunction)_wrap_LinearRetention_beta_get, METH_O, (char *)"LinearRetention_beta_get(LinearRetention self) -> real"}, + { (char *)"LinearRetention_Transmissivity", (PyCFunction) _wrap_LinearRetention_Transmissivity, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "LinearRetention_Transmissivity(LinearRetention self, real upperDepth, real lowerDepth, real wetness) -> real\n" + "\n" + "virtual real Transmissivity(real upperDepth, real lowerDepth, real\n" + "wetness) const \n" + ""}, + { (char *)"LinearRetention_copy", (PyCFunction)_wrap_LinearRetention_copy, METH_O, (char *)"\n" + "LinearRetention_copy(LinearRetention self) -> LinearRetention\n" + "\n" + "LinearRetention* copy() const \n" + ""}, + { (char *)"new_LinearRetention", (PyCFunction) _wrap_new_LinearRetention, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "new_LinearRetention(real ksat, real phi, real thickness, real residual_wetness=0.1) -> LinearRetention\n" + "\n" + "LinearRetention(real ksat, real phi, real thickness, real\n" + "residual_wetness=0.1) \n" + ""}, + { (char *)"delete_LinearRetention", (PyCFunction)_wrap_delete_LinearRetention, METH_O, (char *)"\n" + "delete_LinearRetention(LinearRetention self)\n" + "\n" + "virtual ~LinearRetention() \n" + ""}, + { (char *)"LinearRetention_swigregister", LinearRetention_swigregister, METH_VARARGS, NULL}, + { (char *)"LinearRetention_swiginit", LinearRetention_swiginit, METH_VARARGS, NULL}, + { (char *)"SoilLayer_Position_get", (PyCFunction)_wrap_SoilLayer_Position_get, METH_O, (char *)"SoilLayer_Position_get(SoilLayer self) -> ptrdiff_t const"}, + { (char *)"SoilLayer_cell_get", (PyCFunction)_wrap_SoilLayer_cell_get, METH_O, (char *)"SoilLayer_cell_get(SoilLayer self) -> Cell"}, + { (char *)"SoilLayer___get_upper", (PyCFunction)_wrap_SoilLayer___get_upper, METH_O, (char *)"\n" + "SoilLayer___get_upper(SoilLayer self) -> cmf::upslope::SoilLayer::ptr\n" + "\n" + "ptr\n" + "get_upper() const \n" + ""}, + { (char *)"SoilLayer___get_lower", (PyCFunction)_wrap_SoilLayer___get_lower, METH_O, (char *)"\n" + "SoilLayer___get_lower(SoilLayer self) -> cmf::upslope::SoilLayer::ptr\n" + "\n" + "ptr\n" + "get_lower() const \n" + ""}, + { (char *)"SoilLayer_get_soil", (PyCFunction)_wrap_SoilLayer_get_soil, METH_O, (char *)"\n" + "SoilLayer_get_soil(SoilLayer self) -> RetentionCurve\n" + "\n" + "virtual\n" + "cmf::upslope::RetentionCurve& get_soil() const\n" + "\n" + "Returns the soil properties of the water storage. \n" + ""}, + { (char *)"SoilLayer_set_soil", (PyCFunction) _wrap_SoilLayer_set_soil, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "SoilLayer_set_soil(SoilLayer self, RetentionCurve r_curve)\n" + "\n" + "virtual\n" + "void set_soil(const cmf::upslope::RetentionCurve &r_curve) \n" + ""}, + { (char *)"SoilLayer_get_K", (PyCFunction) _wrap_SoilLayer_get_K, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "SoilLayer_get_K(SoilLayer self, point direction) -> real\n" + "\n" + "virtual real\n" + "get_K(cmf::geometry::point direction) const\n" + "\n" + "Returns the actual anisotropic conductivity along a direction :math:`K = (k_f \\\\cdot d) K`. \n" + ""}, + { (char *)"SoilLayer_anisotropic_kf_set", _wrap_SoilLayer_anisotropic_kf_set, METH_VARARGS, (char *)"SoilLayer_anisotropic_kf_set(SoilLayer self, point anisotropic_kf)"}, + { (char *)"SoilLayer_anisotropic_kf_get", (PyCFunction)_wrap_SoilLayer_anisotropic_kf_get, METH_O, (char *)"SoilLayer_anisotropic_kf_get(SoilLayer self) -> point"}, + { (char *)"SoilLayer_get_capacity", (PyCFunction)_wrap_SoilLayer_get_capacity, METH_O, (char *)"\n" + "SoilLayer_get_capacity(SoilLayer self) -> real\n" + "\n" + "virtual\n" + "real get_capacity() const\n" + "\n" + "Returns the capacity of the water storage in m3. \n" + ""}, + { (char *)"SoilLayer_get_saturated_depth", (PyCFunction)_wrap_SoilLayer_get_saturated_depth, METH_O, (char *)"\n" + "SoilLayer_get_saturated_depth(SoilLayer self) -> real\n" + "\n" + "virtual real get_saturated_depth() const\n" + "\n" + "Returns the depth for saturation \n" + "\n" + ".. math::\n" + "\n" + " z_{sat,this} =\n" + " \\\\left\\\\{z_{cell}-\\\\Psi_{tot} \\\\mbox{ if } W<1 \\\\\\\\\n" + " z_{sat,upper layer} \\\\right. \n" + "\n" + ". \n" + ""}, + { (char *)"SoilLayer_get_flow_crosssection", (PyCFunction) _wrap_SoilLayer_get_flow_crosssection, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "SoilLayer_get_flow_crosssection(SoilLayer self, SoilLayer target, bool HorizontalLayers=False) -> real\n" + "\n" + "real get_flow_crosssection(const cmf::upslope::SoilLayer &target,\n" + "bool HorizontalLayers=false) const\n" + "\n" + "Calculates the shared crosssectional area of this and another soil\n" + "water storage.\n" + "\n" + "If both layers belong to the same cell, the area of the cell is\n" + "returned, if they belong to different cells the area of the vertical\n" + "shared boundary is returned get_area in m2\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "target: The other soil water storage\n" + "\n" + "HorizontalLayers: If true, the layers are assumed to be parallel to\n" + "the gravitational potential, otherwise they are assumed to be parallel\n" + "to the ground topography \n" + ""}, + { (char *)"SoilLayer_cast", (PyCFunction) _wrap_SoilLayer_cast, METH_VARARGS | METH_KEYWORDS, (char *)"SoilLayer_cast(cmf::water::flux_node::ptr node) -> cmf::upslope::SoilLayer::ptr"}, + { (char *)"SoilLayer_gravitational_potential_get", (PyCFunction)_wrap_SoilLayer_gravitational_potential_get, METH_O, (char *)"SoilLayer_gravitational_potential_get(SoilLayer self) -> real"}, + { (char *)"SoilLayer_matrix_potential_get", (PyCFunction)_wrap_SoilLayer_matrix_potential_get, METH_O, (char *)"SoilLayer_matrix_potential_get(SoilLayer self) -> real"}, + { (char *)"SoilLayer_wetness_set", _wrap_SoilLayer_wetness_set, METH_VARARGS, (char *)"SoilLayer_wetness_set(SoilLayer self, real wetness)"}, + { (char *)"SoilLayer_wetness_get", (PyCFunction)_wrap_SoilLayer_wetness_get, METH_O, (char *)"SoilLayer_wetness_get(SoilLayer self) -> real"}, + { (char *)"SoilLayer_theta_set", _wrap_SoilLayer_theta_set, METH_VARARGS, (char *)"SoilLayer_theta_set(SoilLayer self, real theta)"}, + { (char *)"SoilLayer_theta_get", (PyCFunction)_wrap_SoilLayer_theta_get, METH_O, (char *)"SoilLayer_theta_get(SoilLayer self) -> real"}, + { (char *)"SoilLayer_K_get", (PyCFunction)_wrap_SoilLayer_K_get, METH_O, (char *)"SoilLayer_K_get(SoilLayer self) -> real"}, + { (char *)"SoilLayer_Ksat_get", (PyCFunction)_wrap_SoilLayer_Ksat_get, METH_O, (char *)"SoilLayer_Ksat_get(SoilLayer self) -> real"}, + { (char *)"SoilLayer_thickness_get", (PyCFunction)_wrap_SoilLayer_thickness_get, METH_O, (char *)"SoilLayer_thickness_get(SoilLayer self) -> real"}, + { (char *)"SoilLayer_lower_boundary_get", (PyCFunction)_wrap_SoilLayer_lower_boundary_get, METH_O, (char *)"SoilLayer_lower_boundary_get(SoilLayer self) -> real"}, + { (char *)"SoilLayer_upper_boundary_get", (PyCFunction)_wrap_SoilLayer_upper_boundary_get, METH_O, (char *)"SoilLayer_upper_boundary_get(SoilLayer self) -> real"}, + { (char *)"SoilLayer_porosity_get", (PyCFunction)_wrap_SoilLayer_porosity_get, METH_O, (char *)"SoilLayer_porosity_get(SoilLayer self) -> real"}, + { (char *)"SoilLayer_ice_fraction_set", _wrap_SoilLayer_ice_fraction_set, METH_VARARGS, (char *)"SoilLayer_ice_fraction_set(SoilLayer self, real ice_fraction)"}, + { (char *)"SoilLayer_ice_fraction_get", (PyCFunction)_wrap_SoilLayer_ice_fraction_get, METH_O, (char *)"SoilLayer_ice_fraction_get(SoilLayer self) -> real"}, + { (char *)"SoilLayer_rootfraction_set", _wrap_SoilLayer_rootfraction_set, METH_VARARGS, (char *)"SoilLayer_rootfraction_set(SoilLayer self, real rootfraction)"}, + { (char *)"SoilLayer_rootfraction_get", (PyCFunction)_wrap_SoilLayer_rootfraction_get, METH_O, (char *)"SoilLayer_rootfraction_get(SoilLayer self) -> real"}, + { (char *)"delete_SoilLayer", (PyCFunction)_wrap_delete_SoilLayer, METH_O, (char *)"delete_SoilLayer(SoilLayer self)"}, + { (char *)"SoilLayer_swigregister", SoilLayer_swigregister, METH_VARARGS, NULL}, + { (char *)"new_layer_list", _wrap_new_layer_list, METH_VARARGS, (char *)"\n" + "layer_list(layer_list for_copy)\n" + "layer_list()\n" + "new_layer_list(node_list for_copy) -> layer_list\n" + "\n" + "layer_list(const cmf::water::node_list &for_copy)\n" + "\n" + "Creates a list of all soil layers from a node_list. \n" + ""}, + { (char *)"layer_list_pop", (PyCFunction)_wrap_layer_list_pop, METH_O, (char *)"\n" + "layer_list_pop(layer_list self) -> cmf::upslope::SoilLayer::ptr\n" + "\n" + "SoilLayer::ptr\n" + "pop()\n" + "\n" + "Deletes the last layer from the list and returns it. \n" + ""}, + { (char *)"layer_list_append", (PyCFunction) _wrap_layer_list_append, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "layer_list_append(layer_list self, cmf::upslope::SoilLayer::ptr l) -> layer_list\n" + "\n" + "layer_list&\n" + "append(SoilLayer::ptr l)\n" + "\n" + "Appends a soil layer to the list. \n" + ""}, + { (char *)"layer_list_extend", _wrap_layer_list_extend, METH_VARARGS, (char *)"\n" + "extend(layer_list ll) -> layer_list\n" + "layer_list_extend(layer_list self, node_list nl) -> layer_list\n" + "\n" + "layer_list&\n" + "extend(const cmf::water::node_list &nl)\n" + "\n" + "Appends all soil layers from a node_list to this. \n" + ""}, + { (char *)"layer_list_get_slice", (PyCFunction) _wrap_layer_list_get_slice, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "layer_list_get_slice(layer_list self, size_t first=0, size_t last=1000000, size_t step=1) -> layer_list\n" + "\n" + "layer_list get_slice(size_t first=0, size_t last=1000000, size_t\n" + "step=1) \n" + ""}, + { (char *)"layer_list_clear", (PyCFunction)_wrap_layer_list_clear, METH_O, (char *)"\n" + "layer_list_clear(layer_list self)\n" + "\n" + "void clear()\n" + "\n" + "Clears the list. \n" + ""}, + { (char *)"layer_list_size", (PyCFunction)_wrap_layer_list_size, METH_O, (char *)"\n" + "layer_list_size(layer_list self) -> size_t\n" + "\n" + "size_t size()\n" + "const\n" + "\n" + "Number of layers in the list. \n" + ""}, + { (char *)"layer_list_set_wetness", (PyCFunction) _wrap_layer_list_set_wetness, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "layer_list_set_wetness(layer_list self, cmf::math::num_array const & Value, size_t offset=0)\n" + "\n" + "void\n" + "set_wetness(const cmf::math::num_array &Value, size_t offset=0)\n" + "\n" + "Sets the wetness in m3/m3 of layers [offset : arraysize]. \n" + ""}, + { (char *)"layer_list_set_potential", (PyCFunction) _wrap_layer_list_set_potential, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "layer_list_set_potential(layer_list self, cmf::math::num_array const & Value, size_t offset=0)\n" + "\n" + "void\n" + "set_potential(const cmf::math::num_array &Value, size_t offset=0)\n" + "\n" + "Sets the potential (head) in m of layers [offset : arraysize]. \n" + ""}, + { (char *)"layer_list_set_volume", (PyCFunction) _wrap_layer_list_set_volume, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "layer_list_set_volume(layer_list self, cmf::math::num_array const & Value, size_t offset=0)\n" + "\n" + "void\n" + "set_volume(const cmf::math::num_array &Value, size_t offset=0)\n" + "\n" + "Sets the Volume in m3 of layers [offset : arraysize]. \n" + ""}, + { (char *)"layer_list_get_percolation", (PyCFunction) _wrap_layer_list_get_percolation, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "layer_list_get_percolation(layer_list self, Time t) -> cmf::math::num_array\n" + "\n" + "cmf::math::num_array get_percolation(cmf::math::Time t) const\n" + "\n" + "Returns the flux to each layer from the upper layer, or, in case of\n" + "the first layer from the surface water. \n" + ""}, + { (char *)"layer_list_set_theta", (PyCFunction) _wrap_layer_list_set_theta, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "layer_list_set_theta(layer_list self, cmf::math::num_array const & Value, size_t offset=0)\n" + "\n" + "void\n" + "set_theta(const cmf::math::num_array &Value, size_t offset=0)\n" + "\n" + "Sets the volumetric water content of the soil. \n" + ""}, + { (char *)"layer_list_set_ice_fraction", (PyCFunction) _wrap_layer_list_set_ice_fraction, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "layer_list_set_ice_fraction(layer_list self, cmf::math::num_array const & Value, size_t offset=0)\n" + "\n" + "void set_ice_fraction(const cmf::math::num_array &Value, size_t\n" + "offset=0)\n" + "\n" + "Sets the fraction of the ice content of the soil water. \n" + ""}, + { (char *)"layer_list_set_rootfraction", (PyCFunction) _wrap_layer_list_set_rootfraction, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "layer_list_set_rootfraction(layer_list self, cmf::math::num_array const & Value, size_t offset=0)\n" + "\n" + "void set_rootfraction(const cmf::math::num_array &Value, size_t\n" + "offset=0)\n" + "\n" + "Sets the fraction of roots in each layer. \n" + ""}, + { (char *)"layer_list_gravitational_potential_get", (PyCFunction)_wrap_layer_list_gravitational_potential_get, METH_O, (char *)"layer_list_gravitational_potential_get(layer_list self) -> cmf::math::num_array"}, + { (char *)"layer_list_matrix_potential_get", (PyCFunction)_wrap_layer_list_matrix_potential_get, METH_O, (char *)"layer_list_matrix_potential_get(layer_list self) -> cmf::math::num_array"}, + { (char *)"layer_list_wetness_get", (PyCFunction)_wrap_layer_list_wetness_get, METH_O, (char *)"layer_list_wetness_get(layer_list self) -> cmf::math::num_array"}, + { (char *)"layer_list_volume_get", (PyCFunction)_wrap_layer_list_volume_get, METH_O, (char *)"layer_list_volume_get(layer_list self) -> cmf::math::num_array"}, + { (char *)"layer_list_potential_get", (PyCFunction)_wrap_layer_list_potential_get, METH_O, (char *)"layer_list_potential_get(layer_list self) -> cmf::math::num_array"}, + { (char *)"layer_list_K_get", (PyCFunction)_wrap_layer_list_K_get, METH_O, (char *)"layer_list_K_get(layer_list self) -> cmf::math::num_array"}, + { (char *)"layer_list_Ksat_get", (PyCFunction)_wrap_layer_list_Ksat_get, METH_O, (char *)"layer_list_Ksat_get(layer_list self) -> cmf::math::num_array"}, + { (char *)"layer_list_thickness_get", (PyCFunction)_wrap_layer_list_thickness_get, METH_O, (char *)"layer_list_thickness_get(layer_list self) -> cmf::math::num_array"}, + { (char *)"layer_list_lower_boundary_get", (PyCFunction)_wrap_layer_list_lower_boundary_get, METH_O, (char *)"layer_list_lower_boundary_get(layer_list self) -> cmf::math::num_array"}, + { (char *)"layer_list_upper_boundary_get", (PyCFunction)_wrap_layer_list_upper_boundary_get, METH_O, (char *)"layer_list_upper_boundary_get(layer_list self) -> cmf::math::num_array"}, + { (char *)"layer_list_porosity_get", (PyCFunction)_wrap_layer_list_porosity_get, METH_O, (char *)"layer_list_porosity_get(layer_list self) -> cmf::math::num_array"}, + { (char *)"layer_list_ice_fraction_get", (PyCFunction)_wrap_layer_list_ice_fraction_get, METH_O, (char *)"layer_list_ice_fraction_get(layer_list self) -> cmf::math::num_array"}, + { (char *)"layer_list_theta_get", (PyCFunction)_wrap_layer_list_theta_get, METH_O, (char *)"layer_list_theta_get(layer_list self) -> cmf::math::num_array"}, + { (char *)"layer_list_root_get", (PyCFunction)_wrap_layer_list_root_get, METH_O, (char *)"layer_list_root_get(layer_list self) -> cmf::math::num_array"}, + { (char *)"layer_list___get", (PyCFunction) _wrap_layer_list___get, METH_VARARGS | METH_KEYWORDS, (char *)"layer_list___get(layer_list self, int index) -> cmf::upslope::SoilLayer::ptr"}, + { (char *)"delete_layer_list", (PyCFunction)_wrap_delete_layer_list, METH_O, (char *)"delete_layer_list(layer_list self)"}, + { (char *)"layer_list_swigregister", layer_list_swigregister, METH_VARARGS, NULL}, + { (char *)"layer_list_swiginit", layer_list_swiginit, METH_VARARGS, NULL}, + { (char *)"MacroPore_porefraction_min_set", _wrap_MacroPore_porefraction_min_set, METH_VARARGS, (char *)"MacroPore_porefraction_min_set(MacroPore self, real porefraction_min)"}, + { (char *)"MacroPore_porefraction_min_get", (PyCFunction)_wrap_MacroPore_porefraction_min_get, METH_O, (char *)"MacroPore_porefraction_min_get(MacroPore self) -> real"}, + { (char *)"MacroPore_porefraction_max_set", _wrap_MacroPore_porefraction_max_set, METH_VARARGS, (char *)"MacroPore_porefraction_max_set(MacroPore self, real porefraction_max)"}, + { (char *)"MacroPore_porefraction_max_get", (PyCFunction)_wrap_MacroPore_porefraction_max_get, METH_O, (char *)"MacroPore_porefraction_max_get(MacroPore self) -> real"}, + { (char *)"MacroPore___get_layer", (PyCFunction)_wrap_MacroPore___get_layer, METH_O, (char *)"\n" + "MacroPore___get_layer(MacroPore self) -> cmf::upslope::SoilLayer::ptr\n" + "\n" + "SoilLayer::ptr get_layer() const\n" + "\n" + "Gets the soil layer (matrix water storage) for this macropore storage.\n" + "\n" + ""}, + { (char *)"MacroPore_get_porefraction", (PyCFunction)_wrap_MacroPore_get_porefraction, METH_O, (char *)"\n" + "MacroPore_get_porefraction(MacroPore self) -> real\n" + "\n" + "real get_porefraction() const\n" + "\n" + "The fraction of the macro pores in m3/m3. This adds to the porosity of\n" + "the layer. \n" + ""}, + { (char *)"MacroPore_density_set", _wrap_MacroPore_density_set, METH_VARARGS, (char *)"MacroPore_density_set(MacroPore self, real density)"}, + { (char *)"MacroPore_density_get", (PyCFunction)_wrap_MacroPore_density_get, METH_O, (char *)"MacroPore_density_get(MacroPore self) -> real"}, + { (char *)"MacroPore_Ksat_set", _wrap_MacroPore_Ksat_set, METH_VARARGS, (char *)"MacroPore_Ksat_set(MacroPore self, real Ksat)"}, + { (char *)"MacroPore_Ksat_get", (PyCFunction)_wrap_MacroPore_Ksat_get, METH_O, (char *)"MacroPore_Ksat_get(MacroPore self) -> real"}, + { (char *)"MacroPore_crack_wetness_set", _wrap_MacroPore_crack_wetness_set, METH_VARARGS, (char *)"MacroPore_crack_wetness_set(MacroPore self, real crack_wetness)"}, + { (char *)"MacroPore_crack_wetness_get", (PyCFunction)_wrap_MacroPore_crack_wetness_get, METH_O, (char *)"MacroPore_crack_wetness_get(MacroPore self) -> real"}, + { (char *)"MacroPore_get_K", (PyCFunction) _wrap_MacroPore_get_K, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "MacroPore_get_K(MacroPore self, point direction) -> real\n" + "\n" + "virtual real\n" + "get_K(cmf::geometry::point direction) const\n" + "\n" + "Returns the actual anisotropic conductivity along a direction :math:`K = (k_f \\\\cdot d) K`. \n" + ""}, + { (char *)"MacroPore_get_crackwidth", (PyCFunction)_wrap_MacroPore_get_crackwidth, METH_O, (char *)"\n" + "MacroPore_get_crackwidth(MacroPore self) -> real\n" + "\n" + "virtual real get_crackwidth() const\n" + "\n" + "Returns the crack width for a prismatic crackstructure.\n" + "\n" + "For a prismatic crack structure, the porefraction in m3/m3 equals the\n" + "vertical crack area in m2/m2. The length of equally spaced cracks is\n" + "in one direction the inverse of the density and twice the length for\n" + "two directions. \n" + "\n" + ".. math::\n" + "\n" + " l_{crack} [m/m^2]= 2 \\\\frac {1}{d[m]}\n" + "\n" + "If\n" + "we again ignore the fact that the spacing of the cracking crossings is\n" + "counted double, the crack width is: \n" + "\n" + ".. math::\n" + "\n" + " w_{crack}[m] =\n" + " \\\\frac{A_{crack}[m^2/m^2]}{l_{crack}[m/m^2]} \n" + "\n" + "Combining both\n" + "eq. above: \n" + "\n" + ".. math::\n" + "\n" + " w_{crack}[m] = A_{crack}[m^2/m^2]\\\\frac{d[m]}{2}\n" + "\n" + "\n" + "\n" + ""}, + { (char *)"MacroPore_get_flowwidth", (PyCFunction)_wrap_MacroPore_get_flowwidth, METH_O, (char *)"\n" + "MacroPore_get_flowwidth(MacroPore self) -> real\n" + "\n" + "real\n" + "get_flowwidth() const\n" + "\n" + "The approximate length of the aggregate boundaries.\n" + "\n" + "\n" + "\n" + ".. math::\n" + "\n" + " l = \\\\frac{2}{d_{macro}} A\n" + "\n" + "where: :math:`l` is the length of\n" + "the aggregate boundaries (in m)\n" + "\n" + ":math:`2` is the number of directions\n" + "\n" + ":math:`d_{macro}` is the mean distance between macropores (density) in m\n" + "\n" + ":math:`A` is the area of the cell \n" + ""}, + { (char *)"MacroPore_K_shape_set", _wrap_MacroPore_K_shape_set, METH_VARARGS, (char *)"MacroPore_K_shape_set(MacroPore self, real K_shape)"}, + { (char *)"MacroPore_K_shape_get", (PyCFunction)_wrap_MacroPore_K_shape_get, METH_O, (char *)"MacroPore_K_shape_get(MacroPore self) -> real"}, + { (char *)"MacroPore_create", (PyCFunction) _wrap_MacroPore_create, METH_VARARGS | METH_KEYWORDS, (char *)"MacroPore_create(cmf::upslope::SoilLayer::ptr layer, real porefraction=0.05, real Ksat=10, real density=0.05, real porefraction_wilt=-1., real K_shape=0.0) -> cmf::upslope::MacroPore::ptr"}, + { (char *)"MacroPore_cast", (PyCFunction) _wrap_MacroPore_cast, METH_VARARGS | METH_KEYWORDS, (char *)"MacroPore_cast(cmf::water::flux_node::ptr node) -> cmf::upslope::MacroPore::ptr"}, + { (char *)"MacroPore_filled_fraction_get", (PyCFunction)_wrap_MacroPore_filled_fraction_get, METH_O, (char *)"MacroPore_filled_fraction_get(MacroPore self) -> real"}, + { (char *)"MacroPore_K_get", (PyCFunction)_wrap_MacroPore_K_get, METH_O, (char *)"MacroPore_K_get(MacroPore self) -> real"}, + { (char *)"MacroPore_capacity_get", (PyCFunction)_wrap_MacroPore_capacity_get, METH_O, (char *)"MacroPore_capacity_get(MacroPore self) -> real"}, + { (char *)"MacroPore_cell_get", (PyCFunction)_wrap_MacroPore_cell_get, METH_O, (char *)"MacroPore_cell_get(MacroPore self) -> Cell"}, + { (char *)"delete_MacroPore", (PyCFunction)_wrap_delete_MacroPore, METH_O, (char *)"delete_MacroPore(MacroPore self)"}, + { (char *)"MacroPore_swigregister", MacroPore_swigregister, METH_VARARGS, NULL}, + { (char *)"delete_BaseMacroFlow", (PyCFunction)_wrap_delete_BaseMacroFlow, METH_O, (char *)"delete_BaseMacroFlow(BaseMacroFlow self)"}, + { (char *)"BaseMacroFlow_swigregister", BaseMacroFlow_swigregister, METH_VARARGS, NULL}, + { (char *)"new_GradientMacroFlow", (PyCFunction) _wrap_new_GradientMacroFlow, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "new_GradientMacroFlow(cmf::upslope::MacroPore::ptr left, cmf::water::flux_node::ptr right) -> GradientMacroFlow\n" + "\n" + "GradientMacroFlow(cmf::upslope::MacroPore::ptr left,\n" + "cmf::water::flux_node::ptr right) \n" + ""}, + { (char *)"delete_GradientMacroFlow", (PyCFunction)_wrap_delete_GradientMacroFlow, METH_O, (char *)"delete_GradientMacroFlow(GradientMacroFlow self)"}, + { (char *)"GradientMacroFlow_swigregister", GradientMacroFlow_swigregister, METH_VARARGS, NULL}, + { (char *)"GradientMacroFlow_swiginit", GradientMacroFlow_swiginit, METH_VARARGS, NULL}, + { (char *)"new_KinematicMacroFlow", (PyCFunction) _wrap_new_KinematicMacroFlow, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "new_KinematicMacroFlow(cmf::water::WaterStorage::ptr left, cmf::water::flux_node::ptr right, real beta=1.) -> KinematicMacroFlow\n" + "\n" + "KinematicMacroFlow(cmf::water::WaterStorage::ptr left,\n" + "cmf::water::flux_node::ptr right, real beta=1.)\n" + "\n" + "Creates the connection.\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "left: right: the nodes between the connection should be created.\n" + "\n" + "beta: a conceptional curve shape parameter for the relation between\n" + "storage and outflow\n" + "\n" + "Either left or right needs to be a MacroPore, left needs to be a water\n" + "storage \n" + ""}, + { (char *)"delete_KinematicMacroFlow", (PyCFunction)_wrap_delete_KinematicMacroFlow, METH_O, (char *)"delete_KinematicMacroFlow(KinematicMacroFlow self)"}, + { (char *)"KinematicMacroFlow_swigregister", KinematicMacroFlow_swigregister, METH_VARARGS, NULL}, + { (char *)"KinematicMacroFlow_swiginit", KinematicMacroFlow_swiginit, METH_VARARGS, NULL}, + { (char *)"JarvisMacroFlow_beta_set", _wrap_JarvisMacroFlow_beta_set, METH_VARARGS, (char *)"JarvisMacroFlow_beta_set(JarvisMacroFlow self, real beta)"}, + { (char *)"JarvisMacroFlow_beta_get", (PyCFunction)_wrap_JarvisMacroFlow_beta_get, METH_O, (char *)"JarvisMacroFlow_beta_get(JarvisMacroFlow self) -> real"}, + { (char *)"JarvisMacroFlow_porefraction_r_set", _wrap_JarvisMacroFlow_porefraction_r_set, METH_VARARGS, (char *)"JarvisMacroFlow_porefraction_r_set(JarvisMacroFlow self, real porefraction_r)"}, + { (char *)"JarvisMacroFlow_porefraction_r_get", (PyCFunction)_wrap_JarvisMacroFlow_porefraction_r_get, METH_O, (char *)"JarvisMacroFlow_porefraction_r_get(JarvisMacroFlow self) -> real"}, + { (char *)"new_JarvisMacroFlow", (PyCFunction) _wrap_new_JarvisMacroFlow, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "new_JarvisMacroFlow(cmf::water::WaterStorage::ptr left, cmf::water::flux_node::ptr right, real beta=1., real porefraction_r=0.0) -> JarvisMacroFlow\n" + "\n" + "JarvisMacroFlow(cmf::water::WaterStorage::ptr left,\n" + "cmf::water::flux_node::ptr right, real beta=1., real\n" + "porefraction_r=0.0)\n" + "\n" + "Constructs the connection.\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "left: right: the connected macropores\n" + "\n" + "beta: User defined parameter for the swelling reaction\n" + "\n" + "porefraction_r: Porefraction at which flow starts. For swelling soils\n" + "that are closing completely th \n" + ""}, + { (char *)"delete_JarvisMacroFlow", (PyCFunction)_wrap_delete_JarvisMacroFlow, METH_O, (char *)"delete_JarvisMacroFlow(JarvisMacroFlow self)"}, + { (char *)"JarvisMacroFlow_swigregister", JarvisMacroFlow_swigregister, METH_VARARGS, NULL}, + { (char *)"JarvisMacroFlow_swiginit", JarvisMacroFlow_swiginit, METH_VARARGS, NULL}, + { (char *)"new_GradientMacroMicroExchange", (PyCFunction) _wrap_new_GradientMacroMicroExchange, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "new_GradientMacroMicroExchange(cmf::upslope::SoilLayer::ptr left, cmf::upslope::MacroPore::ptr right) -> GradientMacroMicroExchange\n" + "\n" + "GradientMacroMicroExchange(cmf::upslope::SoilLayer::ptr left,\n" + "cmf::upslope::MacroPore::ptr right) \n" + ""}, + { (char *)"delete_GradientMacroMicroExchange", (PyCFunction)_wrap_delete_GradientMacroMicroExchange, METH_O, (char *)"delete_GradientMacroMicroExchange(GradientMacroMicroExchange self)"}, + { (char *)"GradientMacroMicroExchange_swigregister", GradientMacroMicroExchange_swigregister, METH_VARARGS, NULL}, + { (char *)"GradientMacroMicroExchange_swiginit", GradientMacroMicroExchange_swiginit, METH_VARARGS, NULL}, + { (char *)"DiffusiveMacroMicroExchange_omega_set", _wrap_DiffusiveMacroMicroExchange_omega_set, METH_VARARGS, (char *)"DiffusiveMacroMicroExchange_omega_set(DiffusiveMacroMicroExchange self, real omega)"}, + { (char *)"DiffusiveMacroMicroExchange_omega_get", (PyCFunction)_wrap_DiffusiveMacroMicroExchange_omega_get, METH_O, (char *)"DiffusiveMacroMicroExchange_omega_get(DiffusiveMacroMicroExchange self) -> real"}, + { (char *)"DiffusiveMacroMicroExchange_pFrmi_set", _wrap_DiffusiveMacroMicroExchange_pFrmi_set, METH_VARARGS, (char *)"DiffusiveMacroMicroExchange_pFrmi_set(DiffusiveMacroMicroExchange self, real pFrmi)"}, + { (char *)"DiffusiveMacroMicroExchange_pFrmi_get", (PyCFunction)_wrap_DiffusiveMacroMicroExchange_pFrmi_get, METH_O, (char *)"DiffusiveMacroMicroExchange_pFrmi_get(DiffusiveMacroMicroExchange self) -> real"}, + { (char *)"new_DiffusiveMacroMicroExchange", (PyCFunction) _wrap_new_DiffusiveMacroMicroExchange, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "new_DiffusiveMacroMicroExchange(cmf::upslope::MacroPore::ptr left, cmf::upslope::SoilLayer::ptr right, real omega, real pFrmi=4.2) -> DiffusiveMacroMicroExchange\n" + "\n" + "DiffusiveMacroMicroExchange(cmf::upslope::MacroPore::ptr left,\n" + "cmf::upslope::SoilLayer::ptr right, real omega, real pFrmi=4.2) \n" + ""}, + { (char *)"delete_DiffusiveMacroMicroExchange", (PyCFunction)_wrap_delete_DiffusiveMacroMicroExchange, METH_O, (char *)"delete_DiffusiveMacroMicroExchange(DiffusiveMacroMicroExchange self)"}, + { (char *)"DiffusiveMacroMicroExchange_swigregister", DiffusiveMacroMicroExchange_swigregister, METH_VARARGS, NULL}, + { (char *)"DiffusiveMacroMicroExchange_swiginit", DiffusiveMacroMicroExchange_swiginit, METH_VARARGS, NULL}, + { (char *)"MACROlikeMacroMicroExchange_Gf_set", _wrap_MACROlikeMacroMicroExchange_Gf_set, METH_VARARGS, (char *)"MACROlikeMacroMicroExchange_Gf_set(MACROlikeMacroMicroExchange self, real Gf)"}, + { (char *)"MACROlikeMacroMicroExchange_Gf_get", (PyCFunction)_wrap_MACROlikeMacroMicroExchange_Gf_get, METH_O, (char *)"MACROlikeMacroMicroExchange_Gf_get(MACROlikeMacroMicroExchange self) -> real"}, + { (char *)"MACROlikeMacroMicroExchange_gamma_w_set", _wrap_MACROlikeMacroMicroExchange_gamma_w_set, METH_VARARGS, (char *)"MACROlikeMacroMicroExchange_gamma_w_set(MACROlikeMacroMicroExchange self, real gamma_w)"}, + { (char *)"MACROlikeMacroMicroExchange_gamma_w_get", (PyCFunction)_wrap_MACROlikeMacroMicroExchange_gamma_w_get, METH_O, (char *)"MACROlikeMacroMicroExchange_gamma_w_get(MACROlikeMacroMicroExchange self) -> real"}, + { (char *)"new_MACROlikeMacroMicroExchange", (PyCFunction) _wrap_new_MACROlikeMacroMicroExchange, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "new_MACROlikeMacroMicroExchange(cmf::upslope::SoilLayer::ptr left, cmf::upslope::MacroPore::ptr right, real _gamma_w=0.4, real _Gf=3) -> MACROlikeMacroMicroExchange\n" + "\n" + "MACROlikeMacroMicroExchange(cmf::upslope::SoilLayer::ptr left,\n" + "cmf::upslope::MacroPore::ptr right, real _gamma_w=0.4, real _Gf=3) \n" + ""}, + { (char *)"delete_MACROlikeMacroMicroExchange", (PyCFunction)_wrap_delete_MACROlikeMacroMicroExchange, METH_O, (char *)"delete_MACROlikeMacroMicroExchange(MACROlikeMacroMicroExchange self)"}, + { (char *)"MACROlikeMacroMicroExchange_swigregister", MACROlikeMacroMicroExchange_swigregister, METH_VARARGS, NULL}, + { (char *)"MACROlikeMacroMicroExchange_swiginit", MACROlikeMacroMicroExchange_swiginit, METH_VARARGS, NULL}, + { (char *)"IVolumeHeightFunction_h", (PyCFunction) _wrap_IVolumeHeightFunction_h, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "IVolumeHeightFunction_h(IVolumeHeightFunction self, double V) -> double\n" + "\n" + "virtual\n" + "double h(double V) const =0\n" + "\n" + "Returns the depth of a given volume. \n" + ""}, + { (char *)"IVolumeHeightFunction_A", (PyCFunction) _wrap_IVolumeHeightFunction_A, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "IVolumeHeightFunction_A(IVolumeHeightFunction self, double V) -> double\n" + "\n" + "virtual\n" + "double A(double V) const =0\n" + "\n" + "Returns the area of the surface for a given volume. \n" + ""}, + { (char *)"IVolumeHeightFunction_V", (PyCFunction) _wrap_IVolumeHeightFunction_V, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "IVolumeHeightFunction_V(IVolumeHeightFunction self, double h) -> double\n" + "\n" + "virtual\n" + "double V(double h) const =0 \n" + ""}, + { (char *)"IVolumeHeightFunction_copy", (PyCFunction)_wrap_IVolumeHeightFunction_copy, METH_O, (char *)"\n" + "IVolumeHeightFunction_copy(IVolumeHeightFunction self) -> IVolumeHeightFunction\n" + "\n" + "virtual IVolumeHeightFunction* copy() const =0 \n" + ""}, + { (char *)"IVolumeHeightFunction_q", (PyCFunction) _wrap_IVolumeHeightFunction_q, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "IVolumeHeightFunction_q(IVolumeHeightFunction self, double h, double slope) -> double\n" + "\n" + "virtual\n" + "double q(double h, double slope) const \n" + ""}, + { (char *)"delete_IVolumeHeightFunction", (PyCFunction)_wrap_delete_IVolumeHeightFunction, METH_O, (char *)"\n" + "delete_IVolumeHeightFunction(IVolumeHeightFunction self)\n" + "\n" + "virtual\n" + "~IVolumeHeightFunction() \n" + ""}, + { (char *)"IVolumeHeightFunction_swigregister", IVolumeHeightFunction_swigregister, METH_VARARGS, NULL}, + { (char *)"Prism_Area_set", _wrap_Prism_Area_set, METH_VARARGS, (char *)"Prism_Area_set(Prism self, double Area)"}, + { (char *)"Prism_Area_get", (PyCFunction)_wrap_Prism_Area_get, METH_O, (char *)"Prism_Area_get(Prism self) -> double"}, + { (char *)"Prism_RoughThickness_set", _wrap_Prism_RoughThickness_set, METH_VARARGS, (char *)"Prism_RoughThickness_set(Prism self, double RoughThickness)"}, + { (char *)"Prism_RoughThickness_get", (PyCFunction)_wrap_Prism_RoughThickness_get, METH_O, (char *)"Prism_RoughThickness_get(Prism self) -> double"}, + { (char *)"new_Prism", (PyCFunction) _wrap_new_Prism, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "new_Prism(double base_area, double thickness_of_rough_ground=0.01) -> Prism\n" + "\n" + "Prism(double\n" + "base_area, double thickness_of_rough_ground=0.01) \n" + ""}, + { (char *)"Prism_copy", (PyCFunction)_wrap_Prism_copy, METH_O, (char *)"\n" + "Prism_copy(Prism self) -> Prism\n" + "\n" + "Prism* copy() const\n" + "\n" + ""}, + { (char *)"delete_Prism", (PyCFunction)_wrap_delete_Prism, METH_O, (char *)"\n" + "delete_Prism(Prism self)\n" + "\n" + "~Prism() \n" + ""}, + { (char *)"Prism_swigregister", Prism_swigregister, METH_VARARGS, NULL}, + { (char *)"Prism_swiginit", Prism_swiginit, METH_VARARGS, NULL}, + { (char *)"new_volume_height_function", _wrap_new_volume_height_function, METH_VARARGS, (char *)"\n" + "volume_height_function(volume_height_function for_copy)\n" + "new_volume_height_function(IVolumeHeightFunction for_copy) -> volume_height_function\n" + "\n" + "volume_height_function(const IVolumeHeightFunction &for_copy)\n" + "\n" + "Wrapper for any IVolumeHeightFunction. \n" + ""}, + { (char *)"volume_height_function_copy", (PyCFunction)_wrap_volume_height_function_copy, METH_O, (char *)"\n" + "volume_height_function_copy(volume_height_function self) -> volume_height_function\n" + "\n" + "volume_height_function* copy() const \n" + ""}, + { (char *)"delete_volume_height_function", (PyCFunction)_wrap_delete_volume_height_function, METH_O, (char *)"\n" + "delete_volume_height_function(volume_height_function self)\n" + "\n" + "virtual\n" + "~volume_height_function() \n" + ""}, + { (char *)"volume_height_function_swigregister", volume_height_function_swigregister, METH_VARARGS, NULL}, + { (char *)"volume_height_function_swiginit", volume_height_function_swiginit, METH_VARARGS, NULL}, + { (char *)"IChannel_get_nManning", (PyCFunction)_wrap_IChannel_get_nManning, METH_O, (char *)"\n" + "IChannel_get_nManning(IChannel self) -> double\n" + "\n" + "virtual\n" + "double get_nManning() const =0 \n" + ""}, + { (char *)"IChannel_set_nManning", (PyCFunction) _wrap_IChannel_set_nManning, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "IChannel_set_nManning(IChannel self, double val)\n" + "\n" + "virtual\n" + "void set_nManning(double val)=0 \n" + ""}, + { (char *)"IChannel_get_length", (PyCFunction)_wrap_IChannel_get_length, METH_O, (char *)"\n" + "IChannel_get_length(IChannel self) -> double\n" + "\n" + "virtual\n" + "double get_length() const =0\n" + "\n" + "Length of the reach. \n" + ""}, + { (char *)"IChannel_typecode", (PyCFunction)_wrap_IChannel_typecode, METH_O, (char *)"\n" + "IChannel_typecode(IChannel self) -> char\n" + "\n" + "virtual char\n" + "typecode() const =0 \n" + ""}, + { (char *)"IChannel_get_channel_width", (PyCFunction) _wrap_IChannel_get_channel_width, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "IChannel_get_channel_width(IChannel self, double depth) -> double\n" + "\n" + "virtual double get_channel_width(double depth) const =0\n" + "\n" + "Calculates the flow width from a given actual depth [m] using the\n" + "actual IChannel geometry. \n" + ""}, + { (char *)"IChannel_get_wetted_perimeter", (PyCFunction) _wrap_IChannel_get_wetted_perimeter, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "IChannel_get_wetted_perimeter(IChannel self, double depth) -> double\n" + "\n" + "virtual double get_wetted_perimeter(double depth) const =0\n" + "\n" + "Calculates the wetted perimeter from a given actual depth [m] using\n" + "the actual IChannel geometry. \n" + ""}, + { (char *)"IChannel_get_depth", (PyCFunction) _wrap_IChannel_get_depth, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "IChannel_get_depth(IChannel self, double area) -> double\n" + "\n" + "virtual\n" + "double get_depth(double area) const =0\n" + "\n" + "Calculates the actual depth of the reach using the IChannel geometry.\n" + "\n" + "get_depth of the reach [m]\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "area: Wetted area of a river cross section [m2], can be obtained by\n" + "V/l, where V is the stored volume and l is the reach length \n" + ""}, + { (char *)"IChannel_get_flux_crossection", (PyCFunction) _wrap_IChannel_get_flux_crossection, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "IChannel_get_flux_crossection(IChannel self, double depth) -> double\n" + "\n" + "virtual double get_flux_crossection(double depth) const =0\n" + "\n" + "Calculates the wetted area from a given depth using the IChannel\n" + "geometry.\n" + "\n" + "In most cases use get_flux_crossection=V/l, where V is the stored\n" + "volume and l is the reach length Wetted area of a river cross section\n" + "[m2]\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "depth: depth of the reach [m] \n" + ""}, + { (char *)"IChannel_copy", (PyCFunction)_wrap_IChannel_copy, METH_O, (char *)"\n" + "IChannel_copy(IChannel self) -> IChannel\n" + "\n" + "virtual IChannel*\n" + "copy() const =0 \n" + ""}, + { (char *)"IChannel_qManning", (PyCFunction) _wrap_IChannel_qManning, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "IChannel_qManning(IChannel self, double A, double slope) -> double\n" + "\n" + "virtual double\n" + "qManning(double A, double slope) const\n" + "\n" + "Calculates the flow rate from a given water volume in the reach\n" + "\n" + "\n" + ".. math::\n" + "\n" + " q_{Manning}&=& A R^{\\\\frac 2 3}\n" + " \\\\sqrt{\\\\frac {\\\\Delta_z} n} \\\\\\\\ A &=& \\\\frac V l\n" + " \\\\mbox{, (Crosssectional area of the wetted crossection, Volume per\n" + " length)} \\\\\\\\ R &=& \\\\frac A {P(d)} \\\\\\\\ P(d) &=& \\\\mbox{\n" + " the perimeter of the wetted crosssection, a function of reach depth}\n" + " \\\\\\\\ d(V) &=& \\\\mbox{ the depth of the reach a function of the\n" + " volume} \\\\\\\\ \\\\Delta_z &=& \\\\frac{z_{max} - z_{min}}{l}\n" + " \\\\mbox{ Slope of the reach} \n" + "\n" + ".\n" + "\n" + "Flow rate [m3/s]\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "A: The area of the cross section [m2]\n" + "\n" + "slope: The slope of the reach [m/m] \n" + ""}, + { (char *)"delete_IChannel", (PyCFunction)_wrap_delete_IChannel, METH_O, (char *)"\n" + "delete_IChannel(IChannel self)\n" + "\n" + "virtual\n" + "~IChannel() \n" + ""}, + { (char *)"IChannel_swigregister", IChannel_swigregister, METH_VARARGS, NULL}, + { (char *)"SWATReachType_BottomWidth_set", _wrap_SWATReachType_BottomWidth_set, METH_VARARGS, (char *)"SWATReachType_BottomWidth_set(SWATReachType self, double BottomWidth)"}, + { (char *)"SWATReachType_BottomWidth_get", (PyCFunction)_wrap_SWATReachType_BottomWidth_get, METH_O, (char *)"SWATReachType_BottomWidth_get(SWATReachType self) -> double"}, + { (char *)"SWATReachType_ChannelDepth_set", _wrap_SWATReachType_ChannelDepth_set, METH_VARARGS, (char *)"SWATReachType_ChannelDepth_set(SWATReachType self, double ChannelDepth)"}, + { (char *)"SWATReachType_ChannelDepth_get", (PyCFunction)_wrap_SWATReachType_ChannelDepth_get, METH_O, (char *)"SWATReachType_ChannelDepth_get(SWATReachType self) -> double"}, + { (char *)"SWATReachType_BankSlope_set", _wrap_SWATReachType_BankSlope_set, METH_VARARGS, (char *)"SWATReachType_BankSlope_set(SWATReachType self, double BankSlope)"}, + { (char *)"SWATReachType_BankSlope_get", (PyCFunction)_wrap_SWATReachType_BankSlope_get, METH_O, (char *)"SWATReachType_BankSlope_get(SWATReachType self) -> double"}, + { (char *)"SWATReachType_FloodPlainSlope_set", _wrap_SWATReachType_FloodPlainSlope_set, METH_VARARGS, (char *)"SWATReachType_FloodPlainSlope_set(SWATReachType self, double FloodPlainSlope)"}, + { (char *)"SWATReachType_FloodPlainSlope_get", (PyCFunction)_wrap_SWATReachType_FloodPlainSlope_get, METH_O, (char *)"SWATReachType_FloodPlainSlope_get(SWATReachType self) -> double"}, + { (char *)"new_SWATReachType", _wrap_new_SWATReachType, METH_VARARGS, (char *)"\n" + "SWATReachType(SWATReachType copy)\n" + "SWATReachType(double l)\n" + "new_SWATReachType(double l, double BankWidth, double Depth) -> SWATReachType\n" + "\n" + "SWATReachType(double l, double BankWidth, double Depth)\n" + "\n" + "Creates a new reach structure from a give width and depth.\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "l: length of the channel [m]\n" + "\n" + "BankWidth: get_channel_width of the reach from bank to bank [m]\n" + "\n" + "Depth: Depth of the reach [m] \n" + ""}, + { (char *)"SWATReachType_copy", (PyCFunction)_wrap_SWATReachType_copy, METH_O, (char *)"\n" + "SWATReachType_copy(SWATReachType self) -> SWATReachType\n" + "\n" + "SWATReachType* copy() const \n" + ""}, + { (char *)"delete_SWATReachType", (PyCFunction)_wrap_delete_SWATReachType, METH_O, (char *)"\n" + "delete_SWATReachType(SWATReachType self)\n" + "\n" + "virtual ~SWATReachType() \n" + ""}, + { (char *)"SWATReachType_swigregister", SWATReachType_swigregister, METH_VARARGS, NULL}, + { (char *)"SWATReachType_swiginit", SWATReachType_swiginit, METH_VARARGS, NULL}, + { (char *)"TriangularReach_BankSlope_set", _wrap_TriangularReach_BankSlope_set, METH_VARARGS, (char *)"TriangularReach_BankSlope_set(TriangularReach self, double BankSlope)"}, + { (char *)"TriangularReach_BankSlope_get", (PyCFunction)_wrap_TriangularReach_BankSlope_get, METH_O, (char *)"TriangularReach_BankSlope_get(TriangularReach self) -> double"}, + { (char *)"new_TriangularReach", _wrap_new_TriangularReach, METH_VARARGS, (char *)"\n" + "TriangularReach(double l, double bankSlope=2)\n" + "new_TriangularReach(TriangularReach copy) -> TriangularReach\n" + "\n" + "TriangularReach(const TriangularReach ©) \n" + ""}, + { (char *)"TriangularReach_copy", (PyCFunction)_wrap_TriangularReach_copy, METH_O, (char *)"\n" + "TriangularReach_copy(TriangularReach self) -> TriangularReach\n" + "\n" + "TriangularReach* copy() const \n" + ""}, + { (char *)"delete_TriangularReach", (PyCFunction)_wrap_delete_TriangularReach, METH_O, (char *)"\n" + "delete_TriangularReach(TriangularReach self)\n" + "\n" + "virtual ~TriangularReach() \n" + ""}, + { (char *)"TriangularReach_swigregister", TriangularReach_swigregister, METH_VARARGS, NULL}, + { (char *)"TriangularReach_swiginit", TriangularReach_swiginit, METH_VARARGS, NULL}, + { (char *)"new_RectangularReach", _wrap_new_RectangularReach, METH_VARARGS, (char *)"\n" + "RectangularReach(double l, double width)\n" + "new_RectangularReach(RectangularReach copy) -> RectangularReach\n" + "\n" + "RectangularReach(const RectangularReach ©) \n" + ""}, + { (char *)"RectangularReach_copy", (PyCFunction)_wrap_RectangularReach_copy, METH_O, (char *)"\n" + "RectangularReach_copy(RectangularReach self) -> RectangularReach\n" + "\n" + "RectangularReach* copy() const \n" + ""}, + { (char *)"delete_RectangularReach", (PyCFunction)_wrap_delete_RectangularReach, METH_O, (char *)"\n" + "delete_RectangularReach(RectangularReach self)\n" + "\n" + "virtual ~RectangularReach() \n" + ""}, + { (char *)"RectangularReach_swigregister", RectangularReach_swigregister, METH_VARARGS, NULL}, + { (char *)"RectangularReach_swiginit", RectangularReach_swiginit, METH_VARARGS, NULL}, + { (char *)"PipeReach_radius_set", _wrap_PipeReach_radius_set, METH_VARARGS, (char *)"PipeReach_radius_set(PipeReach self, double radius)"}, + { (char *)"PipeReach_radius_get", (PyCFunction)_wrap_PipeReach_radius_get, METH_O, (char *)"PipeReach_radius_get(PipeReach self) -> double"}, + { (char *)"new_PipeReach", _wrap_new_PipeReach, METH_VARARGS, (char *)"\n" + "PipeReach(double l, double diameter)\n" + "new_PipeReach(PipeReach copy) -> PipeReach\n" + "\n" + "PipeReach(const PipeReach ©) \n" + ""}, + { (char *)"PipeReach_copy", (PyCFunction)_wrap_PipeReach_copy, METH_O, (char *)"\n" + "PipeReach_copy(PipeReach self) -> PipeReach\n" + "\n" + "PipeReach* copy()\n" + "const \n" + ""}, + { (char *)"delete_PipeReach", (PyCFunction)_wrap_delete_PipeReach, METH_O, (char *)"\n" + "delete_PipeReach(PipeReach self)\n" + "\n" + "virtual\n" + "~PipeReach() \n" + ""}, + { (char *)"PipeReach_swigregister", PipeReach_swigregister, METH_VARARGS, NULL}, + { (char *)"PipeReach_swiginit", PipeReach_swiginit, METH_VARARGS, NULL}, + { (char *)"new_Channel", _wrap_new_Channel, METH_VARARGS, (char *)"\n" + "Channel()\n" + "Channel(double length)\n" + "Channel(IChannel for_wrapping)\n" + "Channel(IVolumeHeightFunction for_casting)\n" + "Channel(Channel for_copy)\n" + "new_Channel(char typecode, double length, double width=1., double depth=0.25) -> Channel\n" + "\n" + "Channel(char\n" + "typecode, double length, double width=1., double depth=0.25)\n" + "\n" + "Creates a reachtype using a short cut character.\n" + "\n" + "Acceptes one of the following characters: 'T' TriangularReach, width\n" + "and depth are ignored.\n" + "\n" + "'R' RectangularReach, depth is ignored\n" + "\n" + "'P' PipeReach, depth is ignored, width is the diameter of the pipe\n" + "\n" + "'S' SWATReachType, a trapezoid flow cross section, as used in the SWAT\n" + "model, width (bank width) and depth are used the reach type\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "typecode: Describes the geometry of the reach cross section.\n" + "\n" + "length: The length of the channel in m\n" + "\n" + "width: width of the reach cross section in m (ignored for typecode\n" + "'T')\n" + "\n" + "depth: depth of the reach (ignored for typecode 'T','R','P','S') \n" + ""}, + { (char *)"Channel_copy", (PyCFunction)_wrap_Channel_copy, METH_O, (char *)"\n" + "Channel_copy(Channel self) -> Channel\n" + "\n" + "Channel* copy()\n" + "const \n" + ""}, + { (char *)"delete_Channel", (PyCFunction)_wrap_delete_Channel, METH_O, (char *)"\n" + "delete_Channel(Channel self)\n" + "\n" + "virtual\n" + "~Channel() \n" + ""}, + { (char *)"Channel_swigregister", Channel_swigregister, METH_VARARGS, NULL}, + { (char *)"Channel_swiginit", Channel_swiginit, METH_VARARGS, NULL}, + { (char *)"new_MeanChannel", _wrap_new_MeanChannel, METH_VARARGS, (char *)"\n" + "MeanChannel(IChannel channel1, IChannel channel2)\n" + "new_MeanChannel(MeanChannel meanChannel) -> MeanChannel\n" + "\n" + "MeanChannel(const MeanChannel &meanChannel) \n" + ""}, + { (char *)"MeanChannel_copy", (PyCFunction)_wrap_MeanChannel_copy, METH_O, (char *)"\n" + "MeanChannel_copy(MeanChannel self) -> MeanChannel\n" + "\n" + "MeanChannel*\n" + "copy() const \n" + ""}, + { (char *)"delete_MeanChannel", (PyCFunction)_wrap_delete_MeanChannel, METH_O, (char *)"\n" + "delete_MeanChannel(MeanChannel self)\n" + "\n" + "virtual\n" + "~MeanChannel() \n" + ""}, + { (char *)"MeanChannel_swigregister", MeanChannel_swigregister, METH_VARARGS, NULL}, + { (char *)"MeanChannel_swiginit", MeanChannel_swiginit, METH_VARARGS, NULL}, + { (char *)"OpenWaterStorage_get_height_function", (PyCFunction)_wrap_OpenWaterStorage_get_height_function, METH_O, (char *)"\n" + "OpenWaterStorage_get_height_function(OpenWaterStorage self) -> IVolumeHeightFunction\n" + "\n" + "virtual const\n" + "IVolumeHeightFunction& get_height_function() const\n" + "\n" + "The functional relation between volume, depth and exposed area. \n" + ""}, + { (char *)"OpenWaterStorage_set_height_function", (PyCFunction) _wrap_OpenWaterStorage_set_height_function, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "OpenWaterStorage_set_height_function(OpenWaterStorage self, IVolumeHeightFunction val)\n" + "\n" + "virtual void\n" + "set_height_function(const IVolumeHeightFunction &val) \n" + ""}, + { (char *)"OpenWaterStorage_wet_area", (PyCFunction)_wrap_OpenWaterStorage_wet_area, METH_O, (char *)"\n" + "OpenWaterStorage_wet_area(OpenWaterStorage self) -> real\n" + "\n" + "real\n" + "wet_area() const\n" + "\n" + "Returns the exposed surface area in m2. \n" + ""}, + { (char *)"OpenWaterStorage_create", _wrap_OpenWaterStorage_create, METH_VARARGS, (char *)"\n" + "create(project _project, real Area) -> cmf::river::OpenWaterStorage::ptr\n" + "OpenWaterStorage_create(project _project, IVolumeHeightFunction base_geo) -> cmf::river::OpenWaterStorage::ptr\n" + ""}, + { (char *)"OpenWaterStorage_cast", (PyCFunction) _wrap_OpenWaterStorage_cast, METH_VARARGS | METH_KEYWORDS, (char *)"OpenWaterStorage_cast(cmf::water::flux_node::ptr node) -> cmf::river::OpenWaterStorage::ptr"}, + { (char *)"OpenWaterStorage_depth_set", _wrap_OpenWaterStorage_depth_set, METH_VARARGS, (char *)"OpenWaterStorage_depth_set(OpenWaterStorage self, real depth)"}, + { (char *)"OpenWaterStorage_depth_get", (PyCFunction)_wrap_OpenWaterStorage_depth_get, METH_O, (char *)"OpenWaterStorage_depth_get(OpenWaterStorage self) -> real"}, + { (char *)"delete_OpenWaterStorage", (PyCFunction)_wrap_delete_OpenWaterStorage, METH_O, (char *)"delete_OpenWaterStorage(OpenWaterStorage self)"}, + { (char *)"OpenWaterStorage_swigregister", OpenWaterStorage_swigregister, METH_VARARGS, NULL}, + { (char *)"Reach_get_reachtype", (PyCFunction)_wrap_Reach_get_reachtype, METH_O, (char *)"\n" + "Reach_get_reachtype(Reach self) -> Channel\n" + "\n" + "Channel\n" + "get_reachtype() const\n" + "\n" + "Returns the channel shape. \n" + ""}, + { (char *)"Reach_set_height_function", (PyCFunction) _wrap_Reach_set_height_function, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "Reach_set_height_function(Reach self, IChannel val)\n" + "\n" + "void\n" + "set_height_function(const IChannel &val)\n" + "\n" + "Sets the channel shape. \n" + ""}, + { (char *)"Reach_set_outlet", (PyCFunction) _wrap_Reach_set_outlet, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "Reach_set_outlet(Reach self, cmf::water::flux_node::ptr outlet)\n" + "\n" + "void\n" + "set_outlet(cmf::water::flux_node::ptr outlet)\n" + "\n" + "Connects the reach to an outlet, e.g. a boundary condition. \n" + ""}, + { (char *)"Reach_set_dead_end", (PyCFunction)_wrap_Reach_set_dead_end, METH_O, (char *)"\n" + "Reach_set_dead_end(Reach self)\n" + "\n" + "void\n" + "set_dead_end()\n" + "\n" + "Deletes any downstream connection. \n" + ""}, + { (char *)"Reach_set_downstream", (PyCFunction) _wrap_Reach_set_downstream, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "Reach_set_downstream(Reach self, cmf::river::Reach::ptr new_downstream, bool use_meanchannel=False)\n" + "\n" + "void\n" + "set_downstream(ptr new_downstream, bool use_meanchannel=false)\n" + "\n" + "Connects the reach to another one downstream. \n" + ""}, + { (char *)"Reach___get_downstream", (PyCFunction)_wrap_Reach___get_downstream, METH_O, (char *)"\n" + "Reach___get_downstream(Reach self) -> cmf::water::flux_node::ptr\n" + "\n" + "cmf::water::flux_node::ptr get_downstream() const\n" + "\n" + "Returns the reach downstream of this (or null if there is no reach\n" + "downstream) \n" + ""}, + { (char *)"Reach_get_upstream", (PyCFunction) _wrap_Reach_get_upstream, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "Reach_get_upstream(Reach self, int index) -> cmf::river::Reach::ptr\n" + "\n" + "ptr\n" + "get_upstream(int index) const\n" + "\n" + "Returns a reach upstream of this. \n" + ""}, + { (char *)"Reach_connect_to_surfacewater", (PyCFunction) _wrap_Reach_connect_to_surfacewater, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "Reach_connect_to_surfacewater(Reach self, Cell cell, real width, bool diffusive)\n" + "\n" + "void connect_to_surfacewater(cmf::upslope::Cell *cell, real width,\n" + "bool diffusive)\n" + "\n" + "Connects the surfacewater of a cell with this reach.\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "cell: The cell with the surface water to be connected with this reach\n" + "\n" + "width: The flow width from cell to this reach\n" + "\n" + "diffusive: If diffusive is false, a ManningKinematic connection is\n" + "used, else a ManningDiffusive connection \n" + ""}, + { (char *)"Reach_distance_to_cell", (PyCFunction) _wrap_Reach_distance_to_cell, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "Reach_distance_to_cell(Reach self, Cell cell) -> double\n" + "\n" + "double\n" + "distance_to_cell(cmf::upslope::Cell *cell) const\n" + "\n" + "Returns the distance (d) for connections between this reach and a\n" + "cell.\n" + "\n" + "If the effective inner cell distance (defined as :math:`R_{Cell} = 0.5\\\\frac{\\\\sqrt{A}}{\\\\pi}`) is smaller than the distance\n" + "between the center points, the cell radius is returned \n" + ""}, + { (char *)"Reach___get_root", (PyCFunction)_wrap_Reach___get_root, METH_O, (char *)"\n" + "Reach___get_root(Reach self) -> cmf::river::Reach::ptr\n" + "\n" + "ptr get_root()\n" + "\n" + "Returns the reach most downstream from this reach. \n" + ""}, + { (char *)"delete_Reach", (PyCFunction)_wrap_delete_Reach, METH_O, (char *)"\n" + "delete_Reach(Reach self)\n" + "\n" + "virtual ~Reach() \n" + ""}, + { (char *)"Reach_create", (PyCFunction) _wrap_Reach_create, METH_VARARGS | METH_KEYWORDS, (char *)"Reach_create(project project, IChannel shape, bool diffusive=False) -> cmf::river::Reach::ptr"}, + { (char *)"Reach_length_get", (PyCFunction)_wrap_Reach_length_get, METH_O, (char *)"Reach_length_get(Reach self) -> real"}, + { (char *)"Reach_width_get", (PyCFunction)_wrap_Reach_width_get, METH_O, (char *)"Reach_width_get(Reach self) -> real"}, + { (char *)"Reach_channel_get", (PyCFunction)_wrap_Reach_channel_get, METH_O, (char *)"Reach_channel_get(Reach self) -> IChannel"}, + { (char *)"Reach_upstream_count_get", (PyCFunction)_wrap_Reach_upstream_count_get, METH_O, (char *)"\n" + "Reach_upstream_count_get(Reach self) -> int\n" + "\n" + "int\n" + "upstream_count() const\n" + "\n" + "Returns the number of reaches upstream of this. \n" + ""}, + { (char *)"Reach_diffusive_set", _wrap_Reach_diffusive_set, METH_VARARGS, (char *)"Reach_diffusive_set(Reach self, bool diffusive)"}, + { (char *)"Reach_diffusive_get", (PyCFunction)_wrap_Reach_diffusive_get, METH_O, (char *)"Reach_diffusive_get(Reach self) -> bool"}, + { (char *)"Reach_swigregister", Reach_swigregister, METH_VARARGS, NULL}, + { (char *)"ReachIterator_next", (PyCFunction)_wrap_ReachIterator_next, METH_O, (char *)"\n" + "ReachIterator_next(ReachIterator self) -> cmf::river::Reach::ptr\n" + "\n" + "Reach::ptr\n" + "next()\n" + "\n" + "Returns the next reach in the upstream queue. \n" + ""}, + { (char *)"ReachIterator_valid", (PyCFunction)_wrap_ReachIterator_valid, METH_O, (char *)"\n" + "ReachIterator_valid(ReachIterator self) -> bool\n" + "\n" + "bool valid()\n" + "const\n" + "\n" + "Returns true, if reaches are left to iterate over. \n" + ""}, + { (char *)"new_ReachIterator", (PyCFunction) _wrap_new_ReachIterator, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "new_ReachIterator(cmf::river::Reach::ptr first) -> ReachIterator\n" + "\n" + "ReachIterator(Reach::ptr first)\n" + "\n" + "Creates a ReachIterator from a first reach. \n" + ""}, + { (char *)"ReachIterator___reach", (PyCFunction)_wrap_ReachIterator___reach, METH_O, (char *)"\n" + "ReachIterator___reach(ReachIterator self) -> cmf::river::Reach::ptr\n" + "\n" + "Reach::ptr\n" + "reach() const\n" + "\n" + "Returns the current reach. \n" + ""}, + { (char *)"ReachIterator_position_get", (PyCFunction)_wrap_ReachIterator_position_get, METH_O, (char *)"\n" + "ReachIterator_position_get(ReachIterator self) -> double\n" + "\n" + "double\n" + "position() const\n" + "\n" + "Returns the distance to the root reach. \n" + ""}, + { (char *)"delete_ReachIterator", (PyCFunction)_wrap_delete_ReachIterator, METH_O, (char *)"delete_ReachIterator(ReachIterator self)"}, + { (char *)"ReachIterator_swigregister", ReachIterator_swigregister, METH_VARARGS, NULL}, + { (char *)"ReachIterator_swiginit", ReachIterator_swiginit, METH_VARARGS, NULL}, + { (char *)"make_river_gap", (PyCFunction) _wrap_make_river_gap, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "make_river_gap(cmf::river::Reach::ptr root_reach) -> double\n" + "\n" + "double\n" + "cmf::river::make_river_gap(Reach::ptr root_reach)\n" + "\n" + "Ensures that rivers have a monotone downward flow direction.\n" + "\n" + "Reaches with a bottom higher than any upstream reach are lowered to\n" + "the minimum height of any (possibly distant) upstream reach. \n" + ""}, + { (char *)"SurfaceWater_get_height_function", (PyCFunction)_wrap_SurfaceWater_get_height_function, METH_O, (char *)"\n" + "SurfaceWater_get_height_function(SurfaceWater self) -> Prism\n" + "\n" + "virtual const cmf::river::Prism& get_height_function() const\n" + "\n" + "Gets the height function (a cmf::river::Prism) for further reference.\n" + "\n" + ""}, + { (char *)"SurfaceWater_get_cell", (PyCFunction)_wrap_SurfaceWater_get_cell, METH_O, (char *)"\n" + "SurfaceWater_get_cell(SurfaceWater self) -> Cell\n" + "\n" + "Cell&\n" + "get_cell() const\n" + "\n" + "Get the cell of the surface. \n" + ""}, + { (char *)"SurfaceWater_cast", (PyCFunction) _wrap_SurfaceWater_cast, METH_VARARGS | METH_KEYWORDS, (char *)"SurfaceWater_cast(cmf::water::flux_node::ptr node) -> cmf::upslope::SurfaceWater::ptr"}, + { (char *)"SurfaceWater_puddledepth_set", _wrap_SurfaceWater_puddledepth_set, METH_VARARGS, (char *)"SurfaceWater_puddledepth_set(SurfaceWater self, real puddledepth)"}, + { (char *)"SurfaceWater_puddledepth_get", (PyCFunction)_wrap_SurfaceWater_puddledepth_get, METH_O, (char *)"SurfaceWater_puddledepth_get(SurfaceWater self) -> real"}, + { (char *)"SurfaceWater_nManning_set", _wrap_SurfaceWater_nManning_set, METH_VARARGS, (char *)"SurfaceWater_nManning_set(SurfaceWater self, real nManning)"}, + { (char *)"SurfaceWater_nManning_get", (PyCFunction)_wrap_SurfaceWater_nManning_get, METH_O, (char *)"SurfaceWater_nManning_get(SurfaceWater self) -> real"}, + { (char *)"delete_SurfaceWater", (PyCFunction)_wrap_delete_SurfaceWater, METH_O, (char *)"delete_SurfaceWater(SurfaceWater self)"}, + { (char *)"SurfaceWater_swigregister", SurfaceWater_swigregister, METH_VARARGS, NULL}, + { (char *)"new_KinematicSurfaceRunoff", (PyCFunction) _wrap_new_KinematicSurfaceRunoff, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "new_KinematicSurfaceRunoff(cmf::upslope::SurfaceWater::ptr left, cmf::water::flux_node::ptr right, real flowwidth, real distance=-1) -> KinematicSurfaceRunoff\n" + "\n" + "KinematicSurfaceRunoff(cmf::upslope::SurfaceWater::ptr left,\n" + "cmf::water::flux_node::ptr right, real flowwidth, real distance=-1)\n" + "\n" + "Creates a KinematicSurfaceRunoff between a SurfaceWater (left) with\n" + "another (right) node.\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "left: A surfacewater storage\n" + "\n" + "right: The target node\n" + "\n" + "flowwidth: the length of the shared boundary between left and right\n" + "in m\n" + "\n" + "distance: the distance between left and right in m. If d<=0m, the\n" + "distance is calculated according to the position of left and right \n" + ""}, + { (char *)"delete_KinematicSurfaceRunoff", (PyCFunction)_wrap_delete_KinematicSurfaceRunoff, METH_O, (char *)"delete_KinematicSurfaceRunoff(KinematicSurfaceRunoff self)"}, + { (char *)"KinematicSurfaceRunoff_swigregister", KinematicSurfaceRunoff_swigregister, METH_VARARGS, NULL}, + { (char *)"KinematicSurfaceRunoff_swiginit", KinematicSurfaceRunoff_swiginit, METH_VARARGS, NULL}, + { (char *)"DiffusiveSurfaceRunoff_set_linear_slope", (PyCFunction) _wrap_DiffusiveSurfaceRunoff_set_linear_slope, METH_VARARGS | METH_KEYWORDS, (char *)"DiffusiveSurfaceRunoff_set_linear_slope(real width)"}, + { (char *)"DiffusiveSurfaceRunoff_get_linear_slope", (PyCFunction)_wrap_DiffusiveSurfaceRunoff_get_linear_slope, METH_NOARGS, (char *)"DiffusiveSurfaceRunoff_get_linear_slope() -> real"}, + { (char *)"new_DiffusiveSurfaceRunoff", (PyCFunction) _wrap_new_DiffusiveSurfaceRunoff, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "new_DiffusiveSurfaceRunoff(cmf::upslope::SurfaceWater::ptr left, cmf::water::flux_node::ptr right, real flowwidth, real distance=-1) -> DiffusiveSurfaceRunoff\n" + "\n" + "DiffusiveSurfaceRunoff(cmf::upslope::SurfaceWater::ptr left,\n" + "cmf::water::flux_node::ptr right, real flowwidth, real distance=-1) \n" + ""}, + { (char *)"delete_DiffusiveSurfaceRunoff", (PyCFunction)_wrap_delete_DiffusiveSurfaceRunoff, METH_O, (char *)"delete_DiffusiveSurfaceRunoff(DiffusiveSurfaceRunoff self)"}, + { (char *)"DiffusiveSurfaceRunoff_swigregister", DiffusiveSurfaceRunoff_swigregister, METH_VARARGS, NULL}, + { (char *)"DiffusiveSurfaceRunoff_swiginit", DiffusiveSurfaceRunoff_swiginit, METH_VARARGS, NULL}, + { (char *)"aquifer_area_set", _wrap_aquifer_area_set, METH_VARARGS, (char *)"aquifer_area_set(aquifer self, real area)"}, + { (char *)"aquifer_area_get", (PyCFunction)_wrap_aquifer_area_get, METH_O, (char *)"aquifer_area_get(aquifer self) -> real"}, + { (char *)"aquifer_thickness_set", _wrap_aquifer_thickness_set, METH_VARARGS, (char *)"aquifer_thickness_set(aquifer self, real thickness)"}, + { (char *)"aquifer_thickness_get", (PyCFunction)_wrap_aquifer_thickness_get, METH_O, (char *)"aquifer_thickness_get(aquifer self) -> real"}, + { (char *)"aquifer_porosity_set", _wrap_aquifer_porosity_set, METH_VARARGS, (char *)"aquifer_porosity_set(aquifer self, real porosity)"}, + { (char *)"aquifer_porosity_get", (PyCFunction)_wrap_aquifer_porosity_get, METH_O, (char *)"aquifer_porosity_get(aquifer self) -> real"}, + { (char *)"aquifer_K_set", _wrap_aquifer_K_set, METH_VARARGS, (char *)"aquifer_K_set(aquifer self, point K)"}, + { (char *)"aquifer_K_get", (PyCFunction)_wrap_aquifer_K_get, METH_O, (char *)"aquifer_K_get(aquifer self) -> point"}, + { (char *)"aquifer_get_K", (PyCFunction) _wrap_aquifer_get_K, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "aquifer_get_K(aquifer self, point direction) -> real\n" + "\n" + "virtual real\n" + "get_K(cmf::geometry::point direction) const\n" + "\n" + "Returns the conductivity in m/day for a specific direction.\n" + "\n" + "Takes account for anisotropy \n" + "\n" + ".. math::\n" + "\n" + " \\\\|K\\\\|(d) =\n" + " \\\\frac{d}{\\\\|d\\\\|} \\\\bullet K\n" + "\n" + "\n" + ""}, + { (char *)"aquifer_get_abs_errtol", (PyCFunction) _wrap_aquifer_get_abs_errtol, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "aquifer_get_abs_errtol(aquifer self, real rel_errtol) -> real\n" + "\n" + "virtual\n" + "real get_abs_errtol(real rel_errtol) const \n" + ""}, + { (char *)"new_aquifer", _wrap_new_aquifer, METH_VARARGS, (char *)"\n" + "aquifer(project p, point position, real area, real thickness, real porosity, real K=1e-4)\n" + "new_aquifer(cell_vector cells, real thickness, real porosity, real K=1e-4) -> aquifer\n" + "\n" + "aquifer(cmf::upslope::cell_vector &cells, real thickness, real\n" + "porosity, real K=1e-4)\n" + "\n" + "Creates an aquifer below a collection of cells.\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "cells: The cells above the aquifer. The area of the aquifer equals\n" + "the area of the cells, and the upper boundary equals the soildepth of\n" + "the lowest cell\n" + "\n" + "thickness: The thickness of the aquifer in m\n" + "\n" + "porosity: Porosity of the aquifer\n" + "\n" + "K: Conductivity of the aquifer in m/day. If the conductivity should\n" + "be anisotropic, change the x,y and z values of the member K \n" + ""}, + { (char *)"aquifer_cast", (PyCFunction) _wrap_aquifer_cast, METH_VARARGS | METH_KEYWORDS, (char *)"aquifer_cast(cmf::water::flux_node::ptr for_cast) -> cmf::upslope::aquifer::ptr"}, + { (char *)"aquifer_base_height_get", (PyCFunction)_wrap_aquifer_base_height_get, METH_O, (char *)"aquifer_base_height_get(aquifer self) -> double"}, + { (char *)"aquifer_top_height_get", (PyCFunction)_wrap_aquifer_top_height_get, METH_O, (char *)"aquifer_top_height_get(aquifer self) -> double"}, + { (char *)"delete_aquifer", (PyCFunction)_wrap_delete_aquifer, METH_O, (char *)"delete_aquifer(aquifer self)"}, + { (char *)"aquifer_swigregister", aquifer_swigregister, METH_VARARGS, NULL}, + { (char *)"aquifer_swiginit", aquifer_swiginit, METH_VARARGS, NULL}, + { (char *)"aquifer_Darcy_flux_width_set", _wrap_aquifer_Darcy_flux_width_set, METH_VARARGS, (char *)"aquifer_Darcy_flux_width_set(aquifer_Darcy self, real flux_width)"}, + { (char *)"aquifer_Darcy_flux_width_get", (PyCFunction)_wrap_aquifer_Darcy_flux_width_get, METH_O, (char *)"aquifer_Darcy_flux_width_get(aquifer_Darcy self) -> real"}, + { (char *)"new_aquifer_Darcy", (PyCFunction) _wrap_new_aquifer_Darcy, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "new_aquifer_Darcy(cmf::upslope::aquifer::ptr left, cmf::water::flux_node::ptr right, real width) -> aquifer_Darcy\n" + "\n" + "aquifer_Darcy(aquifer::ptr left, cmf::water::flux_node::ptr right,\n" + "real width)\n" + "\n" + "Creates a new Darcy flow connection between two aquifers, or an\n" + "aquifer and another node acting as Dirichlet boundary condition.\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "left: One aquifer\n" + "\n" + "right: Another aquifer, or a flux node that can be interpreted as an\n" + "Dirichlet boundary\n" + "\n" + "width: Width of the connection \n" + ""}, + { (char *)"delete_aquifer_Darcy", (PyCFunction)_wrap_delete_aquifer_Darcy, METH_O, (char *)"delete_aquifer_Darcy(aquifer_Darcy self)"}, + { (char *)"aquifer_Darcy_swigregister", aquifer_Darcy_swigregister, METH_VARARGS, NULL}, + { (char *)"aquifer_Darcy_swiginit", aquifer_Darcy_swiginit, METH_VARARGS, NULL}, + { (char *)"delete_lateral_sub_surface_flux", (PyCFunction)_wrap_delete_lateral_sub_surface_flux, METH_O, (char *)"delete_lateral_sub_surface_flux(lateral_sub_surface_flux self)"}, + { (char *)"lateral_sub_surface_flux_swigregister", lateral_sub_surface_flux_swigregister, METH_VARARGS, NULL}, + { (char *)"new_Darcy", (PyCFunction) _wrap_new_Darcy, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "new_Darcy(cmf::upslope::SoilLayer::ptr left, cmf::water::flux_node::ptr right, real FlowWidth, real Distance=0) -> Darcy\n" + "\n" + "Darcy(cmf::upslope::SoilLayer::ptr left, cmf::water::flux_node::ptr\n" + "right, real FlowWidth, real Distance=0) \n" + ""}, + { (char *)"delete_Darcy", (PyCFunction)_wrap_delete_Darcy, METH_O, (char *)"delete_Darcy(Darcy self)"}, + { (char *)"Darcy_swigregister", Darcy_swigregister, METH_VARARGS, NULL}, + { (char *)"Darcy_swiginit", Darcy_swiginit, METH_VARARGS, NULL}, + { (char *)"new_TopographicGradientDarcy", (PyCFunction) _wrap_new_TopographicGradientDarcy, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "new_TopographicGradientDarcy(cmf::upslope::SoilLayer::ptr left, cmf::water::flux_node::ptr right, real FlowWidth, real Distance=0) -> TopographicGradientDarcy\n" + "\n" + "TopographicGradientDarcy(cmf::upslope::SoilLayer::ptr left,\n" + "cmf::water::flux_node::ptr right, real FlowWidth, real Distance=0)\n" + "\n" + "Creates the connection.\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "left: Left node of the connection (needs to be soil water storage)\n" + "\n" + "right: Right node of the connection (can be any node)\n" + "\n" + "FlowWidth: the width of the connection - is multiplied by layer\n" + "thickness to get the interface area\n" + "\n" + "Distance: the length of the connection. If 0, the distance is\n" + "calculated from the position of the nodes \n" + ""}, + { (char *)"delete_TopographicGradientDarcy", (PyCFunction)_wrap_delete_TopographicGradientDarcy, METH_O, (char *)"delete_TopographicGradientDarcy(TopographicGradientDarcy self)"}, + { (char *)"TopographicGradientDarcy_swigregister", TopographicGradientDarcy_swigregister, METH_VARARGS, NULL}, + { (char *)"TopographicGradientDarcy_swiginit", TopographicGradientDarcy_swiginit, METH_VARARGS, NULL}, + { (char *)"new_DarcyKinematic", (PyCFunction) _wrap_new_DarcyKinematic, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "new_DarcyKinematic(cmf::upslope::SoilLayer::ptr left, cmf::water::flux_node::ptr right, real FlowWidth, real Distance=0) -> DarcyKinematic\n" + "\n" + "DarcyKinematic(cmf::upslope::SoilLayer::ptr left,\n" + "cmf::water::flux_node::ptr right, real FlowWidth, real Distance=0)\n" + "\n" + "Creates the connection.\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "left: Left node of the connection (needs to be soil water storage)\n" + "\n" + "right: Right node of the connection (can be any node)\n" + "\n" + "FlowWidth: the width of the connection - is multiplied by layer\n" + "thickness to get the interface area\n" + "\n" + "Distance: the length of the connection. If 0, the distance is\n" + "calculated from the position of the nodes \n" + ""}, + { (char *)"delete_DarcyKinematic", (PyCFunction)_wrap_delete_DarcyKinematic, METH_O, (char *)"delete_DarcyKinematic(DarcyKinematic self)"}, + { (char *)"DarcyKinematic_swigregister", DarcyKinematic_swigregister, METH_VARARGS, NULL}, + { (char *)"DarcyKinematic_swiginit", DarcyKinematic_swiginit, METH_VARARGS, NULL}, + { (char *)"Richards_lateral_flow_thickness_set", _wrap_Richards_lateral_flow_thickness_set, METH_VARARGS, (char *)"Richards_lateral_flow_thickness_set(Richards_lateral self, real flow_thickness)"}, + { (char *)"Richards_lateral_flow_thickness_get", (PyCFunction)_wrap_Richards_lateral_flow_thickness_get, METH_O, (char *)"Richards_lateral_flow_thickness_get(Richards_lateral self) -> real"}, + { (char *)"Richards_lateral_wet_right_node_set", _wrap_Richards_lateral_wet_right_node_set, METH_VARARGS, (char *)"Richards_lateral_wet_right_node_set(Richards_lateral self, bool wet_right_node)"}, + { (char *)"Richards_lateral_wet_right_node_get", (PyCFunction)_wrap_Richards_lateral_wet_right_node_get, METH_O, (char *)"Richards_lateral_wet_right_node_get(Richards_lateral self) -> bool"}, + { (char *)"new_Richards_lateral", (PyCFunction) _wrap_new_Richards_lateral, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "new_Richards_lateral(cmf::upslope::SoilLayer::ptr left, cmf::water::flux_node::ptr right, real FlowWidth=0, real Distance=0) -> Richards_lateral\n" + "\n" + "Richards_lateral(cmf::upslope::SoilLayer::ptr left,\n" + "cmf::water::flux_node::ptr right, real FlowWidth=0, real Distance=0)\n" + "\n" + "Creates the connection.\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "left: Left node of the connection (needs to be soil water storage)\n" + "\n" + "right: Right node of the connection (can be any node)\n" + "\n" + "FlowWidth: the width of the connection - is multiplied by layer\n" + "thickness to get the interface area\n" + "\n" + "Distance: the length of the connection. If 0, the distance is\n" + "calculated from the position of the nodes \n" + ""}, + { (char *)"Richards_lateral_usebaseflow", (PyCFunction) _wrap_Richards_lateral_usebaseflow, METH_VARARGS | METH_KEYWORDS, (char *)"Richards_lateral_usebaseflow(bool use)"}, + { (char *)"delete_Richards_lateral", (PyCFunction)_wrap_delete_Richards_lateral, METH_O, (char *)"delete_Richards_lateral(Richards_lateral self)"}, + { (char *)"Richards_lateral_swigregister", Richards_lateral_swigregister, METH_VARARGS, NULL}, + { (char *)"Richards_lateral_swiginit", Richards_lateral_swiginit, METH_VARARGS, NULL}, + { (char *)"TOPModelFlow_flow_width_set", _wrap_TOPModelFlow_flow_width_set, METH_VARARGS, (char *)"TOPModelFlow_flow_width_set(TOPModelFlow self, real flow_width)"}, + { (char *)"TOPModelFlow_flow_width_get", (PyCFunction)_wrap_TOPModelFlow_flow_width_get, METH_O, (char *)"TOPModelFlow_flow_width_get(TOPModelFlow self) -> real"}, + { (char *)"TOPModelFlow_distance_set", _wrap_TOPModelFlow_distance_set, METH_VARARGS, (char *)"TOPModelFlow_distance_set(TOPModelFlow self, real distance)"}, + { (char *)"TOPModelFlow_distance_get", (PyCFunction)_wrap_TOPModelFlow_distance_get, METH_O, (char *)"TOPModelFlow_distance_get(TOPModelFlow self) -> real"}, + { (char *)"TOPModelFlow_T0_set", _wrap_TOPModelFlow_T0_set, METH_VARARGS, (char *)"TOPModelFlow_T0_set(TOPModelFlow self, real T0)"}, + { (char *)"TOPModelFlow_T0_get", (PyCFunction)_wrap_TOPModelFlow_T0_get, METH_O, (char *)"TOPModelFlow_T0_get(TOPModelFlow self) -> real"}, + { (char *)"TOPModelFlow_m_set", _wrap_TOPModelFlow_m_set, METH_VARARGS, (char *)"TOPModelFlow_m_set(TOPModelFlow self, real m)"}, + { (char *)"TOPModelFlow_m_get", (PyCFunction)_wrap_TOPModelFlow_m_get, METH_O, (char *)"TOPModelFlow_m_get(TOPModelFlow self) -> real"}, + { (char *)"new_TOPModelFlow", (PyCFunction) _wrap_new_TOPModelFlow, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "new_TOPModelFlow(cmf::upslope::SoilLayer::ptr left, cmf::water::flux_node::ptr right, real T0, real m, real flowwidth, real distance=0) -> TOPModelFlow\n" + "\n" + "TOPModelFlow(cmf::upslope::SoilLayer::ptr left,\n" + "cmf::water::flux_node::ptr right, real T0, real m, real flowwidth,\n" + "real distance=0) \n" + ""}, + { (char *)"delete_TOPModelFlow", (PyCFunction)_wrap_delete_TOPModelFlow, METH_O, (char *)"delete_TOPModelFlow(TOPModelFlow self)"}, + { (char *)"TOPModelFlow_swigregister", TOPModelFlow_swigregister, METH_VARARGS, NULL}, + { (char *)"TOPModelFlow_swiginit", TOPModelFlow_swiginit, METH_VARARGS, NULL}, + { (char *)"Manning_is_diffusive_wave_set", _wrap_Manning_is_diffusive_wave_set, METH_VARARGS, (char *)"Manning_is_diffusive_wave_set(Manning self, bool is_diffusive_wave)"}, + { (char *)"Manning_is_diffusive_wave_get", (PyCFunction)_wrap_Manning_is_diffusive_wave_get, METH_O, (char *)"Manning_is_diffusive_wave_get(Manning self) -> bool"}, + { (char *)"Manning_flux_geometry_set", _wrap_Manning_flux_geometry_set, METH_VARARGS, (char *)"Manning_flux_geometry_set(Manning self, volume_height_function flux_geometry)"}, + { (char *)"Manning_flux_geometry_get", (PyCFunction)_wrap_Manning_flux_geometry_get, METH_O, (char *)"Manning_flux_geometry_get(Manning self) -> volume_height_function"}, + { (char *)"delete_Manning", (PyCFunction)_wrap_delete_Manning, METH_O, (char *)"delete_Manning(Manning self)"}, + { (char *)"Manning_swigregister", Manning_swigregister, METH_VARARGS, NULL}, + { (char *)"Manning_Diffusive_linear_slope_width_set", _wrap_Manning_Diffusive_linear_slope_width_set, METH_VARARGS, (char *)"Manning_Diffusive_linear_slope_width_set(Manning_Diffusive self, real linear_slope_width)"}, + { (char *)"Manning_Diffusive_linear_slope_width_get", (PyCFunction)_wrap_Manning_Diffusive_linear_slope_width_get, METH_O, (char *)"Manning_Diffusive_linear_slope_width_get(Manning_Diffusive self) -> real"}, + { (char *)"new_Manning_Diffusive", (PyCFunction) _wrap_new_Manning_Diffusive, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "new_Manning_Diffusive(cmf::river::OpenWaterStorage::ptr left, cmf::water::flux_node::ptr right, IChannel reachtype) -> Manning_Diffusive\n" + "\n" + "Manning_Diffusive(cmf::river::OpenWaterStorage::ptr left,\n" + "cmf::water::flux_node::ptr right, const cmf::river::IChannel\n" + "&reachtype)\n" + "\n" + "Creates a diffusive wave connection between to open water storages.\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "left: right: The nodes to be connected by the diffusive wave. Left\n" + "needs to be an open water storage\n" + "\n" + "reachtype: The channel geometry \n" + ""}, + { (char *)"delete_Manning_Diffusive", (PyCFunction)_wrap_delete_Manning_Diffusive, METH_O, (char *)"delete_Manning_Diffusive(Manning_Diffusive self)"}, + { (char *)"Manning_Diffusive_swigregister", Manning_Diffusive_swigregister, METH_VARARGS, NULL}, + { (char *)"Manning_Diffusive_swiginit", Manning_Diffusive_swiginit, METH_VARARGS, NULL}, + { (char *)"new_Manning_Kinematic", (PyCFunction) _wrap_new_Manning_Kinematic, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "new_Manning_Kinematic(cmf::river::OpenWaterStorage::ptr left, cmf::water::flux_node::ptr right, IChannel reachtype) -> Manning_Kinematic\n" + "\n" + "Manning_Kinematic(cmf::river::OpenWaterStorage::ptr left,\n" + "cmf::water::flux_node::ptr right, const cmf::river::IChannel\n" + "&reachtype)\n" + "\n" + "Creates a kinematic wave connection between to open water storages.\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "left: right: The nodes to be connected by the kinematic wave. Left\n" + "needs to be an open water storage\n" + "\n" + "reachtype: The channel geometry \n" + ""}, + { (char *)"delete_Manning_Kinematic", (PyCFunction)_wrap_delete_Manning_Kinematic, METH_O, (char *)"delete_Manning_Kinematic(Manning_Kinematic self)"}, + { (char *)"Manning_Kinematic_swigregister", Manning_Kinematic_swigregister, METH_VARARGS, NULL}, + { (char *)"Manning_Kinematic_swiginit", Manning_Kinematic_swiginit, METH_VARARGS, NULL}, + { (char *)"new_CanopyOverflow", (PyCFunction) _wrap_new_CanopyOverflow, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "new_CanopyOverflow(cmf::water::WaterStorage::ptr Canopy, cmf::water::flux_node::ptr target, Cell cell) -> CanopyOverflow\n" + "\n" + "CanopyOverflow(cmf::water::WaterStorage::ptr Canopy,\n" + "cmf::water::flux_node::ptr target, cmf::upslope::Cell &cell) \n" + ""}, + { (char *)"CanopyOverflow_use_for_cell", (PyCFunction) _wrap_CanopyOverflow_use_for_cell, METH_VARARGS | METH_KEYWORDS, (char *)"CanopyOverflow_use_for_cell(Cell cell) -> CanopyOverflow"}, + { (char *)"delete_CanopyOverflow", (PyCFunction)_wrap_delete_CanopyOverflow, METH_O, (char *)"delete_CanopyOverflow(CanopyOverflow self)"}, + { (char *)"CanopyOverflow_swigregister", CanopyOverflow_swigregister, METH_VARARGS, NULL}, + { (char *)"CanopyOverflow_swiginit", CanopyOverflow_swiginit, METH_VARARGS, NULL}, + { (char *)"new_RutterInterception", (PyCFunction) _wrap_new_RutterInterception, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "new_RutterInterception(cmf::water::WaterStorage::ptr Canopy, cmf::water::flux_node::ptr target, Cell cell) -> RutterInterception\n" + "\n" + "RutterInterception(cmf::water::WaterStorage::ptr Canopy,\n" + "cmf::water::flux_node::ptr target, cmf::upslope::Cell &cell) \n" + ""}, + { (char *)"RutterInterception_use_for_cell", (PyCFunction) _wrap_RutterInterception_use_for_cell, METH_VARARGS | METH_KEYWORDS, (char *)"RutterInterception_use_for_cell(Cell cell) -> RutterInterception"}, + { (char *)"delete_RutterInterception", (PyCFunction)_wrap_delete_RutterInterception, METH_O, (char *)"delete_RutterInterception(RutterInterception self)"}, + { (char *)"RutterInterception_swigregister", RutterInterception_swigregister, METH_VARARGS, NULL}, + { (char *)"RutterInterception_swiginit", RutterInterception_swiginit, METH_VARARGS, NULL}, + { (char *)"SimpleTindexSnowMelt_SnowMeltRate_set", _wrap_SimpleTindexSnowMelt_SnowMeltRate_set, METH_VARARGS, (char *)"SimpleTindexSnowMelt_SnowMeltRate_set(SimpleTindexSnowMelt self, real SnowMeltRate)"}, + { (char *)"SimpleTindexSnowMelt_SnowMeltRate_get", (PyCFunction)_wrap_SimpleTindexSnowMelt_SnowMeltRate_get, METH_O, (char *)"SimpleTindexSnowMelt_SnowMeltRate_get(SimpleTindexSnowMelt self) -> real"}, + { (char *)"new_SimpleTindexSnowMelt", (PyCFunction) _wrap_new_SimpleTindexSnowMelt, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "new_SimpleTindexSnowMelt(cmf::water::WaterStorage::ptr snow, cmf::water::flux_node::ptr surface_water, Cell cell, real rate=7.0) -> SimpleTindexSnowMelt\n" + "\n" + "SimpleTindexSnowMelt(cmf::water::WaterStorage::ptr snow,\n" + "cmf::water::flux_node::ptr surface_water, cmf::upslope::Cell &cell,\n" + "real rate=7.0)\n" + "\n" + "Creates a new snow melt connection.\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "snow: Snow storage, usually cel.snow\n" + "\n" + "surface_water: target of the melted water (usually cell.surfacewater)\n" + "\n" + "cell: The cell, needed to get weather and area\n" + "\n" + "rate: The rate of snow melt, given in mm/(degC day), default = 7.0 \n" + ""}, + { (char *)"SimpleTindexSnowMelt_use_for_cell", (PyCFunction) _wrap_SimpleTindexSnowMelt_use_for_cell, METH_VARARGS | METH_KEYWORDS, (char *)"SimpleTindexSnowMelt_use_for_cell(Cell cell)"}, + { (char *)"delete_SimpleTindexSnowMelt", (PyCFunction)_wrap_delete_SimpleTindexSnowMelt, METH_O, (char *)"delete_SimpleTindexSnowMelt(SimpleTindexSnowMelt self)"}, + { (char *)"SimpleTindexSnowMelt_swigregister", SimpleTindexSnowMelt_swigregister, METH_VARARGS, NULL}, + { (char *)"SimpleTindexSnowMelt_swiginit", SimpleTindexSnowMelt_swiginit, METH_VARARGS, NULL}, + { (char *)"new_EnergyBudgetSnowMelt", (PyCFunction) _wrap_new_EnergyBudgetSnowMelt, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "new_EnergyBudgetSnowMelt(cmf::water::WaterStorage::ptr snow, cmf::water::flux_node::ptr surface_water, Cell cell) -> EnergyBudgetSnowMelt\n" + "\n" + "EnergyBudgetSnowMelt(cmf::water::WaterStorage::ptr snow,\n" + "cmf::water::flux_node::ptr surface_water, cmf::upslope::Cell &cell) \n" + ""}, + { (char *)"EnergyBudgetSnowMelt_use_for_cell", (PyCFunction) _wrap_EnergyBudgetSnowMelt_use_for_cell, METH_VARARGS | METH_KEYWORDS, (char *)"EnergyBudgetSnowMelt_use_for_cell(Cell cell)"}, + { (char *)"delete_EnergyBudgetSnowMelt", (PyCFunction)_wrap_delete_EnergyBudgetSnowMelt, METH_O, (char *)"delete_EnergyBudgetSnowMelt(EnergyBudgetSnowMelt self)"}, + { (char *)"EnergyBudgetSnowMelt_swigregister", EnergyBudgetSnowMelt_swigregister, METH_VARARGS, NULL}, + { (char *)"EnergyBudgetSnowMelt_swiginit", EnergyBudgetSnowMelt_swiginit, METH_VARARGS, NULL}, + { (char *)"snowfraction", (PyCFunction) _wrap_snowfraction, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "snowfraction(real T) -> real\n" + "\n" + "real\n" + "cmf::upslope::connections::snowfraction(real T)\n" + "\n" + "A function to calculate the snow fraction of the precipitation\n" + "according to the air temperature.\n" + "\n" + "Returns 0.0 for T>+1 degC, 1.0 for T<-1degC and interpolates linear\n" + "between. Values between 0 and 1 can be interpreted as sleet \n" + ""}, + { (char *)"Rainfall_Throughfall_set", _wrap_Rainfall_Throughfall_set, METH_VARARGS, (char *)"Rainfall_Throughfall_set(Rainfall self, bool Throughfall)"}, + { (char *)"Rainfall_Throughfall_get", (PyCFunction)_wrap_Rainfall_Throughfall_get, METH_O, (char *)"Rainfall_Throughfall_get(Rainfall self) -> bool"}, + { (char *)"Rainfall_InterceptedRainfall_set", _wrap_Rainfall_InterceptedRainfall_set, METH_VARARGS, (char *)"Rainfall_InterceptedRainfall_set(Rainfall self, bool InterceptedRainfall)"}, + { (char *)"Rainfall_InterceptedRainfall_get", (PyCFunction)_wrap_Rainfall_InterceptedRainfall_get, METH_O, (char *)"Rainfall_InterceptedRainfall_get(Rainfall self) -> bool"}, + { (char *)"new_Rainfall", (PyCFunction) _wrap_new_Rainfall, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "new_Rainfall(cmf::water::flux_node::ptr target, Cell cell, bool getthroughfall=True, bool getintercepted=True) -> Rainfall\n" + "\n" + "Rainfall(cmf::water::flux_node::ptr target, cmf::upslope::Cell &cell,\n" + "bool getthroughfall=true, bool getintercepted=true)\n" + "\n" + "Creates a new Rainfall connection. \n" + ""}, + { (char *)"delete_Rainfall", (PyCFunction)_wrap_delete_Rainfall, METH_O, (char *)"delete_Rainfall(Rainfall self)"}, + { (char *)"Rainfall_swigregister", Rainfall_swigregister, METH_VARARGS, NULL}, + { (char *)"Rainfall_swiginit", Rainfall_swiginit, METH_VARARGS, NULL}, + { (char *)"new_Snowfall", (PyCFunction) _wrap_new_Snowfall, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "new_Snowfall(cmf::water::flux_node::ptr target, Cell cell) -> Snowfall\n" + "\n" + "Snowfall(cmf::water::flux_node::ptr target, cmf::upslope::Cell &cell)\n" + "\n" + ""}, + { (char *)"delete_Snowfall", (PyCFunction)_wrap_delete_Snowfall, METH_O, (char *)"delete_Snowfall(Snowfall self)"}, + { (char *)"Snowfall_swigregister", Snowfall_swigregister, METH_VARARGS, NULL}, + { (char *)"Snowfall_swiginit", Snowfall_swiginit, METH_VARARGS, NULL}, + { (char *)"new_MatrixInfiltration", (PyCFunction) _wrap_new_MatrixInfiltration, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "new_MatrixInfiltration(cmf::upslope::SoilLayer::ptr soilwater, cmf::water::flux_node::ptr surfacewater) -> MatrixInfiltration\n" + "\n" + "MatrixInfiltration(cmf::upslope::SoilLayer::ptr soilwater,\n" + "cmf::water::flux_node::ptr surfacewater) \n" + ""}, + { (char *)"MatrixInfiltration_use_for_cell", (PyCFunction) _wrap_MatrixInfiltration_use_for_cell, METH_VARARGS | METH_KEYWORDS, (char *)"MatrixInfiltration_use_for_cell(Cell c)"}, + { (char *)"delete_MatrixInfiltration", (PyCFunction)_wrap_delete_MatrixInfiltration, METH_O, (char *)"delete_MatrixInfiltration(MatrixInfiltration self)"}, + { (char *)"MatrixInfiltration_swigregister", MatrixInfiltration_swigregister, METH_VARARGS, NULL}, + { (char *)"MatrixInfiltration_swiginit", MatrixInfiltration_swiginit, METH_VARARGS, NULL}, + { (char *)"new_GreenAmptInfiltration", (PyCFunction) _wrap_new_GreenAmptInfiltration, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "new_GreenAmptInfiltration(cmf::upslope::SoilLayer::ptr soilwater, cmf::water::flux_node::ptr surfacewater) -> GreenAmptInfiltration\n" + "\n" + "GreenAmptInfiltration(cmf::upslope::SoilLayer::ptr soilwater,\n" + "cmf::water::flux_node::ptr surfacewater) \n" + ""}, + { (char *)"GreenAmptInfiltration_use_for_cell", (PyCFunction) _wrap_GreenAmptInfiltration_use_for_cell, METH_VARARGS | METH_KEYWORDS, (char *)"GreenAmptInfiltration_use_for_cell(Cell c)"}, + { (char *)"delete_GreenAmptInfiltration", (PyCFunction)_wrap_delete_GreenAmptInfiltration, METH_O, (char *)"delete_GreenAmptInfiltration(GreenAmptInfiltration self)"}, + { (char *)"GreenAmptInfiltration_swigregister", GreenAmptInfiltration_swigregister, METH_VARARGS, NULL}, + { (char *)"GreenAmptInfiltration_swiginit", GreenAmptInfiltration_swiginit, METH_VARARGS, NULL}, + { (char *)"SimpleInfiltration_W0_set", _wrap_SimpleInfiltration_W0_set, METH_VARARGS, (char *)"SimpleInfiltration_W0_set(SimpleInfiltration self, real W0)"}, + { (char *)"SimpleInfiltration_W0_get", (PyCFunction)_wrap_SimpleInfiltration_W0_get, METH_O, (char *)"SimpleInfiltration_W0_get(SimpleInfiltration self) -> real"}, + { (char *)"new_SimpleInfiltration", (PyCFunction) _wrap_new_SimpleInfiltration, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "new_SimpleInfiltration(cmf::upslope::SoilLayer::ptr soilwater, cmf::water::flux_node::ptr surfacewater, real W0=0.9) -> SimpleInfiltration\n" + "\n" + "SimpleInfiltration(cmf::upslope::SoilLayer::ptr soilwater,\n" + "cmf::water::flux_node::ptr surfacewater, real W0=0.9)\n" + "\n" + "Creates the connection between surfacewater and first soil layer.\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "soilwater: the infiltration target\n" + "\n" + "surfacewater: the infiltration source\n" + "\n" + "W0: the 50% saturation value \n" + ""}, + { (char *)"SimpleInfiltration_use_for_cell", (PyCFunction) _wrap_SimpleInfiltration_use_for_cell, METH_VARARGS | METH_KEYWORDS, (char *)"SimpleInfiltration_use_for_cell(Cell c)"}, + { (char *)"delete_SimpleInfiltration", (PyCFunction)_wrap_delete_SimpleInfiltration, METH_O, (char *)"delete_SimpleInfiltration(SimpleInfiltration self)"}, + { (char *)"SimpleInfiltration_swigregister", SimpleInfiltration_swigregister, METH_VARARGS, NULL}, + { (char *)"SimpleInfiltration_swiginit", SimpleInfiltration_swiginit, METH_VARARGS, NULL}, + { (char *)"SWATPercolation_use_for_cell", (PyCFunction) _wrap_SWATPercolation_use_for_cell, METH_VARARGS | METH_KEYWORDS, (char *)"SWATPercolation_use_for_cell(Cell cell, bool no_override=True)"}, + { (char *)"new_SWATPercolation", (PyCFunction) _wrap_new_SWATPercolation, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "new_SWATPercolation(cmf::upslope::SoilLayer::ptr upperLayer, cmf::upslope::SoilLayer::ptr lowerLayer) -> SWATPercolation\n" + "\n" + "SWATPercolation(cmf::upslope::SoilLayer::ptr upperLayer,\n" + "cmf::upslope::SoilLayer::ptr lowerLayer) \n" + ""}, + { (char *)"delete_SWATPercolation", (PyCFunction)_wrap_delete_SWATPercolation, METH_O, (char *)"delete_SWATPercolation(SWATPercolation self)"}, + { (char *)"SWATPercolation_swigregister", SWATPercolation_swigregister, METH_VARARGS, NULL}, + { (char *)"SWATPercolation_swiginit", SWATPercolation_swiginit, METH_VARARGS, NULL}, + { (char *)"new_Richards", (PyCFunction) _wrap_new_Richards, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "new_Richards(cmf::upslope::SoilLayer::ptr left, cmf::water::flux_node::ptr right) -> Richards\n" + "\n" + "Richards(cmf::upslope::SoilLayer::ptr left, cmf::water::flux_node::ptr\n" + "right)\n" + "\n" + "Creates a Richards equation connection between two soil layers (left\n" + "and right, rather top and bottom) of the same cell. \n" + ""}, + { (char *)"Richards_use_for_cell", (PyCFunction) _wrap_Richards_use_for_cell, METH_VARARGS | METH_KEYWORDS, (char *)"Richards_use_for_cell(Cell cell, bool no_override=True)"}, + { (char *)"delete_Richards", (PyCFunction)_wrap_delete_Richards, METH_O, (char *)"delete_Richards(Richards self)"}, + { (char *)"Richards_swigregister", Richards_swigregister, METH_VARARGS, NULL}, + { (char *)"Richards_swiginit", Richards_swiginit, METH_VARARGS, NULL}, + { (char *)"new_SimplRichards", (PyCFunction) _wrap_new_SimplRichards, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "new_SimplRichards(cmf::upslope::SoilLayer::ptr left, cmf::water::flux_node::ptr right) -> SimplRichards\n" + "\n" + "SimplRichards(cmf::upslope::SoilLayer::ptr left,\n" + "cmf::water::flux_node::ptr right) \n" + ""}, + { (char *)"SimplRichards_use_for_cell", (PyCFunction) _wrap_SimplRichards_use_for_cell, METH_VARARGS | METH_KEYWORDS, (char *)"SimplRichards_use_for_cell(Cell cell, bool no_override=True)"}, + { (char *)"delete_SimplRichards", (PyCFunction)_wrap_delete_SimplRichards, METH_O, (char *)"delete_SimplRichards(SimplRichards self)"}, + { (char *)"SimplRichards_swigregister", SimplRichards_swigregister, METH_VARARGS, NULL}, + { (char *)"SimplRichards_swiginit", SimplRichards_swiginit, METH_VARARGS, NULL}, + { (char *)"new_FreeDrainagePercolation", (PyCFunction) _wrap_new_FreeDrainagePercolation, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "new_FreeDrainagePercolation(cmf::upslope::SoilLayer::ptr left, cmf::water::flux_node::ptr right) -> FreeDrainagePercolation\n" + "\n" + "FreeDrainagePercolation(cmf::upslope::SoilLayer::ptr left,\n" + "cmf::water::flux_node::ptr right) \n" + ""}, + { (char *)"delete_FreeDrainagePercolation", (PyCFunction)_wrap_delete_FreeDrainagePercolation, METH_O, (char *)"delete_FreeDrainagePercolation(FreeDrainagePercolation self)"}, + { (char *)"FreeDrainagePercolation_swigregister", FreeDrainagePercolation_swigregister, METH_VARARGS, NULL}, + { (char *)"FreeDrainagePercolation_swiginit", FreeDrainagePercolation_swiginit, METH_VARARGS, NULL}, + { (char *)"LayerBypass_Kmax_set", _wrap_LayerBypass_Kmax_set, METH_VARARGS, (char *)"LayerBypass_Kmax_set(LayerBypass self, real Kmax)"}, + { (char *)"LayerBypass_Kmax_get", (PyCFunction)_wrap_LayerBypass_Kmax_get, METH_O, (char *)"LayerBypass_Kmax_get(LayerBypass self) -> real"}, + { (char *)"LayerBypass_w0_set", _wrap_LayerBypass_w0_set, METH_VARARGS, (char *)"LayerBypass_w0_set(LayerBypass self, real w0)"}, + { (char *)"LayerBypass_w0_get", (PyCFunction)_wrap_LayerBypass_w0_get, METH_O, (char *)"LayerBypass_w0_get(LayerBypass self) -> real"}, + { (char *)"LayerBypass_beta_set", _wrap_LayerBypass_beta_set, METH_VARARGS, (char *)"LayerBypass_beta_set(LayerBypass self, real beta)"}, + { (char *)"LayerBypass_beta_get", (PyCFunction)_wrap_LayerBypass_beta_get, METH_O, (char *)"LayerBypass_beta_get(LayerBypass self) -> real"}, + { (char *)"LayerBypass_K", (PyCFunction) _wrap_LayerBypass_K, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "LayerBypass_K(LayerBypass self, real w) -> real\n" + "\n" + "real K(real w)\n" + "\n" + "the actual crack conductivity\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "w: the wetness of the target layer \n" + ""}, + { (char *)"new_LayerBypass", (PyCFunction) _wrap_new_LayerBypass, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "new_LayerBypass(cmf::water::flux_node::ptr left, cmf::upslope::SoilLayer::ptr right, real Kmax=100., real w0=0.0, real beta=1.0) -> LayerBypass\n" + "\n" + "LayerBypass(cmf::water::flux_node::ptr left,\n" + "cmf::upslope::SoilLayer::ptr right, real Kmax=100., real w0=0.0, real\n" + "beta=1.0)\n" + "\n" + "Creates a layer bypass connection.\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "left: The source of the flux, usually the surfacewater of the cell\n" + "\n" + "right: The target soil layer\n" + "\n" + "Kmax: maximum conductivity of the cracks in m/day\n" + "\n" + "w0: is the actual wetness of the target layer\n" + "\n" + "beta: is an empirical shape parameter of the crack size/wetness\n" + "relation \n" + ""}, + { (char *)"delete_LayerBypass", (PyCFunction)_wrap_delete_LayerBypass, METH_O, (char *)"delete_LayerBypass(LayerBypass self)"}, + { (char *)"LayerBypass_swigregister", LayerBypass_swigregister, METH_VARARGS, NULL}, + { (char *)"LayerBypass_swiginit", LayerBypass_swiginit, METH_VARARGS, NULL}, + { (char *)"RootUptakeStessFunction_Tact", (PyCFunction) _wrap_RootUptakeStessFunction_Tact, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "RootUptakeStessFunction_Tact(RootUptakeStessFunction self, stressedET connection, real Tpot) -> real\n" + "\n" + "virtual real Tact(const stressedET *connection, real Tpot) const =0\n" + "\n" + "Calculates the water stress for a layer.\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "connection: The stressedET connection this stress function belongs to\n" + "\n" + "Tpot: Potential Transpiration in mm/day (for the full profile)\n" + "\n" + "Actual flux from layer in m3/day \n" + ""}, + { (char *)"RootUptakeStessFunction_copy", (PyCFunction)_wrap_RootUptakeStessFunction_copy, METH_O, (char *)"\n" + "RootUptakeStessFunction_copy(RootUptakeStessFunction self) -> RootUptakeStessFunction\n" + "\n" + "virtual cmf::upslope::ET::RootUptakeStessFunction* copy() const =0\n" + "\n" + "Creates a new copy of this wetness. \n" + ""}, + { (char *)"RootUptakeStessFunction_to_string", (PyCFunction)_wrap_RootUptakeStessFunction_to_string, METH_O, (char *)"\n" + "RootUptakeStessFunction_to_string(RootUptakeStessFunction self) -> std::string\n" + "\n" + "virtual\n" + "std::string to_string() const =0 \n" + ""}, + { (char *)"delete_RootUptakeStessFunction", (PyCFunction)_wrap_delete_RootUptakeStessFunction, METH_O, (char *)"\n" + "delete_RootUptakeStessFunction(RootUptakeStessFunction self)\n" + "\n" + "virtual ~RootUptakeStessFunction() \n" + ""}, + { (char *)"RootUptakeStessFunction_swigregister", RootUptakeStessFunction_swigregister, METH_VARARGS, NULL}, + { (char *)"SuctionStress_P0_set", _wrap_SuctionStress_P0_set, METH_VARARGS, (char *)"SuctionStress_P0_set(SuctionStress self, real P0)"}, + { (char *)"SuctionStress_P0_get", (PyCFunction)_wrap_SuctionStress_P0_get, METH_O, (char *)"SuctionStress_P0_get(SuctionStress self) -> real"}, + { (char *)"SuctionStress_P1_set", _wrap_SuctionStress_P1_set, METH_VARARGS, (char *)"SuctionStress_P1_set(SuctionStress self, real P1)"}, + { (char *)"SuctionStress_P1_get", (PyCFunction)_wrap_SuctionStress_P1_get, METH_O, (char *)"SuctionStress_P1_get(SuctionStress self) -> real"}, + { (char *)"SuctionStress_P2_set", _wrap_SuctionStress_P2_set, METH_VARARGS, (char *)"SuctionStress_P2_set(SuctionStress self, real P2)"}, + { (char *)"SuctionStress_P2_get", (PyCFunction)_wrap_SuctionStress_P2_get, METH_O, (char *)"SuctionStress_P2_get(SuctionStress self) -> real"}, + { (char *)"SuctionStress_P3_set", _wrap_SuctionStress_P3_set, METH_VARARGS, (char *)"SuctionStress_P3_set(SuctionStress self, real P3)"}, + { (char *)"SuctionStress_P3_get", (PyCFunction)_wrap_SuctionStress_P3_get, METH_O, (char *)"SuctionStress_P3_get(SuctionStress self) -> real"}, + { (char *)"new_SuctionStress", _wrap_new_SuctionStress, METH_VARARGS, (char *)"\n" + "SuctionStress(real P0=1e308, real P1=1e307, real P2=-5, real P3=-160)\n" + "new_SuctionStress(SuctionStress other) -> SuctionStress\n" + "\n" + "SuctionStress(const SuctionStress &other) \n" + ""}, + { (char *)"SuctionStress_copy", (PyCFunction)_wrap_SuctionStress_copy, METH_O, (char *)"\n" + "SuctionStress_copy(SuctionStress self) -> SuctionStress\n" + "\n" + "cmf::upslope::ET::SuctionStress* copy() const\n" + "\n" + "Creates a new copy of this wetness. \n" + ""}, + { (char *)"delete_SuctionStress", (PyCFunction)_wrap_delete_SuctionStress, METH_O, (char *)"\n" + "delete_SuctionStress(SuctionStress self)\n" + "\n" + "virtual ~SuctionStress() \n" + ""}, + { (char *)"SuctionStress_swigregister", SuctionStress_swigregister, METH_VARARGS, NULL}, + { (char *)"SuctionStress_swiginit", SuctionStress_swiginit, METH_VARARGS, NULL}, + { (char *)"ContentStress_theta_d_set", _wrap_ContentStress_theta_d_set, METH_VARARGS, (char *)"ContentStress_theta_d_set(ContentStress self, real theta_d)"}, + { (char *)"ContentStress_theta_d_get", (PyCFunction)_wrap_ContentStress_theta_d_get, METH_O, (char *)"ContentStress_theta_d_get(ContentStress self) -> real"}, + { (char *)"ContentStress_theta_w_set", _wrap_ContentStress_theta_w_set, METH_VARARGS, (char *)"ContentStress_theta_w_set(ContentStress self, real theta_w)"}, + { (char *)"ContentStress_theta_w_get", (PyCFunction)_wrap_ContentStress_theta_w_get, METH_O, (char *)"ContentStress_theta_w_get(ContentStress self) -> real"}, + { (char *)"ContentStress_copy", (PyCFunction)_wrap_ContentStress_copy, METH_O, (char *)"\n" + "ContentStress_copy(ContentStress self) -> ContentStress\n" + "\n" + "cmf::upslope::ET::ContentStress* copy() const\n" + "\n" + "Creates a new copy of this wetness. \n" + ""}, + { (char *)"new_ContentStress", (PyCFunction) _wrap_new_ContentStress, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "new_ContentStress(real theta_d=-1, real theta_w=-1) -> ContentStress\n" + "\n" + "ContentStress(real theta_d=-1, real theta_w=-1)\n" + "\n" + "Creates a new ContentStress for critical water content theta_d in vol\n" + "Water/vol Soil and wilting point theta_w. \n" + ""}, + { (char *)"delete_ContentStress", (PyCFunction)_wrap_delete_ContentStress, METH_O, (char *)"\n" + "delete_ContentStress(ContentStress self)\n" + "\n" + "virtual ~ContentStress() \n" + ""}, + { (char *)"ContentStress_swigregister", ContentStress_swigregister, METH_VARARGS, NULL}, + { (char *)"ContentStress_swiginit", ContentStress_swiginit, METH_VARARGS, NULL}, + { (char *)"VolumeStress_V1_set", _wrap_VolumeStress_V1_set, METH_VARARGS, (char *)"VolumeStress_V1_set(VolumeStress self, real V1)"}, + { (char *)"VolumeStress_V1_get", (PyCFunction)_wrap_VolumeStress_V1_get, METH_O, (char *)"VolumeStress_V1_get(VolumeStress self) -> real"}, + { (char *)"VolumeStress_V0_set", _wrap_VolumeStress_V0_set, METH_VARARGS, (char *)"VolumeStress_V0_set(VolumeStress self, real V0)"}, + { (char *)"VolumeStress_V0_get", (PyCFunction)_wrap_VolumeStress_V0_get, METH_O, (char *)"VolumeStress_V0_get(VolumeStress self) -> real"}, + { (char *)"new_VolumeStress", _wrap_new_VolumeStress, METH_VARARGS, (char *)"\n" + "VolumeStress(real V1, real V0)\n" + "new_VolumeStress(VolumeStress other) -> VolumeStress\n" + "\n" + "VolumeStress(const VolumeStress &other) \n" + ""}, + { (char *)"VolumeStress_copy", (PyCFunction)_wrap_VolumeStress_copy, METH_O, (char *)"\n" + "VolumeStress_copy(VolumeStress self) -> VolumeStress\n" + "\n" + "cmf::upslope::ET::VolumeStress* copy() const\n" + "\n" + "Creates a new copy of this wetness. \n" + ""}, + { (char *)"delete_VolumeStress", (PyCFunction)_wrap_delete_VolumeStress, METH_O, (char *)"\n" + "delete_VolumeStress(VolumeStress self)\n" + "\n" + "virtual ~VolumeStress() \n" + ""}, + { (char *)"VolumeStress_swigregister", VolumeStress_swigregister, METH_VARARGS, NULL}, + { (char *)"VolumeStress_swiginit", VolumeStress_swiginit, METH_VARARGS, NULL}, + { (char *)"new_log_wind_profile", (PyCFunction) _wrap_new_log_wind_profile, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "new_log_wind_profile(Cell _cell) -> log_wind_profile\n" + "\n" + "log_wind_profile(cmf::upslope::Cell &_cell) \n" + ""}, + { (char *)"delete_log_wind_profile", (PyCFunction)_wrap_delete_log_wind_profile, METH_O, (char *)"\n" + "delete_log_wind_profile(log_wind_profile self)\n" + "\n" + "virtual\n" + "~log_wind_profile() \n" + ""}, + { (char *)"log_wind_profile_swigregister", log_wind_profile_swigregister, METH_VARARGS, NULL}, + { (char *)"log_wind_profile_swiginit", log_wind_profile_swiginit, METH_VARARGS, NULL}, + { (char *)"transpiration_method_transp_from_layer", (PyCFunction) _wrap_transpiration_method_transp_from_layer, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "transpiration_method_transp_from_layer(transpiration_method self, cmf::upslope::SoilLayer::ptr arg3, Time t) -> double\n" + "\n" + "virtual\n" + "double transp_from_layer(cmf::upslope::SoilLayer::ptr, cmf::math::Time\n" + "t)=0\n" + "\n" + "returns the transpiration rate from one layer in m3/day \n" + ""}, + { (char *)"delete_transpiration_method", (PyCFunction)_wrap_delete_transpiration_method, METH_O, (char *)"\n" + "delete_transpiration_method(transpiration_method self)\n" + "\n" + "virtual ~transpiration_method() \n" + ""}, + { (char *)"transpiration_method_swigregister", transpiration_method_swigregister, METH_VARARGS, NULL}, + { (char *)"soil_evaporation_method_evap_from_layer", (PyCFunction) _wrap_soil_evaporation_method_evap_from_layer, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "soil_evaporation_method_evap_from_layer(soil_evaporation_method self, cmf::upslope::SoilLayer::ptr arg3, Time t) -> double\n" + "\n" + "virtual\n" + "double evap_from_layer(cmf::upslope::SoilLayer::ptr, cmf::math::Time\n" + "t)=0\n" + "\n" + "returns the soil evaporation rate from one layer in m3/day \n" + ""}, + { (char *)"delete_soil_evaporation_method", (PyCFunction)_wrap_delete_soil_evaporation_method, METH_O, (char *)"\n" + "delete_soil_evaporation_method(soil_evaporation_method self)\n" + "\n" + "virtual ~soil_evaporation_method() \n" + ""}, + { (char *)"soil_evaporation_method_swigregister", soil_evaporation_method_swigregister, METH_VARARGS, NULL}, + { (char *)"surface_water_evaporation_method_evap_from_openwater", (PyCFunction) _wrap_surface_water_evaporation_method_evap_from_openwater, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "surface_water_evaporation_method_evap_from_openwater(surface_water_evaporation_method self, cmf::river::OpenWaterStorage::ptr arg3, Time arg4) -> double\n" + "\n" + "virtual double\n" + "evap_from_openwater(cmf::river::OpenWaterStorage::ptr,\n" + "cmf::math::Time)=0 \n" + ""}, + { (char *)"delete_surface_water_evaporation_method", (PyCFunction)_wrap_delete_surface_water_evaporation_method, METH_O, (char *)"\n" + "delete_surface_water_evaporation_method(surface_water_evaporation_method self)\n" + "\n" + "virtual ~surface_water_evaporation_method() \n" + ""}, + { (char *)"surface_water_evaporation_method_swigregister", surface_water_evaporation_method_swigregister, METH_VARARGS, NULL}, + { (char *)"canopy_evaporation_method_evap_from_canopy", (PyCFunction) _wrap_canopy_evaporation_method_evap_from_canopy, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "canopy_evaporation_method_evap_from_canopy(canopy_evaporation_method self, cmf::water::WaterStorage::ptr arg3, Time arg4) -> double\n" + "\n" + "virtual double evap_from_canopy(cmf::water::WaterStorage::ptr,\n" + "cmf::math::Time)=0 \n" + ""}, + { (char *)"delete_canopy_evaporation_method", (PyCFunction)_wrap_delete_canopy_evaporation_method, METH_O, (char *)"\n" + "delete_canopy_evaporation_method(canopy_evaporation_method self)\n" + "\n" + "virtual ~canopy_evaporation_method() \n" + ""}, + { (char *)"canopy_evaporation_method_swigregister", canopy_evaporation_method_swigregister, METH_VARARGS, NULL}, + { (char *)"snow_evaporation_method_evap_from_snow", (PyCFunction) _wrap_snow_evaporation_method_evap_from_snow, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "snow_evaporation_method_evap_from_snow(snow_evaporation_method self, cmf::water::WaterStorage::ptr snow, Time t) -> double\n" + "\n" + "virtual\n" + "double evap_from_snow(cmf::water::WaterStorage::ptr snow,\n" + "cmf::math::Time t)=0 \n" + ""}, + { (char *)"delete_snow_evaporation_method", (PyCFunction)_wrap_delete_snow_evaporation_method, METH_O, (char *)"\n" + "delete_snow_evaporation_method(snow_evaporation_method self)\n" + "\n" + "virtual ~snow_evaporation_method() \n" + ""}, + { (char *)"snow_evaporation_method_swigregister", snow_evaporation_method_swigregister, METH_VARARGS, NULL}, + { (char *)"new_transpiration", (PyCFunction) _wrap_new_transpiration, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "new_transpiration(cmf::upslope::SoilLayer::ptr source, cmf::water::flux_node::ptr ET_target, std::shared_ptr< cmf::upslope::ET::transpiration_method > _method, std::string method_name) -> transpiration\n" + "\n" + "transpiration(cmf::upslope::SoilLayer::ptr source,\n" + "cmf::water::flux_node::ptr ET_target, std::shared_ptr<\n" + "transpiration_method > _method, std::string method_name) \n" + ""}, + { (char *)"delete_transpiration", (PyCFunction)_wrap_delete_transpiration, METH_O, (char *)"delete_transpiration(transpiration self)"}, + { (char *)"transpiration_swigregister", transpiration_swigregister, METH_VARARGS, NULL}, + { (char *)"transpiration_swiginit", transpiration_swiginit, METH_VARARGS, NULL}, + { (char *)"new_soil_evaporation", (PyCFunction) _wrap_new_soil_evaporation, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "new_soil_evaporation(cmf::upslope::SoilLayer::ptr source, cmf::water::flux_node::ptr ET_target, std::shared_ptr< cmf::upslope::ET::soil_evaporation_method > _method, std::string method_name) -> soil_evaporation\n" + "\n" + "soil_evaporation(cmf::upslope::SoilLayer::ptr source,\n" + "cmf::water::flux_node::ptr ET_target, std::shared_ptr<\n" + "soil_evaporation_method > _method, std::string method_name) \n" + ""}, + { (char *)"delete_soil_evaporation", (PyCFunction)_wrap_delete_soil_evaporation, METH_O, (char *)"delete_soil_evaporation(soil_evaporation self)"}, + { (char *)"soil_evaporation_swigregister", soil_evaporation_swigregister, METH_VARARGS, NULL}, + { (char *)"soil_evaporation_swiginit", soil_evaporation_swiginit, METH_VARARGS, NULL}, + { (char *)"new_canopy_evaporation", (PyCFunction) _wrap_new_canopy_evaporation, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "new_canopy_evaporation(cmf::water::WaterStorage::ptr source, cmf::water::flux_node::ptr ET_target, std::shared_ptr< cmf::upslope::ET::canopy_evaporation_method > _method, std::string method_name) -> canopy_evaporation\n" + "\n" + "canopy_evaporation(cmf::water::WaterStorage::ptr source,\n" + "cmf::water::flux_node::ptr ET_target, std::shared_ptr<\n" + "canopy_evaporation_method > _method, std::string method_name) \n" + ""}, + { (char *)"delete_canopy_evaporation", (PyCFunction)_wrap_delete_canopy_evaporation, METH_O, (char *)"delete_canopy_evaporation(canopy_evaporation self)"}, + { (char *)"canopy_evaporation_swigregister", canopy_evaporation_swigregister, METH_VARARGS, NULL}, + { (char *)"canopy_evaporation_swiginit", canopy_evaporation_swiginit, METH_VARARGS, NULL}, + { (char *)"new_snow_evaporation", (PyCFunction) _wrap_new_snow_evaporation, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "new_snow_evaporation(cmf::water::WaterStorage::ptr source, cmf::water::flux_node::ptr ET_target, std::shared_ptr< cmf::upslope::ET::snow_evaporation_method > _method, std::string method_name) -> snow_evaporation\n" + "\n" + "snow_evaporation(cmf::water::WaterStorage::ptr source,\n" + "cmf::water::flux_node::ptr ET_target, std::shared_ptr<\n" + "snow_evaporation_method > _method, std::string method_name) \n" + ""}, + { (char *)"delete_snow_evaporation", (PyCFunction)_wrap_delete_snow_evaporation, METH_O, (char *)"delete_snow_evaporation(snow_evaporation self)"}, + { (char *)"snow_evaporation_swigregister", snow_evaporation_swigregister, METH_VARARGS, NULL}, + { (char *)"snow_evaporation_swiginit", snow_evaporation_swiginit, METH_VARARGS, NULL}, + { (char *)"new_surface_water_evaporation", (PyCFunction) _wrap_new_surface_water_evaporation, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "new_surface_water_evaporation(cmf::river::OpenWaterStorage::ptr source, cmf::water::flux_node::ptr ET_target, std::shared_ptr< cmf::upslope::ET::surface_water_evaporation_method > _method, std::string method_name) -> surface_water_evaporation\n" + "\n" + "surface_water_evaporation(cmf::river::OpenWaterStorage::ptr source,\n" + "cmf::water::flux_node::ptr ET_target, std::shared_ptr<\n" + "surface_water_evaporation_method > _method, std::string method_name)\n" + "\n" + ""}, + { (char *)"delete_surface_water_evaporation", (PyCFunction)_wrap_delete_surface_water_evaporation, METH_O, (char *)"delete_surface_water_evaporation(surface_water_evaporation self)"}, + { (char *)"surface_water_evaporation_swigregister", surface_water_evaporation_swigregister, METH_VARARGS, NULL}, + { (char *)"surface_water_evaporation_swiginit", surface_water_evaporation_swiginit, METH_VARARGS, NULL}, + { (char *)"PenmanMonteith", _wrap_PenmanMonteith, METH_VARARGS, (char *)"\n" + "PenmanMonteith(real Rn, real ra, real rs, real T, real vap_press_deficit) -> real\n" + "PenmanMonteith(Weather A, Vegetation veg, double h) -> real\n" + "\n" + "real\n" + "cmf::upslope::ET::PenmanMonteith(cmf::atmosphere::Weather A, const\n" + "cmf::upslope::vegetation::Vegetation &veg, double h)\n" + "\n" + "Returns the potential ET after Penman-Monteith using some\n" + "simplifications for a weather and a vegetation object.\n" + "\n" + "aerodynamic and surface resistances, and a vapor pressure deficit\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "A: Current weather\n" + "\n" + "veg: Vegetation data\n" + "\n" + "h: Height above sea level in m (for air pressure estimation) \n" + ""}, + { (char *)"stressedET_set_stressfunction", (PyCFunction) _wrap_stressedET_set_stressfunction, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "stressedET_set_stressfunction(stressedET self, RootUptakeStessFunction stressfunction)\n" + "\n" + "void\n" + "set_stressfunction(const RootUptakeStessFunction &stressfunction)\n" + "\n" + "Sets the stress function to limit water uptake. \n" + ""}, + { (char *)"stressedET_get_layer", (PyCFunction)_wrap_stressedET_get_layer, METH_O, (char *)"\n" + "stressedET_get_layer(stressedET self) -> cmf::upslope::SoilLayer::ptr\n" + "\n" + "SoilLayer::ptr get_layer() const \n" + ""}, + { (char *)"stressedET_ETpot", (PyCFunction) _wrap_stressedET_ETpot, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "stressedET_ETpot(stressedET self, Time t) -> real\n" + "\n" + "virtual\n" + "real ETpot(cmf::math::Time t) const \n" + ""}, + { (char *)"delete_stressedET", (PyCFunction)_wrap_delete_stressedET, METH_O, (char *)"delete_stressedET(stressedET self)"}, + { (char *)"stressedET_swigregister", stressedET_swigregister, METH_VARARGS, NULL}, + { (char *)"constantETpot_ETpot_value_set", _wrap_constantETpot_ETpot_value_set, METH_VARARGS, (char *)"constantETpot_ETpot_value_set(constantETpot self, real ETpot_value)"}, + { (char *)"constantETpot_ETpot_value_get", (PyCFunction)_wrap_constantETpot_ETpot_value_get, METH_O, (char *)"constantETpot_ETpot_value_get(constantETpot self) -> real"}, + { (char *)"constantETpot_GetETpot", (PyCFunction) _wrap_constantETpot_GetETpot, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "constantETpot_GetETpot(constantETpot self, Time t) -> real\n" + "\n" + "real GetETpot(cmf::math::Time t) const \n" + ""}, + { (char *)"new_constantETpot", (PyCFunction) _wrap_new_constantETpot, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "new_constantETpot(cmf::upslope::SoilLayer::ptr source, cmf::water::flux_node::ptr ET_target, double constantETpot_value) -> constantETpot\n" + "\n" + "constantETpot(cmf::upslope::SoilLayer::ptr source,\n" + "cmf::water::flux_node::ptr ET_target, double constantETpot_value) \n" + ""}, + { (char *)"delete_constantETpot", (PyCFunction)_wrap_delete_constantETpot, METH_O, (char *)"delete_constantETpot(constantETpot self)"}, + { (char *)"constantETpot_swigregister", constantETpot_swigregister, METH_VARARGS, NULL}, + { (char *)"constantETpot_swiginit", constantETpot_swiginit, METH_VARARGS, NULL}, + { (char *)"timeseriesETpot_ETpot_data_set", _wrap_timeseriesETpot_ETpot_data_set, METH_VARARGS, (char *)"timeseriesETpot_ETpot_data_set(timeseriesETpot self, timeseries ETpot_data)"}, + { (char *)"timeseriesETpot_ETpot_data_get", (PyCFunction)_wrap_timeseriesETpot_ETpot_data_get, METH_O, (char *)"timeseriesETpot_ETpot_data_get(timeseriesETpot self) -> timeseries"}, + { (char *)"new_timeseriesETpot", (PyCFunction) _wrap_new_timeseriesETpot, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "new_timeseriesETpot(cmf::upslope::SoilLayer::ptr source, cmf::water::flux_node::ptr ET_target, timeseries ETpot_values) -> timeseriesETpot\n" + "\n" + "timeseriesETpot(cmf::upslope::SoilLayer::ptr source,\n" + "cmf::water::flux_node::ptr ET_target, cmf::math::timeseries\n" + "ETpot_values) \n" + ""}, + { (char *)"delete_timeseriesETpot", (PyCFunction)_wrap_delete_timeseriesETpot, METH_O, (char *)"delete_timeseriesETpot(timeseriesETpot self)"}, + { (char *)"timeseriesETpot_swigregister", timeseriesETpot_swigregister, METH_VARARGS, NULL}, + { (char *)"timeseriesETpot_swiginit", timeseriesETpot_swiginit, METH_VARARGS, NULL}, + { (char *)"PenmanMonteithET_daily_set", _wrap_PenmanMonteithET_daily_set, METH_VARARGS, (char *)"PenmanMonteithET_daily_set(PenmanMonteithET self, bool daily)"}, + { (char *)"PenmanMonteithET_daily_get", (PyCFunction)_wrap_PenmanMonteithET_daily_get, METH_O, (char *)"PenmanMonteithET_daily_get(PenmanMonteithET self) -> bool"}, + { (char *)"new_PenmanMonteithET", (PyCFunction) _wrap_new_PenmanMonteithET, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "new_PenmanMonteithET(cmf::upslope::SoilLayer::ptr source, cmf::water::flux_node::ptr ET_target) -> PenmanMonteithET\n" + "\n" + "PenmanMonteithET(cmf::upslope::SoilLayer::ptr source,\n" + "cmf::water::flux_node::ptr ET_target) \n" + ""}, + { (char *)"PenmanMonteithET_r_s", (PyCFunction) _wrap_PenmanMonteithET_r_s, METH_VARARGS | METH_KEYWORDS, (char *)"PenmanMonteithET_r_s(Vegetation veg) -> real"}, + { (char *)"PenmanMonteithET_r_a", (PyCFunction) _wrap_PenmanMonteithET_r_a, METH_VARARGS | METH_KEYWORDS, (char *)"PenmanMonteithET_r_a(Weather A, real veg_height) -> real"}, + { (char *)"PenmanMonteithET_use_for_cell", (PyCFunction) _wrap_PenmanMonteithET_use_for_cell, METH_VARARGS | METH_KEYWORDS, (char *)"PenmanMonteithET_use_for_cell(Cell cell)"}, + { (char *)"delete_PenmanMonteithET", (PyCFunction)_wrap_delete_PenmanMonteithET, METH_O, (char *)"delete_PenmanMonteithET(PenmanMonteithET self)"}, + { (char *)"PenmanMonteithET_swigregister", PenmanMonteithET_swigregister, METH_VARARGS, NULL}, + { (char *)"PenmanMonteithET_swiginit", PenmanMonteithET_swiginit, METH_VARARGS, NULL}, + { (char *)"PriestleyTaylorET_daily_set", _wrap_PriestleyTaylorET_daily_set, METH_VARARGS, (char *)"PriestleyTaylorET_daily_set(PriestleyTaylorET self, bool daily)"}, + { (char *)"PriestleyTaylorET_daily_get", (PyCFunction)_wrap_PriestleyTaylorET_daily_get, METH_O, (char *)"PriestleyTaylorET_daily_get(PriestleyTaylorET self) -> bool"}, + { (char *)"PriestleyTaylorET_alpha_set", _wrap_PriestleyTaylorET_alpha_set, METH_VARARGS, (char *)"PriestleyTaylorET_alpha_set(PriestleyTaylorET self, real alpha)"}, + { (char *)"PriestleyTaylorET_alpha_get", (PyCFunction)_wrap_PriestleyTaylorET_alpha_get, METH_O, (char *)"PriestleyTaylorET_alpha_get(PriestleyTaylorET self) -> real"}, + { (char *)"new_PriestleyTaylorET", (PyCFunction) _wrap_new_PriestleyTaylorET, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "new_PriestleyTaylorET(cmf::upslope::SoilLayer::ptr source, cmf::water::flux_node::ptr ET_target, real alpha=1.26) -> PriestleyTaylorET\n" + "\n" + "PriestleyTaylorET(cmf::upslope::SoilLayer::ptr source,\n" + "cmf::water::flux_node::ptr ET_target, real alpha=1.26) \n" + ""}, + { (char *)"PriestleyTaylorET_use_for_cell", (PyCFunction) _wrap_PriestleyTaylorET_use_for_cell, METH_VARARGS | METH_KEYWORDS, (char *)"PriestleyTaylorET_use_for_cell(Cell cell)"}, + { (char *)"delete_PriestleyTaylorET", (PyCFunction)_wrap_delete_PriestleyTaylorET, METH_O, (char *)"delete_PriestleyTaylorET(PriestleyTaylorET self)"}, + { (char *)"PriestleyTaylorET_swigregister", PriestleyTaylorET_swigregister, METH_VARARGS, NULL}, + { (char *)"PriestleyTaylorET_swiginit", PriestleyTaylorET_swiginit, METH_VARARGS, NULL}, + { (char *)"new_HargreaveET", (PyCFunction) _wrap_new_HargreaveET, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "new_HargreaveET(cmf::upslope::SoilLayer::ptr source, cmf::water::flux_node::ptr ET_target, real latitude=51.0) -> HargreaveET\n" + "\n" + "HargreaveET(cmf::upslope::SoilLayer::ptr source,\n" + "cmf::water::flux_node::ptr ET_target, real latitude=51.0) \n" + ""}, + { (char *)"HargreaveET_lat_set", _wrap_HargreaveET_lat_set, METH_VARARGS, (char *)"HargreaveET_lat_set(HargreaveET self, real lat)"}, + { (char *)"HargreaveET_lat_get", (PyCFunction)_wrap_HargreaveET_lat_get, METH_O, (char *)"HargreaveET_lat_get(HargreaveET self) -> real"}, + { (char *)"HargreaveET_use_for_cell", (PyCFunction) _wrap_HargreaveET_use_for_cell, METH_VARARGS | METH_KEYWORDS, (char *)"HargreaveET_use_for_cell(Cell cell)"}, + { (char *)"delete_HargreaveET", (PyCFunction)_wrap_delete_HargreaveET, METH_O, (char *)"delete_HargreaveET(HargreaveET self)"}, + { (char *)"HargreaveET_swigregister", HargreaveET_swigregister, METH_VARARGS, NULL}, + { (char *)"HargreaveET_swiginit", HargreaveET_swiginit, METH_VARARGS, NULL}, + { (char *)"new_TurcET", (PyCFunction) _wrap_new_TurcET, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "new_TurcET(cmf::upslope::SoilLayer::ptr source, cmf::water::flux_node::ptr ET_target) -> TurcET\n" + "\n" + "TurcET(cmf::upslope::SoilLayer::ptr source, cmf::water::flux_node::ptr\n" + "ET_target) \n" + ""}, + { (char *)"TurcET_use_for_cell", (PyCFunction) _wrap_TurcET_use_for_cell, METH_VARARGS | METH_KEYWORDS, (char *)"TurcET_use_for_cell(Cell cell)"}, + { (char *)"delete_TurcET", (PyCFunction)_wrap_delete_TurcET, METH_O, (char *)"delete_TurcET(TurcET self)"}, + { (char *)"TurcET_swigregister", TurcET_swigregister, METH_VARARGS, NULL}, + { (char *)"TurcET_swiginit", TurcET_swiginit, METH_VARARGS, NULL}, + { (char *)"new_CanopyStorageEvaporation", (PyCFunction) _wrap_new_CanopyStorageEvaporation, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "new_CanopyStorageEvaporation(cmf::water::WaterStorage::ptr CanopyStorage, cmf::water::flux_node::ptr ET_target, Cell cell) -> CanopyStorageEvaporation\n" + "\n" + "CanopyStorageEvaporation(cmf::water::WaterStorage::ptr CanopyStorage,\n" + "cmf::water::flux_node::ptr ET_target, cmf::upslope::Cell &cell) \n" + ""}, + { (char *)"delete_CanopyStorageEvaporation", (PyCFunction)_wrap_delete_CanopyStorageEvaporation, METH_O, (char *)"delete_CanopyStorageEvaporation(CanopyStorageEvaporation self)"}, + { (char *)"CanopyStorageEvaporation_swigregister", CanopyStorageEvaporation_swigregister, METH_VARARGS, NULL}, + { (char *)"CanopyStorageEvaporation_swiginit", CanopyStorageEvaporation_swiginit, METH_VARARGS, NULL}, + { (char *)"new_PenmanEvaporation", (PyCFunction) _wrap_new_PenmanEvaporation, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "new_PenmanEvaporation(cmf::river::OpenWaterStorage::ptr source, cmf::water::flux_node::ptr Evap_target, Meteorology meteo) -> PenmanEvaporation\n" + "\n" + "PenmanEvaporation(cmf::river::OpenWaterStorage::ptr source,\n" + "cmf::water::flux_node::ptr Evap_target, const\n" + "cmf::atmosphere::Meteorology &meteo) \n" + ""}, + { (char *)"delete_PenmanEvaporation", (PyCFunction)_wrap_delete_PenmanEvaporation, METH_O, (char *)"delete_PenmanEvaporation(PenmanEvaporation self)"}, + { (char *)"PenmanEvaporation_swigregister", PenmanEvaporation_swigregister, METH_VARARGS, NULL}, + { (char *)"PenmanEvaporation_swiginit", PenmanEvaporation_swiginit, METH_VARARGS, NULL}, + { (char *)"ShuttleworthWallace_RAA_set", _wrap_ShuttleworthWallace_RAA_set, METH_VARARGS, (char *)"ShuttleworthWallace_RAA_set(ShuttleworthWallace self, double RAA)"}, + { (char *)"ShuttleworthWallace_RAA_get", (PyCFunction)_wrap_ShuttleworthWallace_RAA_get, METH_O, (char *)"ShuttleworthWallace_RAA_get(ShuttleworthWallace self) -> double"}, + { (char *)"ShuttleworthWallace_RAC_set", _wrap_ShuttleworthWallace_RAC_set, METH_VARARGS, (char *)"ShuttleworthWallace_RAC_set(ShuttleworthWallace self, double RAC)"}, + { (char *)"ShuttleworthWallace_RAC_get", (PyCFunction)_wrap_ShuttleworthWallace_RAC_get, METH_O, (char *)"ShuttleworthWallace_RAC_get(ShuttleworthWallace self) -> double"}, + { (char *)"ShuttleworthWallace_RAS_set", _wrap_ShuttleworthWallace_RAS_set, METH_VARARGS, (char *)"ShuttleworthWallace_RAS_set(ShuttleworthWallace self, double RAS)"}, + { (char *)"ShuttleworthWallace_RAS_get", (PyCFunction)_wrap_ShuttleworthWallace_RAS_get, METH_O, (char *)"ShuttleworthWallace_RAS_get(ShuttleworthWallace self) -> double"}, + { (char *)"ShuttleworthWallace_RSS_set", _wrap_ShuttleworthWallace_RSS_set, METH_VARARGS, (char *)"ShuttleworthWallace_RSS_set(ShuttleworthWallace self, double RSS)"}, + { (char *)"ShuttleworthWallace_RSS_get", (PyCFunction)_wrap_ShuttleworthWallace_RSS_get, METH_O, (char *)"ShuttleworthWallace_RSS_get(ShuttleworthWallace self) -> double"}, + { (char *)"ShuttleworthWallace_RSC_set", _wrap_ShuttleworthWallace_RSC_set, METH_VARARGS, (char *)"ShuttleworthWallace_RSC_set(ShuttleworthWallace self, double RSC)"}, + { (char *)"ShuttleworthWallace_RSC_get", (PyCFunction)_wrap_ShuttleworthWallace_RSC_get, METH_O, (char *)"ShuttleworthWallace_RSC_get(ShuttleworthWallace self) -> double"}, + { (char *)"ShuttleworthWallace_refresh_counter_set", _wrap_ShuttleworthWallace_refresh_counter_set, METH_VARARGS, (char *)"ShuttleworthWallace_refresh_counter_set(ShuttleworthWallace self, int refresh_counter)"}, + { (char *)"ShuttleworthWallace_refresh_counter_get", (PyCFunction)_wrap_ShuttleworthWallace_refresh_counter_get, METH_O, (char *)"ShuttleworthWallace_refresh_counter_get(ShuttleworthWallace self) -> int"}, + { (char *)"ShuttleworthWallace_refresh", _wrap_ShuttleworthWallace_refresh, METH_VARARGS, (char *)"\n" + "refresh(Time t)\n" + "ShuttleworthWallace_refresh(ShuttleworthWallace self)\n" + "\n" + "void refresh() \n" + ""}, + { (char *)"ShuttleworthWallace_PTR_set", _wrap_ShuttleworthWallace_PTR_set, METH_VARARGS, (char *)"ShuttleworthWallace_PTR_set(ShuttleworthWallace self, double PTR)"}, + { (char *)"ShuttleworthWallace_PTR_get", (PyCFunction)_wrap_ShuttleworthWallace_PTR_get, METH_O, (char *)"ShuttleworthWallace_PTR_get(ShuttleworthWallace self) -> double"}, + { (char *)"ShuttleworthWallace_PSNVP_set", _wrap_ShuttleworthWallace_PSNVP_set, METH_VARARGS, (char *)"ShuttleworthWallace_PSNVP_set(ShuttleworthWallace self, double PSNVP)"}, + { (char *)"ShuttleworthWallace_PSNVP_get", (PyCFunction)_wrap_ShuttleworthWallace_PSNVP_get, METH_O, (char *)"ShuttleworthWallace_PSNVP_get(ShuttleworthWallace self) -> double"}, + { (char *)"ShuttleworthWallace_ASNVP_set", _wrap_ShuttleworthWallace_ASNVP_set, METH_VARARGS, (char *)"ShuttleworthWallace_ASNVP_set(ShuttleworthWallace self, double ASNVP)"}, + { (char *)"ShuttleworthWallace_ASNVP_get", (PyCFunction)_wrap_ShuttleworthWallace_ASNVP_get, METH_O, (char *)"ShuttleworthWallace_ASNVP_get(ShuttleworthWallace self) -> double"}, + { (char *)"ShuttleworthWallace_GER_set", _wrap_ShuttleworthWallace_GER_set, METH_VARARGS, (char *)"ShuttleworthWallace_GER_set(ShuttleworthWallace self, double GER)"}, + { (char *)"ShuttleworthWallace_GER_get", (PyCFunction)_wrap_ShuttleworthWallace_GER_get, METH_O, (char *)"ShuttleworthWallace_GER_get(ShuttleworthWallace self) -> double"}, + { (char *)"ShuttleworthWallace_PIR_set", _wrap_ShuttleworthWallace_PIR_set, METH_VARARGS, (char *)"ShuttleworthWallace_PIR_set(ShuttleworthWallace self, double PIR)"}, + { (char *)"ShuttleworthWallace_PIR_get", (PyCFunction)_wrap_ShuttleworthWallace_PIR_get, METH_O, (char *)"ShuttleworthWallace_PIR_get(ShuttleworthWallace self) -> double"}, + { (char *)"ShuttleworthWallace_AIR_set", _wrap_ShuttleworthWallace_AIR_set, METH_VARARGS, (char *)"ShuttleworthWallace_AIR_set(ShuttleworthWallace self, double AIR)"}, + { (char *)"ShuttleworthWallace_AIR_get", (PyCFunction)_wrap_ShuttleworthWallace_AIR_get, METH_O, (char *)"ShuttleworthWallace_AIR_get(ShuttleworthWallace self) -> double"}, + { (char *)"ShuttleworthWallace_GIR_set", _wrap_ShuttleworthWallace_GIR_set, METH_VARARGS, (char *)"ShuttleworthWallace_GIR_set(ShuttleworthWallace self, double GIR)"}, + { (char *)"ShuttleworthWallace_GIR_get", (PyCFunction)_wrap_ShuttleworthWallace_GIR_get, METH_O, (char *)"ShuttleworthWallace_GIR_get(ShuttleworthWallace self) -> double"}, + { (char *)"ShuttleworthWallace_ATR_sum_set", _wrap_ShuttleworthWallace_ATR_sum_set, METH_VARARGS, (char *)"ShuttleworthWallace_ATR_sum_set(ShuttleworthWallace self, double ATR_sum)"}, + { (char *)"ShuttleworthWallace_ATR_sum_get", (PyCFunction)_wrap_ShuttleworthWallace_ATR_sum_get, METH_O, (char *)"ShuttleworthWallace_ATR_sum_get(ShuttleworthWallace self) -> double"}, + { (char *)"ShuttleworthWallace_ATR_set", _wrap_ShuttleworthWallace_ATR_set, METH_VARARGS, (char *)"ShuttleworthWallace_ATR_set(ShuttleworthWallace self, cmf::math::num_array ATR)"}, + { (char *)"ShuttleworthWallace_ATR_get", (PyCFunction)_wrap_ShuttleworthWallace_ATR_get, METH_O, (char *)"ShuttleworthWallace_ATR_get(ShuttleworthWallace self) -> cmf::math::num_array"}, + { (char *)"ShuttleworthWallace_KSNVP_set", _wrap_ShuttleworthWallace_KSNVP_set, METH_VARARGS, (char *)"ShuttleworthWallace_KSNVP_set(ShuttleworthWallace self, double KSNVP)"}, + { (char *)"ShuttleworthWallace_KSNVP_get", (PyCFunction)_wrap_ShuttleworthWallace_KSNVP_get, METH_O, (char *)"ShuttleworthWallace_KSNVP_get(ShuttleworthWallace self) -> double"}, + { (char *)"ShuttleworthWallace_allow_dew_set", _wrap_ShuttleworthWallace_allow_dew_set, METH_VARARGS, (char *)"ShuttleworthWallace_allow_dew_set(ShuttleworthWallace self, bool allow_dew)"}, + { (char *)"ShuttleworthWallace_allow_dew_get", (PyCFunction)_wrap_ShuttleworthWallace_allow_dew_get, METH_O, (char *)"ShuttleworthWallace_allow_dew_get(ShuttleworthWallace self) -> bool"}, + { (char *)"ShuttleworthWallace_set_RSS_parameters", (PyCFunction) _wrap_ShuttleworthWallace_set_RSS_parameters, METH_VARARGS | METH_KEYWORDS, (char *)"ShuttleworthWallace_set_RSS_parameters(double _RSSa=500., double _RSSb=1.0, double _RSSa_pot=-3.22)"}, + { (char *)"new_ShuttleworthWallace", (PyCFunction) _wrap_new_ShuttleworthWallace, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "new_ShuttleworthWallace(Cell cell, bool allow_dew=True) -> ShuttleworthWallace\n" + "\n" + "ShuttleworthWallace(cmf::upslope::Cell &cell, bool allow_dew=true)\n" + "\n" + "Calculates the transpiration and the soil evaporation from dry\n" + "surfaces. \n" + ""}, + { (char *)"ShuttleworthWallace_use_for_cell", (PyCFunction) _wrap_ShuttleworthWallace_use_for_cell, METH_VARARGS | METH_KEYWORDS, (char *)"ShuttleworthWallace_use_for_cell(Cell cell) -> ShuttleworthWallace"}, + { (char *)"delete_ShuttleworthWallace", (PyCFunction)_wrap_delete_ShuttleworthWallace, METH_O, (char *)"\n" + "delete_ShuttleworthWallace(ShuttleworthWallace self)\n" + "\n" + "virtual\n" + "~ShuttleworthWallace() \n" + ""}, + { (char *)"ShuttleworthWallace_swigregister", ShuttleworthWallace_swigregister, METH_VARARGS, NULL}, + { (char *)"ShuttleworthWallace_swiginit", ShuttleworthWallace_swiginit, METH_VARARGS, NULL}, + { (char *)"project_remove_node", (PyCFunction) _wrap_project_remove_node, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "project_remove_node(project self, cmf::water::flux_node::ptr node) -> size_t\n" + "\n" + "size_t\n" + "remove_node(cmf::water::flux_node::ptr node)\n" + "\n" + "Removes a node from the repository.\n" + "\n" + "Removes a node (boundary condition or water storage) from the node\n" + "repository of the project. NOTE: If you have other references to this\n" + "node, the node is not deleted. If you are creating a new solver, the\n" + "node will not be part of the solver. \n" + ""}, + { (char *)"project_solutes_get", (PyCFunction)_wrap_project_solutes_get, METH_O, (char *)"project_solutes_get(project self) -> solute_vector"}, + { (char *)"project_meteo_stations_set", _wrap_project_meteo_stations_set, METH_VARARGS, (char *)"project_meteo_stations_set(project self, MeteoStationList meteo_stations)"}, + { (char *)"project_meteo_stations_get", (PyCFunction)_wrap_project_meteo_stations_get, METH_O, (char *)"project_meteo_stations_get(project self) -> MeteoStationList"}, + { (char *)"project_rainfall_stations_set", _wrap_project_rainfall_stations_set, METH_VARARGS, (char *)"project_rainfall_stations_set(project self, RainfallStationList rainfall_stations)"}, + { (char *)"project_rainfall_stations_get", (PyCFunction)_wrap_project_rainfall_stations_get, METH_O, (char *)"project_rainfall_stations_get(project self) -> RainfallStationList"}, + { (char *)"project_use_IDW_meteo", (PyCFunction) _wrap_project_use_IDW_meteo, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "project_use_IDW_meteo(project self, double z_weight=0, double power=2)\n" + "\n" + "void\n" + "use_IDW_meteo(double z_weight=0, double power=2)\n" + "\n" + "Uses IDW interpolation to generate meterological data for each cell of\n" + "project.\n" + "\n" + "Creates a meteo-data source for each cell, using spatial interpolated\n" + "data from all meteorological stations of the project using Inverse\n" + "Distance Weighted (IDW) interpolation. The meteorolgical value f is\n" + "calculated with IDW for position x,y,z and time t as follows:\n" + "\n" + "\n" + ".. math::\n" + "\n" + " f(x,y,z,t) &=& \\\\sum^N_{i=1}{f_i(t) w_i(x,y,z)}\n" + " \\\\\\\\ w_i(x,y,z) &=&\n" + " \\\\frac{d_i(x,y,z)^{-p}}{\\\\sum^N_{j=0}{d_j(x,y,z)^{-p}}} \\\\\\\\\n" + " d_i(x,y,z) &=& w_z \\\\left|z-z_i\\\\right| +\n" + " \\\\sqrt{\\\\left(x-x_i\\\\right)^2 + \\\\left(y-y_i\\\\right)^2}\n" + "\n" + "\n" + " :math:`N` is the number of stations\n" + "\n" + ":math:`f_i(t)` the meteorological value at time t, eg. Temperature, Humidity\n" + "\n" + ":math:`w_i` is the weight of station i\n" + "\n" + ":math:`d_i` is the distance from x,y,z to station i\n" + "\n" + ":math:`p` the power of the weighting function, usually 2.\n" + "\n" + ":math:`x_i,y_i,z_i` is the position of station i in space\n" + "\n" + ":math:`w_z` is a factor to weight the vertical distance between stations and\n" + "the cell. 0 results in a pure horizontal interpolation (normal IDW).\n" + "If :math:`w_z=1`, height difference is as important as horizontal distance,\n" + "and with :math:`w_z>1` the height difference is weighted more important than\n" + "horizontal distance See: IDW_Meteorology\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "z_weight: :math:`w_z` the weight of height difference between cell and\n" + "station\n" + "\n" + "power: the power of the distance weight \n" + ""}, + { (char *)"project_use_nearest_meteo", (PyCFunction) _wrap_project_use_nearest_meteo, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "project_use_nearest_meteo(project self, double z_weight=0)\n" + "\n" + "void\n" + "use_nearest_meteo(double z_weight=0)\n" + "\n" + "Connects all cells of the project with its nearest meteorological\n" + "station.\n" + "\n" + "Distance is calculated as follows: \n" + "\n" + ".. math::\n" + "\n" + " d_i(x,y,z) = w_z\n" + " \\\\left|z-z_i\\\\right| + \\\\sqrt{\\\\left(x-x_i\\\\right)^2 +\n" + " \\\\left(y-y_i\\\\right)^2} \n" + "\n" + ":math:`d_i` is the distance from x,y,z to\n" + "station i\n" + "\n" + ":math:`p` the power of the weighting function, usually 2.\n" + "\n" + ":math:`x_i,y_i,z_i` is the position of station i in space\n" + "\n" + ":math:`w_z` is a factor to weight the vertical distance between stations and\n" + "the cell. 0 results in a pure horizontal interpolation (normal IDW).\n" + "If :math:`w_z=1`, height difference is as important as horizontal distance,\n" + "and with :math:`w_z>1` the height difference is weighted more important than\n" + "horizontal distance\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "z_weight: :math:`w_z` the weight of height difference between cell and\n" + "station \n" + ""}, + { (char *)"project_use_IDW_rainfall", (PyCFunction) _wrap_project_use_IDW_rainfall, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "project_use_IDW_rainfall(project self, double z_weight=0, double power=2)\n" + "\n" + "void\n" + "use_IDW_rainfall(double z_weight=0, double power=2)\n" + "\n" + "Uses IDW interpolation to generate rainfall data for each cell of\n" + "project.\n" + "\n" + "Creates a rainfall-data source for each cell, using spatial\n" + "interpolated data from all meteorological stations of the project\n" + "using Inverse Distance Weighted (IDW) interpolation. The rainfall\n" + "intensity P is calculated with IDW for position x,y,z and time t as\n" + "follows: \n" + "\n" + ".. math::\n" + "\n" + " P(x,y,z,t) &=& \\\\sum^N_{i=1}{P_i(t)\n" + " w_i(x,y,z)} \\\\\\\\ w_i(x,y,z) &=&\n" + " \\\\frac{d_i(x,y,z)^{-p}}{\\\\sum^N_{j=0}{d_j(x,y,z)^{-p}}} \\\\\\\\\n" + " d_i(x,y,z) &=& w_z \\\\left|z-z_i\\\\right| +\n" + " \\\\sqrt{\\\\left(x-x_i\\\\right)^2 + \\\\left(y-y_i\\\\right)^2}\n" + "\n" + "\n" + " :math:`N` is the number of stations\n" + "\n" + ":math:`P_i(t)` the meteorological value at time t, eg. Temperature, Humidity\n" + "\n" + ":math:`w_i` is the weight of station i\n" + "\n" + ":math:`d_i` is the distance from x,y,z to station i\n" + "\n" + ":math:`p` the power of the weighting function, usually 2.\n" + "\n" + ":math:`x_i,y_i,z_i` is the position of station i in space\n" + "\n" + ":math:`w_z` is a factor to weight the vertical distance between stations and\n" + "the cell. 0 results in a pure horizontal interpolation (normal IDW).\n" + "If :math:`w_z=1`, height difference is as important as horizontal distance,\n" + "and with :math:`w_z>1` the height difference is weighted more important than\n" + "horizontal distance See: IDW_Meteorology\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "z_weight: :math:`w_z` the weight of height difference between cell and\n" + "station\n" + "\n" + "power: the power of the distance weight \n" + ""}, + { (char *)"project_use_nearest_rainfall", (PyCFunction) _wrap_project_use_nearest_rainfall, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "project_use_nearest_rainfall(project self, double z_weight=0)\n" + "\n" + "void\n" + "use_nearest_rainfall(double z_weight=0)\n" + "\n" + "Connects all cells of the project with its nearest rainfall station.\n" + "\n" + "Distance is calculated as follows: \n" + "\n" + ".. math::\n" + "\n" + " d_i(x,y,z) = w_z\n" + " \\\\left|z-z_i\\\\right| + \\\\sqrt{\\\\left(x-x_i\\\\right)^2 +\n" + " \\\\left(y-y_i\\\\right)^2} \n" + "\n" + ":math:`d_i` is the distance from x,y,z to\n" + "station i\n" + "\n" + ":math:`p` the power of the weighting function, usually 2.\n" + "\n" + ":math:`x_i,y_i,z_i` is the position of station i in space\n" + "\n" + ":math:`w_z` is a factor to weight the vertical distance between stations and\n" + "the cell. 0 results in a pure horizontal interpolation (normal IDW).\n" + "If :math:`w_z=1`, height difference is as important as horizontal distance,\n" + "and with :math:`w_z>1` the height difference is weighted more important than\n" + "horizontal distance\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "z_weight: :math:`w_z` the weight of height difference between cell and\n" + "station \n" + ""}, + { (char *)"project_get_cell", (PyCFunction) _wrap_project_get_cell, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "project_get_cell(project self, ptrdiff_t index) -> Cell\n" + "\n" + "upslope::Cell&\n" + "get_cell(ptrdiff_t index)\n" + "\n" + "Returns the reference to the cell at index in the project. \n" + ""}, + { (char *)"project_size", (PyCFunction)_wrap_project_size, METH_O, (char *)"\n" + "project_size(project self) -> size_t\n" + "\n" + "size_t size() const\n" + "\n" + "The number of cells in the project. \n" + ""}, + { (char *)"new_project", (PyCFunction) _wrap_new_project, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "new_project(std::string solute_names) -> project\n" + "\n" + "project(std::string\n" + "solute_names=\"\")\n" + "\n" + "Creates a new project.\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "solute_names: A string representing the names of the solutes to be\n" + "used in the project. Sepereate solute names with space. \n" + ""}, + { (char *)"delete_project", (PyCFunction)_wrap_delete_project, METH_O, (char *)"\n" + "delete_project(project self)\n" + "\n" + "~project() \n" + ""}, + { (char *)"project_NewCell", (PyCFunction) _wrap_project_NewCell, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "project_NewCell(project self, double x, double y, double z, double area, bool with_surfacewater=False) -> Cell\n" + "\n" + "cmf::upslope::Cell*\n" + "NewCell(double x, double y, double z, double area, bool\n" + "with_surfacewater=false)\n" + "\n" + "Creates a new cell.\n" + "\n" + "A new cell, owned by the project\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "x: y: z: Position of the cell center in project coordinates (m)\n" + "\n" + "area: Area of the cell in m^2\n" + "\n" + "with_surfacewater: If true, the cell will own a surfacewater storage\n" + "upon creation \n" + ""}, + { (char *)"project_NewOutlet", (PyCFunction) _wrap_project_NewOutlet, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "project_NewOutlet(project self, std::string name, double x=0, double y=0, double z=0) -> cmf::water::DirichletBoundary::ptr\n" + "\n" + "cmf::water::DirichletBoundary::ptr NewOutlet(std::string name, double\n" + "x=0, double y=0, double z=0)\n" + "\n" + "Creates a new Dirichlet boundary condition and adds it to the list of\n" + "outlets The potential of the Dirichlet boundary equals z, but can be\n" + "changed.\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "name: Name of the boundary condition for output\n" + "\n" + "x: y: z: Position of the boundary condition in project coordinates\n" + "\n" + ""}, + { (char *)"project_NewStorage", (PyCFunction) _wrap_project_NewStorage, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "project_NewStorage(project self, std::string name, double x=0, double y=0, double z=0) -> cmf::water::WaterStorage::ptr\n" + "\n" + "cmf::water::WaterStorage::ptr NewStorage(std::string name, double x=0,\n" + "double y=0, double z=0)\n" + "\n" + "Creates a new generic water storage at position x,y,z.\n" + "\n" + "The storage is added to the project nodes A new water storage, owned\n" + "by the project\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "name: Name of the generic water storage for output\n" + "\n" + "x: y: z: Position of the generic water storage condition in project\n" + "coordinates \n" + ""}, + { (char *)"project_NewOpenStorage", (PyCFunction) _wrap_project_NewOpenStorage, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "project_NewOpenStorage(project self, std::string name, double x, double y, double z, double area) -> cmf::river::OpenWaterStorage::ptr\n" + "\n" + "cmf::river::OpenWaterStorage::ptr NewOpenStorage(std::string name,\n" + "double x, double y, double z, double area)\n" + "\n" + "Creates a new open water storage with a prism geometry.\n" + "\n" + "The open water storage is added to the project nodes A new open water\n" + "storage, owned by the project\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "name: Name of the open water storage for output\n" + "\n" + "x: y: z: Position of the open water storage in project coordinates\n" + "\n" + "area: Surface area of the open water storage \n" + ""}, + { (char *)"project_NewNeumannBoundary", (PyCFunction) _wrap_project_NewNeumannBoundary, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "project_NewNeumannBoundary(project self, std::string name, cmf::water::WaterStorage::ptr target) -> cmf::water::NeumannBoundary::ptr\n" + "\n" + "cmf::water::NeumannBoundary::ptr NewNeumannBoundary(std::string name,\n" + "cmf::water::WaterStorage::ptr target)\n" + "\n" + "Creates a new Neumann boundary for a target water storage.\n" + "\n" + "The boundary is stored with the project A new Neumann boundary\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "name: The name of the boundary condition\n" + "\n" + "target: The water storage to which the Neumann boundary is bound \n" + ""}, + { (char *)"project_NewReach", (PyCFunction) _wrap_project_NewReach, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "project_NewReach(project self, double x, double y, double z, IChannel shape, bool diffusive=False) -> cmf::river::Reach::ptr\n" + "\n" + "cmf::river::Reach::ptr\n" + "NewReach(double x, double y, double z, cmf::river::IChannel &shape,\n" + "bool diffusive=false)\n" + "\n" + "Creates a new reach.\n" + "\n" + "A new reach, owned by the project\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "x: y: z: Position of the reach in project coordinates\n" + "\n" + "shape: Crossectional geometry of the river. Any class inheriting from\n" + "cmf::water::IChannel\n" + "\n" + "diffusive: If true, this reach uses by default a diffusive wave\n" + "connection \n" + ""}, + { (char *)"project_get_reach", (PyCFunction) _wrap_project_get_reach, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "project_get_reach(project self, ptrdiff_t index) -> cmf::river::Reach::ptr\n" + "\n" + "cmf::river::Reach::ptr get_reach(ptrdiff_t index)\n" + "\n" + "Returns the reach at index. \n" + ""}, + { (char *)"project_reach_count", (PyCFunction)_wrap_project_reach_count, METH_O, (char *)"\n" + "project_reach_count(project self) -> size_t\n" + "\n" + "size_t\n" + "reach_count() const\n" + "\n" + "Returns the number of reaches in this project. \n" + ""}, + { (char *)"project_get_node", (PyCFunction) _wrap_project_get_node, METH_VARARGS | METH_KEYWORDS, (char *)"\n" + "project_get_node(project self, ptrdiff_t index) -> cmf::water::flux_node::ptr\n" + "\n" + "cmf::water::flux_node::ptr get_node(ptrdiff_t index)\n" + "\n" + "Returns the node from the project nodes at index. \n" + ""}, + { (char *)"project_node_count", (PyCFunction)_wrap_project_node_count, METH_O, (char *)"\n" + "project_node_count(project self) -> size_t\n" + "\n" + "size_t node_count()\n" + "const\n" + "\n" + "Returns the number of nodes saved with this project. \n" + ""}, + { (char *)"project_get_storages", (PyCFunction)_wrap_project_get_storages, METH_O, (char *)"\n" + "project_get_storages(project self) -> node_list\n" + "\n" + "cmf::water::node_list get_storages()\n" + "\n" + "Returns a list of all storages of this project. \n" + ""}, + { (char *)"project_cells_get", (PyCFunction)_wrap_project_cells_get, METH_O, (char *)"project_cells_get(project self) -> cell_vector"}, + { (char *)"project_swigregister", project_swigregister, METH_VARARGS, NULL}, + { (char *)"project_swiginit", project_swiginit, METH_VARARGS, NULL}, + { (char *)"SoluteWaterIntegrator_copy", (PyCFunction)_wrap_SoluteWaterIntegrator_copy, METH_O, (char *)"\n" + "SoluteWaterIntegrator_copy(SoluteWaterIntegrator self) -> SoluteWaterIntegrator\n" + "\n" + "virtual cmf::math::SoluteWaterIntegrator* copy() const\n" + "\n" + "Polymorphic copy constructor. \n" + ""}, + { (char *)"new_SoluteWaterIntegrator", _wrap_new_SoluteWaterIntegrator, METH_VARARGS, (char *)"\n" + "SoluteWaterIntegrator(solute_vector solutes, Integrator water_integrator, Integrator solute_integrator)\n" + "new_SoluteWaterIntegrator(solute_vector solutes, Integrator water_integrator, Integrator solute_integrator, StateVariableOwner states) -> SoluteWaterIntegrator\n" + "\n" + "SoluteWaterIntegrator(cmf::water::solute_vector solutes, const\n" + "cmf::math::Integrator &water_integrator, const cmf::math::Integrator\n" + "&solute_integrator, cmf::math::StateVariableOwner &states)\n" + "\n" + "Creates a new SoluteWaterIntegrator.\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "solutes: Solutes of the project\n" + "\n" + "water_integrator: Template for the integrator of WaterStorage state\n" + "variables\n" + "\n" + "solute_integrator: Template for the integrator of soluteStorage state\n" + "variables\n" + "\n" + "states: States to be added to the integrators \n" + ""}, + { (char *)"delete_SoluteWaterIntegrator", (PyCFunction)_wrap_delete_SoluteWaterIntegrator, METH_O, (char *)"\n" + "delete_SoluteWaterIntegrator(SoluteWaterIntegrator self)\n" + "\n" + "~SoluteWaterIntegrator() \n" + ""}, + { (char *)"SoluteWaterIntegrator_to_string", (PyCFunction)_wrap_SoluteWaterIntegrator_to_string, METH_O, (char *)"\n" + "SoluteWaterIntegrator_to_string(SoluteWaterIntegrator self) -> std::string\n" + "\n" + "std::string to_string() const \n" + ""}, + { (char *)"SoluteWaterIntegrator_swigregister", SoluteWaterIntegrator_swigregister, METH_VARARGS, NULL}, + { (char *)"SoluteWaterIntegrator_swiginit", SoluteWaterIntegrator_swiginit, METH_VARARGS, NULL}, + { NULL, NULL, 0, NULL } +}; + + +/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ + +static void *_p_std__shared_ptrT_cmf__water__flux_integrator_tTo_p_std__shared_ptrT_cmf__math__integratable_t(void *x, int *newmemory) { + *newmemory = SWIG_CAST_NEW_MEMORY; + return (void *) new std::shared_ptr< cmf::math::integratable >(*(std::shared_ptr< cmf::water::flux_integrator > *)x); +} +static void *_p_std__shared_ptrT_cmf__water__waterbalance_integrator_tTo_p_std__shared_ptrT_cmf__math__integratable_t(void *x, int *newmemory) { + *newmemory = SWIG_CAST_NEW_MEMORY; + return (void *) new std::shared_ptr< cmf::math::integratable >(*(std::shared_ptr< cmf::water::waterbalance_integrator > *)x); +} +static void *_p_cmf__upslope__connections__GradientMacroMicroExchangeTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::water::flux_connection *) ((cmf::upslope::connections::GradientMacroMicroExchange *) x)); +} +static void *_p_cmf__upslope__connections__TOPModelFlowTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::water::flux_connection *) ((cmf::upslope::connections::TOPModelFlow *) x)); +} +static void *_p_cmf__upslope__connections__SWATPercolationTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::water::flux_connection *) ((cmf::upslope::connections::SWATPercolation *) x)); +} +static void *_p_cmf__upslope__connections__FreeDrainagePercolationTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::water::flux_connection *) ((cmf::upslope::connections::FreeDrainagePercolation *) x)); +} +static void *_p_cmf__upslope__ET__HargreaveETTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::water::flux_connection *) (cmf::upslope::ET::stressedET *) ((cmf::upslope::ET::HargreaveET *) x)); +} +static void *_p_cmf__river__Manning_DiffusiveTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::water::flux_connection *) (cmf::river::Manning *) ((cmf::river::Manning_Diffusive *) x)); +} +static void *_p_cmf__upslope__connections__TopographicGradientDarcyTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::water::flux_connection *) (cmf::upslope::connections::lateral_sub_surface_flux *) ((cmf::upslope::connections::TopographicGradientDarcy *) x)); +} +static void *_p_cmf__water__bidirectional_kinematic_exchangeTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::water::flux_connection *) ((cmf::water::bidirectional_kinematic_exchange *) x)); +} +static void *_p_cmf__upslope__connections__MACROlikeMacroMicroExchangeTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::water::flux_connection *) ((cmf::upslope::connections::MACROlikeMacroMicroExchange *) x)); +} +static void *_p_cmf__upslope__connections__DiffusiveMacroMicroExchangeTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::water::flux_connection *) ((cmf::upslope::connections::DiffusiveMacroMicroExchange *) x)); +} +static void *_p_cmf__upslope__ET__stressedETTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::water::flux_connection *) ((cmf::upslope::ET::stressedET *) x)); +} +static void *_p_cmf__upslope__connections__SimpleTindexSnowMeltTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::water::flux_connection *) ((cmf::upslope::connections::SimpleTindexSnowMelt *) x)); +} +static void *_p_cmf__upslope__connections__EnergyBudgetSnowMeltTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::water::flux_connection *) ((cmf::upslope::connections::EnergyBudgetSnowMelt *) x)); +} +static void *_p_cmf__upslope__connections__DarcyTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::water::flux_connection *) (cmf::upslope::connections::lateral_sub_surface_flux *) ((cmf::upslope::connections::Darcy *) x)); +} +static void *_p_cmf__upslope__connections__lateral_sub_surface_fluxTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::water::flux_connection *) ((cmf::upslope::connections::lateral_sub_surface_flux *) x)); +} +static void *_p_cmf__upslope__connections__RainfallTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::water::flux_connection *) ((cmf::upslope::connections::Rainfall *) x)); +} +static void *_p_cmf__upslope__connections__CanopyOverflowTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::water::flux_connection *) ((cmf::upslope::connections::CanopyOverflow *) x)); +} +static void *_p_cmf__upslope__ET__transpirationTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::water::flux_connection *) ((cmf::upslope::ET::transpiration *) x)); +} +static void *_p_cmf__upslope__ET__soil_evaporationTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::water::flux_connection *) ((cmf::upslope::ET::soil_evaporation *) x)); +} +static void *_p_cmf__upslope__ET__canopy_evaporationTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::water::flux_connection *) ((cmf::upslope::ET::canopy_evaporation *) x)); +} +static void *_p_cmf__upslope__ET__snow_evaporationTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::water::flux_connection *) ((cmf::upslope::ET::snow_evaporation *) x)); +} +static void *_p_cmf__upslope__ET__surface_water_evaporationTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::water::flux_connection *) ((cmf::upslope::ET::surface_water_evaporation *) x)); +} +static void *_p_cmf__upslope__ET__CanopyStorageEvaporationTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::water::flux_connection *) ((cmf::upslope::ET::CanopyStorageEvaporation *) x)); +} +static void *_p_cmf__upslope__ET__PenmanEvaporationTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::water::flux_connection *) ((cmf::upslope::ET::PenmanEvaporation *) x)); +} +static void *_p_cmf__upslope__connections__RichardsTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::water::flux_connection *) ((cmf::upslope::connections::Richards *) x)); +} +static void *_p_cmf__upslope__connections__SimplRichardsTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::water::flux_connection *) ((cmf::upslope::connections::SimplRichards *) x)); +} +static void *_p_cmf__water__waterbalance_connectionTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::water::flux_connection *) ((cmf::water::waterbalance_connection *) x)); +} +static void *_p_cmf__water__external_control_connectionTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::water::flux_connection *) ((cmf::water::external_control_connection *) x)); +} +static void *_p_cmf__water__LinearStorageConnectionTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::water::flux_connection *) ((cmf::water::LinearStorageConnection *) x)); +} +static void *_p_cmf__water__PowerLawConnectionTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::water::flux_connection *) ((cmf::water::PowerLawConnection *) x)); +} +static void *_p_cmf__water__ExponentialDeclineConnectionTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::water::flux_connection *) ((cmf::water::ExponentialDeclineConnection *) x)); +} +static void *_p_cmf__water__ConstraintLinearStorageConnectionTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::water::flux_connection *) ((cmf::water::ConstraintLinearStorageConnection *) x)); +} +static void *_p_cmf__water__generic_gradient_connectionTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::water::flux_connection *) ((cmf::water::generic_gradient_connection *) x)); +} +static void *_p_cmf__water__statecontrol_connectionTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::water::flux_connection *) ((cmf::water::statecontrol_connection *) x)); +} +static void *_p_cmf__water__SystemBridgeConnectionTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::water::flux_connection *) ((cmf::water::SystemBridgeConnection *) x)); +} +static void *_p_cmf__river__Manning_KinematicTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::water::flux_connection *) (cmf::river::Manning *) ((cmf::river::Manning_Kinematic *) x)); +} +static void *_p_cmf__upslope__connections__DarcyKinematicTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::water::flux_connection *) (cmf::upslope::connections::lateral_sub_surface_flux *) ((cmf::upslope::connections::DarcyKinematic *) x)); +} +static void *_p_cmf__upslope__connections__JarvisMacroFlowTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::water::flux_connection *) (cmf::upslope::connections::BaseMacroFlow *) ((cmf::upslope::connections::JarvisMacroFlow *) x)); +} +static void *_p_cmf__upslope__connections__KinematicMacroFlowTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::water::flux_connection *) (cmf::upslope::connections::BaseMacroFlow *) ((cmf::upslope::connections::KinematicMacroFlow *) x)); +} +static void *_p_cmf__upslope__connections__GradientMacroFlowTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::water::flux_connection *) (cmf::upslope::connections::BaseMacroFlow *) ((cmf::upslope::connections::GradientMacroFlow *) x)); +} +static void *_p_cmf__upslope__connections__BaseMacroFlowTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::water::flux_connection *) ((cmf::upslope::connections::BaseMacroFlow *) x)); +} +static void *_p_cmf__upslope__connections__MatrixInfiltrationTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::water::flux_connection *) ((cmf::upslope::connections::MatrixInfiltration *) x)); +} +static void *_p_cmf__upslope__connections__GreenAmptInfiltrationTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::water::flux_connection *) ((cmf::upslope::connections::GreenAmptInfiltration *) x)); +} +static void *_p_cmf__upslope__connections__SimpleInfiltrationTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::water::flux_connection *) ((cmf::upslope::connections::SimpleInfiltration *) x)); +} +static void *_p_cmf__water__NeumannFluxTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::water::flux_connection *) ((cmf::water::NeumannFlux *) x)); +} +static void *_p_cmf__upslope__aquifer_DarcyTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::water::flux_connection *) ((cmf::upslope::aquifer_Darcy *) x)); +} +static void *_p_cmf__upslope__connections__RutterInterceptionTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::water::flux_connection *) ((cmf::upslope::connections::RutterInterception *) x)); +} +static void *_p_cmf__water__kinematic_waveTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::water::flux_connection *) ((cmf::water::kinematic_wave *) x)); +} +static void *_p_cmf__water__constraint_kinematic_waveTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::water::flux_connection *) ((cmf::water::constraint_kinematic_wave *) x)); +} +static void *_p_cmf__upslope__ET__constantETpotTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::water::flux_connection *) (cmf::upslope::ET::stressedET *) ((cmf::upslope::ET::constantETpot *) x)); +} +static void *_p_cmf__upslope__connections__DiffusiveSurfaceRunoffTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::water::flux_connection *) ((cmf::upslope::connections::DiffusiveSurfaceRunoff *) x)); +} +static void *_p_cmf__upslope__connections__KinematicSurfaceRunoffTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::water::flux_connection *) ((cmf::upslope::connections::KinematicSurfaceRunoff *) x)); +} +static void *_p_cmf__upslope__connections__LayerBypassTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::water::flux_connection *) ((cmf::upslope::connections::LayerBypass *) x)); +} +static void *_p_cmf__water__TechnicalFluxTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::water::flux_connection *) ((cmf::water::TechnicalFlux *) x)); +} +static void *_p_cmf__upslope__connections__SnowfallTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::water::flux_connection *) ((cmf::upslope::connections::Snowfall *) x)); +} +static void *_p_cmf__upslope__ET__PriestleyTaylorETTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::water::flux_connection *) (cmf::upslope::ET::stressedET *) ((cmf::upslope::ET::PriestleyTaylorET *) x)); +} +static void *_p_cmf__upslope__ET__timeseriesETpotTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::water::flux_connection *) (cmf::upslope::ET::stressedET *) ((cmf::upslope::ET::timeseriesETpot *) x)); +} +static void *_p_cmf__upslope__ET__TurcETTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::water::flux_connection *) (cmf::upslope::ET::stressedET *) ((cmf::upslope::ET::TurcET *) x)); +} +static void *_p_cmf__river__ManningTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::water::flux_connection *) ((cmf::river::Manning *) x)); +} +static void *_p_cmf__upslope__connections__Richards_lateralTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::water::flux_connection *) (cmf::upslope::connections::lateral_sub_surface_flux *) ((cmf::upslope::connections::Richards_lateral *) x)); +} +static void *_p_cmf__upslope__ET__PenmanMonteithETTo_p_cmf__water__flux_connection(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::water::flux_connection *) (cmf::upslope::ET::stressedET *) ((cmf::upslope::ET::PenmanMonteithET *) x)); +} +static void *_p_cmf__upslope__LinearRetentionTo_p_cmf__upslope__RetentionCurve(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::upslope::RetentionCurve *) ((cmf::upslope::LinearRetention *) x)); +} +static void *_p_cmf__upslope__BrooksCoreyRetentionCurveTo_p_cmf__upslope__RetentionCurve(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::upslope::RetentionCurve *) ((cmf::upslope::BrooksCoreyRetentionCurve *) x)); +} +static void *_p_cmf__upslope__VanGenuchtenMualemTo_p_cmf__upslope__RetentionCurve(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::upslope::RetentionCurve *) ((cmf::upslope::VanGenuchtenMualem *) x)); +} +static void *_p_cmf__atmosphere__IDWRainfallTo_p_cmf__water__flux_node(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::water::flux_node *) (cmf::atmosphere::RainSource *) ((cmf::atmosphere::IDWRainfall *) x)); +} +static void *_p_cmf__water__SystemBridgeTo_p_cmf__water__flux_node(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::water::flux_node *) ((cmf::water::SystemBridge *) x)); +} +static void *_p_cmf__atmosphere__RainfallStationReferenceTo_p_cmf__water__flux_node(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::water::flux_node *) (cmf::atmosphere::RainSource *) ((cmf::atmosphere::RainfallStationReference *) x)); +} +static void *_p_cmf__water__NeumannBoundaryTo_p_cmf__water__flux_node(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::water::flux_node *) ((cmf::water::NeumannBoundary *) x)); +} +static void *_p_cmf__water__DirichletBoundaryTo_p_cmf__water__flux_node(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::water::flux_node *) ((cmf::water::DirichletBoundary *) x)); +} +static void *_p_cmf__upslope__aquiferTo_p_cmf__water__flux_node(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::water::flux_node *) (cmf::water::WaterStorage *) ((cmf::upslope::aquifer *) x)); +} +static void *_p_cmf__upslope__MacroPoreTo_p_cmf__water__flux_node(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::water::flux_node *) (cmf::water::WaterStorage *) ((cmf::upslope::MacroPore *) x)); +} +static void *_p_cmf__upslope__SoilLayerTo_p_cmf__water__flux_node(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::water::flux_node *) (cmf::water::WaterStorage *) ((cmf::upslope::SoilLayer *) x)); +} +static void *_p_cmf__atmosphere__TimeseriesRainSourceTo_p_cmf__water__flux_node(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::water::flux_node *) (cmf::atmosphere::RainSource *) ((cmf::atmosphere::TimeseriesRainSource *) x)); +} +static void *_p_cmf__atmosphere__ConstantRainSourceTo_p_cmf__water__flux_node(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::water::flux_node *) (cmf::atmosphere::RainSource *) ((cmf::atmosphere::ConstantRainSource *) x)); +} +static void *_p_cmf__atmosphere__RainSourceTo_p_cmf__water__flux_node(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::water::flux_node *) ((cmf::atmosphere::RainSource *) x)); +} +static void *_p_cmf__river__ReachTo_p_cmf__water__flux_node(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::water::flux_node *) (cmf::water::WaterStorage *)(cmf::river::OpenWaterStorage *) ((cmf::river::Reach *) x)); +} +static void *_p_cmf__river__OpenWaterStorageTo_p_cmf__water__flux_node(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::water::flux_node *) (cmf::water::WaterStorage *) ((cmf::river::OpenWaterStorage *) x)); +} +static void *_p_cmf__water__WaterStorageTo_p_cmf__water__flux_node(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::water::flux_node *) ((cmf::water::WaterStorage *) x)); +} +static void *_p_cmf__upslope__SurfaceWaterTo_p_cmf__water__flux_node(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::water::flux_node *) (cmf::water::WaterStorage *)(cmf::river::OpenWaterStorage *) ((cmf::upslope::SurfaceWater *) x)); +} +static void *_p_cmf__upslope__ET__HargreaveETTo_p_cmf__upslope__ET__stressedET(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::upslope::ET::stressedET *) ((cmf::upslope::ET::HargreaveET *) x)); +} +static void *_p_cmf__upslope__ET__constantETpotTo_p_cmf__upslope__ET__stressedET(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::upslope::ET::stressedET *) ((cmf::upslope::ET::constantETpot *) x)); +} +static void *_p_cmf__upslope__ET__PenmanMonteithETTo_p_cmf__upslope__ET__stressedET(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::upslope::ET::stressedET *) ((cmf::upslope::ET::PenmanMonteithET *) x)); +} +static void *_p_cmf__upslope__ET__TurcETTo_p_cmf__upslope__ET__stressedET(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::upslope::ET::stressedET *) ((cmf::upslope::ET::TurcET *) x)); +} +static void *_p_cmf__upslope__ET__PriestleyTaylorETTo_p_cmf__upslope__ET__stressedET(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::upslope::ET::stressedET *) ((cmf::upslope::ET::PriestleyTaylorET *) x)); +} +static void *_p_cmf__upslope__ET__timeseriesETpotTo_p_cmf__upslope__ET__stressedET(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::upslope::ET::stressedET *) ((cmf::upslope::ET::timeseriesETpot *) x)); +} +static void *_p_cmf__upslope__ET__ShuttleworthWallaceTo_p_cmf__upslope__ET__surface_water_evaporation_method(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::upslope::ET::surface_water_evaporation_method *) ((cmf::upslope::ET::ShuttleworthWallace *) x)); +} +static void *_p_cmf__river__PipeReachTo_p_cmf__river__IChannel(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::river::IChannel *) ((cmf::river::PipeReach *) x)); +} +static void *_p_cmf__river__ChannelTo_p_cmf__river__IChannel(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::river::IChannel *) ((cmf::river::Channel *) x)); +} +static void *_p_cmf__river__MeanChannelTo_p_cmf__river__IChannel(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::river::IChannel *) ((cmf::river::MeanChannel *) x)); +} +static void *_p_cmf__river__SWATReachTypeTo_p_cmf__river__IChannel(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::river::IChannel *) ((cmf::river::SWATReachType *) x)); +} +static void *_p_cmf__river__TriangularReachTo_p_cmf__river__IChannel(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::river::IChannel *) ((cmf::river::TriangularReach *) x)); +} +static void *_p_cmf__river__RectangularReachTo_p_cmf__river__IChannel(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::river::IChannel *) ((cmf::river::RectangularReach *) x)); +} +static void *_p_std__shared_ptrT_cmf__atmosphere__RainfallStationReference_tTo_p_std__shared_ptrT_cmf__atmosphere__RainSource_t(void *x, int *newmemory) { + *newmemory = SWIG_CAST_NEW_MEMORY; + return (void *) new std::shared_ptr< cmf::atmosphere::RainSource >(*(std::shared_ptr< cmf::atmosphere::RainfallStationReference > *)x); +} +static void *_p_std__shared_ptrT_cmf__atmosphere__ConstantRainSource_tTo_p_std__shared_ptrT_cmf__atmosphere__RainSource_t(void *x, int *newmemory) { + *newmemory = SWIG_CAST_NEW_MEMORY; + return (void *) new std::shared_ptr< cmf::atmosphere::RainSource >(*(std::shared_ptr< cmf::atmosphere::ConstantRainSource > *)x); +} +static void *_p_std__shared_ptrT_cmf__atmosphere__TimeseriesRainSource_tTo_p_std__shared_ptrT_cmf__atmosphere__RainSource_t(void *x, int *newmemory) { + *newmemory = SWIG_CAST_NEW_MEMORY; + return (void *) new std::shared_ptr< cmf::atmosphere::RainSource >(*(std::shared_ptr< cmf::atmosphere::TimeseriesRainSource > *)x); +} +static void *_p_std__shared_ptrT_cmf__atmosphere__IDWRainfall_tTo_p_std__shared_ptrT_cmf__atmosphere__RainSource_t(void *x, int *newmemory) { + *newmemory = SWIG_CAST_NEW_MEMORY; + return (void *) new std::shared_ptr< cmf::atmosphere::RainSource >(*(std::shared_ptr< cmf::atmosphere::IDWRainfall > *)x); +} +static void *_p_cmf__upslope__connections__GradientMacroFlowTo_p_cmf__upslope__connections__BaseMacroFlow(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::upslope::connections::BaseMacroFlow *) ((cmf::upslope::connections::GradientMacroFlow *) x)); +} +static void *_p_cmf__upslope__connections__KinematicMacroFlowTo_p_cmf__upslope__connections__BaseMacroFlow(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::upslope::connections::BaseMacroFlow *) ((cmf::upslope::connections::KinematicMacroFlow *) x)); +} +static void *_p_cmf__upslope__connections__JarvisMacroFlowTo_p_cmf__upslope__connections__BaseMacroFlow(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::upslope::connections::BaseMacroFlow *) ((cmf::upslope::connections::JarvisMacroFlow *) x)); +} +static void *_p_cmf__atmosphere__ConstantRainSourceTo_p_cmf__atmosphere__RainSource(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::atmosphere::RainSource *) ((cmf::atmosphere::ConstantRainSource *) x)); +} +static void *_p_cmf__atmosphere__TimeseriesRainSourceTo_p_cmf__atmosphere__RainSource(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::atmosphere::RainSource *) ((cmf::atmosphere::TimeseriesRainSource *) x)); +} +static void *_p_cmf__atmosphere__RainfallStationReferenceTo_p_cmf__atmosphere__RainSource(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::atmosphere::RainSource *) ((cmf::atmosphere::RainfallStationReference *) x)); +} +static void *_p_cmf__atmosphere__IDWRainfallTo_p_cmf__atmosphere__RainSource(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::atmosphere::RainSource *) ((cmf::atmosphere::IDWRainfall *) x)); +} +static void *_p_cmf__upslope__ET__SuctionStressTo_p_cmf__upslope__ET__RootUptakeStessFunction(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::upslope::ET::RootUptakeStessFunction *) ((cmf::upslope::ET::SuctionStress *) x)); +} +static void *_p_cmf__upslope__ET__ContentStressTo_p_cmf__upslope__ET__RootUptakeStessFunction(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::upslope::ET::RootUptakeStessFunction *) ((cmf::upslope::ET::ContentStress *) x)); +} +static void *_p_cmf__upslope__ET__VolumeStressTo_p_cmf__upslope__ET__RootUptakeStessFunction(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::upslope::ET::RootUptakeStessFunction *) ((cmf::upslope::ET::VolumeStress *) x)); +} +static void *_p_cmf__river__IChannelTo_p_cmf__river__IVolumeHeightFunction(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::river::IVolumeHeightFunction *) ((cmf::river::IChannel *) x)); +} +static void *_p_cmf__river__PipeReachTo_p_cmf__river__IVolumeHeightFunction(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::river::IVolumeHeightFunction *) (cmf::river::IChannel *) ((cmf::river::PipeReach *) x)); +} +static void *_p_cmf__river__ChannelTo_p_cmf__river__IVolumeHeightFunction(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::river::IVolumeHeightFunction *) (cmf::river::IChannel *) ((cmf::river::Channel *) x)); +} +static void *_p_cmf__river__MeanChannelTo_p_cmf__river__IVolumeHeightFunction(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::river::IVolumeHeightFunction *) (cmf::river::IChannel *) ((cmf::river::MeanChannel *) x)); +} +static void *_p_cmf__river__volume_height_functionTo_p_cmf__river__IVolumeHeightFunction(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::river::IVolumeHeightFunction *) ((cmf::river::volume_height_function *) x)); +} +static void *_p_cmf__river__SWATReachTypeTo_p_cmf__river__IVolumeHeightFunction(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::river::IVolumeHeightFunction *) (cmf::river::IChannel *) ((cmf::river::SWATReachType *) x)); +} +static void *_p_cmf__river__TriangularReachTo_p_cmf__river__IVolumeHeightFunction(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::river::IVolumeHeightFunction *) (cmf::river::IChannel *) ((cmf::river::TriangularReach *) x)); +} +static void *_p_cmf__river__RectangularReachTo_p_cmf__river__IVolumeHeightFunction(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::river::IVolumeHeightFunction *) (cmf::river::IChannel *) ((cmf::river::RectangularReach *) x)); +} +static void *_p_cmf__river__PrismTo_p_cmf__river__IVolumeHeightFunction(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::river::IVolumeHeightFunction *) ((cmf::river::Prism *) x)); +} +static void *_p_cmf__river__Manning_DiffusiveTo_p_cmf__river__Manning(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::river::Manning *) ((cmf::river::Manning_Diffusive *) x)); +} +static void *_p_cmf__river__Manning_KinematicTo_p_cmf__river__Manning(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::river::Manning *) ((cmf::river::Manning_Kinematic *) x)); +} +static void *_p_cmf__upslope__connections__TopographicGradientDarcyTo_p_cmf__upslope__connections__lateral_sub_surface_flux(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::upslope::connections::lateral_sub_surface_flux *) ((cmf::upslope::connections::TopographicGradientDarcy *) x)); +} +static void *_p_cmf__upslope__connections__DarcyKinematicTo_p_cmf__upslope__connections__lateral_sub_surface_flux(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::upslope::connections::lateral_sub_surface_flux *) ((cmf::upslope::connections::DarcyKinematic *) x)); +} +static void *_p_cmf__upslope__connections__Richards_lateralTo_p_cmf__upslope__connections__lateral_sub_surface_flux(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::upslope::connections::lateral_sub_surface_flux *) ((cmf::upslope::connections::Richards_lateral *) x)); +} +static void *_p_cmf__upslope__connections__DarcyTo_p_cmf__upslope__connections__lateral_sub_surface_flux(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::upslope::connections::lateral_sub_surface_flux *) ((cmf::upslope::connections::Darcy *) x)); +} +static void *_p_std__shared_ptrT_cmf__river__Reach_tTo_p_std__shared_ptrT_cmf__river__OpenWaterStorage_t(void *x, int *newmemory) { + *newmemory = SWIG_CAST_NEW_MEMORY; + return (void *) new std::shared_ptr< cmf::river::OpenWaterStorage >(*(std::shared_ptr< cmf::river::Reach > *)x); +} +static void *_p_std__shared_ptrT_cmf__upslope__SurfaceWater_tTo_p_std__shared_ptrT_cmf__river__OpenWaterStorage_t(void *x, int *newmemory) { + *newmemory = SWIG_CAST_NEW_MEMORY; + return (void *) new std::shared_ptr< cmf::river::OpenWaterStorage >(*(std::shared_ptr< cmf::upslope::SurfaceWater > *)x); +} +static void *_p_std__shared_ptrT_cmf__river__Reach_tTo_p_std__shared_ptrT_cmf__water__WaterStorage_t(void *x, int *newmemory) { + *newmemory = SWIG_CAST_NEW_MEMORY; + return (void *) new std::shared_ptr< cmf::water::WaterStorage >(*(std::shared_ptr< cmf::river::Reach > *)x); +} +static void *_p_std__shared_ptrT_cmf__upslope__aquifer_tTo_p_std__shared_ptrT_cmf__water__WaterStorage_t(void *x, int *newmemory) { + *newmemory = SWIG_CAST_NEW_MEMORY; + return (void *) new std::shared_ptr< cmf::water::WaterStorage >(*(std::shared_ptr< cmf::upslope::aquifer > *)x); +} +static void *_p_std__shared_ptrT_cmf__river__OpenWaterStorage_tTo_p_std__shared_ptrT_cmf__water__WaterStorage_t(void *x, int *newmemory) { + *newmemory = SWIG_CAST_NEW_MEMORY; + return (void *) new std::shared_ptr< cmf::water::WaterStorage >(*(std::shared_ptr< cmf::river::OpenWaterStorage > *)x); +} +static void *_p_std__shared_ptrT_cmf__upslope__MacroPore_tTo_p_std__shared_ptrT_cmf__water__WaterStorage_t(void *x, int *newmemory) { + *newmemory = SWIG_CAST_NEW_MEMORY; + return (void *) new std::shared_ptr< cmf::water::WaterStorage >(*(std::shared_ptr< cmf::upslope::MacroPore > *)x); +} +static void *_p_std__shared_ptrT_cmf__upslope__SoilLayer_tTo_p_std__shared_ptrT_cmf__water__WaterStorage_t(void *x, int *newmemory) { + *newmemory = SWIG_CAST_NEW_MEMORY; + return (void *) new std::shared_ptr< cmf::water::WaterStorage >(*(std::shared_ptr< cmf::upslope::SoilLayer > *)x); +} +static void *_p_std__shared_ptrT_cmf__upslope__SurfaceWater_tTo_p_std__shared_ptrT_cmf__water__WaterStorage_t(void *x, int *newmemory) { + *newmemory = SWIG_CAST_NEW_MEMORY; + return (void *) new std::shared_ptr< cmf::water::WaterStorage >(*(std::shared_ptr< cmf::upslope::SurfaceWater > *)x); +} +static void *_p_std__shared_ptrT_cmf__water__SystemBridge_tTo_p_std__shared_ptrT_cmf__water__flux_node_t(void *x, int *newmemory) { + *newmemory = SWIG_CAST_NEW_MEMORY; + return (void *) new std::shared_ptr< cmf::water::flux_node >(*(std::shared_ptr< cmf::water::SystemBridge > *)x); +} +static void *_p_std__shared_ptrT_cmf__upslope__MacroPore_tTo_p_std__shared_ptrT_cmf__water__flux_node_t(void *x, int *newmemory) { + *newmemory = SWIG_CAST_NEW_MEMORY; + return (void *) new std::shared_ptr< cmf::water::flux_node >(*(std::shared_ptr< cmf::upslope::MacroPore > *)x); +} +static void *_p_std__shared_ptrT_cmf__atmosphere__IDWRainfall_tTo_p_std__shared_ptrT_cmf__water__flux_node_t(void *x, int *newmemory) { + *newmemory = SWIG_CAST_NEW_MEMORY; + return (void *) new std::shared_ptr< cmf::water::flux_node >(*(std::shared_ptr< cmf::atmosphere::IDWRainfall > *)x); +} +static void *_p_std__shared_ptrT_cmf__water__NeumannBoundary_tTo_p_std__shared_ptrT_cmf__water__flux_node_t(void *x, int *newmemory) { + *newmemory = SWIG_CAST_NEW_MEMORY; + return (void *) new std::shared_ptr< cmf::water::flux_node >(*(std::shared_ptr< cmf::water::NeumannBoundary > *)x); +} +static void *_p_std__shared_ptrT_cmf__water__DirichletBoundary_tTo_p_std__shared_ptrT_cmf__water__flux_node_t(void *x, int *newmemory) { + *newmemory = SWIG_CAST_NEW_MEMORY; + return (void *) new std::shared_ptr< cmf::water::flux_node >(*(std::shared_ptr< cmf::water::DirichletBoundary > *)x); +} +static void *_p_std__shared_ptrT_cmf__upslope__aquifer_tTo_p_std__shared_ptrT_cmf__water__flux_node_t(void *x, int *newmemory) { + *newmemory = SWIG_CAST_NEW_MEMORY; + return (void *) new std::shared_ptr< cmf::water::flux_node >(*(std::shared_ptr< cmf::upslope::aquifer > *)x); +} +static void *_p_std__shared_ptrT_cmf__river__Reach_tTo_p_std__shared_ptrT_cmf__water__flux_node_t(void *x, int *newmemory) { + *newmemory = SWIG_CAST_NEW_MEMORY; + return (void *) new std::shared_ptr< cmf::water::flux_node >(*(std::shared_ptr< cmf::river::Reach > *)x); +} +static void *_p_std__shared_ptrT_cmf__upslope__SurfaceWater_tTo_p_std__shared_ptrT_cmf__water__flux_node_t(void *x, int *newmemory) { + *newmemory = SWIG_CAST_NEW_MEMORY; + return (void *) new std::shared_ptr< cmf::water::flux_node >(*(std::shared_ptr< cmf::upslope::SurfaceWater > *)x); +} +static void *_p_std__shared_ptrT_cmf__atmosphere__TimeseriesRainSource_tTo_p_std__shared_ptrT_cmf__water__flux_node_t(void *x, int *newmemory) { + *newmemory = SWIG_CAST_NEW_MEMORY; + return (void *) new std::shared_ptr< cmf::water::flux_node >(*(std::shared_ptr< cmf::atmosphere::TimeseriesRainSource > *)x); +} +static void *_p_std__shared_ptrT_cmf__river__OpenWaterStorage_tTo_p_std__shared_ptrT_cmf__water__flux_node_t(void *x, int *newmemory) { + *newmemory = SWIG_CAST_NEW_MEMORY; + return (void *) new std::shared_ptr< cmf::water::flux_node >(*(std::shared_ptr< cmf::river::OpenWaterStorage > *)x); +} +static void *_p_std__shared_ptrT_cmf__water__WaterStorage_tTo_p_std__shared_ptrT_cmf__water__flux_node_t(void *x, int *newmemory) { + *newmemory = SWIG_CAST_NEW_MEMORY; + return (void *) new std::shared_ptr< cmf::water::flux_node >(*(std::shared_ptr< cmf::water::WaterStorage > *)x); +} +static void *_p_std__shared_ptrT_cmf__atmosphere__ConstantRainSource_tTo_p_std__shared_ptrT_cmf__water__flux_node_t(void *x, int *newmemory) { + *newmemory = SWIG_CAST_NEW_MEMORY; + return (void *) new std::shared_ptr< cmf::water::flux_node >(*(std::shared_ptr< cmf::atmosphere::ConstantRainSource > *)x); +} +static void *_p_std__shared_ptrT_cmf__atmosphere__RainfallStationReference_tTo_p_std__shared_ptrT_cmf__water__flux_node_t(void *x, int *newmemory) { + *newmemory = SWIG_CAST_NEW_MEMORY; + return (void *) new std::shared_ptr< cmf::water::flux_node >(*(std::shared_ptr< cmf::atmosphere::RainfallStationReference > *)x); +} +static void *_p_std__shared_ptrT_cmf__atmosphere__RainSource_tTo_p_std__shared_ptrT_cmf__water__flux_node_t(void *x, int *newmemory) { + *newmemory = SWIG_CAST_NEW_MEMORY; + return (void *) new std::shared_ptr< cmf::water::flux_node >(*(std::shared_ptr< cmf::atmosphere::RainSource > *)x); +} +static void *_p_std__shared_ptrT_cmf__upslope__SoilLayer_tTo_p_std__shared_ptrT_cmf__water__flux_node_t(void *x, int *newmemory) { + *newmemory = SWIG_CAST_NEW_MEMORY; + return (void *) new std::shared_ptr< cmf::water::flux_node >(*(std::shared_ptr< cmf::upslope::SoilLayer > *)x); +} +static void *_p_cmf__upslope__ET__ShuttleworthWallaceTo_p_cmf__atmosphere__aerodynamic_resistance(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::atmosphere::aerodynamic_resistance *) ((cmf::upslope::ET::ShuttleworthWallace *) x)); +} +static void *_p_cmf__atmosphere__log_wind_profileTo_p_cmf__atmosphere__aerodynamic_resistance(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::atmosphere::aerodynamic_resistance *) ((cmf::atmosphere::log_wind_profile *) x)); +} +static void *_p_cmf__upslope__ET__ShuttleworthWallaceTo_p_cmf__upslope__ET__snow_evaporation_method(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::upslope::ET::snow_evaporation_method *) ((cmf::upslope::ET::ShuttleworthWallace *) x)); +} +static void *_p_cmf__upslope__ET__ShuttleworthWallaceTo_p_cmf__upslope__ET__canopy_evaporation_method(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::upslope::ET::canopy_evaporation_method *) ((cmf::upslope::ET::ShuttleworthWallace *) x)); +} +static void *_p_cmf__upslope__ET__ShuttleworthWallaceTo_p_cmf__upslope__ET__soil_evaporation_method(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::upslope::ET::soil_evaporation_method *) ((cmf::upslope::ET::ShuttleworthWallace *) x)); +} +static void *_p_cmf__upslope__ET__ShuttleworthWallaceTo_p_cmf__upslope__ET__transpiration_method(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::upslope::ET::transpiration_method *) ((cmf::upslope::ET::ShuttleworthWallace *) x)); +} +static void *_p_std__shared_ptrT_cmf__river__Reach_tTo_p_std__shared_ptrT_cmf__math__StateVariable_t(void *x, int *newmemory) { + *newmemory = SWIG_CAST_NEW_MEMORY; + return (void *) new std::shared_ptr< cmf::math::StateVariable >(*(std::shared_ptr< cmf::river::Reach > *)x); +} +static void *_p_std__shared_ptrT_cmf__upslope__aquifer_tTo_p_std__shared_ptrT_cmf__math__StateVariable_t(void *x, int *newmemory) { + *newmemory = SWIG_CAST_NEW_MEMORY; + return (void *) new std::shared_ptr< cmf::math::StateVariable >(*(std::shared_ptr< cmf::upslope::aquifer > *)x); +} +static void *_p_std__shared_ptrT_cmf__water__SoluteStorage_tTo_p_std__shared_ptrT_cmf__math__StateVariable_t(void *x, int *newmemory) { + *newmemory = SWIG_CAST_NEW_MEMORY; + return (void *) new std::shared_ptr< cmf::math::StateVariable >(*(std::shared_ptr< cmf::water::SoluteStorage > *)x); +} +static void *_p_std__shared_ptrT_cmf__water__WaterStorage_tTo_p_std__shared_ptrT_cmf__math__StateVariable_t(void *x, int *newmemory) { + *newmemory = SWIG_CAST_NEW_MEMORY; + return (void *) new std::shared_ptr< cmf::math::StateVariable >(*(std::shared_ptr< cmf::water::WaterStorage > *)x); +} +static void *_p_std__shared_ptrT_cmf__river__OpenWaterStorage_tTo_p_std__shared_ptrT_cmf__math__StateVariable_t(void *x, int *newmemory) { + *newmemory = SWIG_CAST_NEW_MEMORY; + return (void *) new std::shared_ptr< cmf::math::StateVariable >(*(std::shared_ptr< cmf::river::OpenWaterStorage > *)x); +} +static void *_p_std__shared_ptrT_cmf__upslope__MacroPore_tTo_p_std__shared_ptrT_cmf__math__StateVariable_t(void *x, int *newmemory) { + *newmemory = SWIG_CAST_NEW_MEMORY; + return (void *) new std::shared_ptr< cmf::math::StateVariable >(*(std::shared_ptr< cmf::upslope::MacroPore > *)x); +} +static void *_p_std__shared_ptrT_cmf__upslope__SoilLayer_tTo_p_std__shared_ptrT_cmf__math__StateVariable_t(void *x, int *newmemory) { + *newmemory = SWIG_CAST_NEW_MEMORY; + return (void *) new std::shared_ptr< cmf::math::StateVariable >(*(std::shared_ptr< cmf::upslope::SoilLayer > *)x); +} +static void *_p_std__shared_ptrT_cmf__upslope__SurfaceWater_tTo_p_std__shared_ptrT_cmf__math__StateVariable_t(void *x, int *newmemory) { + *newmemory = SWIG_CAST_NEW_MEMORY; + return (void *) new std::shared_ptr< cmf::math::StateVariable >(*(std::shared_ptr< cmf::upslope::SurfaceWater > *)x); +} +static void *_p_cmf__water__waterbalance_integratorTo_p_cmf__math__integratable(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::math::integratable *) ((cmf::water::waterbalance_integrator *) x)); +} +static void *_p_cmf__water__flux_integratorTo_p_cmf__math__integratable(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::math::integratable *) ((cmf::water::flux_integrator *) x)); +} +static void *_p_cmf__river__ReachTo_p_cmf__river__OpenWaterStorage(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::river::OpenWaterStorage *) ((cmf::river::Reach *) x)); +} +static void *_p_cmf__upslope__SurfaceWaterTo_p_cmf__river__OpenWaterStorage(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::river::OpenWaterStorage *) ((cmf::upslope::SurfaceWater *) x)); +} +static void *_p_cmf__river__ReachTo_p_cmf__water__WaterStorage(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::water::WaterStorage *) (cmf::river::OpenWaterStorage *) ((cmf::river::Reach *) x)); +} +static void *_p_cmf__upslope__SurfaceWaterTo_p_cmf__water__WaterStorage(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::water::WaterStorage *) (cmf::river::OpenWaterStorage *) ((cmf::upslope::SurfaceWater *) x)); +} +static void *_p_cmf__upslope__SoilLayerTo_p_cmf__water__WaterStorage(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::water::WaterStorage *) ((cmf::upslope::SoilLayer *) x)); +} +static void *_p_cmf__upslope__MacroPoreTo_p_cmf__water__WaterStorage(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::water::WaterStorage *) ((cmf::upslope::MacroPore *) x)); +} +static void *_p_cmf__river__OpenWaterStorageTo_p_cmf__water__WaterStorage(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::water::WaterStorage *) ((cmf::river::OpenWaterStorage *) x)); +} +static void *_p_cmf__upslope__aquiferTo_p_cmf__water__WaterStorage(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::water::WaterStorage *) ((cmf::upslope::aquifer *) x)); +} +static void *_p_cmf__river__ReachTo_p_cmf__math__StateVariable(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::math::StateVariable *) (cmf::water::WaterStorage *)(cmf::river::OpenWaterStorage *) ((cmf::river::Reach *) x)); +} +static void *_p_cmf__upslope__SurfaceWaterTo_p_cmf__math__StateVariable(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::math::StateVariable *) (cmf::water::WaterStorage *)(cmf::river::OpenWaterStorage *) ((cmf::upslope::SurfaceWater *) x)); +} +static void *_p_cmf__upslope__SoilLayerTo_p_cmf__math__StateVariable(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::math::StateVariable *) (cmf::water::WaterStorage *) ((cmf::upslope::SoilLayer *) x)); +} +static void *_p_cmf__upslope__MacroPoreTo_p_cmf__math__StateVariable(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::math::StateVariable *) (cmf::water::WaterStorage *) ((cmf::upslope::MacroPore *) x)); +} +static void *_p_cmf__water__SoluteStorageTo_p_cmf__math__StateVariable(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::math::StateVariable *) ((cmf::water::SoluteStorage *) x)); +} +static void *_p_cmf__water__WaterStorageTo_p_cmf__math__StateVariable(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::math::StateVariable *) ((cmf::water::WaterStorage *) x)); +} +static void *_p_cmf__river__OpenWaterStorageTo_p_cmf__math__StateVariable(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::math::StateVariable *) (cmf::water::WaterStorage *) ((cmf::river::OpenWaterStorage *) x)); +} +static void *_p_cmf__upslope__aquiferTo_p_cmf__math__StateVariable(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::math::StateVariable *) (cmf::water::WaterStorage *) ((cmf::upslope::aquifer *) x)); +} +static void *_p_cmf__atmosphere__MeteoStationReferenceTo_p_cmf__atmosphere__Meteorology(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::atmosphere::Meteorology *) ((cmf::atmosphere::MeteoStationReference *) x)); +} +static void *_p_cmf__atmosphere__ConstantMeteorologyTo_p_cmf__atmosphere__Meteorology(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::atmosphere::Meteorology *) ((cmf::atmosphere::ConstantMeteorology *) x)); +} +static void *_p_cmf__atmosphere__IDW_MeteorologyTo_p_cmf__atmosphere__Meteorology(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::atmosphere::Meteorology *) ((cmf::atmosphere::IDW_Meteorology *) x)); +} +static void *_p_cmf__upslope__cell_vectorTo_p_cmf__math__StateVariableOwner(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::math::StateVariableOwner *) ((cmf::upslope::cell_vector *) x)); +} +static void *_p_cmf__math__BDF2To_p_cmf__math__StateVariableOwner(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::math::StateVariableOwner *) (cmf::math::Integrator *) ((cmf::math::BDF2 *) x)); +} +static void *_p_cmf__math__MultiIntegratorTo_p_cmf__math__StateVariableOwner(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::math::StateVariableOwner *) (cmf::math::Integrator *) ((cmf::math::MultiIntegrator *) x)); +} +static void *_p_cmf__math__CVodeIntegratorTo_p_cmf__math__StateVariableOwner(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::math::StateVariableOwner *) (cmf::math::Integrator *) ((cmf::math::CVodeIntegrator *) x)); +} +static void *_p_cmf__math__RKFIntegratorTo_p_cmf__math__StateVariableOwner(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::math::StateVariableOwner *) (cmf::math::Integrator *) ((cmf::math::RKFIntegrator *) x)); +} +static void *_p_cmf__math__HeunIntegratorTo_p_cmf__math__StateVariableOwner(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::math::StateVariableOwner *) (cmf::math::Integrator *) ((cmf::math::HeunIntegrator *) x)); +} +static void *_p_cmf__math__IntegratorTo_p_cmf__math__StateVariableOwner(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::math::StateVariableOwner *) ((cmf::math::Integrator *) x)); +} +static void *_p_cmf__projectTo_p_cmf__math__StateVariableOwner(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::math::StateVariableOwner *) ((cmf::project *) x)); +} +static void *_p_cmf__math__SoluteWaterIntegratorTo_p_cmf__math__StateVariableOwner(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::math::StateVariableOwner *) (cmf::math::Integrator *) ((cmf::math::SoluteWaterIntegrator *) x)); +} +static void *_p_cmf__math__ImplicitEulerTo_p_cmf__math__StateVariableOwner(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::math::StateVariableOwner *) (cmf::math::Integrator *) ((cmf::math::ImplicitEuler *) x)); +} +static void *_p_cmf__math__ExplicitEuler_fixedTo_p_cmf__math__StateVariableOwner(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::math::StateVariableOwner *) (cmf::math::Integrator *) ((cmf::math::ExplicitEuler_fixed *) x)); +} +static void *_p_cmf__math__StateVariableListTo_p_cmf__math__StateVariableOwner(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::math::StateVariableOwner *) ((cmf::math::StateVariableList *) x)); +} +static void *_p_cmf__upslope__CellTo_p_cmf__math__StateVariableOwner(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::math::StateVariableOwner *) ((cmf::upslope::Cell *) x)); +} +static void *_p_cmf__upslope__aquiferTo_p_cmf__math__StateVariableOwner(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::math::StateVariableOwner *) (cmf::water::WaterStorage *) ((cmf::upslope::aquifer *) x)); +} +static void *_p_cmf__upslope__SoilLayerTo_p_cmf__math__StateVariableOwner(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::math::StateVariableOwner *) (cmf::water::WaterStorage *) ((cmf::upslope::SoilLayer *) x)); +} +static void *_p_cmf__upslope__MacroPoreTo_p_cmf__math__StateVariableOwner(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::math::StateVariableOwner *) (cmf::water::WaterStorage *) ((cmf::upslope::MacroPore *) x)); +} +static void *_p_cmf__river__ReachTo_p_cmf__math__StateVariableOwner(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::math::StateVariableOwner *) (cmf::water::WaterStorage *)(cmf::river::OpenWaterStorage *) ((cmf::river::Reach *) x)); +} +static void *_p_cmf__water__WaterStorageTo_p_cmf__math__StateVariableOwner(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::math::StateVariableOwner *) ((cmf::water::WaterStorage *) x)); +} +static void *_p_cmf__river__OpenWaterStorageTo_p_cmf__math__StateVariableOwner(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::math::StateVariableOwner *) (cmf::water::WaterStorage *) ((cmf::river::OpenWaterStorage *) x)); +} +static void *_p_cmf__water__node_listTo_p_cmf__math__StateVariableOwner(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::math::StateVariableOwner *) ((cmf::water::node_list *) x)); +} +static void *_p_cmf__upslope__SurfaceWaterTo_p_cmf__math__StateVariableOwner(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::math::StateVariableOwner *) (cmf::water::WaterStorage *)(cmf::river::OpenWaterStorage *) ((cmf::upslope::SurfaceWater *) x)); +} +static void *_p_cmf__math__ExplicitEuler_fixedTo_p_cmf__math__Integrator(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::math::Integrator *) ((cmf::math::ExplicitEuler_fixed *) x)); +} +static void *_p_cmf__math__BDF2To_p_cmf__math__Integrator(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::math::Integrator *) ((cmf::math::BDF2 *) x)); +} +static void *_p_cmf__math__ImplicitEulerTo_p_cmf__math__Integrator(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::math::Integrator *) ((cmf::math::ImplicitEuler *) x)); +} +static void *_p_cmf__math__HeunIntegratorTo_p_cmf__math__Integrator(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::math::Integrator *) ((cmf::math::HeunIntegrator *) x)); +} +static void *_p_cmf__math__RKFIntegratorTo_p_cmf__math__Integrator(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::math::Integrator *) ((cmf::math::RKFIntegrator *) x)); +} +static void *_p_cmf__math__CVodeIntegratorTo_p_cmf__math__Integrator(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::math::Integrator *) ((cmf::math::CVodeIntegrator *) x)); +} +static void *_p_cmf__math__MultiIntegratorTo_p_cmf__math__Integrator(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::math::Integrator *) ((cmf::math::MultiIntegrator *) x)); +} +static void *_p_cmf__math__SoluteWaterIntegratorTo_p_cmf__math__Integrator(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::math::Integrator *) ((cmf::math::SoluteWaterIntegrator *) x)); +} +static void *_p_cmf__water__NullAdsorptionTo_p_cmf__water__Adsorption(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::water::Adsorption *) ((cmf::water::NullAdsorption *) x)); +} +static void *_p_cmf__water__LinearAdsorptionTo_p_cmf__water__Adsorption(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::water::Adsorption *) ((cmf::water::LinearAdsorption *) x)); +} +static void *_p_cmf__water__FreundlichAdsorbtionTo_p_cmf__water__Adsorption(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::water::Adsorption *) ((cmf::water::FreundlichAdsorbtion *) x)); +} +static void *_p_cmf__water__LangmuirAdsorptionTo_p_cmf__water__Adsorption(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((cmf::water::Adsorption *) ((cmf::water::LangmuirAdsorption *) x)); +} +static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__atmosphere__ConstantMeteorology = {"_p_cmf__atmosphere__ConstantMeteorology", "cmf::atmosphere::ConstantMeteorology *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__atmosphere__ConstantRainSource = {"_p_cmf__atmosphere__ConstantRainSource", "cmf::atmosphere::ConstantRainSource *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__atmosphere__IDWRainfall = {"_p_cmf__atmosphere__IDWRainfall", "cmf::atmosphere::IDWRainfall *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__atmosphere__IDW_Meteorology = {"_p_cmf__atmosphere__IDW_Meteorology", "cmf::atmosphere::IDW_Meteorology *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__atmosphere__MeteoStation = {"_p_cmf__atmosphere__MeteoStation", "cmf::atmosphere::MeteoStation *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__atmosphere__MeteoStationList = {"_p_cmf__atmosphere__MeteoStationList", "cmf::atmosphere::MeteoStationList *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__atmosphere__MeteoStationReference = {"_p_cmf__atmosphere__MeteoStationReference", "cmf::atmosphere::MeteoStationReference *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__atmosphere__Meteorology = {"_p_cmf__atmosphere__Meteorology", "cmf::atmosphere::Meteorology *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__atmosphere__RainSource = {"_p_cmf__atmosphere__RainSource", "cmf::atmosphere::RainSource *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__atmosphere__RainfallStation = {"_p_cmf__atmosphere__RainfallStation", "cmf::atmosphere::RainfallStation *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__atmosphere__RainfallStationList = {"_p_cmf__atmosphere__RainfallStationList", "cmf::atmosphere::RainfallStationList *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__atmosphere__RainfallStationReference = {"_p_cmf__atmosphere__RainfallStationReference", "cmf::atmosphere::RainfallStationReference *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__atmosphere__TimeseriesRainSource = {"_p_cmf__atmosphere__TimeseriesRainSource", "cmf::atmosphere::TimeseriesRainSource *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__atmosphere__Weather = {"_p_cmf__atmosphere__Weather", "cmf::atmosphere::Weather *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__atmosphere__aerodynamic_resistance = {"_p_cmf__atmosphere__aerodynamic_resistance", "cmf::atmosphere::aerodynamic_resistance *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__atmosphere__log_wind_profile = {"_p_cmf__atmosphere__log_wind_profile", "cmf::atmosphere::log_wind_profile *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__geometry__point = {"_p_cmf__geometry__point", "cmf::geometry::point *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__geometry__point_vector = {"_p_cmf__geometry__point_vector", "cmf::geometry::point_vector *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__math__BDF2 = {"_p_cmf__math__BDF2", "cmf::math::BDF2 *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__math__CVodeIntegrator = {"_p_cmf__math__CVodeIntegrator", "cmf::math::CVodeIntegrator *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__math__Date = {"_p_cmf__math__Date", "cmf::math::Date *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__math__ExplicitEuler_fixed = {"_p_cmf__math__ExplicitEuler_fixed", "cmf::math::ExplicitEuler_fixed *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__math__HeunIntegrator = {"_p_cmf__math__HeunIntegrator", "cmf::math::HeunIntegrator *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__math__ImplicitEuler = {"_p_cmf__math__ImplicitEuler", "cmf::math::ImplicitEuler *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__math__Integrator = {"_p_cmf__math__Integrator", "cmf::math::Integrator *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__math__MultiIntegrator = {"_p_cmf__math__MultiIntegrator", "cmf::math::MultiIntegrator *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__math__RKFIntegrator = {"_p_cmf__math__RKFIntegrator", "cmf::math::RKFIntegrator *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__math__SoluteWaterIntegrator = {"_p_cmf__math__SoluteWaterIntegrator", "cmf::math::SoluteWaterIntegrator *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__math__StateVariable = {"_p_cmf__math__StateVariable", "cmf::math::StateVariable *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__math__StateVariableList = {"_p_cmf__math__StateVariableList", "cmf::math::StateVariableList *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__math__StateVariableOwner = {"_p_cmf__math__StateVariableOwner", "cmf::math::StateVariableOwner *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__math__Time = {"_p_cmf__math__Time", "cmf::math::Time *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__math__cubicspline = {"_p_cmf__math__cubicspline", "cmf::math::cubicspline *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__math__integratable = {"_p_cmf__math__integratable", "cmf::math::integratable *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__math__integratable_list = {"_p_cmf__math__integratable_list", "cmf::math::integratable_list *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__math__num_array = {"_p_cmf__math__num_array", "cmf::math::num_array *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__math__timeseries = {"_p_cmf__math__timeseries", "cmf::math::timeseries *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__project = {"_p_cmf__project", "cmf::project *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__river__Channel = {"_p_cmf__river__Channel", "cmf::river::Channel *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__river__IChannel = {"_p_cmf__river__IChannel", "cmf::river::IChannel *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__river__IVolumeHeightFunction = {"_p_cmf__river__IVolumeHeightFunction", "cmf::river::IVolumeHeightFunction *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__river__Manning = {"_p_cmf__river__Manning", "cmf::river::Manning *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__river__Manning_Diffusive = {"_p_cmf__river__Manning_Diffusive", "cmf::river::Manning_Diffusive *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__river__Manning_Kinematic = {"_p_cmf__river__Manning_Kinematic", "cmf::river::Manning_Kinematic *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__river__MeanChannel = {"_p_cmf__river__MeanChannel", "cmf::river::MeanChannel *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__river__OpenWaterStorage = {"_p_cmf__river__OpenWaterStorage", "cmf::river::OpenWaterStorage *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__river__PipeReach = {"_p_cmf__river__PipeReach", "cmf::river::PipeReach *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__river__Prism = {"_p_cmf__river__Prism", "cmf::river::Prism *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__river__Reach = {"_p_cmf__river__Reach", "cmf::river::Reach *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__river__ReachIterator = {"_p_cmf__river__ReachIterator", "cmf::river::ReachIterator *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__river__RectangularReach = {"_p_cmf__river__RectangularReach", "cmf::river::RectangularReach *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__river__SWATReachType = {"_p_cmf__river__SWATReachType", "cmf::river::SWATReachType *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__river__TriangularReach = {"_p_cmf__river__TriangularReach", "cmf::river::TriangularReach *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__river__volume_height_function = {"_p_cmf__river__volume_height_function", "cmf::river::volume_height_function *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__upslope__BrooksCoreyRetentionCurve = {"_p_cmf__upslope__BrooksCoreyRetentionCurve", "cmf::upslope::BrooksCoreyRetentionCurve *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__upslope__Cell = {"_p_cmf__upslope__Cell", "cmf::upslope::Cell *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__upslope__CellConnector = {"_p_cmf__upslope__CellConnector", "cmf::upslope::CellConnector *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__upslope__ET__CanopyStorageEvaporation = {"_p_cmf__upslope__ET__CanopyStorageEvaporation", "cmf::upslope::ET::CanopyStorageEvaporation *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__upslope__ET__ContentStress = {"_p_cmf__upslope__ET__ContentStress", "cmf::upslope::ET::ContentStress *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__upslope__ET__HargreaveET = {"_p_cmf__upslope__ET__HargreaveET", "cmf::upslope::ET::HargreaveET *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__upslope__ET__PenmanEvaporation = {"_p_cmf__upslope__ET__PenmanEvaporation", "cmf::upslope::ET::PenmanEvaporation *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__upslope__ET__PenmanMonteithET = {"_p_cmf__upslope__ET__PenmanMonteithET", "cmf::upslope::ET::PenmanMonteithET *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__upslope__ET__PriestleyTaylorET = {"_p_cmf__upslope__ET__PriestleyTaylorET", "cmf::upslope::ET::PriestleyTaylorET *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__upslope__ET__RootUptakeStessFunction = {"_p_cmf__upslope__ET__RootUptakeStessFunction", "cmf::upslope::ET::RootUptakeStessFunction *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__upslope__ET__ShuttleworthWallace = {"_p_cmf__upslope__ET__ShuttleworthWallace", "cmf::upslope::ET::ShuttleworthWallace *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__upslope__ET__SuctionStress = {"_p_cmf__upslope__ET__SuctionStress", "cmf::upslope::ET::SuctionStress *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__upslope__ET__TurcET = {"_p_cmf__upslope__ET__TurcET", "cmf::upslope::ET::TurcET *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__upslope__ET__VolumeStress = {"_p_cmf__upslope__ET__VolumeStress", "cmf::upslope::ET::VolumeStress *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__upslope__ET__canopy_evaporation = {"_p_cmf__upslope__ET__canopy_evaporation", "cmf::upslope::ET::canopy_evaporation *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__upslope__ET__canopy_evaporation_method = {"_p_cmf__upslope__ET__canopy_evaporation_method", "cmf::upslope::ET::canopy_evaporation_method *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__upslope__ET__constantETpot = {"_p_cmf__upslope__ET__constantETpot", "cmf::upslope::ET::constantETpot *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__upslope__ET__snow_evaporation = {"_p_cmf__upslope__ET__snow_evaporation", "cmf::upslope::ET::snow_evaporation *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__upslope__ET__snow_evaporation_method = {"_p_cmf__upslope__ET__snow_evaporation_method", "cmf::upslope::ET::snow_evaporation_method *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__upslope__ET__soil_evaporation = {"_p_cmf__upslope__ET__soil_evaporation", "cmf::upslope::ET::soil_evaporation *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__upslope__ET__soil_evaporation_method = {"_p_cmf__upslope__ET__soil_evaporation_method", "cmf::upslope::ET::soil_evaporation_method *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__upslope__ET__stressedET = {"_p_cmf__upslope__ET__stressedET", "cmf::upslope::ET::stressedET *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__upslope__ET__surface_water_evaporation = {"_p_cmf__upslope__ET__surface_water_evaporation", "cmf::upslope::ET::surface_water_evaporation *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__upslope__ET__surface_water_evaporation_method = {"_p_cmf__upslope__ET__surface_water_evaporation_method", "cmf::upslope::ET::surface_water_evaporation_method *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__upslope__ET__timeseriesETpot = {"_p_cmf__upslope__ET__timeseriesETpot", "cmf::upslope::ET::timeseriesETpot *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__upslope__ET__transpiration = {"_p_cmf__upslope__ET__transpiration", "cmf::upslope::ET::transpiration *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__upslope__ET__transpiration_method = {"_p_cmf__upslope__ET__transpiration_method", "cmf::upslope::ET::transpiration_method *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__upslope__LinearRetention = {"_p_cmf__upslope__LinearRetention", "cmf::upslope::LinearRetention *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__upslope__MacroPore = {"_p_cmf__upslope__MacroPore", "cmf::upslope::MacroPore *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__upslope__RetentionCurve = {"_p_cmf__upslope__RetentionCurve", "cmf::upslope::RetentionCurve *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__upslope__SoilLayer = {"_p_cmf__upslope__SoilLayer", "cmf::upslope::SoilLayer *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__upslope__SurfaceWater = {"_p_cmf__upslope__SurfaceWater", "cmf::upslope::SurfaceWater *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__upslope__Topology = {"_p_cmf__upslope__Topology", "cmf::upslope::Topology *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__upslope__VanGenuchtenMualem = {"_p_cmf__upslope__VanGenuchtenMualem", "cmf::upslope::VanGenuchtenMualem *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__upslope__aquifer = {"_p_cmf__upslope__aquifer", "cmf::upslope::aquifer *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__upslope__aquifer_Darcy = {"_p_cmf__upslope__aquifer_Darcy", "cmf::upslope::aquifer_Darcy *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__upslope__cell_vector = {"_p_cmf__upslope__cell_vector", "cmf::upslope::cell_vector *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__upslope__connections__BaseMacroFlow = {"_p_cmf__upslope__connections__BaseMacroFlow", "cmf::upslope::connections::BaseMacroFlow *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__upslope__connections__CanopyOverflow = {"_p_cmf__upslope__connections__CanopyOverflow", "cmf::upslope::connections::CanopyOverflow *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__upslope__connections__Darcy = {"_p_cmf__upslope__connections__Darcy", "cmf::upslope::connections::Darcy *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__upslope__connections__DarcyKinematic = {"_p_cmf__upslope__connections__DarcyKinematic", "cmf::upslope::connections::DarcyKinematic *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__upslope__connections__DiffusiveMacroMicroExchange = {"_p_cmf__upslope__connections__DiffusiveMacroMicroExchange", "cmf::upslope::connections::DiffusiveMacroMicroExchange *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__upslope__connections__DiffusiveSurfaceRunoff = {"_p_cmf__upslope__connections__DiffusiveSurfaceRunoff", "cmf::upslope::connections::DiffusiveSurfaceRunoff *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__upslope__connections__EnergyBudgetSnowMelt = {"_p_cmf__upslope__connections__EnergyBudgetSnowMelt", "cmf::upslope::connections::EnergyBudgetSnowMelt *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__upslope__connections__FreeDrainagePercolation = {"_p_cmf__upslope__connections__FreeDrainagePercolation", "cmf::upslope::connections::FreeDrainagePercolation *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__upslope__connections__GradientMacroFlow = {"_p_cmf__upslope__connections__GradientMacroFlow", "cmf::upslope::connections::GradientMacroFlow *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__upslope__connections__GradientMacroMicroExchange = {"_p_cmf__upslope__connections__GradientMacroMicroExchange", "cmf::upslope::connections::GradientMacroMicroExchange *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__upslope__connections__GreenAmptInfiltration = {"_p_cmf__upslope__connections__GreenAmptInfiltration", "cmf::upslope::connections::GreenAmptInfiltration *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__upslope__connections__JarvisMacroFlow = {"_p_cmf__upslope__connections__JarvisMacroFlow", "cmf::upslope::connections::JarvisMacroFlow *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__upslope__connections__KinematicMacroFlow = {"_p_cmf__upslope__connections__KinematicMacroFlow", "cmf::upslope::connections::KinematicMacroFlow *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__upslope__connections__KinematicSurfaceRunoff = {"_p_cmf__upslope__connections__KinematicSurfaceRunoff", "cmf::upslope::connections::KinematicSurfaceRunoff *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__upslope__connections__LayerBypass = {"_p_cmf__upslope__connections__LayerBypass", "cmf::upslope::connections::LayerBypass *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__upslope__connections__MACROlikeMacroMicroExchange = {"_p_cmf__upslope__connections__MACROlikeMacroMicroExchange", "cmf::upslope::connections::MACROlikeMacroMicroExchange *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__upslope__connections__MatrixInfiltration = {"_p_cmf__upslope__connections__MatrixInfiltration", "cmf::upslope::connections::MatrixInfiltration *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__upslope__connections__Rainfall = {"_p_cmf__upslope__connections__Rainfall", "cmf::upslope::connections::Rainfall *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__upslope__connections__Richards = {"_p_cmf__upslope__connections__Richards", "cmf::upslope::connections::Richards *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__upslope__connections__Richards_lateral = {"_p_cmf__upslope__connections__Richards_lateral", "cmf::upslope::connections::Richards_lateral *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__upslope__connections__RutterInterception = {"_p_cmf__upslope__connections__RutterInterception", "cmf::upslope::connections::RutterInterception *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__upslope__connections__SWATPercolation = {"_p_cmf__upslope__connections__SWATPercolation", "cmf::upslope::connections::SWATPercolation *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__upslope__connections__SimplRichards = {"_p_cmf__upslope__connections__SimplRichards", "cmf::upslope::connections::SimplRichards *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__upslope__connections__SimpleInfiltration = {"_p_cmf__upslope__connections__SimpleInfiltration", "cmf::upslope::connections::SimpleInfiltration *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__upslope__connections__SimpleTindexSnowMelt = {"_p_cmf__upslope__connections__SimpleTindexSnowMelt", "cmf::upslope::connections::SimpleTindexSnowMelt *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__upslope__connections__Snowfall = {"_p_cmf__upslope__connections__Snowfall", "cmf::upslope::connections::Snowfall *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__upslope__connections__TOPModelFlow = {"_p_cmf__upslope__connections__TOPModelFlow", "cmf::upslope::connections::TOPModelFlow *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__upslope__connections__TopographicGradientDarcy = {"_p_cmf__upslope__connections__TopographicGradientDarcy", "cmf::upslope::connections::TopographicGradientDarcy *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__upslope__connections__lateral_sub_surface_flux = {"_p_cmf__upslope__connections__lateral_sub_surface_flux", "cmf::upslope::connections::lateral_sub_surface_flux *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__upslope__layer_list = {"_p_cmf__upslope__layer_list", "cmf::upslope::layer_list *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__upslope__neighbor_iterator = {"_p_cmf__upslope__neighbor_iterator", "cmf::upslope::neighbor_iterator *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__upslope__subcatchment = {"_p_cmf__upslope__subcatchment", "cmf::upslope::subcatchment *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__upslope__vegetation__Vegetation = {"_p_cmf__upslope__vegetation__Vegetation", "cmf::upslope::vegetation::Vegetation *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__water__Adsorption = {"_p_cmf__water__Adsorption", "cmf::water::Adsorption *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__water__ConstraintLinearStorageConnection = {"_p_cmf__water__ConstraintLinearStorageConnection", "cmf::water::ConstraintLinearStorageConnection *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__water__DirichletBoundary = {"_p_cmf__water__DirichletBoundary", "cmf::water::DirichletBoundary *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__water__ExponentialDeclineConnection = {"_p_cmf__water__ExponentialDeclineConnection", "cmf::water::ExponentialDeclineConnection *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__water__FreundlichAdsorbtion = {"_p_cmf__water__FreundlichAdsorbtion", "cmf::water::FreundlichAdsorbtion *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__water__LangmuirAdsorption = {"_p_cmf__water__LangmuirAdsorption", "cmf::water::LangmuirAdsorption *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__water__LinearAdsorption = {"_p_cmf__water__LinearAdsorption", "cmf::water::LinearAdsorption *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__water__LinearStorageConnection = {"_p_cmf__water__LinearStorageConnection", "cmf::water::LinearStorageConnection *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__water__NeumannBoundary = {"_p_cmf__water__NeumannBoundary", "cmf::water::NeumannBoundary *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__water__NeumannBoundary_list = {"_p_cmf__water__NeumannBoundary_list", "cmf::water::NeumannBoundary_list *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__water__NeumannFlux = {"_p_cmf__water__NeumannFlux", "cmf::water::NeumannFlux *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__water__NullAdsorption = {"_p_cmf__water__NullAdsorption", "cmf::water::NullAdsorption *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__water__PowerLawConnection = {"_p_cmf__water__PowerLawConnection", "cmf::water::PowerLawConnection *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__water__SoluteStorage = {"_p_cmf__water__SoluteStorage", "cmf::water::SoluteStorage *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__water__SoluteTimeseries = {"_p_cmf__water__SoluteTimeseries", "cmf::water::SoluteTimeseries *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__water__SystemBridge = {"_p_cmf__water__SystemBridge", "cmf::water::SystemBridge *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__water__SystemBridgeConnection = {"_p_cmf__water__SystemBridgeConnection", "cmf::water::SystemBridgeConnection *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__water__TechnicalFlux = {"_p_cmf__water__TechnicalFlux", "cmf::water::TechnicalFlux *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__water__WaterStorage = {"_p_cmf__water__WaterStorage", "cmf::water::WaterStorage *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__water__bidirectional_kinematic_exchange = {"_p_cmf__water__bidirectional_kinematic_exchange", "cmf::water::bidirectional_kinematic_exchange *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__water__connection_list = {"_p_cmf__water__connection_list", "cmf::water::connection_list *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__water__constraint_kinematic_wave = {"_p_cmf__water__constraint_kinematic_wave", "cmf::water::constraint_kinematic_wave *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__water__external_control_connection = {"_p_cmf__water__external_control_connection", "cmf::water::external_control_connection *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__water__flux_connection = {"_p_cmf__water__flux_connection", "cmf::water::flux_connection *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__water__flux_integrator = {"_p_cmf__water__flux_integrator", "cmf::water::flux_integrator *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__water__flux_node = {"_p_cmf__water__flux_node", "cmf::water::flux_node *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__water__generic_gradient_connection = {"_p_cmf__water__generic_gradient_connection", "cmf::water::generic_gradient_connection *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__water__kinematic_wave = {"_p_cmf__water__kinematic_wave", "cmf::water::kinematic_wave *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__water__linear_scale = {"_p_cmf__water__linear_scale", "cmf::water::linear_scale *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__water__node_list = {"_p_cmf__water__node_list", "cmf::water::node_list *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__water__solute = {"_p_cmf__water__solute", "cmf::water::solute *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__water__solute_vector = {"_p_cmf__water__solute_vector", "cmf::water::solute_vector *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__water__statecontrol_connection = {"_p_cmf__water__statecontrol_connection", "cmf::water::statecontrol_connection *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__water__waterbalance_connection = {"_p_cmf__water__waterbalance_connection", "cmf::water::waterbalance_connection *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cmf__water__waterbalance_integrator = {"_p_cmf__water__waterbalance_integrator", "cmf::water::waterbalance_integrator *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_const_iterator = {"_p_const_iterator", "const_iterator *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_double = {"_p_double", "real *|double *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_f_r_cmf__upslope__Cell_r_cmf__upslope__Cell_ptrdiff_t__void = {"_p_f_r_cmf__upslope__Cell_r_cmf__upslope__Cell_ptrdiff_t__void", "cmf::upslope::connectorfunction|void (*)(cmf::upslope::Cell &,cmf::upslope::Cell &,ptrdiff_t)", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_iterator = {"_p_iterator", "iterator *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ptr = {"_p_ptr", "ptr *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__shared_ptrT_SoilLayer_t = {"_p_std__shared_ptrT_SoilLayer_t", "std::shared_ptr< SoilLayer > *|cmf::upslope::layer_ptr *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__shared_ptrT_cmf__atmosphere__ConstantRainSource_t = {"_p_std__shared_ptrT_cmf__atmosphere__ConstantRainSource_t", "std::shared_ptr< cmf::atmosphere::ConstantRainSource > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__shared_ptrT_cmf__atmosphere__IDWRainfall_t = {"_p_std__shared_ptrT_cmf__atmosphere__IDWRainfall_t", "std::shared_ptr< cmf::atmosphere::IDWRainfall > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t = {"_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t", "std::shared_ptr< cmf::atmosphere::MeteoStation > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__shared_ptrT_cmf__atmosphere__RainSource_t = {"_p_std__shared_ptrT_cmf__atmosphere__RainSource_t", "std::shared_ptr< cmf::atmosphere::RainSource > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__shared_ptrT_cmf__atmosphere__RainfallStationReference_t = {"_p_std__shared_ptrT_cmf__atmosphere__RainfallStationReference_t", "std::shared_ptr< cmf::atmosphere::RainfallStationReference > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__shared_ptrT_cmf__atmosphere__RainfallStation_t = {"_p_std__shared_ptrT_cmf__atmosphere__RainfallStation_t", "std::shared_ptr< cmf::atmosphere::RainfallStation > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__shared_ptrT_cmf__atmosphere__TimeseriesRainSource_t = {"_p_std__shared_ptrT_cmf__atmosphere__TimeseriesRainSource_t", "std::shared_ptr< cmf::atmosphere::TimeseriesRainSource > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__shared_ptrT_cmf__atmosphere__aerodynamic_resistance_t = {"_p_std__shared_ptrT_cmf__atmosphere__aerodynamic_resistance_t", "std::shared_ptr< cmf::atmosphere::aerodynamic_resistance > *|cmf::atmosphere::aerodynamic_resistance::ptr *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__shared_ptrT_cmf__math__StateVariable_t = {"_p_std__shared_ptrT_cmf__math__StateVariable_t", "cmf::math::StateVariable::ptr *|std::shared_ptr< cmf::math::StateVariable > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__shared_ptrT_cmf__math__integratable_t = {"_p_std__shared_ptrT_cmf__math__integratable_t", "cmf::math::integratable::ptr *|std::shared_ptr< cmf::math::integratable > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__shared_ptrT_cmf__river__OpenWaterStorage_t = {"_p_std__shared_ptrT_cmf__river__OpenWaterStorage_t", "std::shared_ptr< cmf::river::OpenWaterStorage > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__shared_ptrT_cmf__river__Reach_t = {"_p_std__shared_ptrT_cmf__river__Reach_t", "std::shared_ptr< cmf::river::Reach > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__shared_ptrT_cmf__upslope__ET__canopy_evaporation_method_t = {"_p_std__shared_ptrT_cmf__upslope__ET__canopy_evaporation_method_t", "std::shared_ptr< cmf::upslope::ET::canopy_evaporation_method > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__shared_ptrT_cmf__upslope__ET__snow_evaporation_method_t = {"_p_std__shared_ptrT_cmf__upslope__ET__snow_evaporation_method_t", "std::shared_ptr< cmf::upslope::ET::snow_evaporation_method > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__shared_ptrT_cmf__upslope__ET__soil_evaporation_method_t = {"_p_std__shared_ptrT_cmf__upslope__ET__soil_evaporation_method_t", "std::shared_ptr< cmf::upslope::ET::soil_evaporation_method > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__shared_ptrT_cmf__upslope__ET__surface_water_evaporation_method_t = {"_p_std__shared_ptrT_cmf__upslope__ET__surface_water_evaporation_method_t", "std::shared_ptr< cmf::upslope::ET::surface_water_evaporation_method > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__shared_ptrT_cmf__upslope__ET__transpiration_method_t = {"_p_std__shared_ptrT_cmf__upslope__ET__transpiration_method_t", "std::shared_ptr< cmf::upslope::ET::transpiration_method > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__shared_ptrT_cmf__upslope__MacroPore_t = {"_p_std__shared_ptrT_cmf__upslope__MacroPore_t", "std::shared_ptr< cmf::upslope::MacroPore > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__shared_ptrT_cmf__upslope__SoilLayer_t = {"_p_std__shared_ptrT_cmf__upslope__SoilLayer_t", "cmf::upslope::SoilLayer::ptr *|std::shared_ptr< cmf::upslope::SoilLayer > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__shared_ptrT_cmf__upslope__SurfaceWater_t = {"_p_std__shared_ptrT_cmf__upslope__SurfaceWater_t", "std::shared_ptr< cmf::upslope::SurfaceWater > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__shared_ptrT_cmf__upslope__aquifer_t = {"_p_std__shared_ptrT_cmf__upslope__aquifer_t", "std::shared_ptr< cmf::upslope::aquifer > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__shared_ptrT_cmf__water__DirichletBoundary_t = {"_p_std__shared_ptrT_cmf__water__DirichletBoundary_t", "std::shared_ptr< cmf::water::DirichletBoundary > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__shared_ptrT_cmf__water__NeumannBoundary_t = {"_p_std__shared_ptrT_cmf__water__NeumannBoundary_t", "cmf::water::NeumannBoundary::ptr *|std::shared_ptr< cmf::water::NeumannBoundary > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__shared_ptrT_cmf__water__SoluteStorage_t = {"_p_std__shared_ptrT_cmf__water__SoluteStorage_t", "std::shared_ptr< cmf::water::SoluteStorage > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__shared_ptrT_cmf__water__SystemBridge_t = {"_p_std__shared_ptrT_cmf__water__SystemBridge_t", "std::shared_ptr< cmf::water::SystemBridge > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__shared_ptrT_cmf__water__WaterStorage_t = {"_p_std__shared_ptrT_cmf__water__WaterStorage_t", "std::shared_ptr< cmf::water::WaterStorage > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__shared_ptrT_cmf__water__flux_connection_t = {"_p_std__shared_ptrT_cmf__water__flux_connection_t", "cmf::water::flux_connection::ptr *|std::shared_ptr< cmf::water::flux_connection > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__shared_ptrT_cmf__water__flux_integrator_t = {"_p_std__shared_ptrT_cmf__water__flux_integrator_t", "std::shared_ptr< cmf::water::flux_integrator > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__shared_ptrT_cmf__water__flux_node_t = {"_p_std__shared_ptrT_cmf__water__flux_node_t", "cmf::water::flux_node::ptr *|std::shared_ptr< cmf::water::flux_node > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__shared_ptrT_cmf__water__waterbalance_integrator_t = {"_p_std__shared_ptrT_cmf__water__waterbalance_integrator_t", "std::shared_ptr< cmf::water::waterbalance_integrator > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__shared_ptrT_std__shared_ptrT_cmf__atmosphere__ConstantRainSource_t_t = {"_p_std__shared_ptrT_std__shared_ptrT_cmf__atmosphere__ConstantRainSource_t_t", "std::shared_ptr< std::shared_ptr< cmf::atmosphere::ConstantRainSource > > *|std::shared_ptr< cmf::atmosphere::ConstantRainSource::ptr > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__shared_ptrT_std__shared_ptrT_cmf__atmosphere__RainfallStationReference_t_t = {"_p_std__shared_ptrT_std__shared_ptrT_cmf__atmosphere__RainfallStationReference_t_t", "std::shared_ptr< std::shared_ptr< cmf::atmosphere::RainfallStationReference > > *|std::shared_ptr< cmf::atmosphere::RainfallStationReference::ptr > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__string = {"_p_std__string", "std::string *|cmf::bytestring *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorT_std__shared_ptrT_cmf__water__WaterStorage_t_t = {"_p_std__vectorT_std__shared_ptrT_cmf__water__WaterStorage_t_t", "std::vector< std::shared_ptr< cmf::water::WaterStorage > > *|cmf::water::storage_vector *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorT_std__shared_ptrT_cmf__water__flux_connection_t_t__const_iterator = {"_p_std__vectorT_std__shared_ptrT_cmf__water__flux_connection_t_t__const_iterator", "cmf::water::connection_list::const_iterator *|std::vector< std::shared_ptr< cmf::water::flux_connection > >::const_iterator *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorT_std__shared_ptrT_cmf__water__flux_connection_t_t__iterator = {"_p_std__vectorT_std__shared_ptrT_cmf__water__flux_connection_t_t__iterator", "cmf::water::connection_list::iterator *|std::vector< std::shared_ptr< cmf::water::flux_connection > >::iterator *", 0, 0, (void*)0, 0}; + +static swig_type_info *swig_type_initial[] = { + &_swigt__p_char, + &_swigt__p_cmf__atmosphere__ConstantMeteorology, + &_swigt__p_cmf__atmosphere__ConstantRainSource, + &_swigt__p_cmf__atmosphere__IDWRainfall, + &_swigt__p_cmf__atmosphere__IDW_Meteorology, + &_swigt__p_cmf__atmosphere__MeteoStation, + &_swigt__p_cmf__atmosphere__MeteoStationList, + &_swigt__p_cmf__atmosphere__MeteoStationReference, + &_swigt__p_cmf__atmosphere__Meteorology, + &_swigt__p_cmf__atmosphere__RainSource, + &_swigt__p_cmf__atmosphere__RainfallStation, + &_swigt__p_cmf__atmosphere__RainfallStationList, + &_swigt__p_cmf__atmosphere__RainfallStationReference, + &_swigt__p_cmf__atmosphere__TimeseriesRainSource, + &_swigt__p_cmf__atmosphere__Weather, + &_swigt__p_cmf__atmosphere__aerodynamic_resistance, + &_swigt__p_cmf__atmosphere__log_wind_profile, + &_swigt__p_cmf__geometry__point, + &_swigt__p_cmf__geometry__point_vector, + &_swigt__p_cmf__math__BDF2, + &_swigt__p_cmf__math__CVodeIntegrator, + &_swigt__p_cmf__math__Date, + &_swigt__p_cmf__math__ExplicitEuler_fixed, + &_swigt__p_cmf__math__HeunIntegrator, + &_swigt__p_cmf__math__ImplicitEuler, + &_swigt__p_cmf__math__Integrator, + &_swigt__p_cmf__math__MultiIntegrator, + &_swigt__p_cmf__math__RKFIntegrator, + &_swigt__p_cmf__math__SoluteWaterIntegrator, + &_swigt__p_cmf__math__StateVariable, + &_swigt__p_cmf__math__StateVariableList, + &_swigt__p_cmf__math__StateVariableOwner, + &_swigt__p_cmf__math__Time, + &_swigt__p_cmf__math__cubicspline, + &_swigt__p_cmf__math__integratable, + &_swigt__p_cmf__math__integratable_list, + &_swigt__p_cmf__math__num_array, + &_swigt__p_cmf__math__timeseries, + &_swigt__p_cmf__project, + &_swigt__p_cmf__river__Channel, + &_swigt__p_cmf__river__IChannel, + &_swigt__p_cmf__river__IVolumeHeightFunction, + &_swigt__p_cmf__river__Manning, + &_swigt__p_cmf__river__Manning_Diffusive, + &_swigt__p_cmf__river__Manning_Kinematic, + &_swigt__p_cmf__river__MeanChannel, + &_swigt__p_cmf__river__OpenWaterStorage, + &_swigt__p_cmf__river__PipeReach, + &_swigt__p_cmf__river__Prism, + &_swigt__p_cmf__river__Reach, + &_swigt__p_cmf__river__ReachIterator, + &_swigt__p_cmf__river__RectangularReach, + &_swigt__p_cmf__river__SWATReachType, + &_swigt__p_cmf__river__TriangularReach, + &_swigt__p_cmf__river__volume_height_function, + &_swigt__p_cmf__upslope__BrooksCoreyRetentionCurve, + &_swigt__p_cmf__upslope__Cell, + &_swigt__p_cmf__upslope__CellConnector, + &_swigt__p_cmf__upslope__ET__CanopyStorageEvaporation, + &_swigt__p_cmf__upslope__ET__ContentStress, + &_swigt__p_cmf__upslope__ET__HargreaveET, + &_swigt__p_cmf__upslope__ET__PenmanEvaporation, + &_swigt__p_cmf__upslope__ET__PenmanMonteithET, + &_swigt__p_cmf__upslope__ET__PriestleyTaylorET, + &_swigt__p_cmf__upslope__ET__RootUptakeStessFunction, + &_swigt__p_cmf__upslope__ET__ShuttleworthWallace, + &_swigt__p_cmf__upslope__ET__SuctionStress, + &_swigt__p_cmf__upslope__ET__TurcET, + &_swigt__p_cmf__upslope__ET__VolumeStress, + &_swigt__p_cmf__upslope__ET__canopy_evaporation, + &_swigt__p_cmf__upslope__ET__canopy_evaporation_method, + &_swigt__p_cmf__upslope__ET__constantETpot, + &_swigt__p_cmf__upslope__ET__snow_evaporation, + &_swigt__p_cmf__upslope__ET__snow_evaporation_method, + &_swigt__p_cmf__upslope__ET__soil_evaporation, + &_swigt__p_cmf__upslope__ET__soil_evaporation_method, + &_swigt__p_cmf__upslope__ET__stressedET, + &_swigt__p_cmf__upslope__ET__surface_water_evaporation, + &_swigt__p_cmf__upslope__ET__surface_water_evaporation_method, + &_swigt__p_cmf__upslope__ET__timeseriesETpot, + &_swigt__p_cmf__upslope__ET__transpiration, + &_swigt__p_cmf__upslope__ET__transpiration_method, + &_swigt__p_cmf__upslope__LinearRetention, + &_swigt__p_cmf__upslope__MacroPore, + &_swigt__p_cmf__upslope__RetentionCurve, + &_swigt__p_cmf__upslope__SoilLayer, + &_swigt__p_cmf__upslope__SurfaceWater, + &_swigt__p_cmf__upslope__Topology, + &_swigt__p_cmf__upslope__VanGenuchtenMualem, + &_swigt__p_cmf__upslope__aquifer, + &_swigt__p_cmf__upslope__aquifer_Darcy, + &_swigt__p_cmf__upslope__cell_vector, + &_swigt__p_cmf__upslope__connections__BaseMacroFlow, + &_swigt__p_cmf__upslope__connections__CanopyOverflow, + &_swigt__p_cmf__upslope__connections__Darcy, + &_swigt__p_cmf__upslope__connections__DarcyKinematic, + &_swigt__p_cmf__upslope__connections__DiffusiveMacroMicroExchange, + &_swigt__p_cmf__upslope__connections__DiffusiveSurfaceRunoff, + &_swigt__p_cmf__upslope__connections__EnergyBudgetSnowMelt, + &_swigt__p_cmf__upslope__connections__FreeDrainagePercolation, + &_swigt__p_cmf__upslope__connections__GradientMacroFlow, + &_swigt__p_cmf__upslope__connections__GradientMacroMicroExchange, + &_swigt__p_cmf__upslope__connections__GreenAmptInfiltration, + &_swigt__p_cmf__upslope__connections__JarvisMacroFlow, + &_swigt__p_cmf__upslope__connections__KinematicMacroFlow, + &_swigt__p_cmf__upslope__connections__KinematicSurfaceRunoff, + &_swigt__p_cmf__upslope__connections__LayerBypass, + &_swigt__p_cmf__upslope__connections__MACROlikeMacroMicroExchange, + &_swigt__p_cmf__upslope__connections__MatrixInfiltration, + &_swigt__p_cmf__upslope__connections__Rainfall, + &_swigt__p_cmf__upslope__connections__Richards, + &_swigt__p_cmf__upslope__connections__Richards_lateral, + &_swigt__p_cmf__upslope__connections__RutterInterception, + &_swigt__p_cmf__upslope__connections__SWATPercolation, + &_swigt__p_cmf__upslope__connections__SimplRichards, + &_swigt__p_cmf__upslope__connections__SimpleInfiltration, + &_swigt__p_cmf__upslope__connections__SimpleTindexSnowMelt, + &_swigt__p_cmf__upslope__connections__Snowfall, + &_swigt__p_cmf__upslope__connections__TOPModelFlow, + &_swigt__p_cmf__upslope__connections__TopographicGradientDarcy, + &_swigt__p_cmf__upslope__connections__lateral_sub_surface_flux, + &_swigt__p_cmf__upslope__layer_list, + &_swigt__p_cmf__upslope__neighbor_iterator, + &_swigt__p_cmf__upslope__subcatchment, + &_swigt__p_cmf__upslope__vegetation__Vegetation, + &_swigt__p_cmf__water__Adsorption, + &_swigt__p_cmf__water__ConstraintLinearStorageConnection, + &_swigt__p_cmf__water__DirichletBoundary, + &_swigt__p_cmf__water__ExponentialDeclineConnection, + &_swigt__p_cmf__water__FreundlichAdsorbtion, + &_swigt__p_cmf__water__LangmuirAdsorption, + &_swigt__p_cmf__water__LinearAdsorption, + &_swigt__p_cmf__water__LinearStorageConnection, + &_swigt__p_cmf__water__NeumannBoundary, + &_swigt__p_cmf__water__NeumannBoundary_list, + &_swigt__p_cmf__water__NeumannFlux, + &_swigt__p_cmf__water__NullAdsorption, + &_swigt__p_cmf__water__PowerLawConnection, + &_swigt__p_cmf__water__SoluteStorage, + &_swigt__p_cmf__water__SoluteTimeseries, + &_swigt__p_cmf__water__SystemBridge, + &_swigt__p_cmf__water__SystemBridgeConnection, + &_swigt__p_cmf__water__TechnicalFlux, + &_swigt__p_cmf__water__WaterStorage, + &_swigt__p_cmf__water__bidirectional_kinematic_exchange, + &_swigt__p_cmf__water__connection_list, + &_swigt__p_cmf__water__constraint_kinematic_wave, + &_swigt__p_cmf__water__external_control_connection, + &_swigt__p_cmf__water__flux_connection, + &_swigt__p_cmf__water__flux_integrator, + &_swigt__p_cmf__water__flux_node, + &_swigt__p_cmf__water__generic_gradient_connection, + &_swigt__p_cmf__water__kinematic_wave, + &_swigt__p_cmf__water__linear_scale, + &_swigt__p_cmf__water__node_list, + &_swigt__p_cmf__water__solute, + &_swigt__p_cmf__water__solute_vector, + &_swigt__p_cmf__water__statecontrol_connection, + &_swigt__p_cmf__water__waterbalance_connection, + &_swigt__p_cmf__water__waterbalance_integrator, + &_swigt__p_const_iterator, + &_swigt__p_double, + &_swigt__p_f_r_cmf__upslope__Cell_r_cmf__upslope__Cell_ptrdiff_t__void, + &_swigt__p_iterator, + &_swigt__p_ptr, + &_swigt__p_std__shared_ptrT_SoilLayer_t, + &_swigt__p_std__shared_ptrT_cmf__atmosphere__ConstantRainSource_t, + &_swigt__p_std__shared_ptrT_cmf__atmosphere__IDWRainfall_t, + &_swigt__p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, + &_swigt__p_std__shared_ptrT_cmf__atmosphere__RainSource_t, + &_swigt__p_std__shared_ptrT_cmf__atmosphere__RainfallStationReference_t, + &_swigt__p_std__shared_ptrT_cmf__atmosphere__RainfallStation_t, + &_swigt__p_std__shared_ptrT_cmf__atmosphere__TimeseriesRainSource_t, + &_swigt__p_std__shared_ptrT_cmf__atmosphere__aerodynamic_resistance_t, + &_swigt__p_std__shared_ptrT_cmf__math__StateVariable_t, + &_swigt__p_std__shared_ptrT_cmf__math__integratable_t, + &_swigt__p_std__shared_ptrT_cmf__river__OpenWaterStorage_t, + &_swigt__p_std__shared_ptrT_cmf__river__Reach_t, + &_swigt__p_std__shared_ptrT_cmf__upslope__ET__canopy_evaporation_method_t, + &_swigt__p_std__shared_ptrT_cmf__upslope__ET__snow_evaporation_method_t, + &_swigt__p_std__shared_ptrT_cmf__upslope__ET__soil_evaporation_method_t, + &_swigt__p_std__shared_ptrT_cmf__upslope__ET__surface_water_evaporation_method_t, + &_swigt__p_std__shared_ptrT_cmf__upslope__ET__transpiration_method_t, + &_swigt__p_std__shared_ptrT_cmf__upslope__MacroPore_t, + &_swigt__p_std__shared_ptrT_cmf__upslope__SoilLayer_t, + &_swigt__p_std__shared_ptrT_cmf__upslope__SurfaceWater_t, + &_swigt__p_std__shared_ptrT_cmf__upslope__aquifer_t, + &_swigt__p_std__shared_ptrT_cmf__water__DirichletBoundary_t, + &_swigt__p_std__shared_ptrT_cmf__water__NeumannBoundary_t, + &_swigt__p_std__shared_ptrT_cmf__water__SoluteStorage_t, + &_swigt__p_std__shared_ptrT_cmf__water__SystemBridge_t, + &_swigt__p_std__shared_ptrT_cmf__water__WaterStorage_t, + &_swigt__p_std__shared_ptrT_cmf__water__flux_connection_t, + &_swigt__p_std__shared_ptrT_cmf__water__flux_integrator_t, + &_swigt__p_std__shared_ptrT_cmf__water__flux_node_t, + &_swigt__p_std__shared_ptrT_cmf__water__waterbalance_integrator_t, + &_swigt__p_std__shared_ptrT_std__shared_ptrT_cmf__atmosphere__ConstantRainSource_t_t, + &_swigt__p_std__shared_ptrT_std__shared_ptrT_cmf__atmosphere__RainfallStationReference_t_t, + &_swigt__p_std__string, + &_swigt__p_std__vectorT_std__shared_ptrT_cmf__water__WaterStorage_t_t, + &_swigt__p_std__vectorT_std__shared_ptrT_cmf__water__flux_connection_t_t__const_iterator, + &_swigt__p_std__vectorT_std__shared_ptrT_cmf__water__flux_connection_t_t__iterator, +}; + +static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__atmosphere__ConstantMeteorology[] = { {&_swigt__p_cmf__atmosphere__ConstantMeteorology, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__atmosphere__ConstantRainSource[] = { {&_swigt__p_cmf__atmosphere__ConstantRainSource, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__atmosphere__IDWRainfall[] = { {&_swigt__p_cmf__atmosphere__IDWRainfall, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__atmosphere__IDW_Meteorology[] = { {&_swigt__p_cmf__atmosphere__IDW_Meteorology, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__atmosphere__MeteoStation[] = { {&_swigt__p_cmf__atmosphere__MeteoStation, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__atmosphere__MeteoStationList[] = { {&_swigt__p_cmf__atmosphere__MeteoStationList, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__atmosphere__MeteoStationReference[] = { {&_swigt__p_cmf__atmosphere__MeteoStationReference, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__atmosphere__Meteorology[] = { {&_swigt__p_cmf__atmosphere__MeteoStationReference, _p_cmf__atmosphere__MeteoStationReferenceTo_p_cmf__atmosphere__Meteorology, 0, 0}, {&_swigt__p_cmf__atmosphere__Meteorology, 0, 0, 0}, {&_swigt__p_cmf__atmosphere__ConstantMeteorology, _p_cmf__atmosphere__ConstantMeteorologyTo_p_cmf__atmosphere__Meteorology, 0, 0}, {&_swigt__p_cmf__atmosphere__IDW_Meteorology, _p_cmf__atmosphere__IDW_MeteorologyTo_p_cmf__atmosphere__Meteorology, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__atmosphere__RainSource[] = { {&_swigt__p_cmf__atmosphere__RainSource, 0, 0, 0}, {&_swigt__p_cmf__atmosphere__ConstantRainSource, _p_cmf__atmosphere__ConstantRainSourceTo_p_cmf__atmosphere__RainSource, 0, 0}, {&_swigt__p_cmf__atmosphere__TimeseriesRainSource, _p_cmf__atmosphere__TimeseriesRainSourceTo_p_cmf__atmosphere__RainSource, 0, 0}, {&_swigt__p_cmf__atmosphere__RainfallStationReference, _p_cmf__atmosphere__RainfallStationReferenceTo_p_cmf__atmosphere__RainSource, 0, 0}, {&_swigt__p_cmf__atmosphere__IDWRainfall, _p_cmf__atmosphere__IDWRainfallTo_p_cmf__atmosphere__RainSource, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__atmosphere__RainfallStation[] = { {&_swigt__p_cmf__atmosphere__RainfallStation, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__atmosphere__RainfallStationList[] = { {&_swigt__p_cmf__atmosphere__RainfallStationList, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__atmosphere__RainfallStationReference[] = { {&_swigt__p_cmf__atmosphere__RainfallStationReference, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__atmosphere__TimeseriesRainSource[] = { {&_swigt__p_cmf__atmosphere__TimeseriesRainSource, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__atmosphere__Weather[] = { {&_swigt__p_cmf__atmosphere__Weather, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__atmosphere__aerodynamic_resistance[] = { {&_swigt__p_cmf__atmosphere__aerodynamic_resistance, 0, 0, 0}, {&_swigt__p_cmf__upslope__ET__ShuttleworthWallace, _p_cmf__upslope__ET__ShuttleworthWallaceTo_p_cmf__atmosphere__aerodynamic_resistance, 0, 0}, {&_swigt__p_cmf__atmosphere__log_wind_profile, _p_cmf__atmosphere__log_wind_profileTo_p_cmf__atmosphere__aerodynamic_resistance, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__atmosphere__log_wind_profile[] = { {&_swigt__p_cmf__atmosphere__log_wind_profile, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__geometry__point[] = { {&_swigt__p_cmf__geometry__point, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__geometry__point_vector[] = { {&_swigt__p_cmf__geometry__point_vector, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__math__BDF2[] = { {&_swigt__p_cmf__math__BDF2, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__math__CVodeIntegrator[] = { {&_swigt__p_cmf__math__CVodeIntegrator, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__math__Date[] = { {&_swigt__p_cmf__math__Date, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__math__ExplicitEuler_fixed[] = { {&_swigt__p_cmf__math__ExplicitEuler_fixed, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__math__HeunIntegrator[] = { {&_swigt__p_cmf__math__HeunIntegrator, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__math__ImplicitEuler[] = { {&_swigt__p_cmf__math__ImplicitEuler, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__math__Integrator[] = { {&_swigt__p_cmf__math__BDF2, _p_cmf__math__BDF2To_p_cmf__math__Integrator, 0, 0}, {&_swigt__p_cmf__math__ExplicitEuler_fixed, _p_cmf__math__ExplicitEuler_fixedTo_p_cmf__math__Integrator, 0, 0}, {&_swigt__p_cmf__math__ImplicitEuler, _p_cmf__math__ImplicitEulerTo_p_cmf__math__Integrator, 0, 0}, {&_swigt__p_cmf__math__Integrator, 0, 0, 0}, {&_swigt__p_cmf__math__HeunIntegrator, _p_cmf__math__HeunIntegratorTo_p_cmf__math__Integrator, 0, 0}, {&_swigt__p_cmf__math__RKFIntegrator, _p_cmf__math__RKFIntegratorTo_p_cmf__math__Integrator, 0, 0}, {&_swigt__p_cmf__math__CVodeIntegrator, _p_cmf__math__CVodeIntegratorTo_p_cmf__math__Integrator, 0, 0}, {&_swigt__p_cmf__math__MultiIntegrator, _p_cmf__math__MultiIntegratorTo_p_cmf__math__Integrator, 0, 0}, {&_swigt__p_cmf__math__SoluteWaterIntegrator, _p_cmf__math__SoluteWaterIntegratorTo_p_cmf__math__Integrator, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__math__MultiIntegrator[] = { {&_swigt__p_cmf__math__MultiIntegrator, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__math__RKFIntegrator[] = { {&_swigt__p_cmf__math__RKFIntegrator, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__math__SoluteWaterIntegrator[] = { {&_swigt__p_cmf__math__SoluteWaterIntegrator, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__math__StateVariable[] = { {&_swigt__p_cmf__math__StateVariable, 0, 0, 0}, {&_swigt__p_cmf__river__Reach, _p_cmf__river__ReachTo_p_cmf__math__StateVariable, 0, 0}, {&_swigt__p_cmf__upslope__SurfaceWater, _p_cmf__upslope__SurfaceWaterTo_p_cmf__math__StateVariable, 0, 0}, {&_swigt__p_cmf__upslope__SoilLayer, _p_cmf__upslope__SoilLayerTo_p_cmf__math__StateVariable, 0, 0}, {&_swigt__p_cmf__upslope__MacroPore, _p_cmf__upslope__MacroPoreTo_p_cmf__math__StateVariable, 0, 0}, {&_swigt__p_cmf__water__SoluteStorage, _p_cmf__water__SoluteStorageTo_p_cmf__math__StateVariable, 0, 0}, {&_swigt__p_cmf__water__WaterStorage, _p_cmf__water__WaterStorageTo_p_cmf__math__StateVariable, 0, 0}, {&_swigt__p_cmf__river__OpenWaterStorage, _p_cmf__river__OpenWaterStorageTo_p_cmf__math__StateVariable, 0, 0}, {&_swigt__p_cmf__upslope__aquifer, _p_cmf__upslope__aquiferTo_p_cmf__math__StateVariable, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__math__StateVariableList[] = { {&_swigt__p_cmf__math__StateVariableList, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__math__StateVariableOwner[] = { {&_swigt__p_cmf__upslope__cell_vector, _p_cmf__upslope__cell_vectorTo_p_cmf__math__StateVariableOwner, 0, 0}, {&_swigt__p_cmf__upslope__Cell, _p_cmf__upslope__CellTo_p_cmf__math__StateVariableOwner, 0, 0}, {&_swigt__p_cmf__math__MultiIntegrator, _p_cmf__math__MultiIntegratorTo_p_cmf__math__StateVariableOwner, 0, 0}, {&_swigt__p_cmf__math__CVodeIntegrator, _p_cmf__math__CVodeIntegratorTo_p_cmf__math__StateVariableOwner, 0, 0}, {&_swigt__p_cmf__math__RKFIntegrator, _p_cmf__math__RKFIntegratorTo_p_cmf__math__StateVariableOwner, 0, 0}, {&_swigt__p_cmf__math__HeunIntegrator, _p_cmf__math__HeunIntegratorTo_p_cmf__math__StateVariableOwner, 0, 0}, {&_swigt__p_cmf__math__Integrator, _p_cmf__math__IntegratorTo_p_cmf__math__StateVariableOwner, 0, 0}, {&_swigt__p_cmf__project, _p_cmf__projectTo_p_cmf__math__StateVariableOwner, 0, 0}, {&_swigt__p_cmf__math__SoluteWaterIntegrator, _p_cmf__math__SoluteWaterIntegratorTo_p_cmf__math__StateVariableOwner, 0, 0}, {&_swigt__p_cmf__math__StateVariableOwner, 0, 0, 0}, {&_swigt__p_cmf__math__ImplicitEuler, _p_cmf__math__ImplicitEulerTo_p_cmf__math__StateVariableOwner, 0, 0}, {&_swigt__p_cmf__math__StateVariableList, _p_cmf__math__StateVariableListTo_p_cmf__math__StateVariableOwner, 0, 0}, {&_swigt__p_cmf__math__ExplicitEuler_fixed, _p_cmf__math__ExplicitEuler_fixedTo_p_cmf__math__StateVariableOwner, 0, 0}, {&_swigt__p_cmf__upslope__aquifer, _p_cmf__upslope__aquiferTo_p_cmf__math__StateVariableOwner, 0, 0}, {&_swigt__p_cmf__upslope__SoilLayer, _p_cmf__upslope__SoilLayerTo_p_cmf__math__StateVariableOwner, 0, 0}, {&_swigt__p_cmf__upslope__MacroPore, _p_cmf__upslope__MacroPoreTo_p_cmf__math__StateVariableOwner, 0, 0}, {&_swigt__p_cmf__math__BDF2, _p_cmf__math__BDF2To_p_cmf__math__StateVariableOwner, 0, 0}, {&_swigt__p_cmf__river__Reach, _p_cmf__river__ReachTo_p_cmf__math__StateVariableOwner, 0, 0}, {&_swigt__p_cmf__water__WaterStorage, _p_cmf__water__WaterStorageTo_p_cmf__math__StateVariableOwner, 0, 0}, {&_swigt__p_cmf__river__OpenWaterStorage, _p_cmf__river__OpenWaterStorageTo_p_cmf__math__StateVariableOwner, 0, 0}, {&_swigt__p_cmf__upslope__SurfaceWater, _p_cmf__upslope__SurfaceWaterTo_p_cmf__math__StateVariableOwner, 0, 0}, {&_swigt__p_cmf__water__node_list, _p_cmf__water__node_listTo_p_cmf__math__StateVariableOwner, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__math__Time[] = { {&_swigt__p_cmf__math__Time, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__math__cubicspline[] = { {&_swigt__p_cmf__math__cubicspline, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__math__integratable[] = { {&_swigt__p_cmf__math__integratable, 0, 0, 0}, {&_swigt__p_cmf__water__waterbalance_integrator, _p_cmf__water__waterbalance_integratorTo_p_cmf__math__integratable, 0, 0}, {&_swigt__p_cmf__water__flux_integrator, _p_cmf__water__flux_integratorTo_p_cmf__math__integratable, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__math__integratable_list[] = { {&_swigt__p_cmf__math__integratable_list, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__math__num_array[] = { {&_swigt__p_cmf__math__num_array, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__math__timeseries[] = { {&_swigt__p_cmf__math__timeseries, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__project[] = { {&_swigt__p_cmf__project, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__river__Channel[] = { {&_swigt__p_cmf__river__Channel, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__river__IChannel[] = { {&_swigt__p_cmf__river__IChannel, 0, 0, 0}, {&_swigt__p_cmf__river__PipeReach, _p_cmf__river__PipeReachTo_p_cmf__river__IChannel, 0, 0}, {&_swigt__p_cmf__river__Channel, _p_cmf__river__ChannelTo_p_cmf__river__IChannel, 0, 0}, {&_swigt__p_cmf__river__MeanChannel, _p_cmf__river__MeanChannelTo_p_cmf__river__IChannel, 0, 0}, {&_swigt__p_cmf__river__SWATReachType, _p_cmf__river__SWATReachTypeTo_p_cmf__river__IChannel, 0, 0}, {&_swigt__p_cmf__river__TriangularReach, _p_cmf__river__TriangularReachTo_p_cmf__river__IChannel, 0, 0}, {&_swigt__p_cmf__river__RectangularReach, _p_cmf__river__RectangularReachTo_p_cmf__river__IChannel, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__river__IVolumeHeightFunction[] = { {&_swigt__p_cmf__river__IChannel, _p_cmf__river__IChannelTo_p_cmf__river__IVolumeHeightFunction, 0, 0}, {&_swigt__p_cmf__river__PipeReach, _p_cmf__river__PipeReachTo_p_cmf__river__IVolumeHeightFunction, 0, 0}, {&_swigt__p_cmf__river__Channel, _p_cmf__river__ChannelTo_p_cmf__river__IVolumeHeightFunction, 0, 0}, {&_swigt__p_cmf__river__MeanChannel, _p_cmf__river__MeanChannelTo_p_cmf__river__IVolumeHeightFunction, 0, 0}, {&_swigt__p_cmf__river__Prism, _p_cmf__river__PrismTo_p_cmf__river__IVolumeHeightFunction, 0, 0}, {&_swigt__p_cmf__river__IVolumeHeightFunction, 0, 0, 0}, {&_swigt__p_cmf__river__SWATReachType, _p_cmf__river__SWATReachTypeTo_p_cmf__river__IVolumeHeightFunction, 0, 0}, {&_swigt__p_cmf__river__volume_height_function, _p_cmf__river__volume_height_functionTo_p_cmf__river__IVolumeHeightFunction, 0, 0}, {&_swigt__p_cmf__river__TriangularReach, _p_cmf__river__TriangularReachTo_p_cmf__river__IVolumeHeightFunction, 0, 0}, {&_swigt__p_cmf__river__RectangularReach, _p_cmf__river__RectangularReachTo_p_cmf__river__IVolumeHeightFunction, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__river__Manning[] = { {&_swigt__p_cmf__river__Manning_Diffusive, _p_cmf__river__Manning_DiffusiveTo_p_cmf__river__Manning, 0, 0}, {&_swigt__p_cmf__river__Manning_Kinematic, _p_cmf__river__Manning_KinematicTo_p_cmf__river__Manning, 0, 0}, {&_swigt__p_cmf__river__Manning, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__river__Manning_Diffusive[] = { {&_swigt__p_cmf__river__Manning_Diffusive, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__river__Manning_Kinematic[] = { {&_swigt__p_cmf__river__Manning_Kinematic, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__river__MeanChannel[] = { {&_swigt__p_cmf__river__MeanChannel, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__river__OpenWaterStorage[] = { {&_swigt__p_cmf__river__Reach, _p_cmf__river__ReachTo_p_cmf__river__OpenWaterStorage, 0, 0}, {&_swigt__p_cmf__upslope__SurfaceWater, _p_cmf__upslope__SurfaceWaterTo_p_cmf__river__OpenWaterStorage, 0, 0}, {&_swigt__p_cmf__river__OpenWaterStorage, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__river__PipeReach[] = { {&_swigt__p_cmf__river__PipeReach, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__river__Prism[] = { {&_swigt__p_cmf__river__Prism, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__river__Reach[] = { {&_swigt__p_cmf__river__Reach, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__river__ReachIterator[] = { {&_swigt__p_cmf__river__ReachIterator, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__river__RectangularReach[] = { {&_swigt__p_cmf__river__RectangularReach, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__river__SWATReachType[] = { {&_swigt__p_cmf__river__SWATReachType, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__river__TriangularReach[] = { {&_swigt__p_cmf__river__TriangularReach, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__river__volume_height_function[] = { {&_swigt__p_cmf__river__volume_height_function, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__upslope__BrooksCoreyRetentionCurve[] = { {&_swigt__p_cmf__upslope__BrooksCoreyRetentionCurve, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__upslope__Cell[] = { {&_swigt__p_cmf__upslope__Cell, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__upslope__CellConnector[] = { {&_swigt__p_cmf__upslope__CellConnector, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__upslope__ET__CanopyStorageEvaporation[] = { {&_swigt__p_cmf__upslope__ET__CanopyStorageEvaporation, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__upslope__ET__ContentStress[] = { {&_swigt__p_cmf__upslope__ET__ContentStress, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__upslope__ET__HargreaveET[] = { {&_swigt__p_cmf__upslope__ET__HargreaveET, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__upslope__ET__PenmanEvaporation[] = { {&_swigt__p_cmf__upslope__ET__PenmanEvaporation, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__upslope__ET__PenmanMonteithET[] = { {&_swigt__p_cmf__upslope__ET__PenmanMonteithET, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__upslope__ET__PriestleyTaylorET[] = { {&_swigt__p_cmf__upslope__ET__PriestleyTaylorET, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__upslope__ET__RootUptakeStessFunction[] = { {&_swigt__p_cmf__upslope__ET__SuctionStress, _p_cmf__upslope__ET__SuctionStressTo_p_cmf__upslope__ET__RootUptakeStessFunction, 0, 0}, {&_swigt__p_cmf__upslope__ET__ContentStress, _p_cmf__upslope__ET__ContentStressTo_p_cmf__upslope__ET__RootUptakeStessFunction, 0, 0}, {&_swigt__p_cmf__upslope__ET__VolumeStress, _p_cmf__upslope__ET__VolumeStressTo_p_cmf__upslope__ET__RootUptakeStessFunction, 0, 0}, {&_swigt__p_cmf__upslope__ET__RootUptakeStessFunction, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__upslope__ET__ShuttleworthWallace[] = { {&_swigt__p_cmf__upslope__ET__ShuttleworthWallace, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__upslope__ET__SuctionStress[] = { {&_swigt__p_cmf__upslope__ET__SuctionStress, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__upslope__ET__TurcET[] = { {&_swigt__p_cmf__upslope__ET__TurcET, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__upslope__ET__VolumeStress[] = { {&_swigt__p_cmf__upslope__ET__VolumeStress, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__upslope__ET__canopy_evaporation[] = { {&_swigt__p_cmf__upslope__ET__canopy_evaporation, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__upslope__ET__canopy_evaporation_method[] = { {&_swigt__p_cmf__upslope__ET__ShuttleworthWallace, _p_cmf__upslope__ET__ShuttleworthWallaceTo_p_cmf__upslope__ET__canopy_evaporation_method, 0, 0}, {&_swigt__p_cmf__upslope__ET__canopy_evaporation_method, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__upslope__ET__constantETpot[] = { {&_swigt__p_cmf__upslope__ET__constantETpot, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__upslope__ET__snow_evaporation[] = { {&_swigt__p_cmf__upslope__ET__snow_evaporation, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__upslope__ET__snow_evaporation_method[] = { {&_swigt__p_cmf__upslope__ET__ShuttleworthWallace, _p_cmf__upslope__ET__ShuttleworthWallaceTo_p_cmf__upslope__ET__snow_evaporation_method, 0, 0}, {&_swigt__p_cmf__upslope__ET__snow_evaporation_method, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__upslope__ET__soil_evaporation[] = { {&_swigt__p_cmf__upslope__ET__soil_evaporation, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__upslope__ET__soil_evaporation_method[] = { {&_swigt__p_cmf__upslope__ET__ShuttleworthWallace, _p_cmf__upslope__ET__ShuttleworthWallaceTo_p_cmf__upslope__ET__soil_evaporation_method, 0, 0}, {&_swigt__p_cmf__upslope__ET__soil_evaporation_method, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__upslope__ET__stressedET[] = { {&_swigt__p_cmf__upslope__ET__HargreaveET, _p_cmf__upslope__ET__HargreaveETTo_p_cmf__upslope__ET__stressedET, 0, 0}, {&_swigt__p_cmf__upslope__ET__constantETpot, _p_cmf__upslope__ET__constantETpotTo_p_cmf__upslope__ET__stressedET, 0, 0}, {&_swigt__p_cmf__upslope__ET__PenmanMonteithET, _p_cmf__upslope__ET__PenmanMonteithETTo_p_cmf__upslope__ET__stressedET, 0, 0}, {&_swigt__p_cmf__upslope__ET__stressedET, 0, 0, 0}, {&_swigt__p_cmf__upslope__ET__TurcET, _p_cmf__upslope__ET__TurcETTo_p_cmf__upslope__ET__stressedET, 0, 0}, {&_swigt__p_cmf__upslope__ET__PriestleyTaylorET, _p_cmf__upslope__ET__PriestleyTaylorETTo_p_cmf__upslope__ET__stressedET, 0, 0}, {&_swigt__p_cmf__upslope__ET__timeseriesETpot, _p_cmf__upslope__ET__timeseriesETpotTo_p_cmf__upslope__ET__stressedET, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__upslope__ET__surface_water_evaporation[] = { {&_swigt__p_cmf__upslope__ET__surface_water_evaporation, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__upslope__ET__surface_water_evaporation_method[] = { {&_swigt__p_cmf__upslope__ET__surface_water_evaporation_method, 0, 0, 0}, {&_swigt__p_cmf__upslope__ET__ShuttleworthWallace, _p_cmf__upslope__ET__ShuttleworthWallaceTo_p_cmf__upslope__ET__surface_water_evaporation_method, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__upslope__ET__timeseriesETpot[] = { {&_swigt__p_cmf__upslope__ET__timeseriesETpot, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__upslope__ET__transpiration[] = { {&_swigt__p_cmf__upslope__ET__transpiration, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__upslope__ET__transpiration_method[] = { {&_swigt__p_cmf__upslope__ET__ShuttleworthWallace, _p_cmf__upslope__ET__ShuttleworthWallaceTo_p_cmf__upslope__ET__transpiration_method, 0, 0}, {&_swigt__p_cmf__upslope__ET__transpiration_method, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__upslope__LinearRetention[] = { {&_swigt__p_cmf__upslope__LinearRetention, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__upslope__MacroPore[] = { {&_swigt__p_cmf__upslope__MacroPore, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__upslope__RetentionCurve[] = { {&_swigt__p_cmf__upslope__LinearRetention, _p_cmf__upslope__LinearRetentionTo_p_cmf__upslope__RetentionCurve, 0, 0}, {&_swigt__p_cmf__upslope__RetentionCurve, 0, 0, 0}, {&_swigt__p_cmf__upslope__BrooksCoreyRetentionCurve, _p_cmf__upslope__BrooksCoreyRetentionCurveTo_p_cmf__upslope__RetentionCurve, 0, 0}, {&_swigt__p_cmf__upslope__VanGenuchtenMualem, _p_cmf__upslope__VanGenuchtenMualemTo_p_cmf__upslope__RetentionCurve, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__upslope__SoilLayer[] = { {&_swigt__p_cmf__upslope__SoilLayer, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__upslope__SurfaceWater[] = { {&_swigt__p_cmf__upslope__SurfaceWater, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__upslope__Topology[] = { {&_swigt__p_cmf__upslope__Topology, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__upslope__VanGenuchtenMualem[] = { {&_swigt__p_cmf__upslope__VanGenuchtenMualem, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__upslope__aquifer[] = { {&_swigt__p_cmf__upslope__aquifer, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__upslope__aquifer_Darcy[] = { {&_swigt__p_cmf__upslope__aquifer_Darcy, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__upslope__cell_vector[] = { {&_swigt__p_cmf__upslope__cell_vector, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__upslope__connections__BaseMacroFlow[] = { {&_swigt__p_cmf__upslope__connections__BaseMacroFlow, 0, 0, 0}, {&_swigt__p_cmf__upslope__connections__GradientMacroFlow, _p_cmf__upslope__connections__GradientMacroFlowTo_p_cmf__upslope__connections__BaseMacroFlow, 0, 0}, {&_swigt__p_cmf__upslope__connections__KinematicMacroFlow, _p_cmf__upslope__connections__KinematicMacroFlowTo_p_cmf__upslope__connections__BaseMacroFlow, 0, 0}, {&_swigt__p_cmf__upslope__connections__JarvisMacroFlow, _p_cmf__upslope__connections__JarvisMacroFlowTo_p_cmf__upslope__connections__BaseMacroFlow, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__upslope__connections__CanopyOverflow[] = { {&_swigt__p_cmf__upslope__connections__CanopyOverflow, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__upslope__connections__Darcy[] = { {&_swigt__p_cmf__upslope__connections__Darcy, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__upslope__connections__DarcyKinematic[] = { {&_swigt__p_cmf__upslope__connections__DarcyKinematic, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__upslope__connections__DiffusiveMacroMicroExchange[] = { {&_swigt__p_cmf__upslope__connections__DiffusiveMacroMicroExchange, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__upslope__connections__DiffusiveSurfaceRunoff[] = { {&_swigt__p_cmf__upslope__connections__DiffusiveSurfaceRunoff, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__upslope__connections__EnergyBudgetSnowMelt[] = { {&_swigt__p_cmf__upslope__connections__EnergyBudgetSnowMelt, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__upslope__connections__FreeDrainagePercolation[] = { {&_swigt__p_cmf__upslope__connections__FreeDrainagePercolation, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__upslope__connections__GradientMacroFlow[] = { {&_swigt__p_cmf__upslope__connections__GradientMacroFlow, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__upslope__connections__GradientMacroMicroExchange[] = { {&_swigt__p_cmf__upslope__connections__GradientMacroMicroExchange, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__upslope__connections__GreenAmptInfiltration[] = { {&_swigt__p_cmf__upslope__connections__GreenAmptInfiltration, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__upslope__connections__JarvisMacroFlow[] = { {&_swigt__p_cmf__upslope__connections__JarvisMacroFlow, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__upslope__connections__KinematicMacroFlow[] = { {&_swigt__p_cmf__upslope__connections__KinematicMacroFlow, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__upslope__connections__KinematicSurfaceRunoff[] = { {&_swigt__p_cmf__upslope__connections__KinematicSurfaceRunoff, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__upslope__connections__LayerBypass[] = { {&_swigt__p_cmf__upslope__connections__LayerBypass, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__upslope__connections__MACROlikeMacroMicroExchange[] = { {&_swigt__p_cmf__upslope__connections__MACROlikeMacroMicroExchange, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__upslope__connections__MatrixInfiltration[] = { {&_swigt__p_cmf__upslope__connections__MatrixInfiltration, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__upslope__connections__Rainfall[] = { {&_swigt__p_cmf__upslope__connections__Rainfall, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__upslope__connections__Richards[] = { {&_swigt__p_cmf__upslope__connections__Richards, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__upslope__connections__Richards_lateral[] = { {&_swigt__p_cmf__upslope__connections__Richards_lateral, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__upslope__connections__RutterInterception[] = { {&_swigt__p_cmf__upslope__connections__RutterInterception, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__upslope__connections__SWATPercolation[] = { {&_swigt__p_cmf__upslope__connections__SWATPercolation, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__upslope__connections__SimplRichards[] = { {&_swigt__p_cmf__upslope__connections__SimplRichards, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__upslope__connections__SimpleInfiltration[] = { {&_swigt__p_cmf__upslope__connections__SimpleInfiltration, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__upslope__connections__SimpleTindexSnowMelt[] = { {&_swigt__p_cmf__upslope__connections__SimpleTindexSnowMelt, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__upslope__connections__Snowfall[] = { {&_swigt__p_cmf__upslope__connections__Snowfall, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__upslope__connections__TOPModelFlow[] = { {&_swigt__p_cmf__upslope__connections__TOPModelFlow, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__upslope__connections__TopographicGradientDarcy[] = { {&_swigt__p_cmf__upslope__connections__TopographicGradientDarcy, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__upslope__connections__lateral_sub_surface_flux[] = { {&_swigt__p_cmf__upslope__connections__TopographicGradientDarcy, _p_cmf__upslope__connections__TopographicGradientDarcyTo_p_cmf__upslope__connections__lateral_sub_surface_flux, 0, 0}, {&_swigt__p_cmf__upslope__connections__DarcyKinematic, _p_cmf__upslope__connections__DarcyKinematicTo_p_cmf__upslope__connections__lateral_sub_surface_flux, 0, 0}, {&_swigt__p_cmf__upslope__connections__Richards_lateral, _p_cmf__upslope__connections__Richards_lateralTo_p_cmf__upslope__connections__lateral_sub_surface_flux, 0, 0}, {&_swigt__p_cmf__upslope__connections__lateral_sub_surface_flux, 0, 0, 0}, {&_swigt__p_cmf__upslope__connections__Darcy, _p_cmf__upslope__connections__DarcyTo_p_cmf__upslope__connections__lateral_sub_surface_flux, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__upslope__layer_list[] = { {&_swigt__p_cmf__upslope__layer_list, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__upslope__neighbor_iterator[] = { {&_swigt__p_cmf__upslope__neighbor_iterator, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__upslope__subcatchment[] = { {&_swigt__p_cmf__upslope__subcatchment, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__upslope__vegetation__Vegetation[] = { {&_swigt__p_cmf__upslope__vegetation__Vegetation, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__water__Adsorption[] = { {&_swigt__p_cmf__water__Adsorption, 0, 0, 0}, {&_swigt__p_cmf__water__NullAdsorption, _p_cmf__water__NullAdsorptionTo_p_cmf__water__Adsorption, 0, 0}, {&_swigt__p_cmf__water__LinearAdsorption, _p_cmf__water__LinearAdsorptionTo_p_cmf__water__Adsorption, 0, 0}, {&_swigt__p_cmf__water__FreundlichAdsorbtion, _p_cmf__water__FreundlichAdsorbtionTo_p_cmf__water__Adsorption, 0, 0}, {&_swigt__p_cmf__water__LangmuirAdsorption, _p_cmf__water__LangmuirAdsorptionTo_p_cmf__water__Adsorption, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__water__ConstraintLinearStorageConnection[] = { {&_swigt__p_cmf__water__ConstraintLinearStorageConnection, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__water__DirichletBoundary[] = { {&_swigt__p_cmf__water__DirichletBoundary, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__water__ExponentialDeclineConnection[] = { {&_swigt__p_cmf__water__ExponentialDeclineConnection, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__water__FreundlichAdsorbtion[] = { {&_swigt__p_cmf__water__FreundlichAdsorbtion, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__water__LangmuirAdsorption[] = { {&_swigt__p_cmf__water__LangmuirAdsorption, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__water__LinearAdsorption[] = { {&_swigt__p_cmf__water__LinearAdsorption, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__water__LinearStorageConnection[] = { {&_swigt__p_cmf__water__LinearStorageConnection, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__water__NeumannBoundary[] = { {&_swigt__p_cmf__water__NeumannBoundary, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__water__NeumannBoundary_list[] = { {&_swigt__p_cmf__water__NeumannBoundary_list, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__water__NeumannFlux[] = { {&_swigt__p_cmf__water__NeumannFlux, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__water__NullAdsorption[] = { {&_swigt__p_cmf__water__NullAdsorption, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__water__PowerLawConnection[] = { {&_swigt__p_cmf__water__PowerLawConnection, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__water__SoluteStorage[] = { {&_swigt__p_cmf__water__SoluteStorage, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__water__SoluteTimeseries[] = { {&_swigt__p_cmf__water__SoluteTimeseries, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__water__SystemBridge[] = { {&_swigt__p_cmf__water__SystemBridge, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__water__SystemBridgeConnection[] = { {&_swigt__p_cmf__water__SystemBridgeConnection, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__water__TechnicalFlux[] = { {&_swigt__p_cmf__water__TechnicalFlux, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__water__WaterStorage[] = { {&_swigt__p_cmf__river__Reach, _p_cmf__river__ReachTo_p_cmf__water__WaterStorage, 0, 0}, {&_swigt__p_cmf__upslope__SurfaceWater, _p_cmf__upslope__SurfaceWaterTo_p_cmf__water__WaterStorage, 0, 0}, {&_swigt__p_cmf__upslope__SoilLayer, _p_cmf__upslope__SoilLayerTo_p_cmf__water__WaterStorage, 0, 0}, {&_swigt__p_cmf__upslope__MacroPore, _p_cmf__upslope__MacroPoreTo_p_cmf__water__WaterStorage, 0, 0}, {&_swigt__p_cmf__water__WaterStorage, 0, 0, 0}, {&_swigt__p_cmf__river__OpenWaterStorage, _p_cmf__river__OpenWaterStorageTo_p_cmf__water__WaterStorage, 0, 0}, {&_swigt__p_cmf__upslope__aquifer, _p_cmf__upslope__aquiferTo_p_cmf__water__WaterStorage, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__water__bidirectional_kinematic_exchange[] = { {&_swigt__p_cmf__water__bidirectional_kinematic_exchange, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__water__connection_list[] = { {&_swigt__p_cmf__water__connection_list, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__water__constraint_kinematic_wave[] = { {&_swigt__p_cmf__water__constraint_kinematic_wave, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__water__external_control_connection[] = { {&_swigt__p_cmf__water__external_control_connection, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__water__flux_connection[] = { {&_swigt__p_cmf__upslope__connections__FreeDrainagePercolation, _p_cmf__upslope__connections__FreeDrainagePercolationTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__upslope__connections__TOPModelFlow, _p_cmf__upslope__connections__TOPModelFlowTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__upslope__connections__SWATPercolation, _p_cmf__upslope__connections__SWATPercolationTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__upslope__ET__HargreaveET, _p_cmf__upslope__ET__HargreaveETTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__upslope__connections__TopographicGradientDarcy, _p_cmf__upslope__connections__TopographicGradientDarcyTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__river__Manning_Diffusive, _p_cmf__river__Manning_DiffusiveTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__water__bidirectional_kinematic_exchange, _p_cmf__water__bidirectional_kinematic_exchangeTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__upslope__ET__stressedET, _p_cmf__upslope__ET__stressedETTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__upslope__ET__TurcET, _p_cmf__upslope__ET__TurcETTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__upslope__connections__EnergyBudgetSnowMelt, _p_cmf__upslope__connections__EnergyBudgetSnowMeltTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__upslope__connections__SimpleTindexSnowMelt, _p_cmf__upslope__connections__SimpleTindexSnowMeltTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__upslope__connections__Rainfall, _p_cmf__upslope__connections__RainfallTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__upslope__ET__transpiration, _p_cmf__upslope__ET__transpirationTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__upslope__ET__soil_evaporation, _p_cmf__upslope__ET__soil_evaporationTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__upslope__ET__canopy_evaporation, _p_cmf__upslope__ET__canopy_evaporationTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__upslope__ET__snow_evaporation, _p_cmf__upslope__ET__snow_evaporationTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__upslope__ET__surface_water_evaporation, _p_cmf__upslope__ET__surface_water_evaporationTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__upslope__ET__CanopyStorageEvaporation, _p_cmf__upslope__ET__CanopyStorageEvaporationTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__upslope__ET__PenmanEvaporation, _p_cmf__upslope__ET__PenmanEvaporationTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__upslope__connections__GreenAmptInfiltration, _p_cmf__upslope__connections__GreenAmptInfiltrationTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__upslope__connections__CanopyOverflow, _p_cmf__upslope__connections__CanopyOverflowTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__upslope__connections__Richards, _p_cmf__upslope__connections__RichardsTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__upslope__connections__SimplRichards, _p_cmf__upslope__connections__SimplRichardsTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__upslope__connections__Darcy, _p_cmf__upslope__connections__DarcyTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__water__LinearStorageConnection, _p_cmf__water__LinearStorageConnectionTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__water__PowerLawConnection, _p_cmf__water__PowerLawConnectionTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__water__ExponentialDeclineConnection, _p_cmf__water__ExponentialDeclineConnectionTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__water__ConstraintLinearStorageConnection, _p_cmf__water__ConstraintLinearStorageConnectionTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__water__generic_gradient_connection, _p_cmf__water__generic_gradient_connectionTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__water__flux_connection, 0, 0, 0}, {&_swigt__p_cmf__water__external_control_connection, _p_cmf__water__external_control_connectionTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__water__waterbalance_connection, _p_cmf__water__waterbalance_connectionTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__water__statecontrol_connection, _p_cmf__water__statecontrol_connectionTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__water__SystemBridgeConnection, _p_cmf__water__SystemBridgeConnectionTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__river__Manning_Kinematic, _p_cmf__river__Manning_KinematicTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__upslope__connections__DarcyKinematic, _p_cmf__upslope__connections__DarcyKinematicTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__upslope__connections__MACROlikeMacroMicroExchange, _p_cmf__upslope__connections__MACROlikeMacroMicroExchangeTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__upslope__connections__DiffusiveMacroMicroExchange, _p_cmf__upslope__connections__DiffusiveMacroMicroExchangeTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__upslope__connections__JarvisMacroFlow, _p_cmf__upslope__connections__JarvisMacroFlowTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__upslope__connections__KinematicMacroFlow, _p_cmf__upslope__connections__KinematicMacroFlowTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__upslope__connections__GradientMacroFlow, _p_cmf__upslope__connections__GradientMacroFlowTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__upslope__connections__BaseMacroFlow, _p_cmf__upslope__connections__BaseMacroFlowTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__upslope__connections__MatrixInfiltration, _p_cmf__upslope__connections__MatrixInfiltrationTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__upslope__connections__SimpleInfiltration, _p_cmf__upslope__connections__SimpleInfiltrationTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__water__NeumannFlux, _p_cmf__water__NeumannFluxTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__upslope__aquifer_Darcy, _p_cmf__upslope__aquifer_DarcyTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__upslope__connections__RutterInterception, _p_cmf__upslope__connections__RutterInterceptionTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__water__kinematic_wave, _p_cmf__water__kinematic_waveTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__water__constraint_kinematic_wave, _p_cmf__water__constraint_kinematic_waveTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__upslope__ET__constantETpot, _p_cmf__upslope__ET__constantETpotTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__upslope__connections__LayerBypass, _p_cmf__upslope__connections__LayerBypassTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__water__TechnicalFlux, _p_cmf__water__TechnicalFluxTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__upslope__ET__PriestleyTaylorET, _p_cmf__upslope__ET__PriestleyTaylorETTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__upslope__connections__lateral_sub_surface_flux, _p_cmf__upslope__connections__lateral_sub_surface_fluxTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__upslope__connections__Snowfall, _p_cmf__upslope__connections__SnowfallTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__upslope__ET__timeseriesETpot, _p_cmf__upslope__ET__timeseriesETpotTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__upslope__connections__DiffusiveSurfaceRunoff, _p_cmf__upslope__connections__DiffusiveSurfaceRunoffTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__upslope__connections__KinematicSurfaceRunoff, _p_cmf__upslope__connections__KinematicSurfaceRunoffTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__river__Manning, _p_cmf__river__ManningTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__upslope__connections__Richards_lateral, _p_cmf__upslope__connections__Richards_lateralTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__upslope__connections__GradientMacroMicroExchange, _p_cmf__upslope__connections__GradientMacroMicroExchangeTo_p_cmf__water__flux_connection, 0, 0}, {&_swigt__p_cmf__upslope__ET__PenmanMonteithET, _p_cmf__upslope__ET__PenmanMonteithETTo_p_cmf__water__flux_connection, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__water__flux_integrator[] = { {&_swigt__p_cmf__water__flux_integrator, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__water__flux_node[] = { {&_swigt__p_cmf__atmosphere__IDWRainfall, _p_cmf__atmosphere__IDWRainfallTo_p_cmf__water__flux_node, 0, 0}, {&_swigt__p_cmf__water__SystemBridge, _p_cmf__water__SystemBridgeTo_p_cmf__water__flux_node, 0, 0}, {&_swigt__p_cmf__atmosphere__RainfallStationReference, _p_cmf__atmosphere__RainfallStationReferenceTo_p_cmf__water__flux_node, 0, 0}, {&_swigt__p_cmf__water__NeumannBoundary, _p_cmf__water__NeumannBoundaryTo_p_cmf__water__flux_node, 0, 0}, {&_swigt__p_cmf__water__DirichletBoundary, _p_cmf__water__DirichletBoundaryTo_p_cmf__water__flux_node, 0, 0}, {&_swigt__p_cmf__upslope__aquifer, _p_cmf__upslope__aquiferTo_p_cmf__water__flux_node, 0, 0}, {&_swigt__p_cmf__upslope__MacroPore, _p_cmf__upslope__MacroPoreTo_p_cmf__water__flux_node, 0, 0}, {&_swigt__p_cmf__upslope__SoilLayer, _p_cmf__upslope__SoilLayerTo_p_cmf__water__flux_node, 0, 0}, {&_swigt__p_cmf__atmosphere__TimeseriesRainSource, _p_cmf__atmosphere__TimeseriesRainSourceTo_p_cmf__water__flux_node, 0, 0}, {&_swigt__p_cmf__atmosphere__ConstantRainSource, _p_cmf__atmosphere__ConstantRainSourceTo_p_cmf__water__flux_node, 0, 0}, {&_swigt__p_cmf__atmosphere__RainSource, _p_cmf__atmosphere__RainSourceTo_p_cmf__water__flux_node, 0, 0}, {&_swigt__p_cmf__water__flux_node, 0, 0, 0}, {&_swigt__p_cmf__river__OpenWaterStorage, _p_cmf__river__OpenWaterStorageTo_p_cmf__water__flux_node, 0, 0}, {&_swigt__p_cmf__river__Reach, _p_cmf__river__ReachTo_p_cmf__water__flux_node, 0, 0}, {&_swigt__p_cmf__water__WaterStorage, _p_cmf__water__WaterStorageTo_p_cmf__water__flux_node, 0, 0}, {&_swigt__p_cmf__upslope__SurfaceWater, _p_cmf__upslope__SurfaceWaterTo_p_cmf__water__flux_node, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__water__generic_gradient_connection[] = { {&_swigt__p_cmf__water__generic_gradient_connection, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__water__kinematic_wave[] = { {&_swigt__p_cmf__water__kinematic_wave, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__water__linear_scale[] = { {&_swigt__p_cmf__water__linear_scale, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__water__node_list[] = { {&_swigt__p_cmf__water__node_list, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__water__solute[] = { {&_swigt__p_cmf__water__solute, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__water__solute_vector[] = { {&_swigt__p_cmf__water__solute_vector, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__water__statecontrol_connection[] = { {&_swigt__p_cmf__water__statecontrol_connection, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__water__waterbalance_connection[] = { {&_swigt__p_cmf__water__waterbalance_connection, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cmf__water__waterbalance_integrator[] = { {&_swigt__p_cmf__water__waterbalance_integrator, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_const_iterator[] = { {&_swigt__p_const_iterator, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_double[] = { {&_swigt__p_double, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_f_r_cmf__upslope__Cell_r_cmf__upslope__Cell_ptrdiff_t__void[] = { {&_swigt__p_f_r_cmf__upslope__Cell_r_cmf__upslope__Cell_ptrdiff_t__void, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_iterator[] = { {&_swigt__p_iterator, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ptr[] = { {&_swigt__p_ptr, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__shared_ptrT_SoilLayer_t[] = { {&_swigt__p_std__shared_ptrT_SoilLayer_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__shared_ptrT_cmf__atmosphere__ConstantRainSource_t[] = { {&_swigt__p_std__shared_ptrT_cmf__atmosphere__ConstantRainSource_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__shared_ptrT_cmf__atmosphere__IDWRainfall_t[] = { {&_swigt__p_std__shared_ptrT_cmf__atmosphere__IDWRainfall_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t[] = { {&_swigt__p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__shared_ptrT_cmf__atmosphere__RainSource_t[] = { {&_swigt__p_std__shared_ptrT_cmf__atmosphere__RainSource_t, 0, 0, 0}, {&_swigt__p_std__shared_ptrT_cmf__atmosphere__ConstantRainSource_t, _p_std__shared_ptrT_cmf__atmosphere__ConstantRainSource_tTo_p_std__shared_ptrT_cmf__atmosphere__RainSource_t, 0, 0}, {&_swigt__p_std__shared_ptrT_cmf__atmosphere__IDWRainfall_t, _p_std__shared_ptrT_cmf__atmosphere__IDWRainfall_tTo_p_std__shared_ptrT_cmf__atmosphere__RainSource_t, 0, 0}, {&_swigt__p_std__shared_ptrT_cmf__atmosphere__RainfallStationReference_t, _p_std__shared_ptrT_cmf__atmosphere__RainfallStationReference_tTo_p_std__shared_ptrT_cmf__atmosphere__RainSource_t, 0, 0}, {&_swigt__p_std__shared_ptrT_cmf__atmosphere__TimeseriesRainSource_t, _p_std__shared_ptrT_cmf__atmosphere__TimeseriesRainSource_tTo_p_std__shared_ptrT_cmf__atmosphere__RainSource_t, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__shared_ptrT_cmf__atmosphere__RainfallStationReference_t[] = { {&_swigt__p_std__shared_ptrT_cmf__atmosphere__RainfallStationReference_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__shared_ptrT_cmf__atmosphere__RainfallStation_t[] = { {&_swigt__p_std__shared_ptrT_cmf__atmosphere__RainfallStation_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__shared_ptrT_cmf__atmosphere__TimeseriesRainSource_t[] = { {&_swigt__p_std__shared_ptrT_cmf__atmosphere__TimeseriesRainSource_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__shared_ptrT_cmf__atmosphere__aerodynamic_resistance_t[] = { {&_swigt__p_std__shared_ptrT_cmf__atmosphere__aerodynamic_resistance_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__shared_ptrT_cmf__math__StateVariable_t[] = { {&_swigt__p_std__shared_ptrT_cmf__water__SoluteStorage_t, _p_std__shared_ptrT_cmf__water__SoluteStorage_tTo_p_std__shared_ptrT_cmf__math__StateVariable_t, 0, 0}, {&_swigt__p_std__shared_ptrT_cmf__water__WaterStorage_t, _p_std__shared_ptrT_cmf__water__WaterStorage_tTo_p_std__shared_ptrT_cmf__math__StateVariable_t, 0, 0}, {&_swigt__p_std__shared_ptrT_cmf__river__OpenWaterStorage_t, _p_std__shared_ptrT_cmf__river__OpenWaterStorage_tTo_p_std__shared_ptrT_cmf__math__StateVariable_t, 0, 0}, {&_swigt__p_std__shared_ptrT_cmf__upslope__MacroPore_t, _p_std__shared_ptrT_cmf__upslope__MacroPore_tTo_p_std__shared_ptrT_cmf__math__StateVariable_t, 0, 0}, {&_swigt__p_std__shared_ptrT_cmf__math__StateVariable_t, 0, 0, 0}, {&_swigt__p_std__shared_ptrT_cmf__upslope__SurfaceWater_t, _p_std__shared_ptrT_cmf__upslope__SurfaceWater_tTo_p_std__shared_ptrT_cmf__math__StateVariable_t, 0, 0}, {&_swigt__p_std__shared_ptrT_cmf__upslope__SoilLayer_t, _p_std__shared_ptrT_cmf__upslope__SoilLayer_tTo_p_std__shared_ptrT_cmf__math__StateVariable_t, 0, 0}, {&_swigt__p_std__shared_ptrT_cmf__river__Reach_t, _p_std__shared_ptrT_cmf__river__Reach_tTo_p_std__shared_ptrT_cmf__math__StateVariable_t, 0, 0}, {&_swigt__p_std__shared_ptrT_cmf__upslope__aquifer_t, _p_std__shared_ptrT_cmf__upslope__aquifer_tTo_p_std__shared_ptrT_cmf__math__StateVariable_t, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__shared_ptrT_cmf__math__integratable_t[] = { {&_swigt__p_std__shared_ptrT_cmf__water__flux_integrator_t, _p_std__shared_ptrT_cmf__water__flux_integrator_tTo_p_std__shared_ptrT_cmf__math__integratable_t, 0, 0}, {&_swigt__p_std__shared_ptrT_cmf__water__waterbalance_integrator_t, _p_std__shared_ptrT_cmf__water__waterbalance_integrator_tTo_p_std__shared_ptrT_cmf__math__integratable_t, 0, 0}, {&_swigt__p_std__shared_ptrT_cmf__math__integratable_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__shared_ptrT_cmf__river__OpenWaterStorage_t[] = { {&_swigt__p_std__shared_ptrT_cmf__river__OpenWaterStorage_t, 0, 0, 0}, {&_swigt__p_std__shared_ptrT_cmf__upslope__SurfaceWater_t, _p_std__shared_ptrT_cmf__upslope__SurfaceWater_tTo_p_std__shared_ptrT_cmf__river__OpenWaterStorage_t, 0, 0}, {&_swigt__p_std__shared_ptrT_cmf__river__Reach_t, _p_std__shared_ptrT_cmf__river__Reach_tTo_p_std__shared_ptrT_cmf__river__OpenWaterStorage_t, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__shared_ptrT_cmf__river__Reach_t[] = { {&_swigt__p_std__shared_ptrT_cmf__river__Reach_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__shared_ptrT_cmf__upslope__ET__canopy_evaporation_method_t[] = { {&_swigt__p_std__shared_ptrT_cmf__upslope__ET__canopy_evaporation_method_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__shared_ptrT_cmf__upslope__ET__snow_evaporation_method_t[] = { {&_swigt__p_std__shared_ptrT_cmf__upslope__ET__snow_evaporation_method_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__shared_ptrT_cmf__upslope__ET__soil_evaporation_method_t[] = { {&_swigt__p_std__shared_ptrT_cmf__upslope__ET__soil_evaporation_method_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__shared_ptrT_cmf__upslope__ET__surface_water_evaporation_method_t[] = { {&_swigt__p_std__shared_ptrT_cmf__upslope__ET__surface_water_evaporation_method_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__shared_ptrT_cmf__upslope__ET__transpiration_method_t[] = { {&_swigt__p_std__shared_ptrT_cmf__upslope__ET__transpiration_method_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__shared_ptrT_cmf__upslope__MacroPore_t[] = { {&_swigt__p_std__shared_ptrT_cmf__upslope__MacroPore_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__shared_ptrT_cmf__upslope__SoilLayer_t[] = { {&_swigt__p_std__shared_ptrT_cmf__upslope__SoilLayer_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__shared_ptrT_cmf__upslope__SurfaceWater_t[] = { {&_swigt__p_std__shared_ptrT_cmf__upslope__SurfaceWater_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__shared_ptrT_cmf__upslope__aquifer_t[] = { {&_swigt__p_std__shared_ptrT_cmf__upslope__aquifer_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__shared_ptrT_cmf__water__DirichletBoundary_t[] = { {&_swigt__p_std__shared_ptrT_cmf__water__DirichletBoundary_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__shared_ptrT_cmf__water__NeumannBoundary_t[] = { {&_swigt__p_std__shared_ptrT_cmf__water__NeumannBoundary_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__shared_ptrT_cmf__water__SoluteStorage_t[] = { {&_swigt__p_std__shared_ptrT_cmf__water__SoluteStorage_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__shared_ptrT_cmf__water__SystemBridge_t[] = { {&_swigt__p_std__shared_ptrT_cmf__water__SystemBridge_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__shared_ptrT_cmf__water__WaterStorage_t[] = { {&_swigt__p_std__shared_ptrT_cmf__water__WaterStorage_t, 0, 0, 0}, {&_swigt__p_std__shared_ptrT_cmf__river__OpenWaterStorage_t, _p_std__shared_ptrT_cmf__river__OpenWaterStorage_tTo_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0, 0}, {&_swigt__p_std__shared_ptrT_cmf__upslope__MacroPore_t, _p_std__shared_ptrT_cmf__upslope__MacroPore_tTo_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0, 0}, {&_swigt__p_std__shared_ptrT_cmf__upslope__SurfaceWater_t, _p_std__shared_ptrT_cmf__upslope__SurfaceWater_tTo_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0, 0}, {&_swigt__p_std__shared_ptrT_cmf__upslope__SoilLayer_t, _p_std__shared_ptrT_cmf__upslope__SoilLayer_tTo_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0, 0}, {&_swigt__p_std__shared_ptrT_cmf__river__Reach_t, _p_std__shared_ptrT_cmf__river__Reach_tTo_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0, 0}, {&_swigt__p_std__shared_ptrT_cmf__upslope__aquifer_t, _p_std__shared_ptrT_cmf__upslope__aquifer_tTo_p_std__shared_ptrT_cmf__water__WaterStorage_t, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__shared_ptrT_cmf__water__flux_connection_t[] = { {&_swigt__p_std__shared_ptrT_cmf__water__flux_connection_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__shared_ptrT_cmf__water__flux_integrator_t[] = { {&_swigt__p_std__shared_ptrT_cmf__water__flux_integrator_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__shared_ptrT_cmf__water__flux_node_t[] = { {&_swigt__p_std__shared_ptrT_cmf__upslope__aquifer_t, _p_std__shared_ptrT_cmf__upslope__aquifer_tTo_p_std__shared_ptrT_cmf__water__flux_node_t, 0, 0}, {&_swigt__p_std__shared_ptrT_cmf__atmosphere__IDWRainfall_t, _p_std__shared_ptrT_cmf__atmosphere__IDWRainfall_tTo_p_std__shared_ptrT_cmf__water__flux_node_t, 0, 0}, {&_swigt__p_std__shared_ptrT_cmf__water__NeumannBoundary_t, _p_std__shared_ptrT_cmf__water__NeumannBoundary_tTo_p_std__shared_ptrT_cmf__water__flux_node_t, 0, 0}, {&_swigt__p_std__shared_ptrT_cmf__atmosphere__RainfallStationReference_t, _p_std__shared_ptrT_cmf__atmosphere__RainfallStationReference_tTo_p_std__shared_ptrT_cmf__water__flux_node_t, 0, 0}, {&_swigt__p_std__shared_ptrT_cmf__river__Reach_t, _p_std__shared_ptrT_cmf__river__Reach_tTo_p_std__shared_ptrT_cmf__water__flux_node_t, 0, 0}, {&_swigt__p_std__shared_ptrT_cmf__upslope__SurfaceWater_t, _p_std__shared_ptrT_cmf__upslope__SurfaceWater_tTo_p_std__shared_ptrT_cmf__water__flux_node_t, 0, 0}, {&_swigt__p_std__shared_ptrT_cmf__water__DirichletBoundary_t, _p_std__shared_ptrT_cmf__water__DirichletBoundary_tTo_p_std__shared_ptrT_cmf__water__flux_node_t, 0, 0}, {&_swigt__p_std__shared_ptrT_cmf__atmosphere__ConstantRainSource_t, _p_std__shared_ptrT_cmf__atmosphere__ConstantRainSource_tTo_p_std__shared_ptrT_cmf__water__flux_node_t, 0, 0}, {&_swigt__p_std__shared_ptrT_cmf__river__OpenWaterStorage_t, _p_std__shared_ptrT_cmf__river__OpenWaterStorage_tTo_p_std__shared_ptrT_cmf__water__flux_node_t, 0, 0}, {&_swigt__p_std__shared_ptrT_cmf__water__WaterStorage_t, _p_std__shared_ptrT_cmf__water__WaterStorage_tTo_p_std__shared_ptrT_cmf__water__flux_node_t, 0, 0}, {&_swigt__p_std__shared_ptrT_cmf__water__flux_node_t, 0, 0, 0}, {&_swigt__p_std__shared_ptrT_cmf__atmosphere__RainSource_t, _p_std__shared_ptrT_cmf__atmosphere__RainSource_tTo_p_std__shared_ptrT_cmf__water__flux_node_t, 0, 0}, {&_swigt__p_std__shared_ptrT_cmf__upslope__SoilLayer_t, _p_std__shared_ptrT_cmf__upslope__SoilLayer_tTo_p_std__shared_ptrT_cmf__water__flux_node_t, 0, 0}, {&_swigt__p_std__shared_ptrT_cmf__atmosphere__TimeseriesRainSource_t, _p_std__shared_ptrT_cmf__atmosphere__TimeseriesRainSource_tTo_p_std__shared_ptrT_cmf__water__flux_node_t, 0, 0}, {&_swigt__p_std__shared_ptrT_cmf__upslope__MacroPore_t, _p_std__shared_ptrT_cmf__upslope__MacroPore_tTo_p_std__shared_ptrT_cmf__water__flux_node_t, 0, 0}, {&_swigt__p_std__shared_ptrT_cmf__water__SystemBridge_t, _p_std__shared_ptrT_cmf__water__SystemBridge_tTo_p_std__shared_ptrT_cmf__water__flux_node_t, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__shared_ptrT_cmf__water__waterbalance_integrator_t[] = { {&_swigt__p_std__shared_ptrT_cmf__water__waterbalance_integrator_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__shared_ptrT_std__shared_ptrT_cmf__atmosphere__ConstantRainSource_t_t[] = { {&_swigt__p_std__shared_ptrT_std__shared_ptrT_cmf__atmosphere__ConstantRainSource_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__shared_ptrT_std__shared_ptrT_cmf__atmosphere__RainfallStationReference_t_t[] = { {&_swigt__p_std__shared_ptrT_std__shared_ptrT_cmf__atmosphere__RainfallStationReference_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__string[] = { {&_swigt__p_std__string, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorT_std__shared_ptrT_cmf__water__WaterStorage_t_t[] = { {&_swigt__p_std__vectorT_std__shared_ptrT_cmf__water__WaterStorage_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorT_std__shared_ptrT_cmf__water__flux_connection_t_t__const_iterator[] = { {&_swigt__p_std__vectorT_std__shared_ptrT_cmf__water__flux_connection_t_t__const_iterator, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorT_std__shared_ptrT_cmf__water__flux_connection_t_t__iterator[] = { {&_swigt__p_std__vectorT_std__shared_ptrT_cmf__water__flux_connection_t_t__iterator, 0, 0, 0},{0, 0, 0, 0}}; + +static swig_cast_info *swig_cast_initial[] = { + _swigc__p_char, + _swigc__p_cmf__atmosphere__ConstantMeteorology, + _swigc__p_cmf__atmosphere__ConstantRainSource, + _swigc__p_cmf__atmosphere__IDWRainfall, + _swigc__p_cmf__atmosphere__IDW_Meteorology, + _swigc__p_cmf__atmosphere__MeteoStation, + _swigc__p_cmf__atmosphere__MeteoStationList, + _swigc__p_cmf__atmosphere__MeteoStationReference, + _swigc__p_cmf__atmosphere__Meteorology, + _swigc__p_cmf__atmosphere__RainSource, + _swigc__p_cmf__atmosphere__RainfallStation, + _swigc__p_cmf__atmosphere__RainfallStationList, + _swigc__p_cmf__atmosphere__RainfallStationReference, + _swigc__p_cmf__atmosphere__TimeseriesRainSource, + _swigc__p_cmf__atmosphere__Weather, + _swigc__p_cmf__atmosphere__aerodynamic_resistance, + _swigc__p_cmf__atmosphere__log_wind_profile, + _swigc__p_cmf__geometry__point, + _swigc__p_cmf__geometry__point_vector, + _swigc__p_cmf__math__BDF2, + _swigc__p_cmf__math__CVodeIntegrator, + _swigc__p_cmf__math__Date, + _swigc__p_cmf__math__ExplicitEuler_fixed, + _swigc__p_cmf__math__HeunIntegrator, + _swigc__p_cmf__math__ImplicitEuler, + _swigc__p_cmf__math__Integrator, + _swigc__p_cmf__math__MultiIntegrator, + _swigc__p_cmf__math__RKFIntegrator, + _swigc__p_cmf__math__SoluteWaterIntegrator, + _swigc__p_cmf__math__StateVariable, + _swigc__p_cmf__math__StateVariableList, + _swigc__p_cmf__math__StateVariableOwner, + _swigc__p_cmf__math__Time, + _swigc__p_cmf__math__cubicspline, + _swigc__p_cmf__math__integratable, + _swigc__p_cmf__math__integratable_list, + _swigc__p_cmf__math__num_array, + _swigc__p_cmf__math__timeseries, + _swigc__p_cmf__project, + _swigc__p_cmf__river__Channel, + _swigc__p_cmf__river__IChannel, + _swigc__p_cmf__river__IVolumeHeightFunction, + _swigc__p_cmf__river__Manning, + _swigc__p_cmf__river__Manning_Diffusive, + _swigc__p_cmf__river__Manning_Kinematic, + _swigc__p_cmf__river__MeanChannel, + _swigc__p_cmf__river__OpenWaterStorage, + _swigc__p_cmf__river__PipeReach, + _swigc__p_cmf__river__Prism, + _swigc__p_cmf__river__Reach, + _swigc__p_cmf__river__ReachIterator, + _swigc__p_cmf__river__RectangularReach, + _swigc__p_cmf__river__SWATReachType, + _swigc__p_cmf__river__TriangularReach, + _swigc__p_cmf__river__volume_height_function, + _swigc__p_cmf__upslope__BrooksCoreyRetentionCurve, + _swigc__p_cmf__upslope__Cell, + _swigc__p_cmf__upslope__CellConnector, + _swigc__p_cmf__upslope__ET__CanopyStorageEvaporation, + _swigc__p_cmf__upslope__ET__ContentStress, + _swigc__p_cmf__upslope__ET__HargreaveET, + _swigc__p_cmf__upslope__ET__PenmanEvaporation, + _swigc__p_cmf__upslope__ET__PenmanMonteithET, + _swigc__p_cmf__upslope__ET__PriestleyTaylorET, + _swigc__p_cmf__upslope__ET__RootUptakeStessFunction, + _swigc__p_cmf__upslope__ET__ShuttleworthWallace, + _swigc__p_cmf__upslope__ET__SuctionStress, + _swigc__p_cmf__upslope__ET__TurcET, + _swigc__p_cmf__upslope__ET__VolumeStress, + _swigc__p_cmf__upslope__ET__canopy_evaporation, + _swigc__p_cmf__upslope__ET__canopy_evaporation_method, + _swigc__p_cmf__upslope__ET__constantETpot, + _swigc__p_cmf__upslope__ET__snow_evaporation, + _swigc__p_cmf__upslope__ET__snow_evaporation_method, + _swigc__p_cmf__upslope__ET__soil_evaporation, + _swigc__p_cmf__upslope__ET__soil_evaporation_method, + _swigc__p_cmf__upslope__ET__stressedET, + _swigc__p_cmf__upslope__ET__surface_water_evaporation, + _swigc__p_cmf__upslope__ET__surface_water_evaporation_method, + _swigc__p_cmf__upslope__ET__timeseriesETpot, + _swigc__p_cmf__upslope__ET__transpiration, + _swigc__p_cmf__upslope__ET__transpiration_method, + _swigc__p_cmf__upslope__LinearRetention, + _swigc__p_cmf__upslope__MacroPore, + _swigc__p_cmf__upslope__RetentionCurve, + _swigc__p_cmf__upslope__SoilLayer, + _swigc__p_cmf__upslope__SurfaceWater, + _swigc__p_cmf__upslope__Topology, + _swigc__p_cmf__upslope__VanGenuchtenMualem, + _swigc__p_cmf__upslope__aquifer, + _swigc__p_cmf__upslope__aquifer_Darcy, + _swigc__p_cmf__upslope__cell_vector, + _swigc__p_cmf__upslope__connections__BaseMacroFlow, + _swigc__p_cmf__upslope__connections__CanopyOverflow, + _swigc__p_cmf__upslope__connections__Darcy, + _swigc__p_cmf__upslope__connections__DarcyKinematic, + _swigc__p_cmf__upslope__connections__DiffusiveMacroMicroExchange, + _swigc__p_cmf__upslope__connections__DiffusiveSurfaceRunoff, + _swigc__p_cmf__upslope__connections__EnergyBudgetSnowMelt, + _swigc__p_cmf__upslope__connections__FreeDrainagePercolation, + _swigc__p_cmf__upslope__connections__GradientMacroFlow, + _swigc__p_cmf__upslope__connections__GradientMacroMicroExchange, + _swigc__p_cmf__upslope__connections__GreenAmptInfiltration, + _swigc__p_cmf__upslope__connections__JarvisMacroFlow, + _swigc__p_cmf__upslope__connections__KinematicMacroFlow, + _swigc__p_cmf__upslope__connections__KinematicSurfaceRunoff, + _swigc__p_cmf__upslope__connections__LayerBypass, + _swigc__p_cmf__upslope__connections__MACROlikeMacroMicroExchange, + _swigc__p_cmf__upslope__connections__MatrixInfiltration, + _swigc__p_cmf__upslope__connections__Rainfall, + _swigc__p_cmf__upslope__connections__Richards, + _swigc__p_cmf__upslope__connections__Richards_lateral, + _swigc__p_cmf__upslope__connections__RutterInterception, + _swigc__p_cmf__upslope__connections__SWATPercolation, + _swigc__p_cmf__upslope__connections__SimplRichards, + _swigc__p_cmf__upslope__connections__SimpleInfiltration, + _swigc__p_cmf__upslope__connections__SimpleTindexSnowMelt, + _swigc__p_cmf__upslope__connections__Snowfall, + _swigc__p_cmf__upslope__connections__TOPModelFlow, + _swigc__p_cmf__upslope__connections__TopographicGradientDarcy, + _swigc__p_cmf__upslope__connections__lateral_sub_surface_flux, + _swigc__p_cmf__upslope__layer_list, + _swigc__p_cmf__upslope__neighbor_iterator, + _swigc__p_cmf__upslope__subcatchment, + _swigc__p_cmf__upslope__vegetation__Vegetation, + _swigc__p_cmf__water__Adsorption, + _swigc__p_cmf__water__ConstraintLinearStorageConnection, + _swigc__p_cmf__water__DirichletBoundary, + _swigc__p_cmf__water__ExponentialDeclineConnection, + _swigc__p_cmf__water__FreundlichAdsorbtion, + _swigc__p_cmf__water__LangmuirAdsorption, + _swigc__p_cmf__water__LinearAdsorption, + _swigc__p_cmf__water__LinearStorageConnection, + _swigc__p_cmf__water__NeumannBoundary, + _swigc__p_cmf__water__NeumannBoundary_list, + _swigc__p_cmf__water__NeumannFlux, + _swigc__p_cmf__water__NullAdsorption, + _swigc__p_cmf__water__PowerLawConnection, + _swigc__p_cmf__water__SoluteStorage, + _swigc__p_cmf__water__SoluteTimeseries, + _swigc__p_cmf__water__SystemBridge, + _swigc__p_cmf__water__SystemBridgeConnection, + _swigc__p_cmf__water__TechnicalFlux, + _swigc__p_cmf__water__WaterStorage, + _swigc__p_cmf__water__bidirectional_kinematic_exchange, + _swigc__p_cmf__water__connection_list, + _swigc__p_cmf__water__constraint_kinematic_wave, + _swigc__p_cmf__water__external_control_connection, + _swigc__p_cmf__water__flux_connection, + _swigc__p_cmf__water__flux_integrator, + _swigc__p_cmf__water__flux_node, + _swigc__p_cmf__water__generic_gradient_connection, + _swigc__p_cmf__water__kinematic_wave, + _swigc__p_cmf__water__linear_scale, + _swigc__p_cmf__water__node_list, + _swigc__p_cmf__water__solute, + _swigc__p_cmf__water__solute_vector, + _swigc__p_cmf__water__statecontrol_connection, + _swigc__p_cmf__water__waterbalance_connection, + _swigc__p_cmf__water__waterbalance_integrator, + _swigc__p_const_iterator, + _swigc__p_double, + _swigc__p_f_r_cmf__upslope__Cell_r_cmf__upslope__Cell_ptrdiff_t__void, + _swigc__p_iterator, + _swigc__p_ptr, + _swigc__p_std__shared_ptrT_SoilLayer_t, + _swigc__p_std__shared_ptrT_cmf__atmosphere__ConstantRainSource_t, + _swigc__p_std__shared_ptrT_cmf__atmosphere__IDWRainfall_t, + _swigc__p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t, + _swigc__p_std__shared_ptrT_cmf__atmosphere__RainSource_t, + _swigc__p_std__shared_ptrT_cmf__atmosphere__RainfallStationReference_t, + _swigc__p_std__shared_ptrT_cmf__atmosphere__RainfallStation_t, + _swigc__p_std__shared_ptrT_cmf__atmosphere__TimeseriesRainSource_t, + _swigc__p_std__shared_ptrT_cmf__atmosphere__aerodynamic_resistance_t, + _swigc__p_std__shared_ptrT_cmf__math__StateVariable_t, + _swigc__p_std__shared_ptrT_cmf__math__integratable_t, + _swigc__p_std__shared_ptrT_cmf__river__OpenWaterStorage_t, + _swigc__p_std__shared_ptrT_cmf__river__Reach_t, + _swigc__p_std__shared_ptrT_cmf__upslope__ET__canopy_evaporation_method_t, + _swigc__p_std__shared_ptrT_cmf__upslope__ET__snow_evaporation_method_t, + _swigc__p_std__shared_ptrT_cmf__upslope__ET__soil_evaporation_method_t, + _swigc__p_std__shared_ptrT_cmf__upslope__ET__surface_water_evaporation_method_t, + _swigc__p_std__shared_ptrT_cmf__upslope__ET__transpiration_method_t, + _swigc__p_std__shared_ptrT_cmf__upslope__MacroPore_t, + _swigc__p_std__shared_ptrT_cmf__upslope__SoilLayer_t, + _swigc__p_std__shared_ptrT_cmf__upslope__SurfaceWater_t, + _swigc__p_std__shared_ptrT_cmf__upslope__aquifer_t, + _swigc__p_std__shared_ptrT_cmf__water__DirichletBoundary_t, + _swigc__p_std__shared_ptrT_cmf__water__NeumannBoundary_t, + _swigc__p_std__shared_ptrT_cmf__water__SoluteStorage_t, + _swigc__p_std__shared_ptrT_cmf__water__SystemBridge_t, + _swigc__p_std__shared_ptrT_cmf__water__WaterStorage_t, + _swigc__p_std__shared_ptrT_cmf__water__flux_connection_t, + _swigc__p_std__shared_ptrT_cmf__water__flux_integrator_t, + _swigc__p_std__shared_ptrT_cmf__water__flux_node_t, + _swigc__p_std__shared_ptrT_cmf__water__waterbalance_integrator_t, + _swigc__p_std__shared_ptrT_std__shared_ptrT_cmf__atmosphere__ConstantRainSource_t_t, + _swigc__p_std__shared_ptrT_std__shared_ptrT_cmf__atmosphere__RainfallStationReference_t_t, + _swigc__p_std__string, + _swigc__p_std__vectorT_std__shared_ptrT_cmf__water__WaterStorage_t_t, + _swigc__p_std__vectorT_std__shared_ptrT_cmf__water__flux_connection_t_t__const_iterator, + _swigc__p_std__vectorT_std__shared_ptrT_cmf__water__flux_connection_t_t__iterator, +}; + + +/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */ + +static swig_const_info swig_const_table[] = { +{0, 0, 0, 0.0, 0, 0}}; + +#ifdef __cplusplus +} +#endif +/* ----------------------------------------------------------------------------- + * Type initialization: + * This problem is tough by the requirement that no dynamic + * memory is used. Also, since swig_type_info structures store pointers to + * swig_cast_info structures and swig_cast_info structures store pointers back + * to swig_type_info structures, we need some lookup code at initialization. + * The idea is that swig generates all the structures that are needed. + * The runtime then collects these partially filled structures. + * The SWIG_InitializeModule function takes these initial arrays out of + * swig_module, and does all the lookup, filling in the swig_module.types + * array with the correct data and linking the correct swig_cast_info + * structures together. + * + * The generated swig_type_info structures are assigned statically to an initial + * array. We just loop through that array, and handle each type individually. + * First we lookup if this type has been already loaded, and if so, use the + * loaded structure instead of the generated one. Then we have to fill in the + * cast linked list. The cast data is initially stored in something like a + * two-dimensional array. Each row corresponds to a type (there are the same + * number of rows as there are in the swig_type_initial array). Each entry in + * a column is one of the swig_cast_info structures for that type. + * The cast_initial array is actually an array of arrays, because each row has + * a variable number of columns. So to actually build the cast linked list, + * we find the array of casts associated with the type, and loop through it + * adding the casts to the list. The one last trick we need to do is making + * sure the type pointer in the swig_cast_info struct is correct. + * + * First off, we lookup the cast->type name to see if it is already loaded. + * There are three cases to handle: + * 1) If the cast->type has already been loaded AND the type we are adding + * casting info to has not been loaded (it is in this module), THEN we + * replace the cast->type pointer with the type pointer that has already + * been loaded. + * 2) If BOTH types (the one we are adding casting info to, and the + * cast->type) are loaded, THEN the cast info has already been loaded by + * the previous module so we just ignore it. + * 3) Finally, if cast->type has not already been loaded, then we add that + * swig_cast_info to the linked list (because the cast->type) pointer will + * be correct. + * ----------------------------------------------------------------------------- */ + +#ifdef __cplusplus +extern "C" { +#if 0 +} /* c-mode */ +#endif +#endif + +#if 0 +#define SWIGRUNTIME_DEBUG +#endif + + +SWIGRUNTIME void +SWIG_InitializeModule(void *clientdata) { + size_t i; + swig_module_info *module_head, *iter; + int init; + + /* check to see if the circular list has been setup, if not, set it up */ + if (swig_module.next==0) { + /* Initialize the swig_module */ + swig_module.type_initial = swig_type_initial; + swig_module.cast_initial = swig_cast_initial; + swig_module.next = &swig_module; + init = 1; + } else { + init = 0; + } + + /* Try and load any already created modules */ + module_head = SWIG_GetModule(clientdata); + if (!module_head) { + /* This is the first module loaded for this interpreter */ + /* so set the swig module into the interpreter */ + SWIG_SetModule(clientdata, &swig_module); + } else { + /* the interpreter has loaded a SWIG module, but has it loaded this one? */ + iter=module_head; + do { + if (iter==&swig_module) { + /* Our module is already in the list, so there's nothing more to do. */ + return; + } + iter=iter->next; + } while (iter!= module_head); + + /* otherwise we must add our module into the list */ + swig_module.next = module_head->next; + module_head->next = &swig_module; + } + + /* When multiple interpreters are used, a module could have already been initialized in + a different interpreter, but not yet have a pointer in this interpreter. + In this case, we do not want to continue adding types... everything should be + set up already */ + if (init == 0) return; + + /* Now work on filling in swig_module.types */ +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: size %d\n", swig_module.size); +#endif + for (i = 0; i < swig_module.size; ++i) { + swig_type_info *type = 0; + swig_type_info *ret; + swig_cast_info *cast; + +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); +#endif + + /* if there is another module already loaded */ + if (swig_module.next != &swig_module) { + type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name); + } + if (type) { + /* Overwrite clientdata field */ +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: found type %s\n", type->name); +#endif + if (swig_module.type_initial[i]->clientdata) { + type->clientdata = swig_module.type_initial[i]->clientdata; +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name); +#endif + } + } else { + type = swig_module.type_initial[i]; + } + + /* Insert casting types */ + cast = swig_module.cast_initial[i]; + while (cast->type) { + /* Don't need to add information already in the list */ + ret = 0; +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: look cast %s\n", cast->type->name); +#endif + if (swig_module.next != &swig_module) { + ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name); +#ifdef SWIGRUNTIME_DEBUG + if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name); +#endif + } + if (ret) { + if (type == swig_module.type_initial[i]) { +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: skip old type %s\n", ret->name); +#endif + cast->type = ret; + ret = 0; + } else { + /* Check for casting already in the list */ + swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type); +#ifdef SWIGRUNTIME_DEBUG + if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name); +#endif + if (!ocast) ret = 0; + } + } + + if (!ret) { +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name); +#endif + if (type->cast) { + type->cast->prev = cast; + cast->next = type->cast; + } + type->cast = cast; + } + cast++; + } + /* Set entry in modules->types array equal to the type */ + swig_module.types[i] = type; + } + swig_module.types[i] = 0; + +#ifdef SWIGRUNTIME_DEBUG + printf("**** SWIG_InitializeModule: Cast List ******\n"); + for (i = 0; i < swig_module.size; ++i) { + int j = 0; + swig_cast_info *cast = swig_module.cast_initial[i]; + printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); + while (cast->type) { + printf("SWIG_InitializeModule: cast type %s\n", cast->type->name); + cast++; + ++j; + } + printf("---- Total casts: %d\n",j); + } + printf("**** SWIG_InitializeModule: Cast List ******\n"); +#endif +} + +/* This function will propagate the clientdata field of type to +* any new swig_type_info structures that have been added into the list +* of equivalent types. It is like calling +* SWIG_TypeClientData(type, clientdata) a second time. +*/ +SWIGRUNTIME void +SWIG_PropagateClientData(void) { + size_t i; + swig_cast_info *equiv; + static int init_run = 0; + + if (init_run) return; + init_run = 1; + + for (i = 0; i < swig_module.size; i++) { + if (swig_module.types[i]->clientdata) { + equiv = swig_module.types[i]->cast; + while (equiv) { + if (!equiv->converter) { + if (equiv->type && !equiv->type->clientdata) + SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata); + } + equiv = equiv->next; + } + } + } +} + +#ifdef __cplusplus +#if 0 +{ + /* c-mode */ +#endif +} +#endif + + + +#ifdef __cplusplus +extern "C" { +#endif + + /* Python-specific SWIG API */ +#define SWIG_newvarlink() SWIG_Python_newvarlink() +#define SWIG_addvarlink(p, name, get_attr, set_attr) SWIG_Python_addvarlink(p, name, get_attr, set_attr) +#define SWIG_InstallConstants(d, constants) SWIG_Python_InstallConstants(d, constants) + + /* ----------------------------------------------------------------------------- + * global variable support code. + * ----------------------------------------------------------------------------- */ + + typedef struct swig_globalvar { + char *name; /* Name of global variable */ + PyObject *(*get_attr)(void); /* Return the current value */ + int (*set_attr)(PyObject *); /* Set the value */ + struct swig_globalvar *next; + } swig_globalvar; + + typedef struct swig_varlinkobject { + PyObject_HEAD + swig_globalvar *vars; + } swig_varlinkobject; + + SWIGINTERN PyObject * + swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v)) { +#if PY_VERSION_HEX >= 0x03000000 + return PyUnicode_InternFromString(""); +#else + return PyString_FromString(""); +#endif + } + + SWIGINTERN PyObject * + swig_varlink_str(swig_varlinkobject *v) { +#if PY_VERSION_HEX >= 0x03000000 + PyObject *str = PyUnicode_InternFromString("("); + PyObject *tail; + PyObject *joined; + swig_globalvar *var; + for (var = v->vars; var; var=var->next) { + tail = PyUnicode_FromString(var->name); + joined = PyUnicode_Concat(str, tail); + Py_DecRef(str); + Py_DecRef(tail); + str = joined; + if (var->next) { + tail = PyUnicode_InternFromString(", "); + joined = PyUnicode_Concat(str, tail); + Py_DecRef(str); + Py_DecRef(tail); + str = joined; + } + } + tail = PyUnicode_InternFromString(")"); + joined = PyUnicode_Concat(str, tail); + Py_DecRef(str); + Py_DecRef(tail); + str = joined; +#else + PyObject *str = PyString_FromString("("); + swig_globalvar *var; + for (var = v->vars; var; var=var->next) { + PyString_ConcatAndDel(&str,PyString_FromString(var->name)); + if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", ")); + } + PyString_ConcatAndDel(&str,PyString_FromString(")")); +#endif + return str; + } + + SWIGINTERN int + swig_varlink_print(swig_varlinkobject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) { + char *tmp; + PyObject *str = swig_varlink_str(v); + fprintf(fp,"Swig global variables "); + fprintf(fp,"%s\n", tmp = SWIG_Python_str_AsChar(str)); + SWIG_Python_str_DelForPy3(tmp); + Py_DECREF(str); + return 0; + } + + SWIGINTERN void + swig_varlink_dealloc(swig_varlinkobject *v) { + swig_globalvar *var = v->vars; + while (var) { + swig_globalvar *n = var->next; + free(var->name); + free(var); + var = n; + } + } + + SWIGINTERN PyObject * + swig_varlink_getattr(swig_varlinkobject *v, char *n) { + PyObject *res = NULL; + swig_globalvar *var = v->vars; + while (var) { + if (strcmp(var->name,n) == 0) { + res = (*var->get_attr)(); + break; + } + var = var->next; + } + if (res == NULL && !PyErr_Occurred()) { + PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n); + } + return res; + } + + SWIGINTERN int + swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) { + int res = 1; + swig_globalvar *var = v->vars; + while (var) { + if (strcmp(var->name,n) == 0) { + res = (*var->set_attr)(p); + break; + } + var = var->next; + } + if (res == 1 && !PyErr_Occurred()) { + PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n); + } + return res; + } + + SWIGINTERN PyTypeObject* + swig_varlink_type(void) { + static char varlink__doc__[] = "Swig var link object"; + static PyTypeObject varlink_type; + static int type_init = 0; + if (!type_init) { + const PyTypeObject tmp = { +#if PY_VERSION_HEX >= 0x03000000 + PyVarObject_HEAD_INIT(NULL, 0) +#else + PyObject_HEAD_INIT(NULL) + 0, /* ob_size */ +#endif + (char *)"swigvarlink", /* tp_name */ + sizeof(swig_varlinkobject), /* tp_basicsize */ + 0, /* tp_itemsize */ + (destructor) swig_varlink_dealloc, /* tp_dealloc */ + (printfunc) swig_varlink_print, /* tp_print */ + (getattrfunc) swig_varlink_getattr, /* tp_getattr */ + (setattrfunc) swig_varlink_setattr, /* tp_setattr */ + 0, /* tp_compare */ + (reprfunc) swig_varlink_repr, /* tp_repr */ + 0, /* tp_as_number */ + 0, /* tp_as_sequence */ + 0, /* tp_as_mapping */ + 0, /* tp_hash */ + 0, /* tp_call */ + (reprfunc) swig_varlink_str, /* tp_str */ + 0, /* tp_getattro */ + 0, /* tp_setattro */ + 0, /* tp_as_buffer */ + 0, /* tp_flags */ + varlink__doc__, /* tp_doc */ + 0, /* tp_traverse */ + 0, /* tp_clear */ + 0, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ +#if PY_VERSION_HEX >= 0x02020000 + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */ +#endif +#if PY_VERSION_HEX >= 0x02030000 + 0, /* tp_del */ +#endif +#if PY_VERSION_HEX >= 0x02060000 + 0, /* tp_version_tag */ +#endif +#if PY_VERSION_HEX >= 0x03040000 + 0, /* tp_finalize */ +#endif +#ifdef COUNT_ALLOCS + 0, /* tp_allocs */ + 0, /* tp_frees */ + 0, /* tp_maxalloc */ +#if PY_VERSION_HEX >= 0x02050000 + 0, /* tp_prev */ +#endif + 0 /* tp_next */ +#endif + }; + varlink_type = tmp; + type_init = 1; +#if PY_VERSION_HEX < 0x02020000 + varlink_type.ob_type = &PyType_Type; +#else + if (PyType_Ready(&varlink_type) < 0) + return NULL; +#endif + } + return &varlink_type; + } + + /* Create a variable linking object for use later */ + SWIGINTERN PyObject * + SWIG_Python_newvarlink(void) { + swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type()); + if (result) { + result->vars = 0; + } + return ((PyObject*) result); + } + + SWIGINTERN void + SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) { + swig_varlinkobject *v = (swig_varlinkobject *) p; + swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar)); + if (gv) { + size_t size = strlen(name)+1; + gv->name = (char *)malloc(size); + if (gv->name) { + strncpy(gv->name,name,size); + gv->get_attr = get_attr; + gv->set_attr = set_attr; + gv->next = v->vars; + } + } + v->vars = gv; + } + + SWIGINTERN PyObject * + SWIG_globals(void) { + static PyObject *_SWIG_globals = 0; + if (!_SWIG_globals) _SWIG_globals = SWIG_newvarlink(); + return _SWIG_globals; + } + + /* ----------------------------------------------------------------------------- + * constants/methods manipulation + * ----------------------------------------------------------------------------- */ + + /* Install Constants */ + SWIGINTERN void + SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) { + PyObject *obj = 0; + size_t i; + for (i = 0; constants[i].type; ++i) { + switch(constants[i].type) { + case SWIG_PY_POINTER: + obj = SWIG_InternalNewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0); + break; + case SWIG_PY_BINARY: + obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype)); + break; + default: + obj = 0; + break; + } + if (obj) { + PyDict_SetItemString(d, constants[i].name, obj); + Py_DECREF(obj); + } + } + } + + /* -----------------------------------------------------------------------------*/ + /* Fix SwigMethods to carry the callback ptrs when needed */ + /* -----------------------------------------------------------------------------*/ + + SWIGINTERN void + SWIG_Python_FixMethods(PyMethodDef *methods, + swig_const_info *const_table, + swig_type_info **types, + swig_type_info **types_initial) { + size_t i; + for (i = 0; methods[i].ml_name; ++i) { + const char *c = methods[i].ml_doc; + if (!c) continue; + c = strstr(c, "swig_ptr: "); + if (c) { + int j; + swig_const_info *ci = 0; + const char *name = c + 10; + for (j = 0; const_table[j].type; ++j) { + if (strncmp(const_table[j].name, name, + strlen(const_table[j].name)) == 0) { + ci = &(const_table[j]); + break; + } + } + if (ci) { + void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0; + if (ptr) { + size_t shift = (ci->ptype) - types; + swig_type_info *ty = types_initial[shift]; + size_t ldoc = (c - methods[i].ml_doc); + size_t lptr = strlen(ty->name)+2*sizeof(void*)+2; + char *ndoc = (char*)malloc(ldoc + lptr + 10); + if (ndoc) { + char *buff = ndoc; + strncpy(buff, methods[i].ml_doc, ldoc); + buff += ldoc; + strncpy(buff, "swig_ptr: ", 10); + buff += 10; + SWIG_PackVoidPtr(buff, ptr, ty->name, lptr); + methods[i].ml_doc = ndoc; + } + } + } + } + } + } + +#ifdef __cplusplus +} +#endif + +/* -----------------------------------------------------------------------------* + * Partial Init method + * -----------------------------------------------------------------------------*/ + +#ifdef __cplusplus +extern "C" +#endif + +SWIGEXPORT +#if PY_VERSION_HEX >= 0x03000000 +PyObject* +#else +void +#endif +SWIG_init(void) { + PyObject *m, *d, *md; +#if PY_VERSION_HEX >= 0x03000000 + static struct PyModuleDef SWIG_module = { +# if PY_VERSION_HEX >= 0x03020000 + PyModuleDef_HEAD_INIT, +# else + { + PyObject_HEAD_INIT(NULL) + NULL, /* m_init */ + 0, /* m_index */ + NULL, /* m_copy */ + }, +# endif + (char *) SWIG_name, + NULL, + -1, + SwigMethods, + NULL, + NULL, + NULL, + NULL + }; +#endif + +#if defined(SWIGPYTHON_BUILTIN) + static SwigPyClientData SwigPyObject_clientdata = { + 0, 0, 0, 0, 0, 0, 0 + }; + static PyGetSetDef this_getset_def = { + (char *)"this", &SwigPyBuiltin_ThisClosure, NULL, NULL, NULL + }; + static SwigPyGetSet thisown_getset_closure = { + (PyCFunction) SwigPyObject_own, + (PyCFunction) SwigPyObject_own + }; + static PyGetSetDef thisown_getset_def = { + (char *)"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure + }; + PyTypeObject *builtin_pytype; + int builtin_base_count; + swig_type_info *builtin_basetype; + PyObject *tuple; + PyGetSetDescrObject *static_getset; + PyTypeObject *metatype; + PyTypeObject *swigpyobject; + SwigPyClientData *cd; + PyObject *public_interface, *public_symbol; + PyObject *this_descr; + PyObject *thisown_descr; + PyObject *self = 0; + int i; + + (void)builtin_pytype; + (void)builtin_base_count; + (void)builtin_basetype; + (void)tuple; + (void)static_getset; + (void)self; + + /* Metaclass is used to implement static member variables */ + metatype = SwigPyObjectType(); + assert(metatype); +#endif + + /* Fix SwigMethods to carry the callback ptrs when needed */ + SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial); + +#if PY_VERSION_HEX >= 0x03000000 + m = PyModule_Create(&SWIG_module); +#else + m = Py_InitModule((char *) SWIG_name, SwigMethods); +#endif + + md = d = PyModule_GetDict(m); + (void)md; + + SWIG_InitializeModule(0); + +#ifdef SWIGPYTHON_BUILTIN + swigpyobject = SwigPyObject_TypeOnce(); + + SwigPyObject_stype = SWIG_MangledTypeQuery("_p_SwigPyObject"); + assert(SwigPyObject_stype); + cd = (SwigPyClientData*) SwigPyObject_stype->clientdata; + if (!cd) { + SwigPyObject_stype->clientdata = &SwigPyObject_clientdata; + SwigPyObject_clientdata.pytype = swigpyobject; + } else if (swigpyobject->tp_basicsize != cd->pytype->tp_basicsize) { + PyErr_SetString(PyExc_RuntimeError, "Import error: attempted to load two incompatible swig-generated modules."); +# if PY_VERSION_HEX >= 0x03000000 + return NULL; +# else + return; +# endif + } + + /* All objects have a 'this' attribute */ + this_descr = PyDescr_NewGetSet(SwigPyObject_type(), &this_getset_def); + (void)this_descr; + + /* All objects have a 'thisown' attribute */ + thisown_descr = PyDescr_NewGetSet(SwigPyObject_type(), &thisown_getset_def); + (void)thisown_descr; + + public_interface = PyList_New(0); + public_symbol = 0; + (void)public_symbol; + + PyDict_SetItemString(md, "__all__", public_interface); + Py_DECREF(public_interface); + for (i = 0; SwigMethods[i].ml_name != NULL; ++i) + SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name); + for (i = 0; swig_const_table[i].name != 0; ++i) + SwigPyBuiltin_AddPublicSymbol(public_interface, swig_const_table[i].name); +#endif + + SWIG_InstallConstants(d,swig_const_table); + + SWIG_Python_SetConstant(d, "SHARED_PTR_DISOWN",SWIG_From_int(static_cast< int >(0))); + import_array(); + PyDict_SetItemString(md,(char *)"cvar", SWIG_globals()); + SWIG_addvarlink(SWIG_globals(),(char *)"PI",Swig_var_PI_get, Swig_var_PI_set); + + PyDateTime_IMPORT; + + SWIG_addvarlink(SWIG_globals(),(char *)"Debug",Swig_var_Debug_get, Swig_var_Debug_set); + SWIG_addvarlink(SWIG_globals(),(char *)"__compiledate__",Swig_var___compiledate___get, Swig_var___compiledate___set); + SWIG_addvarlink(SWIG_globals(),(char *)"Pi",Swig_var_Pi_get, Swig_var_Pi_set); + SWIG_Python_SetConstant(d, "JULIANDAY_0_1_1900",SWIG_From_int(static_cast< int >(2415019))); + SWIG_Python_SetConstant(d, "Time_ms_per_day",SWIG_From_long_SS_long(static_cast< long long >(cmf::math::Time::ms_per_day))); + SWIG_addvarlink(SWIG_globals(),(char *)"ms",Swig_var_ms_get, Swig_var_ms_set); + SWIG_addvarlink(SWIG_globals(),(char *)"sec",Swig_var_sec_get, Swig_var_sec_set); + SWIG_addvarlink(SWIG_globals(),(char *)"min",Swig_var_min_get, Swig_var_min_set); + SWIG_addvarlink(SWIG_globals(),(char *)"h",Swig_var_h_get, Swig_var_h_set); + SWIG_addvarlink(SWIG_globals(),(char *)"day",Swig_var_day_get, Swig_var_day_set); + SWIG_addvarlink(SWIG_globals(),(char *)"week",Swig_var_week_get, Swig_var_week_set); + SWIG_addvarlink(SWIG_globals(),(char *)"year",Swig_var_year_get, Swig_var_year_set); + SWIG_addvarlink(SWIG_globals(),(char *)"month",Swig_var_month_get, Swig_var_month_set); + SWIG_addvarlink(SWIG_globals(),(char *)"never",Swig_var_never_get, Swig_var_never_set); + SWIG_addvarlink(SWIG_globals(),(char *)"rho_wg",Swig_var_rho_wg_get, Swig_var_rho_wg_set); + SWIG_addvarlink(SWIG_globals(),(char *)"KinematicSurfaceRunoff_cell_connector",Swig_var_KinematicSurfaceRunoff_cell_connector_get, Swig_var_KinematicSurfaceRunoff_cell_connector_set); + SWIG_addvarlink(SWIG_globals(),(char *)"DiffusiveSurfaceRunoff_cell_connector",Swig_var_DiffusiveSurfaceRunoff_cell_connector_get, Swig_var_DiffusiveSurfaceRunoff_cell_connector_set); + SWIG_addvarlink(SWIG_globals(),(char *)"Darcy_cell_connector",Swig_var_Darcy_cell_connector_get, Swig_var_Darcy_cell_connector_set); + SWIG_addvarlink(SWIG_globals(),(char *)"TopographicGradientDarcy_cell_connector",Swig_var_TopographicGradientDarcy_cell_connector_get, Swig_var_TopographicGradientDarcy_cell_connector_set); + SWIG_addvarlink(SWIG_globals(),(char *)"DarcyKinematic_cell_connector",Swig_var_DarcyKinematic_cell_connector_get, Swig_var_DarcyKinematic_cell_connector_set); + SWIG_addvarlink(SWIG_globals(),(char *)"Richards_lateral_cell_connector",Swig_var_Richards_lateral_cell_connector_get, Swig_var_Richards_lateral_cell_connector_set); + SWIG_addvarlink(SWIG_globals(),(char *)"Manning_Diffusive_cell_connector",Swig_var_Manning_Diffusive_cell_connector_get, Swig_var_Manning_Diffusive_cell_connector_set); + SWIG_addvarlink(SWIG_globals(),(char *)"Manning_Kinematic_cell_connector",Swig_var_Manning_Kinematic_cell_connector_get, Swig_var_Manning_Kinematic_cell_connector_set); +#if PY_VERSION_HEX >= 0x03000000 + return m; +#else + return; +#endif +} + diff --git a/cmf/cmf_core_src/water/simple_connections.h b/cmf/cmf_core_src/water/simple_connections.h index 57d8490f..f07893b1 100755 --- a/cmf/cmf_core_src/water/simple_connections.h +++ b/cmf/cmf_core_src/water/simple_connections.h @@ -204,7 +204,7 @@ namespace cmf { }; /// @ingroup connections - /// @brief Calculates flux out of a storage as a linear function of its volume to a power, constraint by the volume stored in the target storage. + /// @brief Calculates flux out of a storage as a linear function of its volume, constraint by the volume stored in the target storage. /// \f[ q = \frac {1}{t_r} \left({V_{l} - V_{l,min}}\right) \cdot \left(\frac{V_{r,max}-V_{r}}{V_{r,max}}\right)\f] /// where: /// - \f$V_l\f$ The actual volume stored by the left water storage @@ -230,7 +230,7 @@ namespace cmf { real Vlmin; /// @brief Target capacity \f$V_{r,max}\f$ real Vrmax; - /// @brief Creates a kinematic wave connection. + /// @brief Creates a linear storage connection, constrained by the fill level of the source /// \f[ q = \frac 1 {t_r} {\left(\frac{V - V_{residual}}{V_0} \right)^\beta} \f] /// @param source Water storage from which the water flows out. Flux is a function of source.volume /// @param target Target node (boundary condition or storage). Does not influence the strength of the flow